Comment.
[dcpomatic.git] / src / lib / job.h
index 8fe87747c2186a465b48799ab8b4734bc9a58fe6..32e71d6581c0bb3767f68dca222cc58ce601aa80 100644 (file)
@@ -40,14 +40,14 @@ class Job : public boost::enable_shared_from_this<Job>, public Signaller, public
 {
 public:
        Job (boost::shared_ptr<const Film>);
-       virtual ~Job() {}
+       virtual ~Job ();
 
        /** @return user-readable name of this job */
        virtual std::string name () const = 0;
        virtual std::string json_name () const = 0;
        /** Run this job in the current thread. */
        virtual void run () = 0;
-       
+
        void start ();
        void pause ();
        void resume ();
@@ -80,6 +80,8 @@ public:
                return _film;
        }
 
+       void when_finished (boost::signals2::connection& connection, boost::function<void()> finished);
+
        boost::signals2::signal<void()> Progress;
        /** Emitted from the UI thread when the job is finished */
        boost::signals2::signal<void()> Finished;
@@ -97,7 +99,7 @@ protected:
                FINISHED_ERROR, ///< the job has finished in error
                FINISHED_CANCELLED ///< the job was cancelled
        };
-       
+
        void set_state (State);
        void set_error (std::string s, std::string d);
 
@@ -106,6 +108,7 @@ protected:
 private:
 
        void run_wrapper ();
+       void set_progress_common (boost::optional<float> p);
 
        boost::thread* _thread;