Various fixes to make audio analysis sort-of work.
[dcpomatic.git] / src / lib / job.h
index 2119db2f3e71a67e6e3ac64f6103e317e0081f02..5a4775180586e7dbed363c6e4ac1bc3bb06ae97b 100644 (file)
@@ -38,7 +38,7 @@ class Film;
 class Job : public boost::enable_shared_from_this<Job>
 {
 public:
-       Job (boost::shared_ptr<Film>);
+       Job (boost::shared_ptr<const Film>);
        virtual ~Job() {}
 
        /** @return user-readable name of this job */
@@ -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
@@ -87,7 +91,7 @@ protected:
        void set_state (State);
        void set_error (std::string s, std::string d);
 
-       boost::shared_ptr<Film> _film;
+       boost::shared_ptr<const Film> _film;
 
 private: