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_MULTI_STREAM_HPP
25 #define LAUNCHER_PLUGINS_ABSTRACT_MULTI_STREAM_HPP
27 #include <Noncopyable.hpp>
35 #include <comms/AbstractLauncherCommunicator.hpp>
38 namespace launcher_plugins {
48 namespace launcher_plugins {
57 template <
typename R,
typename ... Args>
66 explicit AbstractMultiStream(comms::AbstractLauncherCommunicatorPtr in_launcherCommunicator);
133 void sendResponse(
const std::set<uint64_t>& in_requestIds, Args... in_responseArgs);
139 PRIVATE_IMPL(m_baseImpl);
std::mutex m_mutex
Definition: AbstractMultiStream.hpp:136
Manages the sending of streamed responses.
Definition: AbstractMultiStream.hpp:58
void onAddRequest(uint64_t in_requestId)
Adds a new request ID to the multi-stream response.
Class which represents a system user.
Definition: User.hpp:55
bool isEmpty() const
Checks whether there are any requests listening to this stream.
AbstractMultiStream(comms::AbstractLauncherCommunicatorPtr in_launcherCommunicator)
Constructor.
void sendResponse(Args... in_responseArgs)
Sends a response to the Launcher for all requests.
virtual void addRequest(uint64_t in_requestId, const system::User &in_requestUser)=0
Adds a request to the stream.
virtual void removeRequest(uint64_t in_requestId)
Removes a request from the multi-stream response.
Class which represents an error.
Definition: Error.hpp:174
void onRemoveRequest(uint64_t in_requestId)
Removes a request from the multi-stream response.
virtual Error initialize()=0
Initializes the response stream.
Class which can be inherited from to disallow copying of its child classes.
Definition: Noncopyable.hpp:34