X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fjob.h;h=8b89fd0c383fbbb41c4bb76183588b2a583b08b0;hb=d710869f0a42285e81c72c1e5b9e76886e0d190a;hp=6d8435c60fe29be840a244c18ba949e281614e2d;hpb=b249700e1da7dd6631a8b4440587f4093a2bdef1;p=dcpomatic.git diff --git a/src/lib/job.h b/src/lib/job.h index 6d8435c60..8b89fd0c3 100644 --- a/src/lib/job.h +++ b/src/lib/job.h @@ -50,6 +50,10 @@ public: virtual std::string json_name () const = 0; /** Run this job in the current thread. */ virtual void run () = 0; + /** @return true if it should be possible to notify when this job finishes */ + virtual bool enable_notify () const { + return false; + } void start (); bool pause_by_user (); @@ -81,12 +85,13 @@ public: void set_progress (float, bool force = false); void sub (std::string); boost::optional progress () const; + boost::optional seconds_since_last_progress_update () const; std::shared_ptr film () const { return _film; } - void when_finished (boost::signals2::connection& connection, boost::function finished); + void when_finished (boost::signals2::connection& connection, std::function finished); boost::signals2::signal Progress; /** Emitted from the UI thread when the job is finished */