Merge master.
[dcpomatic.git] / src / lib / job.h
index f5175c525024ee6b4636e73c35f24e58cbc6a06f..40e90b73c72b3c136f0570cf7198018746610a29 100644 (file)
@@ -21,8 +21,8 @@
  *  @brief A parent class to represent long-running tasks which are run in their own thread.
  */
 
-#ifndef DVDOMATIC_JOB_H
-#define DVDOMATIC_JOB_H
+#ifndef DCPOMATIC_JOB_H
+#define DCPOMATIC_JOB_H
 
 #include <string>
 #include <boost/thread/mutex.hpp>
@@ -47,6 +47,8 @@ public:
        virtual void run () = 0;
        
        void start ();
+       void pause ();
+       void resume ();
        void cancel ();
 
        bool is_new () const;
@@ -55,6 +57,7 @@ public:
        bool finished_ok () const;
        bool finished_in_error () const;
        bool finished_cancelled () const;
+       bool paused () const;
 
        std::string error_summary () const;
        std::string error_details () const;
@@ -79,6 +82,7 @@ protected:
        enum State {
                NEW,            ///< the job hasn't been started yet
                RUNNING,        ///< the job is running
+               PAUSED,         ///< the job has been paused
                FINISHED_OK,    ///< the job has finished successfully
                FINISHED_ERROR, ///< the job has finished in error
                FINISHED_CANCELLED ///< the job was cancelled