Merge branch 'master' of /home/carl/git/dvdomatic
[dcpomatic.git] / src / lib / job.h
index 802bf468da24d71a723fc31929d1fcdd0810cca0..f50ed078434efb6cd3661de2802a4c528fb18c7d 100644 (file)
@@ -39,7 +39,7 @@ class Options;
 class Job : public boost::enable_shared_from_this<Job>
 {
 public:
-       Job (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l);
+       Job (boost::shared_ptr<const FilmState> s, boost::shared_ptr<const Options> o, Log* l, boost::shared_ptr<Job> req);
 
        /** @return user-readable name of this job */
        virtual std::string name () const = 0;
@@ -48,6 +48,7 @@ public:
        
        void start ();
 
+       bool is_new () const;
        bool running () const;
        bool finished () const;
        bool finished_ok () const;
@@ -66,6 +67,10 @@ public:
 
        void emit_finished ();
 
+       boost::shared_ptr<Job> required () const {
+               return _required;
+       }
+
        /** Emitted from the GUI thread */
        sigc::signal0<void> Finished;
 
@@ -95,6 +100,8 @@ private:
 
        void run_wrapper ();
 
+       boost::shared_ptr<Job> _required;
+
        /** mutex for _state and _error */
        mutable boost::mutex _state_mutex;
        /** current state of the job */