23 #ifndef DOBBYIPCUTILS_H
24 #define DOBBYIPCUTILS_H
26 #include "IDobbyIPCUtils.h"
28 #include <IIpcService.h>
47 const std::shared_ptr<AI_IPC::IIpcService> &systemIpcService);
53 const AI_IPC::VariantList &args,
54 int timeoutMs)
const override;
58 const AI_IPC::VariantList &args,
59 AI_IPC::VariantList &replyArgs)
const override;
63 const AI_IPC::VariantList &args)
const override;
66 const std::string &serviceName)
const override;
69 const std::string &serviceName,
70 const std::function<
void(
bool)> &handlerFunc)
override;
74 const AI_IPC::SignalHandler &handlerFunc)
override;
77 int handlerId)
override;
89 std::map<BusType, std::shared_ptr<DobbyIpcBus>> mIpcBuses;
Utility methods for IPC in Dobby.
Definition: DobbyIPCUtils.h:44
bool ipcServiceAvailable(const BusType &bus, const std::string &serviceName) const override
Queries if the given service is available on the bus.
Definition: DobbyIPCUtils.cpp:339
void ipcUnregisterHandler(const BusType &bus, int handlerId) override
Unregisters either a service or signal handler.
Definition: DobbyIPCUtils.cpp:245
int ipcRegisterSignalHandler(const BusType &bus, const AI_IPC::Signal &signal, const AI_IPC::SignalHandler &handlerFunc) override
Registers a callback function that will be called when the given signal is received on the bus.
Definition: DobbyIPCUtils.cpp:186
bool ipcEmitSignal(const BusType &bus, const AI_IPC::Signal &signal, const AI_IPC::VariantList &args) const override
Sends out a signal over dbus.
Definition: DobbyIPCUtils.cpp:318
bool setAIDbusAddress(bool privateBus, const std::string &address)
Sets the dbus address for one of the AI dbus-daemons.
Definition: DobbyIPCUtils.cpp:95
std::string ipcDbusSocketPath(const BusType &bus) const override
Returns just the path to the socket for the dbus daemon.
Definition: DobbyIPCUtils.cpp:156
std::shared_ptr< DobbyIpcBus > getIpcBus(const BusType &bus) const
Utility function to simply return the bus object associated with the given bus id.
Definition: DobbyIPCUtils.cpp:73
std::string ipcDbusAddress(const BusType &bus) const override
Returns complete address to the dbus daemon.
Definition: DobbyIPCUtils.cpp:134
std::shared_ptr< AI_IPC::IAsyncReplyGetter > ipcInvokeMethod(const BusType &bus, const AI_IPC::Method &method, const AI_IPC::VariantList &args, int timeoutMs) const override
Invokes the ipc method.
Definition: DobbyIPCUtils.cpp:269
int ipcRegisterServiceHandler(const BusType &bus, const std::string &serviceName, const std::function< void(bool)> &handlerFunc) override
Registers a callback function that will be called when the given service is added or removed from the...
Definition: DobbyIPCUtils.cpp:223
Wraps an IPC service object on a given bus.
Definition: DobbyIpcBus.h:58
Definition: IDobbyIPCUtils.h:47
BusType
The type of dbus to call methods on / emit signals.
Definition: IDobbyIPCUtils.h:60
Method identified by a service, object, interface and method name itself.
Definition: IpcCommon.h:90
Method identified by object, interface and signal name itself.
Definition: IpcCommon.h:105