Dobby
3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
|
Classes | |
struct | Executor |
struct | RegisteredMethod |
struct | RegisteredSignal |
Public Types | |
enum | BusType { SessionBus , SystemBus } |
Public Member Functions | |
SDBusIpcService (BusType busType, const std::string &serviceName, int defaultTimeoutMs=-1) | |
SDBusIpcService (const std::string &busAddress, const std::string &serviceName, int defaultTimeoutMs=-1) | |
bool | isValid () const override |
Returns true if we initialised ourselves successfully. More... | |
std::shared_ptr< AI_IPC::IAsyncReplyGetter > | invokeMethod (const AI_IPC::Method &method, const AI_IPC::VariantList &args, int timeoutMs) override |
bool | invokeMethod (const AI_IPC::Method &method, const AI_IPC::VariantList &args, AI_IPC::VariantList &replyArgs, int timeoutMs) override |
bool | emitSignal (const AI_IPC::Signal &signal, const AI_IPC::VariantList &args) override |
std::string | registerMethodHandler (const AI_IPC::Method &method, const AI_IPC::MethodHandler &handler) override |
std::string | registerSignalHandler (const AI_IPC::Signal &signal, const AI_IPC::SignalHandler &handler) override |
bool | unregisterHandler (const std::string ®Id) override |
bool | enableMonitor (const std::set< std::string > &matchRules, const AI_IPC::MonitorHandler &handler) override |
bool | disableMonitor () override |
void | flush () override |
bool | start () override |
bool | stop () override |
bool | isServiceAvailable (const std::string &serviceName) const override |
std::string | getBusAddress () const override |
Private Attributes | |
uint64_t | mDefaultTimeoutUsecs |
std::thread | mThread |
sd_bus * | mSDBus |
std::atomic< bool > | mStarted |
bool | mValid |
uint64_t | mHandlerTag |
std::map< std::string, RegisteredMethod > | mMethodHandlers |
std::map< std::string, RegisteredSignal > | mSignalHandlers |
uint64_t | mExecCounter |
uint64_t | mLastExecTag |
int | mExecEventFd |
std::mutex | mExecLock |
std::condition_variable | mExecCond |
std::deque< Executor > | mExecQueue |
std::map< uint64_t, std::shared_ptr< SDBusAsyncReplyGetter > > | mCalls |
std::map< uint32_t, sd_bus_message * > | mCallReplies |
std::queue< uint32_t > | mReplyIdentifiers |
Friends | |
class | SDBusAsyncReplySender |
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
This is a NOP for the SDBus implementation.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Checks if the service with the given name serviceName is registered on the bus and therefore available.
Implements AI_IPC::IIpcService.
|
overridevirtual |
Returns true if we initialised ourselves successfully.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Starts the IpcService, this is a bit of NOP for sd-bus, it just sets a flag to say that handlers will now be called.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Stops the IpcService by terminating the event loop thread.
Implements AI_IPC::IIpcService.
|
overridevirtual |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Implements AI_IPC::IIpcService.