RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
24 #ifndef LAUNCHER_PLUGINS_JOB_REPOSITORY_HPP
25 #define LAUNCHER_PLUGINS_JOB_REPOSITORY_HPP
27 #include <Noncopyable.hpp>
30 #include <api/Job.hpp>
31 #include <jobs/JobStatusNotifier.hpp>
34 namespace launcher_plugins {
44 namespace launcher_plugins {
72 void addJob(
const api::JobPtr& in_job);
112 void removeJob(
const std::string& in_jobId);
124 virtual Error loadJobs(api::JobList& out_jobs)
const = 0;
131 virtual void onJobAdded(
const api::JobPtr& in_job);
138 virtual void onJobRemoved(
const api::JobPtr& in_job);
145 virtual Error onInitialize();
148 PRIVATE_IMPL(m_impl);
152 typedef std::shared_ptr<AbstractJobRepository> JobRepositoryPtr;
Class which represents a system user.
Definition: User.hpp:55
Error initialize()
Initializes the AbstractJobRepository.
Stores any jobs currently in the job scheduling system.
Definition: AbstractJobRepository.hpp:50
void removeJob(const std::string &in_jobId)
Removes a job from the repository.
virtual ~AbstractJobRepository()=default
Virtual Destructor, to allow for inheritance, if necessary.
void addJob(const api::JobPtr &in_job)
Adds the job to the repository.
Class which represents an error.
Definition: Error.hpp:174
AbstractJobRepository(JobStatusNotifierPtr in_jobStatusNotifier)
Constructor.
api::JobList getJobs(const system::User &in_use=system::User()) const
Gets all jobs belonging to the specified user.
Class which can be inherited from to disallow copying of its child classes.
Definition: Noncopyable.hpp:34
api::JobPtr getJob(const std::string &in_jobId, const system::User &in_user=system::User()) const
Gets the specified job for the specified user from the repository.