X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fjob.h;h=f50ed078434efb6cd3661de2802a4c528fb18c7d;hb=13511ed2fcc23f4d5f9c507c775c3c5cfd82d155;hp=b391304792e0a3e9ab0a926ae440b3dfcf806e8d;hpb=922361469072474da4294a90f1436cd0117cb90f;p=dcpomatic.git diff --git a/src/lib/job.h b/src/lib/job.h index b39130479..f50ed0784 100644 --- a/src/lib/job.h +++ b/src/lib/job.h @@ -39,7 +39,7 @@ class Options; class Job : public boost::enable_shared_from_this { public: - Job (boost::shared_ptr s, boost::shared_ptr o, Log* l); + Job (boost::shared_ptr s, boost::shared_ptr o, Log* l, boost::shared_ptr 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 required () const { + return _required; + } + /** Emitted from the GUI thread */ sigc::signal0 Finished; @@ -95,6 +100,8 @@ private: void run_wrapper (); + boost::shared_ptr _required; + /** mutex for _state and _error */ mutable boost::mutex _state_mutex; /** current state of the job */ @@ -119,6 +126,8 @@ private: /** true if this job's progress will always be unknown */ bool _progress_unknown; + + int _ran_for; }; #endif