summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/analyse_audio_job.h9
-rw-r--r--src/lib/job.h4
-rw-r--r--src/lib/transcode_job.h3
3 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/analyse_audio_job.h b/src/lib/analyse_audio_job.h
index 864a6a7cd..f8311da47 100644
--- a/src/lib/analyse_audio_job.h
+++ b/src/lib/analyse_audio_job.h
@@ -54,9 +54,12 @@ public:
AnalyseAudioJob (std::shared_ptr<const Film>, std::shared_ptr<const Playlist>, bool from_zero);
~AnalyseAudioJob ();
- std::string name () const;
- std::string json_name () const;
- void run ();
+ std::string name () const override;
+ std::string json_name () const override;
+ void run () override;
+ bool enable_notify () const override {
+ return true;
+ }
boost::filesystem::path path () const {
return _path;
diff --git a/src/lib/job.h b/src/lib/job.h
index b44fd1365..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 ();
diff --git a/src/lib/transcode_job.h b/src/lib/transcode_job.h
index 368a9b685..6b2e8f923 100644
--- a/src/lib/transcode_job.h
+++ b/src/lib/transcode_job.h
@@ -57,6 +57,9 @@ public:
std::string json_name () const override;
void run () override;
std::string status () const override;
+ bool enable_notify () const override {
+ return true;
+ }
void set_encoder (std::shared_ptr<Encoder> t);