summaryrefslogtreecommitdiff
path: root/src/lib/job.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-10 12:53:06 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-10 12:53:06 +0100
commit9dd38ef2f05b24ba669acb9805e0914ac227fff2 (patch)
treeaa3b2e4d768764238bb498ca8ad62056cfb95809 /src/lib/job.h
parenta097506d4867fec47406283caa5b262a21791585 (diff)
Try to not start jobs if a dependant fails.
Diffstat (limited to 'src/lib/job.h')
-rw-r--r--src/lib/job.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/job.h b/src/lib/job.h
index 802bf468d..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<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 */