Connection point to the DBus. More...
#include <connection.h>
Public Types | |
typedef DBusCxxPointer < Connection > | pointer |
typedef DBusCxxWeakPointer < Connection > | weak_pointer |
typedef sigc::signal1< bool, Watch::pointer, InterruptablePredicateAccumulatorDefaultFalse > | AddWatchSignal |
typedef sigc::signal1< bool, Timeout::pointer, InterruptablePredicateAccumulatorDefaultFalse > | AddTimeoutSignal |
typedef std::deque < Watch::pointer > | Watches |
typedef std::list < signal_proxy_base::pointer > | ProxySignals |
typedef std::map< std::string, ProxySignals > | NameToProxySignalMap |
typedef std::map< std::string, NameToProxySignalMap > | InterfaceToNameProxySignalMap |
Public Member Functions | |
virtual | ~Connection () |
operator bool () const | |
True if this is a valid connection; false otherwise. | |
bool | is_valid () const |
True if this is a valid connection; false otherwise. | |
bool | is_private () const |
True if this is a valid connection and is private; false otherwise. | |
bool | bus_register () |
Registers this connection with the bus. | |
bool | is_registered () const |
True if this connection is already registered. | |
const char * | unique_name () const |
Gets the unique name of the connection as assigned by the message bus. | |
unsigned long | unix_user (const std::string &name) const |
The unix user id associated with the name connection or -1 if an error occurred. | |
const char * | bus_id () const |
The bus' globally unique ID, as described in the D-Bus specification. | |
int | request_name (const std::string &name, unsigned int flags=0) |
int | release_name (const std::string &name) |
bool | name_has_owner (const std::string &name) const |
StartReply | start_service (const std::string &name, uint32_t flags) const |
bool | add_match (const std::string &rule) |
void | add_match_nonblocking (const std::string &rule) |
bool | remove_match (const std::string &rule) |
void | remove_match_nonblocking (const std::string &rule) |
bool | is_connected () const |
bool | is_authenticated () const |
bool | is_anonymous () const |
const char * | server_id () const |
uint32_t | send (const Message::const_pointer) |
Connection & | operator<< (Message::const_pointer msg) |
Sends the message on the connection. | |
PendingCall::pointer | send_with_reply_async (Message::const_pointer message, int timeout_milliseconds=-1) const |
ReturnMessage::const_pointer | send_with_reply_blocking (Message::const_pointer msg, int timeout_milliseconds=-1) const |
void | flush () |
bool | read_write_dispatch (int timeout_milliseconds=-1) |
bool | read_write (int timeout_milliseconds=-1) |
Message::pointer | borrow_message () |
void | return_message (Message::pointer message) |
void | steal_borrowed_message (Message::pointer message) |
Message::pointer | pop_message () |
DispatchStatus | dispatch_status () const |
DispatchStatus | dispatch () |
int | unix_fd () const |
int | socket () const |
unsigned long | unix_user () const |
unsigned long | unix_process_id () const |
void | set_allow_anonymous (bool allow=true) |
void | set_route_peer_messages (bool route=true) |
void | set_max_message_size (long size) |
long | max_message_size () |
void | set_max_received_size (long size) |
long | max_received_size () |
long | outgoing_size () |
bool | has_messages_to_send () |
AddWatchSignal & | signal_add_watch () |
Cannot call watch.handle() in a slot connected to this signal. | |
sigc::signal< bool, Watch::pointer > & | signal_remove_watch () |
sigc::signal< bool, Watch::pointer > & | signal_watch_toggled () |
AddTimeoutSignal & | signal_add_timeout () |
Cannot call timeout.handle() in a slot connected to this signal. | |
sigc::signal< bool, Timeout::pointer > & | signal_remove_timeout () |
sigc::signal< bool, Timeout::pointer > & | signal_timeout_toggled () |
sigc::signal< void > & | signal_wakeup_main () |
sigc::signal< void, DispatchStatus > & | signal_dispatch_status_changed () |
Cannot call dispatch() in a slot connected to this signal. | |
FilterSignal & | signal_filter () |
Signal emitted during dispatch. | |
const Watches & | unhandled_watches () const |
void | remove_unhandled_watch (const Watch::pointer w) |
Object::pointer | create_object (const std::string &path, PrimaryFallback pf=PRIMARY) |
bool | register_object (Object::pointer object) |
ObjectPathHandler::pointer | create_object (const std::string &path, sigc::slot< HandlerResult, Connection::pointer, Message::const_pointer > &slot, PrimaryFallback pf=PRIMARY) |
ObjectPathHandler::pointer | create_object (const std::string &path, HandlerResult(*MessageFunction)(Connection::pointer, Message::const_pointer), PrimaryFallback pf=PRIMARY) |
ObjectProxy::pointer | create_object_proxy (const std::string &path) |
ObjectProxy::pointer | create_object_proxy (const std::string &destination, const std::string &path) |
bool | unregister_object (const std::string &path) |
signal_proxy_simple::pointer | create_signal_proxy (const std::string &interface, const std::string &name) |
Adds a signal with the given interface and name. | |
signal_proxy_simple::pointer | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
Adds a signal with the given path, interface and name. | |
template<class T_return > | |
DBusCxxPointer< signal_proxy < T_return > > | create_signal_proxy (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1 > > | create_signal_proxy (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2 > > | create_signal_proxy (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3 > > | create_signal_proxy (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3, T_arg4 > > | create_signal_proxy (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 > > | create_signal_proxy (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 > > | create_signal_proxy (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 , class T_arg7 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 > > | create_signal_proxy (const std::string &interface, const std::string &name) |
template<class T_return > | |
DBusCxxPointer< signal_proxy < T_return > > | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1 > > | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2 > > | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3 > > | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3, T_arg4 > > | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 > > | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 > > | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 , class T_arg7 > | |
DBusCxxPointer< signal_proxy < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 > > | create_signal_proxy (const std::string &path, const std::string &interface, const std::string &name) |
signal_proxy_base::pointer | add_signal_proxy (signal_proxy_base::pointer signal) |
Adds the given signal proxy to the connection. | |
bool | remove_signal_proxy (signal_proxy_base::pointer proxy) |
const InterfaceToNameProxySignalMap & | get_signal_proxies () |
Gets all the signal handlers. | |
NameToProxySignalMap | get_signal_proxies (const std::string &interface) |
Gets the signal handlers for a specific interface. | |
ProxySignals | get_signal_proxies (const std::string &interface, const std::string &member) |
Gets the signal handlers for a specific interface and member. | |
template<class T_return > | |
DBusCxxPointer< signal < T_return > > | create_signal (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 > | |
DBusCxxPointer< signal < T_return, T_arg1 > > | create_signal (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2 > > | create_signal (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3 > > | create_signal (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3, T_arg4 > > | create_signal (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 > > | create_signal (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 > > | create_signal (const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 , class T_arg7 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 > > | create_signal (const std::string &interface, const std::string &name) |
template<class T_return > | |
DBusCxxPointer< signal < T_return > > | create_signal (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 > | |
DBusCxxPointer< signal < T_return, T_arg1 > > | create_signal (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2 > > | create_signal (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3 > > | create_signal (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3, T_arg4 > > | create_signal (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5 > > | create_signal (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6 > > | create_signal (const std::string &path, const std::string &interface, const std::string &name) |
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 , class T_arg7 > | |
DBusCxxPointer< signal < T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7 > > | create_signal (const std::string &path, const std::string &interface, const std::string &name) |
pointer | self () |
Returns a smart pointer to itself. | |
DBusConnection * | cobj () |
std::string | introspect (const std::string &destination, const std::string &path) |
Static Public Member Functions | |
static pointer | create (DBusConnection *cobj=NULL, bool is_private=false) |
static pointer | create (BusType type, bool is_private=false) |
Connects to a bus daemon and registers the client with it. | |
static pointer | create (const Connection &other) |
static pointer | self (DBusConnection *c) |
Given a dbus connection, if it was established through a call to Connection::create() this method will return a copy of the smart pointer returned by the create method. | |
static void | set_global_change_sigpipe (bool will_modify_sigpipe=true) |
Protected Types | |
typedef std::map< DBusTimeout *, Timeout::pointer > | Timeouts |
Protected Member Functions | |
Connection (DBusConnection *cobj=NULL, bool is_private=false) | |
Connection (BusType type, bool is_private=false) | |
Connects to a bus daemon and registers the client with it. | |
Connection (const Connection &other) | |
void | initialize (bool is_private) |
Static Protected Member Functions | |
static dbus_bool_t | on_add_watch_callback (DBusWatch *cwatch, void *data) |
static void | on_remove_watch_callback (DBusWatch *cwatch, void *data) |
static void | on_watch_toggled_callback (DBusWatch *cwatch, void *data) |
static dbus_bool_t | on_add_timeout_callback (DBusTimeout *ctimeout, void *data) |
static void | on_remove_timeout_callback (DBusTimeout *ctimeout, void *data) |
static void | on_timeout_toggled_callback (DBusTimeout *ctimeout, void *data) |
static void | on_wakeup_main_callback (void *data) |
static void | on_dispatch_status_callback (DBusConnection *connection, DBusDispatchStatus new_status, void *data) |
static DBusHandlerResult | on_filter_callback (DBusConnection *connection, DBusMessage *message, void *data) |
Protected Attributes | |
DBusConnection * | m_cobj |
bool | m_private_flag |
AddWatchSignal | m_add_watch_signal |
sigc::signal< bool, Watch::pointer > | m_remove_watch_signal |
sigc::signal< bool, Watch::pointer > | m_watch_toggled_signal |
AddTimeoutSignal | m_add_timeout_signal |
sigc::signal< bool, Timeout::pointer > | m_remove_timeout_signal |
sigc::signal< bool, Timeout::pointer > | m_timeout_toggled_signal |
sigc::signal< void > | m_wakeup_main_signal |
sigc::signal< void, DispatchStatus > | m_dispatch_status_signal |
FilterSignal | m_filter_signal |
Watches | m_unhandled_watches |
Timeouts | m_timeouts |
std::map< std::string, ObjectPathHandler::pointer > | m_created_objects |
InterfaceToNameProxySignalMap | m_proxy_signal_interface_map |
Static Protected Attributes | |
static dbus_int32_t | m_weak_pointer_slot = -1 |
Friends | |
void | init (bool) |
Initializes the dbus-cxx library. |
Connection point to the DBus.
typedef sigc::signal1<bool,Timeout::pointer,InterruptablePredicateAccumulatorDefaultFalse> DBus::Connection::AddTimeoutSignal |
typedef sigc::signal1<bool,Watch::pointer,InterruptablePredicateAccumulatorDefaultFalse> DBus::Connection::AddWatchSignal |
typedef std::map<std::string,NameToProxySignalMap> DBus::Connection::InterfaceToNameProxySignalMap |
typedef std::map<std::string,ProxySignals> DBus::Connection::NameToProxySignalMap |
typedef DBusCxxPointer<Connection> DBus::Connection::pointer |
typedef std::list<signal_proxy_base::pointer> DBus::Connection::ProxySignals |
typedef std::map<DBusTimeout*,Timeout::pointer> DBus::Connection::Timeouts [protected] |
typedef std::deque<Watch::pointer> DBus::Connection::Watches |
typedef DBusCxxWeakPointer<Connection> DBus::Connection::weak_pointer |
DBus::Connection::Connection | ( | DBusConnection * | cobj = NULL , |
|
bool | is_private = false | |||
) | [protected] |
References initialize(), and m_cobj.
Referenced by create().
DBus::Connection::Connection | ( | BusType | type, | |
bool | is_private = false | |||
) | [protected] |
Connects to a bus daemon and registers the client with it.
is_private | if true a private connection will be created. Otherwise a shared connection is created. |
References DBus::BUS_NONE, create(), initialize(), and m_cobj.
DBus::Connection::Connection | ( | const Connection & | other | ) | [protected] |
References m_cobj.
DBus::Connection::~Connection | ( | ) | [virtual] |
References is_private(), is_valid(), and m_cobj.
bool DBus::Connection::add_match | ( | const std::string & | rule | ) |
References create(), is_valid(), and m_cobj.
Referenced by add_signal_proxy().
void DBus::Connection::add_match_nonblocking | ( | const std::string & | rule | ) |
References is_valid(), and m_cobj.
signal_proxy_base::pointer DBus::Connection::add_signal_proxy | ( | signal_proxy_base::pointer | signal | ) |
Adds the given signal proxy to the connection.
References add_match(), DBUS_CXX_DEBUG, and m_proxy_signal_interface_map.
Referenced by create_signal_proxy().
Message::pointer DBus::Connection::borrow_message | ( | ) |
References create(), is_valid(), and m_cobj.
const char * DBus::Connection::bus_id | ( | ) | const |
The bus' globally unique ID, as described in the D-Bus specification.
References create(), is_valid(), and m_cobj.
bool DBus::Connection::bus_register | ( | ) |
Registers this connection with the bus.
References create(), is_valid(), and m_cobj.
Connection::pointer DBus::Connection::create | ( | const Connection & | other | ) | [static] |
References DBus::conn_wp_deleter(), Connection(), create(), and m_weak_pointer_slot.
Connection::pointer DBus::Connection::create | ( | BusType | type, | |
bool | is_private = false | |||
) | [static] |
Connects to a bus daemon and registers the client with it.
is_private | if true a private connection will be created. Otherwise a shared connection is created. |
References DBus::conn_wp_deleter(), Connection(), create(), and m_weak_pointer_slot.
Connection::pointer DBus::Connection::create | ( | DBusConnection * | cobj = NULL , |
|
bool | is_private = false | |||
) | [static] |
References DBus::conn_wp_deleter(), Connection(), and m_weak_pointer_slot.
Referenced by add_match(), borrow_message(), bus_id(), bus_register(), Connection(), create(), create_object(), create_object_proxy(), create_signal(), create_signal_proxy(), initialize(), introspect(), name_has_owner(), on_add_timeout_callback(), on_add_watch_callback(), on_filter_callback(), on_remove_timeout_callback(), on_timeout_toggled_callback(), pop_message(), release_name(), remove_match(), request_name(), send(), send_with_reply_async(), send_with_reply_blocking(), start_service(), and unix_user().
ObjectPathHandler::pointer DBus::Connection::create_object | ( | const std::string & | path, | |
HandlerResult(*)(Connection::pointer, Message::const_pointer) | MessageFunction, | |||
PrimaryFallback | pf = PRIMARY | |||
) |
References create(), and m_created_objects.
ObjectPathHandler::pointer DBus::Connection::create_object | ( | const std::string & | path, | |
sigc::slot< HandlerResult, Connection::pointer, Message::const_pointer > & | slot, | |||
PrimaryFallback | pf = PRIMARY | |||
) |
References create(), and m_created_objects.
Object::pointer DBus::Connection::create_object | ( | const std::string & | path, | |
PrimaryFallback | pf = PRIMARY | |||
) |
References create(), and m_created_objects.
ObjectProxy::pointer DBus::Connection::create_object_proxy | ( | const std::string & | destination, | |
const std::string & | path | |||
) |
References create().
ObjectProxy::pointer DBus::Connection::create_object_proxy | ( | const std::string & | path | ) |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> > DBus::Connection::create_signal | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> > DBus::Connection::create_signal | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> > DBus::Connection::create_signal | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4> > DBus::Connection::create_signal | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3> > DBus::Connection::create_signal | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2> > DBus::Connection::create_signal | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1> > DBus::Connection::create_signal | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return> > DBus::Connection::create_signal | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> > DBus::Connection::create_signal | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> > DBus::Connection::create_signal | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> > DBus::Connection::create_signal | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3,T_arg4> > DBus::Connection::create_signal | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2,T_arg3> > DBus::Connection::create_signal | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1,T_arg2> > DBus::Connection::create_signal | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return, T_arg1> > DBus::Connection::create_signal | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal<T_return> > DBus::Connection::create_signal | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> > DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> > DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> > DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4> > DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3> > DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2> > DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1> > DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return> > DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> > DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> > DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> > DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4> > DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3> > DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2> > DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return, T_arg1> > DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
DBusCxxPointer<signal_proxy<T_return> > DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) | [inline] |
References add_signal_proxy(), and create().
signal_proxy_simple::pointer DBus::Connection::create_signal_proxy | ( | const std::string & | path, | |
const std::string & | interface, | |||
const std::string & | name | |||
) |
Adds a signal with the given path, interface and name.
References add_signal_proxy(), and DBus::signal_proxy_simple::create().
signal_proxy_simple::pointer DBus::Connection::create_signal_proxy | ( | const std::string & | interface, | |
const std::string & | name | |||
) |
Adds a signal with the given interface and name.
References add_signal_proxy(), and DBus::signal_proxy_simple::create().
DispatchStatus DBus::Connection::dispatch | ( | ) |
References DBus::DISPATCH_COMPLETE, is_valid(), and m_cobj.
DispatchStatus DBus::Connection::dispatch_status | ( | ) | const |
References DBus::DISPATCH_COMPLETE, is_valid(), and m_cobj.
void DBus::Connection::flush | ( | ) |
References is_valid(), and m_cobj.
Referenced by introspect().
Connection::ProxySignals DBus::Connection::get_signal_proxies | ( | const std::string & | interface, | |
const std::string & | member | |||
) |
Gets the signal handlers for a specific interface and member.
References m_proxy_signal_interface_map.
Connection::NameToProxySignalMap DBus::Connection::get_signal_proxies | ( | const std::string & | interface | ) |
Gets the signal handlers for a specific interface.
References m_proxy_signal_interface_map.
const Connection::InterfaceToNameProxySignalMap & DBus::Connection::get_signal_proxies | ( | ) |
Gets all the signal handlers.
References m_proxy_signal_interface_map.
bool DBus::Connection::has_messages_to_send | ( | ) |
References is_valid(), and m_cobj.
void DBus::Connection::initialize | ( | bool | is_private | ) | [protected] |
References create(), m_cobj, m_private_flag, on_add_timeout_callback(), on_add_watch_callback(), on_dispatch_status_callback(), on_filter_callback(), on_remove_timeout_callback(), on_remove_watch_callback(), on_timeout_toggled_callback(), on_wakeup_main_callback(), and on_watch_toggled_callback().
Referenced by Connection().
std::string DBus::Connection::introspect | ( | const std::string & | destination, | |
const std::string & | path | |||
) |
References create(), flush(), and send_with_reply_async().
bool DBus::Connection::is_anonymous | ( | ) | const |
References is_valid(), and m_cobj.
bool DBus::Connection::is_authenticated | ( | ) | const |
References is_valid(), and m_cobj.
bool DBus::Connection::is_connected | ( | ) | const |
References is_valid(), and m_cobj.
bool DBus::Connection::is_private | ( | ) | const |
True if this is a valid connection and is private; false otherwise.
References m_private_flag.
Referenced by ~Connection().
bool DBus::Connection::is_registered | ( | ) | const |
True if this connection is already registered.
References unique_name().
bool DBus::Connection::is_valid | ( | ) | const |
True if this is a valid connection; false otherwise.
References m_cobj.
Referenced by add_match(), add_match_nonblocking(), borrow_message(), bus_id(), bus_register(), dispatch(), dispatch_status(), flush(), has_messages_to_send(), is_anonymous(), is_authenticated(), is_connected(), max_message_size(), max_received_size(), name_has_owner(), outgoing_size(), pop_message(), read_write(), read_write_dispatch(), release_name(), remove_match(), remove_match_nonblocking(), request_name(), return_message(), self(), send(), send_with_reply_async(), send_with_reply_blocking(), server_id(), set_allow_anonymous(), set_max_message_size(), set_max_received_size(), set_route_peer_messages(), socket(), start_service(), steal_borrowed_message(), unique_name(), unix_fd(), unix_process_id(), unix_user(), and ~Connection().
long DBus::Connection::max_message_size | ( | ) |
References is_valid(), and m_cobj.
long DBus::Connection::max_received_size | ( | ) |
References is_valid(), and m_cobj.
bool DBus::Connection::name_has_owner | ( | const std::string & | name | ) | const |
References create(), is_valid(), and m_cobj.
dbus_bool_t DBus::Connection::on_add_timeout_callback | ( | DBusTimeout * | ctimeout, | |
void * | data | |||
) | [static, protected] |
References create(), DBUS_CXX_DEBUG, m_timeouts, and signal_add_timeout().
Referenced by initialize().
dbus_bool_t DBus::Connection::on_add_watch_callback | ( | DBusWatch * | cwatch, | |
void * | data | |||
) | [static, protected] |
References create(), m_unhandled_watches, and signal_add_watch().
Referenced by initialize().
void DBus::Connection::on_dispatch_status_callback | ( | DBusConnection * | connection, | |
DBusDispatchStatus | new_status, | |||
void * | data | |||
) | [static, protected] |
References signal_dispatch_status_changed().
Referenced by initialize().
DBusHandlerResult DBus::Connection::on_filter_callback | ( | DBusConnection * | connection, | |
DBusMessage * | message, | |||
void * | data | |||
) | [static, protected] |
References create(), DBUS_CXX_DEBUG, DBus::DONT_FILTER, DBus::FILTER, DBus::FILTER_NEEDS_MEMORY, DBus::HANDLED, DBus::HANDLER_NEEDS_MEMORY, DBus::NOT_HANDLED, and DBus::SIGNAL_MESSAGE.
Referenced by initialize().
void DBus::Connection::on_remove_timeout_callback | ( | DBusTimeout * | ctimeout, | |
void * | data | |||
) | [static, protected] |
References create(), DBUS_CXX_DEBUG, m_timeouts, and signal_remove_timeout().
Referenced by initialize().
void DBus::Connection::on_remove_watch_callback | ( | DBusWatch * | cwatch, | |
void * | data | |||
) | [static, protected] |
References DBus::Watch::create(), and signal_remove_watch().
Referenced by initialize().
void DBus::Connection::on_timeout_toggled_callback | ( | DBusTimeout * | ctimeout, | |
void * | data | |||
) | [static, protected] |
References create(), DBUS_CXX_DEBUG, m_timeouts, and signal_timeout_toggled().
Referenced by initialize().
void DBus::Connection::on_wakeup_main_callback | ( | void * | data | ) | [static, protected] |
References signal_wakeup_main().
Referenced by initialize().
void DBus::Connection::on_watch_toggled_callback | ( | DBusWatch * | cwatch, | |
void * | data | |||
) | [static, protected] |
References DBus::Watch::create(), and signal_watch_toggled().
Referenced by initialize().
DBus::Connection::operator bool | ( | ) | const |
True if this is a valid connection; false otherwise.
References m_cobj.
Connection & DBus::Connection::operator<< | ( | Message::const_pointer | msg | ) |
Sends the message on the connection.
References send().
long DBus::Connection::outgoing_size | ( | ) |
References is_valid(), and m_cobj.
Message::pointer DBus::Connection::pop_message | ( | ) |
References create(), is_valid(), and m_cobj.
bool DBus::Connection::read_write | ( | int | timeout_milliseconds = -1 |
) |
References is_valid(), and m_cobj.
bool DBus::Connection::read_write_dispatch | ( | int | timeout_milliseconds = -1 |
) |
References is_valid(), and m_cobj.
bool DBus::Connection::register_object | ( | Object::pointer | object | ) |
References DBUS_CXX_DEBUG.
int DBus::Connection::release_name | ( | const std::string & | name | ) |
References create(), is_valid(), and m_cobj.
bool DBus::Connection::remove_match | ( | const std::string & | rule | ) |
References create(), is_valid(), and m_cobj.
void DBus::Connection::remove_match_nonblocking | ( | const std::string & | rule | ) |
References is_valid(), and m_cobj.
bool DBus::Connection::remove_signal_proxy | ( | signal_proxy_base::pointer | proxy | ) |
References m_proxy_signal_interface_map.
void DBus::Connection::remove_unhandled_watch | ( | const Watch::pointer | w | ) |
References m_unhandled_watches.
int DBus::Connection::request_name | ( | const std::string & | name, | |
unsigned int | flags = 0 | |||
) |
References create(), is_valid(), and m_cobj.
void DBus::Connection::return_message | ( | Message::pointer | message | ) |
References is_valid(), and m_cobj.
Connection::pointer DBus::Connection::self | ( | DBusConnection * | c | ) | [static] |
Given a dbus connection, if it was established through a call to Connection::create() this method will return a copy of the smart pointer returned by the create method.
This is accomplished safely because the create() methods store a weak pointer in a dbus data slot associated with the DBusConnection C object, and this method creates the smart pointer from the weak pointer if the weak pointer is still valid.
If the DBusConnection was created outside a Connection::create() method or the underlying object has already been deleted this method will return an empty pointer.
References m_weak_pointer_slot.
Connection::pointer DBus::Connection::self | ( | ) |
Returns a smart pointer to itself.
References cobj(), is_valid(), and m_weak_pointer_slot.
Referenced by DBus::MessageHandler::message_handler_callback().
uint32_t DBus::Connection::send | ( | const Message::const_pointer | msg | ) |
References create(), is_valid(), and m_cobj.
Referenced by operator<<().
PendingCall::pointer DBus::Connection::send_with_reply_async | ( | Message::const_pointer | message, | |
int | timeout_milliseconds = -1 | |||
) | const |
References create(), is_valid(), and m_cobj.
Referenced by introspect().
ReturnMessage::const_pointer DBus::Connection::send_with_reply_blocking | ( | Message::const_pointer | msg, | |
int | timeout_milliseconds = -1 | |||
) | const |
References create(), is_valid(), and m_cobj.
const char * DBus::Connection::server_id | ( | ) | const |
References is_valid(), and m_cobj.
void DBus::Connection::set_allow_anonymous | ( | bool | allow = true |
) |
References is_valid(), and m_cobj.
void DBus::Connection::set_global_change_sigpipe | ( | bool | will_modify_sigpipe = true |
) | [static] |
void DBus::Connection::set_max_message_size | ( | long | size | ) |
References is_valid(), and m_cobj.
void DBus::Connection::set_max_received_size | ( | long | size | ) |
References is_valid(), and m_cobj.
void DBus::Connection::set_route_peer_messages | ( | bool | route = true |
) |
References is_valid(), and m_cobj.
Connection::AddTimeoutSignal & DBus::Connection::signal_add_timeout | ( | ) |
Cannot call timeout.handle() in a slot connected to this signal.
References m_add_timeout_signal.
Referenced by on_add_timeout_callback().
Connection::AddWatchSignal & DBus::Connection::signal_add_watch | ( | ) |
Cannot call watch.handle() in a slot connected to this signal.
References m_add_watch_signal.
Referenced by on_add_watch_callback().
sigc::signal< void, DispatchStatus > & DBus::Connection::signal_dispatch_status_changed | ( | ) |
Cannot call dispatch() in a slot connected to this signal.
References m_dispatch_status_signal.
Referenced by on_dispatch_status_callback().
FilterSignal & DBus::Connection::signal_filter | ( | ) |
Signal emitted during dispatch.
A slot returning true will cause the message to be filtered.
References m_filter_signal.
sigc::signal< bool, Timeout::pointer > & DBus::Connection::signal_remove_timeout | ( | ) |
References m_remove_timeout_signal.
Referenced by on_remove_timeout_callback().
sigc::signal< bool, Watch::pointer > & DBus::Connection::signal_remove_watch | ( | ) |
References m_remove_watch_signal.
Referenced by on_remove_watch_callback().
sigc::signal< bool, Timeout::pointer > & DBus::Connection::signal_timeout_toggled | ( | ) |
References m_timeout_toggled_signal.
Referenced by on_timeout_toggled_callback().
sigc::signal< void > & DBus::Connection::signal_wakeup_main | ( | ) |
References m_wakeup_main_signal.
Referenced by on_wakeup_main_callback().
sigc::signal< bool, Watch::pointer > & DBus::Connection::signal_watch_toggled | ( | ) |
References m_watch_toggled_signal.
Referenced by on_watch_toggled_callback().
int DBus::Connection::socket | ( | ) | const |
References is_valid(), and m_cobj.
StartReply DBus::Connection::start_service | ( | const std::string & | name, | |
uint32_t | flags | |||
) | const |
void DBus::Connection::steal_borrowed_message | ( | Message::pointer | message | ) |
References is_valid(), and m_cobj.
const Connection::Watches & DBus::Connection::unhandled_watches | ( | ) | const |
References m_unhandled_watches.
const char * DBus::Connection::unique_name | ( | ) | const |
Gets the unique name of the connection as assigned by the message bus.
References is_valid(), and m_cobj.
Referenced by is_registered().
int DBus::Connection::unix_fd | ( | ) | const |
References is_valid(), and m_cobj.
unsigned long DBus::Connection::unix_process_id | ( | ) | const |
References is_valid(), and m_cobj.
unsigned long DBus::Connection::unix_user | ( | ) | const |
References is_valid(), and m_cobj.
unsigned long DBus::Connection::unix_user | ( | const std::string & | name | ) | const |
The unix user id associated with the name connection or -1 if an error occurred.
References create(), is_valid(), and m_cobj.
bool DBus::Connection::unregister_object | ( | const std::string & | path | ) |
void init | ( | bool | ) | [friend] |
Initializes the dbus-cxx library.
threadsafe | If true the library's threadsafe structures, along with the underlying dbus library will be initialized to support threadsafe operations. This makes the library threadsafe at the cost of efficiency. |
Referenced by signal_add_timeout().
AddWatchSignal DBus::Connection::m_add_watch_signal [protected] |
Referenced by signal_add_watch().
DBusConnection* DBus::Connection::m_cobj [protected] |
Referenced by add_match(), add_match_nonblocking(), borrow_message(), bus_id(), bus_register(), cobj(), Connection(), dispatch(), dispatch_status(), flush(), has_messages_to_send(), initialize(), is_anonymous(), is_authenticated(), is_connected(), is_valid(), max_message_size(), max_received_size(), name_has_owner(), operator bool(), outgoing_size(), pop_message(), read_write(), read_write_dispatch(), release_name(), remove_match(), remove_match_nonblocking(), request_name(), return_message(), send(), send_with_reply_async(), send_with_reply_blocking(), server_id(), set_allow_anonymous(), set_max_message_size(), set_max_received_size(), set_route_peer_messages(), socket(), start_service(), steal_borrowed_message(), unique_name(), unix_fd(), unix_process_id(), unix_user(), and ~Connection().
std::map<std::string,ObjectPathHandler::pointer> DBus::Connection::m_created_objects [protected] |
Referenced by create_object().
sigc::signal<void,DispatchStatus> DBus::Connection::m_dispatch_status_signal [protected] |
Referenced by signal_dispatch_status_changed().
FilterSignal DBus::Connection::m_filter_signal [protected] |
Referenced by signal_filter().
bool DBus::Connection::m_private_flag [protected] |
Referenced by initialize(), and is_private().
Referenced by add_signal_proxy(), get_signal_proxies(), and remove_signal_proxy().
sigc::signal<bool,Timeout::pointer> DBus::Connection::m_remove_timeout_signal [protected] |
Referenced by signal_remove_timeout().
sigc::signal<bool,Watch::pointer> DBus::Connection::m_remove_watch_signal [protected] |
Referenced by signal_remove_watch().
sigc::signal<bool,Timeout::pointer> DBus::Connection::m_timeout_toggled_signal [protected] |
Referenced by signal_timeout_toggled().
Timeouts DBus::Connection::m_timeouts [protected] |
Referenced by on_add_timeout_callback(), on_remove_timeout_callback(), and on_timeout_toggled_callback().
Watches DBus::Connection::m_unhandled_watches [protected] |
Referenced by on_add_watch_callback(), remove_unhandled_watch(), and unhandled_watches().
sigc::signal<void> DBus::Connection::m_wakeup_main_signal [protected] |
Referenced by signal_wakeup_main().
sigc::signal<bool,Watch::pointer> DBus::Connection::m_watch_toggled_signal [protected] |
Referenced by signal_watch_toggled().
dbus_int32_t DBus::Connection::m_weak_pointer_slot = -1 [static, protected] |