dbus-cxx logo

utility.h File Reference

#include <dbus/dbus.h>
#include <dbus-cxx/pointer.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.

Functions

void DBus::init (bool threadsafe=true)
 Initializes the dbus-cxx library.
bool DBus::initialized ()
 Get the initialization state of the dbus-cxx library.

Define Documentation

#define DBUS_CXX_DEBUG (  )     ;

Referenced by DBus::Interface::add_signal(), DBus::Connection::add_signal_proxy(), DBus::Dispatcher::dispatch_thread_main(), 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::Method< void, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 >::handle_call_message(), 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::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 Thu Mar 18 09:31:29 2010 for dbus-cxx by doxygen 1.6.1