RStudio Launcher Plugin SDK
1.1.3
A software development kit for creating plugins that work the the RStudio Launcher.
|
25 #ifndef LAUNCHER_PLUGINS_FILE_OUTPUT_STREAM_HPP
26 #define LAUNCHER_PLUGINS_FILE_OUTPUT_STREAM_HPP
28 #include <api/stream/AbstractOutputStream.hpp>
33 #include <api/Job.hpp>
34 #include <system/DateTime.hpp>
37 namespace launcher_plugins {
58 OutputType in_outputType,
60 AbstractOutputStream::OnOutput in_onOutput,
62 AbstractOutputStream::OnError in_onError,
84 typedef std::function<void()> OnStreamEnd;
93 static void onExitCallback(
94 std::weak_ptr<FileOutputStream> in_weakThis,
95 OutputType in_outputType,
103 static void onFindFileTimerCallback(std::weak_ptr<FileOutputStream> in_weakThis);
114 virtual void onOutput(
const std::string& in_output, OutputType in_outputType);
125 virtual void waitForStreamEnd(
const OnStreamEnd& in_onStreamEnd);
128 PRIVATE_IMPL(m_impl);
Error start() override
Starts the output stream.
Streams job output data to the launcher.
Definition: AbstractOutputStream.hpp:62
void stop() override
Stops the output stream.
virtual ~FileOutputStream()=default
Virtual destructor for inheritance.
std::function< void(uint64_t)> OnComplete
Definition: AbstractOutputStream.hpp:66
Class which represents an error.
Definition: Error.hpp:174
Represents an duration of time (e.g. 5 hours, 43 minutes, and 21 seconds) as opposed to a point in ti...
Definition: DateTime.hpp:48
static TimeDuration Seconds(int64_t in_seconds)
Constructs an TimeDuration which represents the specified number of seconds.
FileOutputStream(OutputType in_outputType, api::JobPtr in_job, AbstractOutputStream::OnOutput in_onOutput, AbstractOutputStream::OnComplete in_onComplete, AbstractOutputStream::OnError in_onError, system::TimeDuration in_maxWaitTime=system::TimeDuration::Seconds(10))
Constructor.
Streams job output data from a file.
Definition: FileOutputStream.hpp:43