![]() |
dbus-cxx
|
Global DBus namespace, where everything happens. More...
Namespaces | |
namespace | GLib |
namespace | priv |
Private namespace for internal dbux-cxx implementation. | |
namespace | Qt |
namespace | Uv |
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 | ErrorAccessDenied |
class | ErrorAddressInUse |
class | ErrorAuthFailed |
class | ErrorBadAddress |
class | ErrorBadVariantCast |
class | ErrorDeadlock |
class | ErrorDisconnected |
class | ErrorDispatcherInitFailed |
class | ErrorFailed |
class | ErrorFileExists |
class | ErrorFileNotFound |
class | ErrorIncorrectDispatchThread |
class | ErrorInteractiveAuthorizationRequired |
This error is caused attempting to call a D-Bus method which expects ALLOW_INTERACTIVE_AUTHORIZATION to be set when it isn't. More... | |
class | ErrorInvalidAdaptee |
class | ErrorInvalidArgs |
class | ErrorInvalidCObject |
class | ErrorInvalidConnection |
class | ErrorInvalidFileContent |
class | ErrorInvalidMessage |
An invalid message was tried to be parsed. More... | |
class | ErrorInvalidMessageType |
class | ErrorInvalidReturn |
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... | |
class | ErrorInvalidSharedPtr |
class | ErrorInvalidSignature |
class | ErrorInvalidTypecast |
class | ErrorIOError |
class | ErrorLimitsExceeded |
class | ErrorMatchRule |
class | ErrorMatchRuleInvalid |
class | ErrorMatchRuleNotFound |
class | ErrorMessage |
Represents a DBus Error message. More... | |
class | ErrorMessageNestedTooDeep |
class | ErrorNameHasNoOwner |
class | ErrorNoConnection |
class | ErrorNoMemory |
class | ErrorNoNetwork |
class | ErrorNoReply |
class | ErrorNoServer |
class | ErrorNotInitialized |
class | ErrorNotOwner |
class | ErrorNotSupported |
class | ErrorPollFailed |
class | ErrorPropertyReadOnly |
class | ErrorRemoteException |
class | ErrorSELinuxSecurityContextUnknown |
class | ErrorServiceUnknown |
class | ErrorSpawnChildExited |
class | ErrorSpawnChildSignaled |
class | ErrorSpawnExecFailed |
class | ErrorSpawnFailed |
class | ErrorSpawnForkFailed |
class | ErrorTimedOut |
class | ErrorTimeout |
class | ErrorUnableToParse |
We were unable to parse(something is unimplemented?) More... | |
class | ErrorUnexpectedResponse |
This error may be thrown if we receive an unexpected response. More... | |
class | ErrorUnixProcessIdUnknown |
class | ErrorUnknown |
class | ErrorUnknownInterface |
class | ErrorUnknownMethod |
class | ErrorUnknownObject |
class | ErrorUnknownProperty |
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 | InterfaceProxy |
An InterfaceProxy represents a remote Interface in another application on the DBus. More... | |
class | IntrospectableInterfaceProxy |
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 | 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 | MessageIterator |
Extraction iterator allowing values to be retrieved from a message. More... | |
class | Method |
class | MethodBase |
Base class for all methods(proxy and local). More... | |
class | MethodCallMatchRule |
class | MethodProxy |
class | MethodProxy< T_return(T_arg...)> |
MethodProxy specialization for non-void return type. More... | |
class | MethodProxy< void(T_arg...)> |
MethodProxy specialization for void return type. More... | |
class | MethodProxyBase |
Base class for all proxy(remote) methods. More... | |
class | MethodReturnMatchRule |
class | MultipleReturn |
class | Object |
An Object represents a local object that is able to be called over the DBus. More... | |
class | ObjectManagerProxy |
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 | PeerInterfaceProxy |
class | PropertiesInterfaceProxy |
class | Property |
Represents a local DBus property. More... | |
class | PropertyBase |
Base type of Property to allow for storage in e.g. More... | |
class | PropertyProxy |
Represents a remote DBus property. More... | |
class | PropertyProxyBase |
Base type of PropertyProxy to allow for storage in e.g. 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 | SignalMatchRule |
A special MatchRule for signals. More... | |
class | SignalMessage |
Represents a DBus signal message. More... | |
class | SignalProxy |
class | SignalProxy< void(T_arg...)> |
Subclass of the sigc::signal templates. More... | |
class | SignalProxyBase |
Base class for a signal proxy that allows you to listen for signals. 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 | 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 |
typedef std::map< DBus::Path, std::map< std::string, std::map< std::string, DBus::Variant > > > | ObjectManagerObjects |
Functions | |
static void | set_lightweight_thread_ids_to_dispatcher (const std::thread::id thread_id, std::shared_ptr< Object > obj) |
static void | check_for_invalid_thread_ids (const std::vector< std::thread::id > &invalidThreadIds, std::shared_ptr< Object > obj) |
std::shared_ptr< DBus::Connection > | operator<< (std::shared_ptr< DBus::Connection > ptr, std::shared_ptr< DBus::Message > msg) |
std::shared_ptr< DBus::Connection > | operator<< (std::shared_ptr< DBus::Connection > ptr, std::shared_ptr< DBus::ReturnMessage > msg) |
std::shared_ptr< DBus::Connection > | operator<< (std::shared_ptr< DBus::Connection > ptr, std::shared_ptr< DBus::SignalMessage > msg) |
std::shared_ptr< DBus::Connection > | operator<< (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) |
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 |
Global DBus namespace, where everything happens.
typedef std::map<std::shared_ptr<Interface>, sigc::connection> DBus::InterfaceSignalNameConnections |
typedef std::map<DBus::Path,std::map<std::string,std::map<std::string,DBus::Variant> > > DBus::ObjectManagerObjects |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
inline |
References ARRAY, DICT_ENTRY, None, STRUCT, and VARIANT.
Referenced by DBus::Signature::create_signature_tree().
|
inline |
|
inline |
References DICT_ENTRY, None, and STRUCT.
|
static |
References check_for_invalid_thread_ids().
Referenced by check_for_invalid_thread_ids(), and DBus::Connection::remove_invalid_threaddispatchers_and_associated_objects().
|
inline |
DBus::Endianess DBus::default_endianess | ( | ) |
References lib_default_endianess.
Referenced by DBus::Variant::createFromDemarshal(), DBus::Variant::createFromVariant(), DBus::MessageAppendIterator::MessageAppendIterator(), DBus::Variant::recurseArray(), DBus::Message::serialize_to_vector(), DBus::Variant::Variant(), DBus::priv::VariantAppendIterator::VariantAppendIterator(), and DBus::priv::VariantIterator::VariantIterator().
std::string DBus::demangle | ( | ) |
demangle the given type.
Used for debugging purposes.
|
inline |
References Destination, Error_Name, Interface, Member, Path, Reply_Serial, Sender, Signature, and Unix_FDs.
Referenced by DBus::Message::serialize_to_vector().
void DBus::hexdump | ( | const std::vector< uint8_t > * | vec, |
std::ostream * | stream | ||
) |
Print the vector as a hexdump output to the given output stream.
vec | The vector to print |
stream | The stream to print the data to |
References hexdump().
Referenced by hexdump(), DBus::priv::SimpleTransport::readMessage(), DBus::priv::SendmsgTransport::writeMessage(), and DBus::priv::SimpleTransport::writeMessage().
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.
vec | The C array to print |
len | The length of the array |
stream | The stream to print the data to |
|
inline |
References Destination, Error_Name, Interface, Invalid, Member, Path, Reply_Serial, Sender, Signature, and Unix_FDs.
Referenced by DBus::Message::create_from_data().
|
inline |
Referenced by DBus::Signature::create_signature_tree().
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)
void DBus::log_std_err | ( | const char * | logger_name, |
const struct SL_LogLocation * | location, | ||
const enum SL_LogLevel | level, | ||
const char * | log_string | ||
) |
References SL_LogLocation::file, SL_LogLocation::line_number, log_level, and SL_LOGLEVEL_TO_STRING.
Referenced by main().
std::ostream & DBus::operator<< | ( | std::ostream & | os, |
const DBus::Message * | msg | ||
) |
std::ostream & DBus::operator<< | ( | std::ostream & | os, |
const Variant & | var | ||
) |
std::ostream & DBus::operator<< | ( | std::ostream & | os, |
DataType | d | ||
) |
|
inline |
References COMPLETE, DATA_REMAINS, and NEED_MEMORY.
|
inline |
References Handled, Invalid_Interface, Invalid_Method, Invalid_Path, and Not_Handled.
|
inline |
|
inline |
References DBus::Signature::str().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References value.
|
inline |
References value.
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.
endianess |
References lib_default_endianess.
Referenced by configure_endianess().
|
static |
References set_lightweight_thread_ids_to_dispatcher().
Referenced by DBus::Connection::set_dispatching_thread(), and set_lightweight_thread_ids_to_dispatcher().
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
void DBus::set_log_level | ( | const enum SL_LogLevel | level | ) |
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.
void DBus::set_logging_function | ( | simplelogger_log_function | function | ) |
References dbuscxx_log_function.
Referenced by main().
|
inline |
References DBUSCXX_TYPE_BOOLEAN_AS_STRING.
|
inline |
References DBUSCXX_TYPE_INVALID_AS_STRING.
|
inline |
References DBUSCXX_TYPE_VARIANT_AS_STRING.
|
inline |
|
inline |
References DBUSCXX_TYPE_UNIX_FD_AS_STRING.
|
inline |
Referenced by DBus::Variant::createFromVariant(), DBus::priv::dbus_signature< arg1, argn... >::dbus_sig(), DBus::priv::multireturn_signature< arg1, argn... >::introspect(), DBus::priv::method_signature< arg1, argn... >::introspect(), DBus::priv::dbus_function_traits< std::function< T_ret(Args...)> >::introspect(), DBus::Marshaling::marshal(), DBus::MessageAppendIterator::open_container(), DBus::priv::VariantAppendIterator::open_container(), DBus::MessageAppendIterator::operator<<(), DBus::priv::VariantAppendIterator::operator<<(), signature(), and signature_dict_data().
|
inline |
References DBUSCXX_STRUCT_BEGIN_CHAR_AS_STRING, and DBUSCXX_STRUCT_END_CHAR_AS_STRING.
|
inline |
References DBUSCXX_TYPE_ARRAY_AS_STRING, and signature().
|
inline |
References DBUSCXX_TYPE_DOUBLE_AS_STRING.
|
inline |
References DBUSCXX_TYPE_INT16_AS_STRING.
|
inline |
References DBUSCXX_TYPE_INT32_AS_STRING.
|
inline |
References DBUSCXX_TYPE_INT64_AS_STRING.
|
inline |
References DBUSCXX_TYPE_OBJECT_PATH_AS_STRING.
|
inline |
References DBUSCXX_TYPE_SIGNATURE_AS_STRING.
|
inline |
References DBUSCXX_TYPE_STRING_AS_STRING.
|
inline |
References DBUSCXX_TYPE_UINT16_AS_STRING.
|
inline |
References DBUSCXX_TYPE_UINT32_AS_STRING.
|
inline |
References DBUSCXX_TYPE_UINT64_AS_STRING.
|
inline |
References DBUSCXX_TYPE_BYTE_AS_STRING.
|
inline |
|
inline |
Referenced by DBus::MessageAppendIterator::operator<<().
|
inline |
References VARIANT.
|
inline |
References UNIX_FD.
References OBJECT_PATH.
|
inline |
References STRUCT.
|
inline |
References BYTE.
Referenced by DBus::Connection::Connection(), DBus::Connection::create(), DBus::GLib::GLibDispatcher::create_connection(), DBus::Qt::QtDispatcher::create_connection(), DBus::Uv::UvDispatcher::create_connection(), DBus::StandaloneDispatcher::create_connection(), DBus::MatchRule::MatchRule(), DBus::MessageAppendIterator::operator<<(), and operator<<().
|
inline |
|
inline |
|
static |
Referenced by default_endianess(), and set_default_endianess().
|
static |
Referenced by log_std_err(), and set_log_level().
const Signature::size_type DBus::npos = std::string::npos |
Referenced by DBus::Path::append_element(), and DBus::Path::is_valid().