dbus-cxx logo

utility.h File Reference

#include <typeinfo>
#include <string>
#include <sigc++/sigc++.h>
#include <dbus-cxx/dbus-cxx-config.h>
#include <dbus-cxx/enums.h>
#include <dbus-cxx/pointer.h>
#include <dbus-cxx/path.h>
#include <dbus-cxx/signature.h>
Include dependency graph for utility.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  DBus

Defines

#define DBUS_CXX_PARAM_LIMIT   7
#define DEBUG_OUT(x, y)   ;
#define DBUS_CXX_DEBUG(x)   ;
#define DBUS_CXX_INTROSPECTABLE_INTERFACE   "org.freedesktop.DBus.Introspectable"
#define DBUS_CXX_ITERATOR_SUPPORT(CppType, DBusType)
 Provides support for unsupported types that can be cast to DBus supported types.

Typedefs

typedef sigc::nil DBus::nil

Functions

void DBus::init (bool threadsafe)
bool DBus::initialized ()
std::string DBus::introspect (DBusCxxPointer< Connection > conn, const std::string &destination, const std::string &path)
std::string DBus::signature (uint8_t)
std::string DBus::signature (bool)
std::string DBus::signature (int16_t)
std::string DBus::signature (uint16_t)
std::string DBus::signature (int32_t)
std::string DBus::signature (uint32_t)
std::string DBus::signature (int64_t)
std::string DBus::signature (uint64_t)
std::string DBus::signature (double)
std::string DBus::signature (std::string)
std::string DBus::signature (Signature)
std::string DBus::signature (Path)
std::string DBus::signature (char)
std::string DBus::signature (int8_t)
std::string DBus::signature (long int)
std::string DBus::signature (long unsigned int)
std::string DBus::signature (float)
template<typename T >
std::string DBus::signature ()
template<>
std::string DBus::signature< uint8_t > ()
template<>
std::string DBus::signature< bool > ()
template<>
std::string DBus::signature< int16_t > ()
template<>
std::string DBus::signature< uint16_t > ()
template<>
std::string DBus::signature< int32_t > ()
template<>
std::string DBus::signature< uint32_t > ()
template<>
std::string DBus::signature< int64_t > ()
template<>
std::string DBus::signature< uint64_t > ()
template<>
std::string DBus::signature< double > ()
template<>
std::string DBus::signature< std::string > ()
template<>
std::string DBus::signature< Signature > ()
template<>
std::string DBus::signature< Path > ()
template<>
std::string DBus::signature< char > ()
template<>
std::string DBus::signature< int8_t > ()
template<>
std::string DBus::signature< long int > ()
template<>
std::string DBus::signature< long unsigned int > ()
template<>
std::string DBus::signature< float > ()
template<>
std::string DBus::signature< std::vector< uint8_t > > ()
template<>
std::string DBus::signature< std::vector< bool > > ()
template<>
std::string DBus::signature< std::vector< int16_t > > ()
template<>
std::string DBus::signature< std::vector< uint16_t > > ()
template<>
std::string DBus::signature< std::vector< int32_t > > ()
template<>
std::string DBus::signature< std::vector< uint32_t > > ()
template<>
std::string DBus::signature< std::vector< int64_t > > ()
template<>
std::string DBus::signature< std::vector< uint64_t > > ()
template<>
std::string DBus::signature< std::vector< double > > ()
template<>
std::string DBus::signature< std::vector< char > > ()
template<>
std::string DBus::signature< std::vector< int8_t > > ()
template<>
std::string DBus::signature< std::vector< long int > > ()
template<>
std::string DBus::signature< std::vector< long unsigned int > > ()
template<>
std::string DBus::signature< std::vector< float > > ()
Type DBus::type (uint8_t)
Type DBus::type (bool)
Type DBus::type (int16_t)
Type DBus::type (uint16_t)
Type DBus::type (int32_t)
Type DBus::type (uint32_t)
Type DBus::type (int64_t)
Type DBus::type (uint64_t)
Type DBus::type (double)
Type DBus::type (const std::string &)
Type DBus::type (const char *)
Type DBus::type (Path)
Type DBus::type (Signature)
Type DBus::type (char)
Type DBus::type (int8_t)
Type DBus::type (long int)
Type DBus::type (long unsigned int)
Type DBus::type (float)
template<typename T >
Type DBus::type ()
template<>
Type DBus::type< uint8_t > ()
template<>
Type DBus::type< bool > ()
template<>
Type DBus::type< int16_t > ()
template<>
Type DBus::type< uint16_t > ()
template<>
Type DBus::type< int32_t > ()
template<>
Type DBus::type< uint32_t > ()
template<>
Type DBus::type< int64_t > ()
template<>
Type DBus::type< uint64_t > ()
template<>
Type DBus::type< double > ()
template<>
Type DBus::type< const std::string & > ()
template<>
Type DBus::type< const char * > ()
template<>
Type DBus::type< Path > ()
template<>
Type DBus::type< Signature > ()
template<>
Type DBus::type< char > ()
template<>
Type DBus::type< int8_t > ()
template<>
Type DBus::type< long int > ()
template<>
Type DBus::type< long unsigned int > ()
template<>
Type DBus::type< float > ()
std::string DBus::type_string (uint8_t)
std::string DBus::type_string (bool)
std::string DBus::type_string (int16_t)
std::string DBus::type_string (uint16_t)
std::string DBus::type_string (int32_t)
std::string DBus::type_string (uint32_t)
std::string DBus::type_string (int64_t)
std::string DBus::type_string (uint64_t)
std::string DBus::type_string (double)
std::string DBus::type_string (std::string)
std::string DBus::type_string (Path)
std::string DBus::type_string (Signature)
template<typename T >
std::string DBus::type_string ()
template<>
std::string DBus::type_string< uint8_t > ()
template<>
std::string DBus::type_string< bool > ()
template<>
std::string DBus::type_string< int16_t > ()
template<>
std::string DBus::type_string< uint16_t > ()
template<>
std::string DBus::type_string< int32_t > ()
template<>
std::string DBus::type_string< uint32_t > ()
template<>
std::string DBus::type_string< int64_t > ()
template<>
std::string DBus::type_string< uint64_t > ()
template<>
std::string DBus::type_string< double > ()
template<>
std::string DBus::type_string< std::string > ()
template<>
std::string DBus::type_string< Path > ()
template<>
std::string DBus::type_string< Signature > ()
std::string DBus::type_string_from_code (DBus::Type t)
Type DBus::checked_type_cast (int n)

Define Documentation

#define DBUS_CXX_DEBUG (  )     ;

Referenced by DBus::Object::add_interface(), DBus::Interface::add_signal(), DBus::Connection::add_signal_proxy(), DBus::Dispatcher::dispatch_thread_main(), DBus::Method< void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil >::handle_call_message(), DBus::Method< void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil, nil >::handle_call_message(), DBus::Method< void, T_arg1, T_arg2, T_arg3, T_arg4, nil, nil, nil >::handle_call_message(), DBus::Method< void, T_arg1, T_arg2, T_arg3, nil, nil, nil, nil >::handle_call_message(), DBus::Method< void, T_arg1, T_arg2, nil, nil, nil, nil, nil >::handle_call_message(), DBus::Method< void, T_arg1, nil, nil, nil, nil, nil, nil >::handle_call_message(), DBus::Method< void, nil, nil, nil, nil, nil, nil, nil >::handle_call_message(), DBus::Method< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil >::handle_call_message(), DBus::Method< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil, nil >::handle_call_message(), DBus::Method< T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil, nil, nil >::handle_call_message(), DBus::Method< T_return, T_arg1, T_arg2, T_arg3, nil, nil, nil, nil >::handle_call_message(), DBus::Method< T_return, T_arg1, T_arg2, nil, nil, nil, nil, nil >::handle_call_message(), DBus::Method< T_return, T_arg1, nil, nil, nil, nil, nil, nil >::handle_call_message(), DBus::Method< T_return, nil, nil, nil, nil, nil, nil, nil >::handle_call_message(), DBus::Method< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >::handle_call_message(), DBus::SignalReceiver::handle_message(), DBus::signal< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil >::internal_callback(), DBus::signal< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil, nil >::internal_callback(), DBus::signal< T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil, nil, nil >::internal_callback(), DBus::signal< T_return, T_arg1, T_arg2, T_arg3, nil, nil, nil, nil >::internal_callback(), DBus::signal< T_return, T_arg1, T_arg2, nil, nil, nil, nil, nil >::internal_callback(), DBus::signal< T_return, T_arg1, nil, nil, nil, nil, nil, nil >::internal_callback(), DBus::signal< T_return, nil, nil, nil, nil, nil, nil, nil >::internal_callback(), DBus::signal< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >::internal_callback(), DBus::Dispatcher::on_add_timeout(), DBus::Connection::on_add_timeout_callback(), DBus::Dispatcher::on_add_watch(), DBus::Dispatcher::on_dispatch_status_changed(), DBus::Connection::on_filter_callback(), DBus::Glib::Dispatcher::on_glibmm_dispatch(), DBus::Dispatcher::on_remove_timeout(), DBus::Connection::on_remove_timeout_callback(), DBus::Dispatcher::on_remove_watch(), DBus::Dispatcher::on_timeout_toggled(), DBus::Connection::on_timeout_toggled_callback(), DBus::Dispatcher::on_wakeup_main(), DBus::Dispatcher::on_watch_toggled(), DBus::MethodProxy< void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil >::operator()(), DBus::MethodProxy< void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil, nil >::operator()(), DBus::MethodProxy< void, T_arg1, T_arg2, T_arg3, T_arg4, nil, nil, nil >::operator()(), DBus::MethodProxy< void, T_arg1, T_arg2, T_arg3, nil, nil, nil, nil >::operator()(), DBus::MethodProxy< void, T_arg1, T_arg2, nil, nil, nil, nil, nil >::operator()(), DBus::MethodProxy< void, T_arg1, nil, nil, nil, nil, nil, nil >::operator()(), DBus::MethodProxy< void, nil, nil, nil, nil, nil, nil, nil >::operator()(), DBus::MethodProxy< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, nil >::operator()(), DBus::MethodProxy< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, nil, nil >::operator()(), DBus::MethodProxy< T_return, T_arg1, T_arg2, T_arg3, T_arg4, nil, nil, nil >::operator()(), DBus::MethodProxy< T_return, T_arg1, T_arg2, T_arg3, nil, nil, nil, nil >::operator()(), DBus::MethodProxy< T_return, T_arg1, T_arg2, nil, nil, nil, nil, nil >::operator()(), DBus::MethodProxy< T_return, T_arg1, nil, nil, nil, nil, nil, nil >::operator()(), DBus::MethodProxy< T_return, nil, nil, nil, nil, nil, nil, nil >::operator()(), DBus::MethodProxy< T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >::operator()(), DBus::Connection::register_object(), and DBus::Timeout::timer_callback_proxy().

#define DBUS_CXX_INTROSPECTABLE_INTERFACE   "org.freedesktop.DBus.Introspectable"
#define DBUS_CXX_ITERATOR_SUPPORT ( CppType,
DBusType   ) 
Value:
inline                                                                                              \
  DBus::MessageIterator& operator>>(DBus::MessageIterator& __msgiter, CppType& __cpptype)             \
  {                                                                                                   \
    DBusType __dbustype;                                                                              \
    __msgiter >> __dbustype;                                                                          \
    __cpptype = static_cast< CppType >( __dbustype );                                                 \
    return __msgiter;                                                                                 \
  }                                                                                                   \
                                                                                                      \
  inline                                                                                              \
  DBus::MessageAppendIterator& operator<<(DBus::MessageAppendIterator& __msgiter, CppType& __cpptype) \
  {                                                                                                   \
    __msgiter << static_cast< DBusType >( __cpptype );                                                \
    return __msgiter;                                                                                 \
  }                                                                                                   \
                                                                                                      \
  namespace DBus {                                                                                    \
    template<> inline std::string signature< CppType >() { return signature< DBusType >(); }          \
  }

Provides support for unsupported types that can be cast to DBus supported types.

This macro provides message iterator and introspection support for types that are not supported by the DBus native types, but can be static_cast<> to a DBus native type. Typically, this is an enum.

Parameters:
CppType The unsupported type. Must be able to static_cast<> to DBusType
DBusType One of the types inherently supported by dbus-cxx

Example supporting an enum as a 32-bit int:

 typedef MyEnum { ZERO, ONE, TWO, THREE } MyEnum;
 
 DBUS_CXX_ITERATOR_SUPPORT( MyEnum, uint32_t )
#define DBUS_CXX_PARAM_LIMIT   7
#define DEBUG_OUT ( x,
 )     ;

Generated on Wed Sep 30 11:15:12 2009 for dbus-cxx by doxygen 1.6.1