RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
24 #ifndef LAUNCHER_PLUGINS_ABSTRACT_OUTPUT_STREAM_HPP
25 #define LAUNCHER_PLUGINS_ABSTRACT_OUTPUT_STREAM_HPP
32 #include <api/Job.hpp>
35 namespace launcher_plugins {
67 typedef std::function<void(
const Error&)> OnError;
68 typedef std::function<void(
const std::string&, OutputType, uint64_t)> OnOutput;
85 virtual void stop() = 0;
99 OutputType in_outputType,
101 OnOutput in_onOutput,
111 void reportData(
const std::string& in_data, OutputType in_outputType);
134 PRIVATE_IMPL(m_baseImpl);
137 typedef std::shared_ptr<AbstractOutputStream> OutputStreamPtr;
Streams job output data to the launcher.
Definition: AbstractOutputStream.hpp:62
std::function< void(uint64_t)> OnComplete
Definition: AbstractOutputStream.hpp:66
void reportData(const std::string &in_data, OutputType in_outputType)
Reports output to the launcher.
void reportError(const Error &in_error)
Reports an error to the launcher.
virtual Error start()=0
Starts the output stream.
virtual ~AbstractOutputStream()=default
Virtual destructor for inheritance.
OutputType m_outputType
Definition: AbstractOutputStream.hpp:127
virtual void stop()=0
Stops the output stream.
void setStreamComplete()
Notifies the base class that the output stream has completed (i.e. all output of the specified type h...
Class which represents an error.
Definition: Error.hpp:174
JobPtr m_job
Definition: AbstractOutputStream.hpp:130
AbstractOutputStream(OutputType in_outputType, JobPtr in_job, OnOutput in_onOutput, OnComplete in_onComplete, OnError in_onError)
Constructor.