Dobby
3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
|
IPC service that enables us to invoke remote method and emit signals as well as to handle incoming method calls and received signals. More...
#include <IIpcService.h>
Public Member Functions | |
virtual bool | isValid () const =0 |
Returns true if we initialised ourselves successfully. More... | |
virtual std::shared_ptr< IAsyncReplyGetter > | invokeMethod (const Method &method, const VariantList &args, int timeoutMs=-1)=0 |
Invoke a method and get reply asynchronously. More... | |
virtual bool | invokeMethod (const Method &method, const VariantList &args, VariantList &replyArgs, int timeoutMs=-1)=0 |
Invoke a method and get reply synchronously. More... | |
virtual bool | emitSignal (const Signal &signal, const VariantList &args)=0 |
Emit a signal. More... | |
virtual std::string | registerMethodHandler (const Method &method, const MethodHandler &handler)=0 |
Register a method handler. More... | |
virtual std::string | registerSignalHandler (const Signal &signal, const SignalHandler &handler)=0 |
Register a signal handler. More... | |
virtual bool | unregisterHandler (const std::string ®Id)=0 |
Unregister a method or signal handler. More... | |
virtual bool | enableMonitor (const std::set< std::string > &matchRules, const MonitorHandler &handler)=0 |
Enables monitor mode for the service. More... | |
virtual bool | disableMonitor ()=0 |
Disables monitor mode for the service. More... | |
virtual bool | isServiceAvailable (const std::string &serviceName) const =0 |
Checks if the given service name is currently registered on the bus. More... | |
virtual void | flush ()=0 |
Flushes all messages out. More... | |
virtual bool | start ()=0 |
Start IPC service. More... | |
virtual bool | stop ()=0 |
Stop IPC service. More... | |
virtual std::string | getBusAddress () const =0 |
Returns the dbus address the service is using. More... | |
IPC service that enables us to invoke remote method and emit signals as well as to handle incoming method calls and received signals.
|
pure virtual |
Disables monitor mode for the service.
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Emit a signal.
@parameter[in] signal Signal definition @parameter[in] args Signal arguments/data
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Enables monitor mode for the service.
@parameter[in] matchRules Optional set of match rules for monitor mode, can be empty @parameter[in] handler Handler callback for all events received in monitor mode
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Flushes all messages out.
This method ensures that any message or signal handlers queued before this function was called are processed before the function returns.
For obvious reasons do not hold any lock that a handler might need while calling this function.
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Returns the dbus address the service is using.
Note the address is formatted like a dbus address and is NOT just the path to the unix socket.
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Invoke a method and get reply asynchronously.
@parameter[in] method Method definition @parameter[in] args Method arguments @parameter[in] timeoutMs Timeout in milliseconds, -1 for default (30 seconds)
Implemented in IpcService, and SDBusIpcService.
|
pure virtual |
Invoke a method and get reply synchronously.
@parameter[in] method Method definition @parameter[in] args Method arguments @parameter[in] replyArgs Reply return by the method call @parameter[in] timeoutMs Timeout in milliseconds, -1 for default (30 seconds)
Implemented in IpcService, and SDBusIpcService.
|
pure virtual |
Checks if the given service name is currently registered on the bus.
@parameter[in] serviceName The name of the service to look for
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Returns true if we initialised ourselves successfully.
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Register a method handler.
@parameter[in] method Method definition @parameter[in] handler Method handler
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Register a signal handler.
@parameter[in] method Signal definition @parameter[in] handler Signal handler
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Start IPC service.
It needs to be invoked to start the event dispatcher, which is required to handle method and signals, as well as to get method call reply.
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Stop IPC service.
The event dispatcher thread will be terminated.
Implemented in SDBusIpcService, and IpcService.
|
pure virtual |
Unregister a method or signal handler.
@parameter[in] regId Registration Id
Implemented in SDBusIpcService, and IpcService.