summaryrefslogtreecommitdiff
path: root/src/lib/job.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-12-05 00:24:56 +0100
committerCarl Hetherington <cth@carlh.net>2021-12-06 22:42:06 +0100
commit03f138ee007efd175c85d7c63f8deec567065d89 (patch)
tree7d76f7f482525a05f1bd6c37d04117c66346850e /src/lib/job.h
parent6e93ff6ac5b514d1b8dd9ccb2d6372576a52761a (diff)
Use a virtual method rather than a set of nasty dynamic casts.
Diffstat (limited to 'src/lib/job.h')
-rw-r--r--src/lib/job.h4
1 files changed, 4 insertions, 0 deletions
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 ();