// Signal/slot mechanism
#include <boost/signal.hpp>
#include <boost/bind.hpp>
+#include <boost/thread/mutex.hpp>
namespace creaImageIO
{
///Thread method called upon exiting
void OnExit();
///Sets the new state of adding files
- void SetAddFilesState(bool addFiles){wxMutexLocker lock(mMutex);mAddFiles=addFiles;}
+ void SetAddFilesState(bool addFiles){boost::mutex::scoped_lock lock(mMutex);mAddFiles=addFiles;}
///Sets the new state of removing files
- void SetRemoveFilesState(bool removeFiles){wxMutexLocker lock(mMutex);mRemoveFiles=removeFiles;}
+ void SetRemoveFilesState(bool removeFiles){boost::mutex::scoped_lock lock(mMutex);mRemoveFiles=removeFiles;}
///Sets the new monitored drive
- void SetMonitoredDrive(const std::string& dr){wxMutexLocker lock(mMutex);mDrive=dr;}
+ void SetMonitoredDrive(const std::string& dr){boost::mutex::scoped_lock lock(mMutex);mDrive=dr;}
///Puts the name of the monitored drive in the given string
void GetMonitoredDrive(std::string& drive){drive=mDrive;}
private:
/// The mutex
- wxMutex mMutex;
+ boost::mutex mMutex;
/// Boolean that declares if the files that are read on CD mount should be added
bool mAddFiles;
/// Boolean that declares if, on CD unmount, the files that were in the drive should be removed