DBus Namespace Reference

Global DBus namespace, where everything happens. More...

Namespaces

 priv
 Private namespace for internal dbux-cxx implementation.
 

Classes

class  CallMessage
 Represents a DBus call message. More...
 
class  Connection
 Connection point to the DBus. More...
 
class  DBusDaemonProxy
 
class  Demarshaling
 Routines for demarshaling data. More...
 
class  Dispatcher
 A Dispatcher handles all of the reading/writing that a Connection needs in order to work correctly. More...
 
class  Error
 Base class of a hierarchy of error objects thrown when exceptional conditions occur. More...
 
class  ErrorIncorrectDispatchThread
 
class  ErrorRemoteException
 
class  ErrorUnknown
 
class  ErrorBadVariantCast
 
class  ErrorUnableToParse
 We were unable to parse(something is unimplemented?) More...
 
class  ErrorInvalidMessage
 An invalid message was tried to be parsed. More...
 
class  ErrorMessageNestedTooDeep
 
class  ErrorMessage
 Represents a DBus Error message. More...
 
class  FileDescriptor
 A FileDescriptor holds a UNIX file descriptor that can be passed between processes. More...
 
class  Interface
 An Interface represents a local copy of a DBus interface. More...
 
class  MethodProxy
 
class  InterfaceProxy
 An InterfaceProxy represents a remote Interface in another application on the DBus. More...
 
class  Marshaling
 Implements the marshaling algorithms on a given vector of data. More...
 
class  MatchRule
 Immutable class that represents a match rule for DBus. More...
 
class  SignalMatchRule
 A special MatchRule for signals. More...
 
class  MethodCallMatchRule
 
class  MethodReturnMatchRule
 
class  ErrorMatchRule
 
class  MatchRuleBuilder
 A builder to create match rules. More...
 
class  Message
 This class represents a basic DBus message and also serves as a base class for the specialized message types (call, return, signal, error). More...
 
class  MessageAppendIterator
 Insertion iterator allow values to be appended to a message. More...
 
class  MultipleReturn
 
class  MessageIterator
 Extraction iterator allowing values to be retrieved from a message. More...
 
class  MethodBase
 Base class for all methods(proxy and local). More...
 
class  Method
 
class  MethodProxyBase
 Base class for all proxy(remote) methods. More...
 
class  MethodProxy< void(T_arg...)>
 MethodProxy specialization for void return type. More...
 
class  MethodProxy< T_return(T_arg...)>
 MethodProxy specialization for non-void return type. More...
 
class  Object
 An Object represents a local object that is able to be called over the DBus. More...
 
class  ObjectProxy
 Object proxies are local proxies that provide local methods and signals for remote objects with dbus interfaces. More...
 
class  Path
 Represents a DBus Path. More...
 
class  PropertyBase
 Base type of Property to allow for storage in e.g. More...
 
class  Property
 Represents a local DBus property. More...
 
class  PropertyProxyBase
 Base type of PropertyProxy to allow for storage in e.g. More...
 
class  PropertyProxy
 Represents a remote DBus property. More...
 
class  ReturnMessage
 Represents a DBus call return message. More...
 
class  Signal
 
class  Signal< T_ret(T_args...)>
 
class  Signal< void(T_type...)>
 Subclass of sigc::signal. More...
 
class  SignalBase
 Base class of all signals(proxy and adapter). More...
 
class  SignalMessage
 Represents a DBus signal message. More...
 
class  SignalProxy
 
class  SignalProxyBase
 Base class for a signal proxy that allows you to listen for signals. More...
 
class  SignalProxy< void(T_arg...)>
 Subclass of the sigc::signal templates. More...
 
class  Signature
 Represents a DBus signature. More...
 
class  SignatureIterator
 A SignatureIterator allows you to iterate over a given DBus signature, and to extract useful information out of the signature. More...
 
class  StandaloneDispatcher
 The StandaloneDispatcher creates a new thread that handles all of the reading and writing to the bus. More...
 
class  IntrospectableInterfaceProxy
 
class  PeerInterfaceProxy
 
class  PropertiesInterfaceProxy
 
class  ThreadDispatcher
 A ThreadDispatcher is responsible for executing method calls and signals on objects in the given thread. More...
 
class  TypeInfo
 Contains useful data about the type in order for code generation to happen in an easy manner. More...
 
class  Validator
 Contains various static routines for validating and/or sanitizing data. More...
 
class  Variant
 A Variant is a type-safe union for DBus operations. More...
 

Typedefs

typedef std::map< std::shared_ptr< Interface >, sigc::connection > InterfaceSignalNameConnections
 

Enumerations

enum class  BusType { NONE = -1 , SESSION , SYSTEM , STARTER }
 
enum class  PropertyUpdateType { Updates , Invalidates , Const , DoesNotUpdate }
 
enum class  PropertyAccess { ReadOnly , WriteOnly , ReadWrite }
 
enum class  DataType {
  INVALID = '\0' , BYTE = 'y' , BOOLEAN = 'b' , INT16 = 'n' ,
  UINT16 = 'q' , INT32 = 'i' , UINT32 = 'u' , INT64 = 'x' ,
  UINT64 = 't' , DOUBLE = 'd' , STRING = 's' , OBJECT_PATH = 'o' ,
  SIGNATURE = 'g' , ARRAY = 'a' , VARIANT = 'v' , STRUCT = 'r' ,
  DICT_ENTRY = 'e' , UNIX_FD = 'h'
}
 
enum class  ContainerType {
  None , ARRAY = 'a' , VARIANT = 'v' , STRUCT = 'r' ,
  DICT_ENTRY = 'e'
}
 
enum class  MessageType : int32_t {
  INVALID = 0 , CALL = 1 , RETURN = 2 , ERROR = 3 ,
  SIGNAL = 4
}
 
enum class  DispatchStatus { DATA_REMAINS , COMPLETE , NEED_MEMORY }
 
enum class  HandlerResult {
  Handled , Invalid_Interface , Invalid_Method , Invalid_Path ,
  Not_Handled
}
 
enum class  StartReply { FAILED = 0 , SUCCESS , ALREADY_RUNNING }
 
enum class  Endianess { Little , Big }
 
enum class  RegistrationStatus { Success , Failed_Path_in_Use , Failed_Invalid_Object , Failed_No_Thread_Dispatcher }
 
enum class  ThreadForCalling { DispatcherThread , CurrentThread }
 Gives hints to the connection as to which thread should be the one to call the methods on the given object. More...
 
enum class  MessageHeaderFields {
  Invalid = 0 , Path = 1 , Interface = 2 , Member = 3 ,
  Error_Name = 4 , Reply_Serial = 5 , Destination = 6 , Sender = 7 ,
  Signature = 8 , Unix_FDs = 9
}
 
enum class  RequestNameResponse { PrimaryOwner , NameInQueue , NameExists , AlreadyOwner }
 Response status to attempting to register a name on the bus. More...
 
enum class  ReleaseNameResponse { NameReleased , NameNonExistant , NotOwner }
 

Functions

std::shared_ptr< DBus::Connectionoperator<< (std::shared_ptr< DBus::Connection > ptr, std::shared_ptr< DBus::Message > msg)
 
std::shared_ptr< DBus::Connectionoperator<< (std::shared_ptr< DBus::Connection > ptr, std::shared_ptr< DBus::ReturnMessage > msg)
 
std::shared_ptr< DBus::Connectionoperator<< (std::shared_ptr< DBus::Connection > ptr, std::shared_ptr< DBus::SignalMessage > msg)
 
std::shared_ptr< DBus::Connectionoperator<< (std::shared_ptr< DBus::Connection > ptr, std::shared_ptr< DBus::ErrorMessage > msg)
 
template<typename T >
std::string demangle ()
 demangle the given type. More...
 
uint8_t header_field_to_int (MessageHeaderFields header)
 
MessageHeaderFields int_to_header_field (uint8_t val)
 
std::ostream & operator<< (std::ostream &os, Endianess endian)
 
std::ostream & operator<< (std::ostream &os, MessageType type)
 
std::ostream & operator<< (std::ostream &os, DispatchStatus status)
 
std::ostream & operator<< (std::ostream &os, HandlerResult res)
 
 DBUSCXX_ERROR (ErrorFailed, DBUSCXX_ERROR_FAILED)
 
 DBUSCXX_ERROR (ErrorNoMemory, DBUSCXX_ERROR_NO_MEMORY)
 
 DBUSCXX_ERROR (ErrorServiceUnknown, DBUSCXX_ERROR_SERVICE_UNKNOWN)
 
 DBUSCXX_ERROR (ErrorNameHasNoOwner, DBUSCXX_ERROR_NAME_HAS_NO_OWNER)
 
 DBUSCXX_ERROR (ErrorNoReply, DBUSCXX_ERROR_NO_REPLY)
 
 DBUSCXX_ERROR (ErrorIOError, DBUSCXX_ERROR_IO_ERROR)
 
 DBUSCXX_ERROR (ErrorBadAddress, DBUSCXX_ERROR_BAD_ADDRESS)
 
 DBUSCXX_ERROR (ErrorNotSupported, DBUSCXX_ERROR_NOT_SUPPORTED)
 
 DBUSCXX_ERROR (ErrorLimitsExceeded, DBUSCXX_ERROR_LIMITS_EXCEEDED)
 
 DBUSCXX_ERROR (ErrorAccessDenied, DBUSCXX_ERROR_ACCESS_DENIED)
 
 DBUSCXX_ERROR (ErrorAuthFailed, DBUSCXX_ERROR_AUTH_FAILED)
 
 DBUSCXX_ERROR (ErrorNoServer, DBUSCXX_ERROR_NO_SERVER)
 
 DBUSCXX_ERROR (ErrorTimeout, DBUSCXX_ERROR_TIMEOUT)
 
 DBUSCXX_ERROR (ErrorNoNetwork, DBUSCXX_ERROR_NO_NETWORK)
 
 DBUSCXX_ERROR (ErrorAddressInUse, DBUSCXX_ERROR_ADDRESS_IN_USE)
 
 DBUSCXX_ERROR (ErrorDisconnected, DBUSCXX_ERROR_DISCONNECTED)
 
 DBUSCXX_ERROR (ErrorInvalidArgs, DBUSCXX_ERROR_INVALID_ARGS)
 
 DBUSCXX_ERROR (ErrorFileNotFound, DBUSCXX_ERROR_FILE_NOT_FOUND)
 
 DBUSCXX_ERROR (ErrorFileExists, DBUSCXX_ERROR_FILE_EXISTS)
 
 DBUSCXX_ERROR (ErrorUnknownMethod, DBUSCXX_ERROR_UNKNOWN_METHOD)
 
 DBUSCXX_ERROR (ErrorUnknownObject, DBUSCXX_ERROR_UNKNOWN_OBJECT)
 
 DBUSCXX_ERROR (ErrorUnknownInterface, DBUSCXX_ERROR_UNKNOWN_INTERFACE)
 
 DBUSCXX_ERROR (ErrorUnknownProperty, DBUSCXX_ERROR_UNKNOWN_PROPERTY)
 
 DBUSCXX_ERROR (ErrorPropertyReadOnly, DBUSCXX_ERROR_PROPERTY_READ_ONLY)
 
 DBUSCXX_ERROR (ErrorTimedOut, DBUSCXX_ERROR_TIMED_OUT)
 
 DBUSCXX_ERROR (ErrorMatchRuleNotFound, DBUSCXX_ERROR_MATCH_RULE_NOT_FOUND)
 
 DBUSCXX_ERROR (ErrorMatchRuleInvalid, DBUSCXX_ERROR_MATCH_RULE_INVALID)
 
 DBUSCXX_ERROR (ErrorSpawnExecFailed, DBUSCXX_ERROR_SPAWN_EXEC_FAILED)
 
 DBUSCXX_ERROR (ErrorSpawnForkFailed, DBUSCXX_ERROR_SPAWN_FORK_FAILED)
 
 DBUSCXX_ERROR (ErrorSpawnChildExited, DBUSCXX_ERROR_SPAWN_CHILD_EXITED)
 
 DBUSCXX_ERROR (ErrorSpawnChildSignaled, DBUSCXX_ERROR_SPAWN_CHILD_SIGNALED)
 
 DBUSCXX_ERROR (ErrorSpawnFailed, DBUSCXX_ERROR_SPAWN_FAILED)
 
 DBUSCXX_ERROR (ErrorUnixProcessIdUnknown, DBUSCXX_ERROR_UNIX_PROCESS_ID_UNKNOWN)
 
 DBUSCXX_ERROR (ErrorInvalidSignature, DBUSCXX_ERROR_INVALID_SIGNATURE)
 
 DBUSCXX_ERROR (ErrorInvalidFileContent, DBUSCXX_ERROR_INVALID_FILE_CONTENT)
 
 DBUSCXX_ERROR (ErrorSELinuxSecurityContextUnknown, DBUSCXX_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN)
 
 DBUSCXX_ERROR (ErrorInvalidCObject, "Invalid C Object")
 
 DBUSCXX_ERROR (ErrorInvalidTypecast, "Invalid Typecast")
 
 DBUSCXX_ERROR (ErrorInvalidConnection, "DBus connection is invalid")
 
 DBUSCXX_ERROR (ErrorInvalidMessageType, "DBus message type does not match the C++ Message object type")
 
 DBUSCXX_ERROR (ErrorNoConnection, "No connection specified and operation requires a DBus connection")
 
 DBUSCXX_ERROR (ErrorDeadlock, "Locking a mutex a dbus-cxx thread already owns")
 
 DBUSCXX_ERROR (ErrorNotOwner, "Unlocking a mutex a dbus-cxx thread doesn't own")
 
 DBUSCXX_ERROR (ErrorNotInitialized, "DBus::init(bool threadsafe=true) not called")
 
 DBUSCXX_ERROR (ErrorInvalidAdaptee, "DBus adapter method called, but adaptee is invalid")
 
 DBUSCXX_ERROR (ErrorDispatcherInitFailed, "DBus::Dispatcher initialization failed")
 
 DBUSCXX_ERROR (ErrorInvalidSharedPtr, "shared_ptr was invalid")
 
 DBUSCXX_ERROR (ErrorPollFailed, "poll() syscall failed")
 
 DBUSCXX_ERROR (ErrorInvalidReturn, "dbuscxx.Error.InvalidReturnValue")
 This error may be thrown if there is an invalid return value from a DBus function that should never have an invalid return value. More...
 
 DBUSCXX_ERROR (ErrorUnexpectedResponse, "dbuscxx.Error.UnexpectedResponse")
 This error may be thrown if we receive an unexpected response. More...
 
std::ostream & operator<< (std::ostream &os, const DBus::Message *msg)
 
template<typename T >
DBus::MessageIterator operator>> (std::shared_ptr< const DBus::Message > ptr, T &value)
 
template<typename T >
DBus::MessageAppendIterator operator<< (std::shared_ptr< DBus::Message > ptr, const T &value)
 
template<typename... T>
std::string signature (const std::tuple< T... > &)
 
std::string signature (uint8_t)
 
std::string signature (bool)
 
std::string signature (int16_t)
 
std::string signature (uint16_t)
 
std::string signature (int32_t)
 
std::string signature (uint32_t)
 
std::string signature (int64_t)
 
std::string signature (uint64_t)
 
std::string signature (double)
 
std::string signature (std::string)
 
std::string signature (Signature)
 
std::string signature (Path)
 
std::string signature (const DBus::Variant &)
 
std::string signature (const std::shared_ptr< FileDescriptor >)
 
template<typename... T>
std::string signature (const DBus::MultipleReturn< T... > &)
 
template<typename T >
std::string signature (const std::vector< T > &)
 
template<typename Key , typename Data >
std::string signature (const std::map< Key, Data > &)
 
template<typename Key , typename Data >
std::string signature_dict_data (const std::map< Key, Data > &)
 
template<typename... T_arg>
std::string signature_multiple_return_data (const DBus::MultipleReturn< T_arg... > &)
 
template<typename... T_arg>
std::string signature (const std::tuple< T_arg... > &)
 
std::ostream & operator<< (std::ostream &sout, const DBus::Signature &sig)
 
std::ostream & operator<< (std::ostream &os, DataType d)
 
int typeToDBusType (DataType t)
 
int typeToDBusContainerType (ContainerType t)
 
DataType char_to_dbus_type (char c)
 
ContainerType char_to_container_type (char c)
 
bool is_ending_container (char c)
 
ContainerType char_to_ending_container (char c)
 
DataType type (const uint8_t &)
 
DataType type (const bool &)
 
DataType type (const int16_t &)
 
DataType type (const uint16_t &)
 
DataType type (const int32_t &)
 
DataType type (const uint32_t &)
 
DataType type (const int64_t &)
 
DataType type (const uint64_t &)
 
DataType type (const double &)
 
DataType type (const std::string &)
 
DataType type (const char *)
 
DataType type (const Path &)
 
DataType type (const Signature &)
 
template<typename... args>
DataType type (const DBus::Variant &)
 
DataType type (const FileDescriptor &)
 
DataType type (const char &)
 
DataType type (const int8_t &)
 
DataType type (const float &)
 
template<typename T >
DataType type (const std::vector< T > &)
 
template<typename ... T>
DataType type (const std::tuple< T... > &)
 
DataType checked_type_cast (int n)
 
void set_logging_function (simplelogger_log_function function)
 
void log_std_err (const char *logger_name, const struct SL_LogLocation *location, const enum SL_LogLevel level, const char *log_string)
 
void set_log_level (const enum SL_LogLevel level)
 
void hexdump (const std::vector< uint8_t > *vec, std::ostream *stream)
 Print the vector as a hexdump output to the given output stream. More...
 
void hexdump (const uint8_t *vec, const uint32_t len, std::ostream *stream)
 Print the C array as a hexdump output to the given output stream. More...
 
void set_default_endianess (DBus::Endianess endianess)
 Set the default endianess that the library uses in order to send messages. More...
 
DBus::Endianess default_endianess ()
 
void set_logging_function (::simplelogger_log_function function)
 Set the callback function that is used for printing log messages. More...
 
void log_std_err (const char *logger_name, const struct ::SL_LogLocation *location, const enum ::SL_LogLevel level, const char *log_string)
 Log messages to stderr(std::cerr). More...
 
void set_log_level (const enum ::SL_LogLevel level)
 When used in conjunction with DBus::logStdErr, will only print out log messages above the set level. More...
 
std::ostream & operator<< (std::ostream &os, const Variant &var)
 

Variables

const Signature::size_type npos = std::string::npos
 
static enum SL_LogLevel log_level = SL_INFO
 
static Endianess lib_default_endianess = Endianess::Big
 

Detailed Description

Global DBus namespace, where everything happens.

Typedef Documentation

◆ InterfaceSignalNameConnections

typedef std::map<std::shared_ptr<Interface>, sigc::connection> DBus::InterfaceSignalNameConnections

Enumeration Type Documentation

◆ BusType

enum DBus::BusType
strong
Enumerator
NONE 
SESSION 

The login session bus.

SYSTEM 

The systemwide bus.

STARTER 

The bus that started us, if any.

◆ ContainerType

enum DBus::ContainerType
strong
Enumerator
None 
ARRAY 
VARIANT 
STRUCT 
DICT_ENTRY 

◆ DataType

enum DBus::DataType
strong
Enumerator
INVALID 
BYTE 
BOOLEAN 
INT16 
UINT16 
INT32 
UINT32 
INT64 
UINT64 
DOUBLE 
STRING 
OBJECT_PATH 
SIGNATURE 
ARRAY 
VARIANT 
STRUCT 
DICT_ENTRY 
UNIX_FD 

◆ DispatchStatus

enum DBus::DispatchStatus
strong
Enumerator
DATA_REMAINS 
COMPLETE 
NEED_MEMORY 

◆ Endianess

enum DBus::Endianess
strong
Enumerator
Little 
Big 

◆ HandlerResult

enum DBus::HandlerResult
strong
Enumerator
Handled 

This message was handled appropriately.

Invalid_Interface 

This message had an invalid interface.

Invalid_Method 

This message had an invalid method to call.

Invalid_Path 

This message had an invalid path.

Not_Handled 

This message was not handled for some reason.

◆ MessageHeaderFields

Enumerator
Invalid 
Path 
Interface 
Member 
Error_Name 
Reply_Serial 
Destination 
Sender 
Signature 
Unix_FDs 

◆ MessageType

enum DBus::MessageType : int32_t
strong
Enumerator
INVALID 
CALL 
RETURN 
ERROR 
SIGNAL 

◆ PropertyAccess

enum DBus::PropertyAccess
strong
Enumerator
ReadOnly 
WriteOnly 
ReadWrite 

◆ PropertyUpdateType

Enumerator
Updates 

When this property changes, the PropertyChanged signal will be emitted with the new value.

Invalidates 

When this property cahnges, the PropertyChanged signal will be emitted but the new value will not be set in the signal.

Const 

This property does not change during the lifetime.

DoesNotUpdate 

The property does not emit the PropertyChanged signal whenever it changes.

This implies that when you query the property on a proxy, it will always query the value over the bus.

◆ RegistrationStatus

Enumerator
Success 
Failed_Path_in_Use 

Unable to register object: There is already an object exported on this path.

Failed_Invalid_Object 

Unable to register object: invalid object.

Failed_No_Thread_Dispatcher 

Unable to register object: No thread dispatcher for the given thread found.

◆ ReleaseNameResponse

Enumerator
NameReleased 

The name has been released.

NameNonExistant 

The given name does not exist on the bus.

NotOwner 

We are not the owner, and we also were not in the queue waiting to own the name.

◆ RequestNameResponse

Response status to attempting to register a name on the bus.

Enumerator
PrimaryOwner 

The caller is now the primary owner.

NameInQueue 

The caller is in the queue.

NameExists 

The name exists and we cannot get it.

AlreadyOwner 

We are already the owner of the specified name.

◆ StartReply

enum DBus::StartReply
strong
Enumerator
FAILED 
SUCCESS 
ALREADY_RUNNING 

◆ ThreadForCalling

Gives hints to the connection as to which thread should be the one to call the methods on the given object.

Enumerator
DispatcherThread 

Always call methods for this object from the dispatcher thread.

CurrentThread 

Always call methods for this object from the current thread.

Function Documentation

◆ char_to_container_type()

ContainerType DBus::char_to_container_type ( char  c)
inline

◆ char_to_dbus_type()

DataType DBus::char_to_dbus_type ( char  c)
inline

◆ char_to_ending_container()

ContainerType DBus::char_to_ending_container ( char  c)
inline

References DICT_ENTRY, None, and STRUCT.

◆ checked_type_cast()

DataType DBus::checked_type_cast ( int  n)
inline

◆ DBUSCXX_ERROR() [1/50]

DBus::DBUSCXX_ERROR ( ErrorAccessDenied  ,
DBUSCXX_ERROR_ACCESS_DENIED   
)

◆ DBUSCXX_ERROR() [2/50]

DBus::DBUSCXX_ERROR ( ErrorAddressInUse  ,
DBUSCXX_ERROR_ADDRESS_IN_USE   
)

◆ DBUSCXX_ERROR() [3/50]

DBus::DBUSCXX_ERROR ( ErrorAuthFailed  ,
DBUSCXX_ERROR_AUTH_FAILED   
)

◆ DBUSCXX_ERROR() [4/50]

DBus::DBUSCXX_ERROR ( ErrorBadAddress  ,
DBUSCXX_ERROR_BAD_ADDRESS   
)

◆ DBUSCXX_ERROR() [5/50]

DBus::DBUSCXX_ERROR ( ErrorDeadlock  ,
"Locking a mutex a dbus-cxx thread already owns"   
)

◆ DBUSCXX_ERROR() [6/50]

DBus::DBUSCXX_ERROR ( ErrorDisconnected  ,
DBUSCXX_ERROR_DISCONNECTED   
)

◆ DBUSCXX_ERROR() [7/50]

DBus::DBUSCXX_ERROR ( ErrorDispatcherInitFailed  ,
"DBus::Dispatcher initialization failed"   
)

◆ DBUSCXX_ERROR() [8/50]

DBus::DBUSCXX_ERROR ( ErrorFailed  ,
DBUSCXX_ERROR_FAILED   
)

◆ DBUSCXX_ERROR() [9/50]

DBus::DBUSCXX_ERROR ( ErrorFileExists  ,
DBUSCXX_ERROR_FILE_EXISTS   
)

◆ DBUSCXX_ERROR() [10/50]

DBus::DBUSCXX_ERROR ( ErrorFileNotFound  ,
DBUSCXX_ERROR_FILE_NOT_FOUND   
)

◆ DBUSCXX_ERROR() [11/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidAdaptee  ,
"DBus adapter method  called,
but adaptee is invalid"   
)

◆ DBUSCXX_ERROR() [12/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidArgs  ,
DBUSCXX_ERROR_INVALID_ARGS   
)

◆ DBUSCXX_ERROR() [13/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidCObject  ,
"Invalid C Object  
)

◆ DBUSCXX_ERROR() [14/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidConnection  ,
"DBus connection is invalid"   
)

◆ DBUSCXX_ERROR() [15/50]

◆ DBUSCXX_ERROR() [16/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidMessageType  ,
"DBus message type does not match the C++ Message object type  
)

◆ DBUSCXX_ERROR() [17/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidReturn  ,
"dbuscxx.Error.InvalidReturnValue"   
)

This error may be thrown if there is an invalid return value from a DBus function that should never have an invalid return value.

◆ DBUSCXX_ERROR() [18/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidSharedPtr  ,
"shared_ptr was invalid"   
)

◆ DBUSCXX_ERROR() [19/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidSignature  ,
DBUSCXX_ERROR_INVALID_SIGNATURE   
)

◆ DBUSCXX_ERROR() [20/50]

DBus::DBUSCXX_ERROR ( ErrorInvalidTypecast  ,
"Invalid Typecast"   
)

◆ DBUSCXX_ERROR() [21/50]

DBus::DBUSCXX_ERROR ( ErrorIOError  ,
DBUSCXX_ERROR_IO_ERROR   
)

◆ DBUSCXX_ERROR() [22/50]

DBus::DBUSCXX_ERROR ( ErrorLimitsExceeded  ,
DBUSCXX_ERROR_LIMITS_EXCEEDED   
)

◆ DBUSCXX_ERROR() [23/50]

DBus::DBUSCXX_ERROR ( ErrorMatchRuleInvalid  ,
DBUSCXX_ERROR_MATCH_RULE_INVALID   
)

◆ DBUSCXX_ERROR() [24/50]

◆ DBUSCXX_ERROR() [25/50]

DBus::DBUSCXX_ERROR ( ErrorNameHasNoOwner  ,
DBUSCXX_ERROR_NAME_HAS_NO_OWNER   
)

◆ DBUSCXX_ERROR() [26/50]

DBus::DBUSCXX_ERROR ( ErrorNoConnection  ,
"No connection specified and operation requires a DBus connection"   
)

◆ DBUSCXX_ERROR() [27/50]

DBus::DBUSCXX_ERROR ( ErrorNoMemory  ,
DBUSCXX_ERROR_NO_MEMORY   
)

◆ DBUSCXX_ERROR() [28/50]

DBus::DBUSCXX_ERROR ( ErrorNoNetwork  ,
DBUSCXX_ERROR_NO_NETWORK   
)

◆ DBUSCXX_ERROR() [29/50]

DBus::DBUSCXX_ERROR ( ErrorNoReply  ,
DBUSCXX_ERROR_NO_REPLY   
)

◆ DBUSCXX_ERROR() [30/50]

DBus::DBUSCXX_ERROR ( ErrorNoServer  ,
DBUSCXX_ERROR_NO_SERVER   
)

◆ DBUSCXX_ERROR() [31/50]

DBus::DBUSCXX_ERROR ( ErrorNotInitialized  ,
"DBus::init(bool threadsafe=true) not called"   
)

◆ DBUSCXX_ERROR() [32/50]

DBus::DBUSCXX_ERROR ( ErrorNotOwner  ,
"Unlocking a mutex a dbus-cxx thread doesn't own"   
)

◆ DBUSCXX_ERROR() [33/50]

DBus::DBUSCXX_ERROR ( ErrorNotSupported  ,
DBUSCXX_ERROR_NOT_SUPPORTED   
)

◆ DBUSCXX_ERROR() [34/50]

DBus::DBUSCXX_ERROR ( ErrorPollFailed  ,
"poll() syscall failed"   
)

◆ DBUSCXX_ERROR() [35/50]

DBus::DBUSCXX_ERROR ( ErrorPropertyReadOnly  ,
DBUSCXX_ERROR_PROPERTY_READ_ONLY   
)

◆ DBUSCXX_ERROR() [36/50]

◆ DBUSCXX_ERROR() [37/50]

DBus::DBUSCXX_ERROR ( ErrorServiceUnknown  ,
DBUSCXX_ERROR_SERVICE_UNKNOWN   
)

◆ DBUSCXX_ERROR() [38/50]

DBus::DBUSCXX_ERROR ( ErrorSpawnChildExited  ,
DBUSCXX_ERROR_SPAWN_CHILD_EXITED   
)

◆ DBUSCXX_ERROR() [39/50]

◆ DBUSCXX_ERROR() [40/50]

DBus::DBUSCXX_ERROR ( ErrorSpawnExecFailed  ,
DBUSCXX_ERROR_SPAWN_EXEC_FAILED   
)

◆ DBUSCXX_ERROR() [41/50]

DBus::DBUSCXX_ERROR ( ErrorSpawnFailed  ,
DBUSCXX_ERROR_SPAWN_FAILED   
)

◆ DBUSCXX_ERROR() [42/50]

DBus::DBUSCXX_ERROR ( ErrorSpawnForkFailed  ,
DBUSCXX_ERROR_SPAWN_FORK_FAILED   
)

◆ DBUSCXX_ERROR() [43/50]

DBus::DBUSCXX_ERROR ( ErrorTimedOut  ,
DBUSCXX_ERROR_TIMED_OUT   
)

◆ DBUSCXX_ERROR() [44/50]

DBus::DBUSCXX_ERROR ( ErrorTimeout  ,
DBUSCXX_ERROR_TIMEOUT   
)

◆ DBUSCXX_ERROR() [45/50]

DBus::DBUSCXX_ERROR ( ErrorUnexpectedResponse  ,
"dbuscxx.Error.UnexpectedResponse"   
)

This error may be thrown if we receive an unexpected response.

◆ DBUSCXX_ERROR() [46/50]

◆ DBUSCXX_ERROR() [47/50]

DBus::DBUSCXX_ERROR ( ErrorUnknownInterface  ,
DBUSCXX_ERROR_UNKNOWN_INTERFACE   
)

◆ DBUSCXX_ERROR() [48/50]

DBus::DBUSCXX_ERROR ( ErrorUnknownMethod  ,
DBUSCXX_ERROR_UNKNOWN_METHOD   
)

◆ DBUSCXX_ERROR() [49/50]

DBus::DBUSCXX_ERROR ( ErrorUnknownObject  ,
DBUSCXX_ERROR_UNKNOWN_OBJECT   
)

◆ DBUSCXX_ERROR() [50/50]

DBus::DBUSCXX_ERROR ( ErrorUnknownProperty  ,
DBUSCXX_ERROR_UNKNOWN_PROPERTY   
)

◆ default_endianess()

◆ demangle()

template<typename T >
std::string DBus::demangle ( )

demangle the given type.

Used for debugging purposes.

◆ header_field_to_int()

uint8_t DBus::header_field_to_int ( MessageHeaderFields  header)
inline

◆ hexdump() [1/2]

void DBus::hexdump ( const std::vector< uint8_t > *  vec,
std::ostream *  stream 
)

Print the vector as a hexdump output to the given output stream.

Parameters
vecThe vector to print
streamThe stream to print the data to

Referenced by DBus::priv::SimpleTransport::readMessage(), DBus::priv::SendmsgTransport::writeMessage(), and DBus::priv::SimpleTransport::writeMessage().

◆ hexdump() [2/2]

void DBus::hexdump ( const uint8_t *  vec,
const uint32_t  len,
std::ostream *  stream 
)

Print the C array as a hexdump output to the given output stream.

Parameters
vecThe C array to print
lenThe length of the array
streamThe stream to print the data to

◆ int_to_header_field()

MessageHeaderFields DBus::int_to_header_field ( uint8_t  val)
inline

◆ is_ending_container()

bool DBus::is_ending_container ( char  c)
inline

◆ log_std_err() [1/2]

void DBus::log_std_err ( const char *  logger_name,
const struct ::SL_LogLocation location,
const enum ::SL_LogLevel  level,
const char *  log_string 
)

Log messages to stderr(std::cerr).

Format is: [thread-id] [logger-name] [level] - message(file:line)

◆ log_std_err() [2/2]

void DBus::log_std_err ( const char *  logger_name,
const struct SL_LogLocation location,
const enum SL_LogLevel  level,
const char *  log_string 
)

◆ operator<<() [1/13]

std::ostream& DBus::operator<< ( std::ostream &  os,
const DBus::Message msg 
)

◆ operator<<() [2/13]

std::ostream& DBus::operator<< ( std::ostream &  os,
const Variant var 
)

◆ operator<<() [3/13]

std::ostream & DBus::operator<< ( std::ostream &  os,
DataType  d 
)

◆ operator<<() [4/13]

std::ostream& DBus::operator<< ( std::ostream &  os,
DispatchStatus  status 
)
inline

References COMPLETE, DATA_REMAINS, and NEED_MEMORY.

◆ operator<<() [5/13]

std::ostream& DBus::operator<< ( std::ostream &  os,
Endianess  endian 
)
inline

References Little.

◆ operator<<() [6/13]

std::ostream& DBus::operator<< ( std::ostream &  os,
HandlerResult  res 
)
inline

◆ operator<<() [7/13]

std::ostream& DBus::operator<< ( std::ostream &  os,
MessageType  type 
)
inline

References CALL, ERROR, INVALID, RETURN, SIGNAL, and type().

◆ operator<<() [8/13]

std::ostream& DBus::operator<< ( std::ostream &  sout,
const DBus::Signature sig 
)
inline

◆ operator<<() [9/13]

std::shared_ptr< DBus::Connection > DBus::operator<< ( std::shared_ptr< DBus::Connection ptr,
std::shared_ptr< DBus::ErrorMessage msg 
)
inline

◆ operator<<() [10/13]

std::shared_ptr< DBus::Connection > DBus::operator<< ( std::shared_ptr< DBus::Connection ptr,
std::shared_ptr< DBus::Message msg 
)
inline

◆ operator<<() [11/13]

std::shared_ptr< DBus::Connection > DBus::operator<< ( std::shared_ptr< DBus::Connection ptr,
std::shared_ptr< DBus::ReturnMessage msg 
)
inline

◆ operator<<() [12/13]

std::shared_ptr< DBus::Connection > DBus::operator<< ( std::shared_ptr< DBus::Connection ptr,
std::shared_ptr< DBus::SignalMessage msg 
)
inline

◆ operator<<() [13/13]

template<typename T >
DBus::MessageAppendIterator DBus::operator<< ( std::shared_ptr< DBus::Message ptr,
const T &  value 
)
inline

◆ operator>>()

template<typename T >
DBus::MessageIterator DBus::operator>> ( std::shared_ptr< const DBus::Message ptr,
T &  value 
)
inline

◆ set_default_endianess()

void DBus::set_default_endianess ( DBus::Endianess  endianess)

Set the default endianess that the library uses in order to send messages.

By default, all messages are sent in big endian order.

You may also set the environment variable DBUSCXX_ENDIANESS to either 'B' or 'l' to set the endianess. This requires your compiler to have constructor support.

Parameters
endianess

References lib_default_endianess.

Referenced by configure_endianess().

◆ set_log_level() [1/2]

void DBus::set_log_level ( const enum ::SL_LogLevel  level)

When used in conjunction with DBus::logStdErr, will only print out log messages above the set level.

By default, this is set to SL_INFO

◆ set_log_level() [2/2]

void DBus::set_log_level ( const enum SL_LogLevel  level)

References log_level.

◆ set_logging_function() [1/2]

void DBus::set_logging_function ( ::simplelogger_log_function  function)

Set the callback function that is used for printing log messages.

Set this to either your provided function, or use the built-in function DBus::logStdErr.

◆ set_logging_function() [2/2]

void DBus::set_logging_function ( simplelogger_log_function  function)

References dbuscxx_log_function.

◆ signature() [1/19]

std::string DBus::signature ( bool  )
inline

◆ signature() [2/19]

template<typename... T>
std::string DBus::signature ( const DBus::MultipleReturn< T... > &  )
inline

◆ signature() [3/19]

std::string DBus::signature ( const DBus::Variant )
inline

◆ signature() [4/19]

template<typename Key , typename Data >
std::string DBus::signature ( const std::map< Key, Data > &  )
inline

◆ signature() [5/19]

std::string DBus::signature ( const std::shared_ptr< FileDescriptor )
inline

◆ signature() [6/19]

◆ signature() [7/19]

template<typename... T_arg>
std::string DBus::signature ( const std::tuple< T_arg... > &  )
inline

◆ signature() [8/19]

template<typename T >
std::string DBus::signature ( const std::vector< T > &  )
inline

◆ signature() [9/19]

std::string DBus::signature ( double  )
inline

◆ signature() [10/19]

std::string DBus::signature ( int16_t  )
inline

◆ signature() [11/19]

std::string DBus::signature ( int32_t  )
inline

◆ signature() [12/19]

std::string DBus::signature ( int64_t  )
inline

◆ signature() [13/19]

std::string DBus::signature ( Path  )
inline

◆ signature() [14/19]

std::string DBus::signature ( Signature  )
inline

◆ signature() [15/19]

std::string DBus::signature ( std::string  )
inline

◆ signature() [16/19]

std::string DBus::signature ( uint16_t  )
inline

◆ signature() [17/19]

std::string DBus::signature ( uint32_t  )
inline

◆ signature() [18/19]

std::string DBus::signature ( uint64_t  )
inline

◆ signature() [19/19]

std::string DBus::signature ( uint8_t  )
inline

◆ signature_dict_data()

template<typename Key , typename Data >
std::string DBus::signature_dict_data ( const std::map< Key, Data > &  )
inline

◆ signature_multiple_return_data()

template<typename... T_arg>
std::string DBus::signature_multiple_return_data ( const DBus::MultipleReturn< T_arg... > &  )
inline

◆ type() [1/20]

DataType DBus::type ( const bool &  )
inline

References BOOLEAN.

◆ type() [2/20]

DataType DBus::type ( const char &  )
inline

References BYTE.

◆ type() [3/20]

DataType DBus::type ( const char *  )
inline

References STRING.

◆ type() [4/20]

template<typename... args>
DataType DBus::type ( const DBus::Variant )
inline

References VARIANT.

◆ type() [5/20]

DataType DBus::type ( const double &  )
inline

References DOUBLE.

◆ type() [6/20]

DataType DBus::type ( const FileDescriptor )
inline

References UNIX_FD.

◆ type() [7/20]

DataType DBus::type ( const float &  )
inline

References DOUBLE.

◆ type() [8/20]

DataType DBus::type ( const int16_t &  )
inline

References INT16.

◆ type() [9/20]

DataType DBus::type ( const int32_t &  )
inline

References INT32.

◆ type() [10/20]

DataType DBus::type ( const int64_t &  )
inline

References INT64.

◆ type() [11/20]

DataType DBus::type ( const int8_t &  )
inline

References BYTE.

◆ type() [12/20]

DataType DBus::type ( const Path )
inline

References OBJECT_PATH.

◆ type() [13/20]

DataType DBus::type ( const Signature )
inline

References SIGNATURE.

◆ type() [14/20]

DataType DBus::type ( const std::string &  )
inline

References STRING.

◆ type() [15/20]

template<typename ... T>
DataType DBus::type ( const std::tuple< T... > &  )
inline

References STRUCT.

◆ type() [16/20]

template<typename T >
DataType DBus::type ( const std::vector< T > &  )
inline

References ARRAY.

◆ type() [17/20]

DataType DBus::type ( const uint16_t &  )
inline

References UINT16.

◆ type() [18/20]

DataType DBus::type ( const uint32_t &  )
inline

References UINT32.

◆ type() [19/20]

DataType DBus::type ( const uint64_t &  )
inline

References UINT64.

◆ type() [20/20]

◆ typeToDBusContainerType()

int DBus::typeToDBusContainerType ( ContainerType  t)
inline

◆ typeToDBusType()

int DBus::typeToDBusType ( DataType  t)
inline

Variable Documentation

◆ lib_default_endianess

Endianess DBus::lib_default_endianess = Endianess::Big
static

◆ log_level

enum SL_LogLevel DBus::log_level = SL_INFO
static

Referenced by log_std_err(), and set_log_level().

◆ npos

const Signature::size_type DBus::npos = std::string::npos