]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOListener.h
move directory
[creaImageIO.git] / src2 / creaImageIOListener.h
index 32b4caa1adc51a6fdf5f1605aecf06b67b8050a4..fe65ed80075ae65797548e158390c959a16f366c 100644 (file)
@@ -8,6 +8,7 @@
 // Signal/slot mechanism
 #include <boost/signal.hpp>
 #include <boost/bind.hpp>
+#include <boost/thread/mutex.hpp>
 
 namespace creaImageIO
 {
@@ -24,11 +25,11 @@ 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;}
 
@@ -48,7 +49,7 @@ namespace creaImageIO
 
   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