xbmc
Public Member Functions | List of all members
CDBusMessage Class Reference

Public Member Functions

 CDBusMessage (const char *destination, const char *object, const char *interface, const char *method)
 
 CDBusMessage (std::string const &destination, std::string const &object, std::string const &interface, std::string const &method)
 
void AppendObjectPath (const char *object)
 
template<typename T >
void AppendArgument (const T arg)
 
void AppendArgument (const char **arrayString, unsigned int length)
 
template<typename TFirst >
void AppendArguments (const TFirst first)
 
template<typename TFirst , typename... TArgs>
void AppendArguments (const TFirst first, const TArgs... args)
 
DBusMessageIter * GetArgumentIter ()
 
template<typename... TArgs>
bool GetReplyArguments (TArgs *... args)
 Retrieve simple arguments from DBus reply message. More...
 
DBusMessage * SendSystem ()
 
DBusMessage * SendSession ()
 
DBusMessage * SendSystem (CDBusError &error)
 
DBusMessage * SendSession (CDBusError &error)
 
bool SendAsyncSystem ()
 
bool SendAsyncSession ()
 
DBusMessage * Send (DBusBusType type)
 
DBusMessage * Send (DBusBusType type, CDBusError &error)
 
DBusMessage * Send (DBusConnection *con, CDBusError &error)
 
template<>
void AppendArgument (const bool arg)
 
template<>
void AppendArgument (const bool arg)
 

Member Function Documentation

◆ GetReplyArguments()

template<typename... TArgs>
bool CDBusMessage::GetReplyArguments ( TArgs *...  args)
inline

Retrieve simple arguments from DBus reply message.

You MUST use the correct fixed-width integer typedefs (e.g. std::uint16_t) corresponding to the DBus types for the variables or you will get potentially differing behavior between architectures since the DBus argument type detection is based on the width of the type.

Complex arguments (arrays, structs) are not supported.

Returned pointers for strings are only valid until the instance of this class is deleted.

Exceptions
std::logic_errorif the message has no reply
Returns
whether all arguments could be retrieved (false on argument type mismatch or when more arguments were to be retrieved than there are in the message)

The documentation for this class was generated from the following files: