RStudio Launcher Plugin SDK  1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
LocalPluginApi.hpp
1 /*
2  * LocalPluginApi.hpp
3  *
4  * Copyright (C) 2019-20 by RStudio, PBC
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
7  * documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
12  * Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
15  * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
17  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
18  *
19  */
20 
21 #ifndef LAUNCHER_PLUGINS_LOCAL_PLUGIN_API_HPP
22 #define LAUNCHER_PLUGINS_LOCAL_PLUGIN_API_HPP
23 
24 #include <api/AbstractPluginApi.hpp>
25 
26 #include "LocalJobSource.hpp"
27 #include "LocalJobRepository.hpp"
28 
29 namespace rstudio {
30 namespace launcher_plugins {
31 namespace comms {
32 
33 class AbstractLauncherCommunicator;
34 
35 }
36 }
37 }
38 
39 namespace rstudio {
40 namespace launcher_plugins {
41 namespace local {
42 
47 {
48 public:
57  std::string in_hostname,
58  std::shared_ptr<comms::AbstractLauncherCommunicator> in_launcherCommunicator);
59 
60 private:
69  jobs::JobRepositoryPtr createJobRepository(
70  const jobs::JobStatusNotifierPtr& in_jobStatusNotifier) const override;
80  std::shared_ptr<api::IJobSource> createJobSource(
81  jobs::JobRepositoryPtr in_jobRepository,
82  jobs::JobStatusNotifierPtr in_jobStatusNotifier) const override;
83 
90  Error doInitialize() override;
91 
93  std::string m_hostname;
94 };
95 
96 } // namespace local
97 } // namespace launcher_plugins
98 } // namespace rstudio
99 
100 #endif
rstudio::launcher_plugins::local::LocalPluginApi::LocalPluginApi
LocalPluginApi(std::string in_hostname, std::shared_ptr< comms::AbstractLauncherCommunicator > in_launcherCommunicator)
Constructor.
rstudio::launcher_plugins::Error
Class which represents an error.
Definition: Error.hpp:174
rstudio::launcher_plugins::local::LocalPluginApi
Launcher Plugin API for the Local Plugin.
Definition: LocalPluginApi.hpp:46
rstudio::launcher_plugins::api::AbstractPluginApi
Base class for the Launcher Plugin API.
Definition: AbstractPluginApi.hpp:50