* @brief A parent class to represent long-running tasks which are run in their own thread.
*/
-#ifndef DVDOMATIC_JOB_H
-#define DVDOMATIC_JOB_H
+#ifndef DCPOMATIC_JOB_H
+#define DCPOMATIC_JOB_H
#include <string>
#include <boost/thread/mutex.hpp>
virtual void run () = 0;
void start ();
+ void pause ();
+ void resume ();
void cancel ();
bool is_new () const;
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;
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