26 #ifndef AI_IPC_IPCCOMMON_H
27 #define AI_IPC_IPCCOMMON_H
29 #include "IpcVariantList.h"
31 #include <sys/types.h>
61 std::string interface;
66 if (
object.empty() || interface.empty() || name.empty())
68 if ((type == METHOD) && service.empty())
82 RemoteEntry(Type type_,
const std::string& service_,
const std::string& object_,
const std::string& interface_,
const std::string& name_)
83 : type(type_), service(service_), object(object_), interface(interface_), name(name_) {}
94 Method(
const std::string& service_,
const std::string& object_,
const std::string& interface_,
const std::string& name_)
95 :
RemoteEntry(METHOD, service_, object_, interface_, name_) {}
109 Signal(
const std::string& object_,
const std::string& interface_,
const std::string& name_)
110 :
RemoteEntry(SIGNAL, std::string(), object_, interface_, name_) {}
134 virtual bool sendReply(
const VariantList& replyArgs) = 0;
180 typedef std::function<void(std::shared_ptr<IAsyncReplySender>)> MethodHandler;
185 typedef std::function<void(
const VariantList&)> SignalHandler;
190 typedef std::function<void(EventType,
197 const VariantList&)> MonitorHandler;
Helper class to get reply.
Definition: IpcCommon.h:151
virtual bool getReply(VariantList &argList)=0
Get reply.
Helper class to send reply of a method call asynchronously.
Definition: IpcCommon.h:117
virtual std::string getSenderName() const =0
Gets the unique name of the connection which originated this message.
virtual VariantList getMethodCallArguments() const =0
Get method call arguments.
virtual uid_t getSenderUid() const =0
Get Id of the user (unix user Id) who invoked the method.
virtual bool sendReply(const VariantList &replyArgs)=0
Send reply.
Method identified by a service, object, interface and method name itself.
Definition: IpcCommon.h:90
Remote entry, which can be either a signal or method.
Definition: IpcCommon.h:51
Method identified by object, interface and signal name itself.
Definition: IpcCommon.h:105