24 #ifndef LAUNCHER_PLUGINS_JOB_STATUS_NOTIFIER_HPP
25 #define LAUNCHER_PLUGINS_JOB_STATUS_NOTIFIER_HPP
27 #include <Noncopyable.hpp>
34 #include <api/Job.hpp>
35 #include <system/DateTime.hpp>
38 namespace launcher_plugins {
42 class AbstractJobRepository;
45 typedef std::shared_ptr<Subscription> SubscriptionHandle;
48 typedef std::function<void(
const api::JobPtr&)> OnJobStatusUpdate;
55 public std::enable_shared_from_this<JobStatusNotifier>
70 SubscriptionHandle
subscribe(
const OnJobStatusUpdate& in_onJobStatusUpdate);
81 SubscriptionHandle
subscribe(
const std::string& in_jobId,
const OnJobStatusUpdate& in_onJobStatusUpdate);
95 const api::JobPtr& in_job,
97 const std::string& in_statusMessage =
"",
102 PRIVATE_IMPL(m_impl);
104 friend class Subscription;
108 typedef std::shared_ptr<JobStatusNotifier> JobStatusNotifierPtr;