dbus-cxx logo
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends | List of all members
DBus::InterfaceProxy Class Reference

#include <interfaceproxy.h>

Public Types

typedef DBusCxxPointer
< InterfaceProxy
pointer
 
typedef DBusCxxWeakPointer
< InterfaceProxy
weak_pointer
 
typedef std::multimap
< std::string,
MethodProxyBase::pointer
Methods
 
typedef std::set
< signal_proxy_base::pointer
Signals
 

Public Member Functions

virtual ~InterfaceProxy ()
 
ObjectProxyobject () const
 
Path path () const
 
DBusCxxPointer< Connectionconnection () const
 
const std::string & name () const
 
void set_name (const std::string &new_name)
 
const Methodsmethods () const
 
MethodProxyBase::pointer method (const std::string &name) const
 Returns the first method with the given name. More...
 
template<class T_return >
DBusCxxPointer< MethodProxy
< T_return > > 
create_method (const std::string &name)
 
template<class T_return , class T_arg1 >
DBusCxxPointer< MethodProxy
< T_return, T_arg1 > > 
create_method (const std::string &name)
 
template<class T_return , class T_arg1 , class T_arg2 >
DBusCxxPointer< MethodProxy
< T_return, T_arg1, T_arg2 > > 
create_method (const std::string &name)
 
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 >
DBusCxxPointer< MethodProxy
< T_return, T_arg1, T_arg2,
T_arg3 > > 
create_method (const std::string &name)
 
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 >
DBusCxxPointer< MethodProxy
< T_return, T_arg1, T_arg2,
T_arg3, T_arg4 > > 
create_method (const std::string &name)
 
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 >
DBusCxxPointer< MethodProxy
< T_return, T_arg1, T_arg2,
T_arg3, T_arg4, T_arg5 > > 
create_method (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< MethodProxy
< T_return, T_arg1, T_arg2,
T_arg3, T_arg4, T_arg5, T_arg6 > > 
create_method (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< MethodProxy
< T_return, T_arg1, T_arg2,
T_arg3, T_arg4, T_arg5, T_arg6,
T_arg7 > > 
create_method (const std::string &name)
 
bool add_method (MethodProxyBase::pointer method)
 Adds the named method. More...
 
void remove_method (const std::string &name)
 Removes the first method with the given name. More...
 
void remove_method (MethodProxyBase::pointer method)
 Removed the specific method. More...
 
bool has_method (const std::string &name) const
 True if the interface has a method with the given name. More...
 
bool has_method (MethodProxyBase::pointer method) const
 True if the interface has the specified method. More...
 
CallMessage::pointer create_call_message (const std::string &method_name) const
 
ReturnMessage::const_pointer call (CallMessage::const_pointer, int timeout_milliseconds=-1) const
 
PendingCall::pointer call_async (CallMessage::const_pointer, int timeout_milliseconds=-1) const
 
template<class T_return >
DBusCxxPointer< signal_proxy
< T_return > > 
create_signal (const std::string &sig_name)
 
template<class T_return , class T_arg1 >
DBusCxxPointer< signal_proxy
< T_return, T_arg1 > > 
create_signal (const std::string &sig_name)
 
template<class T_return , class T_arg1 , class T_arg2 >
DBusCxxPointer< signal_proxy
< T_return, T_arg1, T_arg2 > > 
create_signal (const std::string &sig_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 (const std::string &sig_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 (const std::string &sig_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 (const std::string &sig_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 (const std::string &sig_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 (const std::string &sig_name)
 
const Signalssignals () const
 
signal_proxy_base::pointer signal (const std::string &signame)
 
bool add_signal (signal_proxy_base::pointer sig)
 
bool remove_signal (const std::string &signame)
 
bool remove_signal (signal_proxy_base::pointer sig)
 
bool has_signal (const std::string &signame) const
 
bool has_signal (signal_proxy_base::pointer sig) const
 
sigc::signal< void, const
std::string &, const
std::string & > 
signal_name_changed ()
 Signal emitted when the name is changed. More...
 
sigc::signal< void,
MethodProxyBase::pointer
signal_method_added ()
 Signal emitted when a method of the given name is added. More...
 
sigc::signal< void,
MethodProxyBase::pointer
signal_method_removed ()
 Signal emitted when a method of the given name is removed. More...
 

Static Public Member Functions

static pointer create (const std::string &name=std::string())
 

Protected Types

typedef std::map
< MethodProxyBase::pointer,
sigc::connection > 
MethodSignalNameConnections
 

Protected Member Functions

 InterfaceProxy (const std::string &name)
 
void on_method_name_changed (const std::string &oldname, const std::string &newname, MethodProxyBase::pointer method)
 
void on_object_set_connection (DBusCxxPointer< Connection > conn)
 
void on_object_set_path (const std::string &path)
 

Protected Attributes

ObjectProxym_object
 
std::string m_name
 
Methods m_methods
 
Signals m_signals
 
pthread_rwlock_t m_methods_rwlock
 
pthread_mutex_t m_name_mutex
 Ensures that the name doesn't change while the name changed signal is emitting. More...
 
sigc::signal< void, const
std::string &, const
std::string & > 
m_signal_name_changed
 
sigc::signal< void,
MethodProxyBase::pointer
m_signal_method_added
 
sigc::signal< void,
MethodProxyBase::pointer
m_signal_method_removed
 
MethodSignalNameConnections m_method_signal_name_connections
 

Friends

class ObjectProxy
 

Detailed Description

Author
Rick L Vinyard Jr rviny.nosp@m.ard@.nosp@m.cs.nm.nosp@m.su.e.nosp@m.du

Member Typedef Documentation

typedef std::multimap<std::string, MethodProxyBase::pointer> DBus::InterfaceProxy::Methods

Constructor & Destructor Documentation

DBus::InterfaceProxy::InterfaceProxy ( const std::string &  name)
protected

References m_methods_rwlock, and m_name_mutex.

Referenced by create().

DBus::InterfaceProxy::~InterfaceProxy ( )
virtual

References m_methods_rwlock, and m_name_mutex.

Member Function Documentation

bool DBus::InterfaceProxy::add_method ( MethodProxyBase::pointer  method)
bool DBus::InterfaceProxy::add_signal ( signal_proxy_base::pointer  sig)

References connection(), m_signals, name(), and path().

Referenced by create_signal().

ReturnMessage::const_pointer DBus::InterfaceProxy::call ( CallMessage::const_pointer  call_message,
int  timeout_milliseconds = -1 
) const

References m_object.

PendingCall::pointer DBus::InterfaceProxy::call_async ( CallMessage::const_pointer  call_message,
int  timeout_milliseconds = -1 
) const

References m_object.

Connection::pointer DBus::InterfaceProxy::connection ( ) const
InterfaceProxy::pointer DBus::InterfaceProxy::create ( const std::string &  name = std::string())
static
CallMessage::pointer DBus::InterfaceProxy::create_call_message ( const std::string &  method_name) const

References m_name, and m_object.

template<class T_return >
DBusCxxPointer<MethodProxy<T_return> > DBus::InterfaceProxy::create_method ( const std::string &  name)
inline
template<class T_return , class T_arg1 >
DBusCxxPointer<MethodProxy<T_return, T_arg1> > DBus::InterfaceProxy::create_method ( const std::string &  name)
inline
template<class T_return , class T_arg1 , class T_arg2 >
DBusCxxPointer<MethodProxy<T_return, T_arg1,T_arg2> > DBus::InterfaceProxy::create_method ( const std::string &  name)
inline
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 >
DBusCxxPointer<MethodProxy<T_return, T_arg1,T_arg2,T_arg3> > DBus::InterfaceProxy::create_method ( const std::string &  name)
inline
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 >
DBusCxxPointer<MethodProxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4> > DBus::InterfaceProxy::create_method ( const std::string &  name)
inline
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 >
DBusCxxPointer<MethodProxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> > DBus::InterfaceProxy::create_method ( const std::string &  name)
inline
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 , class T_arg4 , class T_arg5 , class T_arg6 >
DBusCxxPointer<MethodProxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> > DBus::InterfaceProxy::create_method ( const std::string &  name)
inline
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<MethodProxy<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> > DBus::InterfaceProxy::create_method ( const std::string &  name)
inline
template<class T_return >
DBusCxxPointer<signal_proxy<T_return> > DBus::InterfaceProxy::create_signal ( const std::string &  sig_name)
inline
template<class T_return , class T_arg1 >
DBusCxxPointer<signal_proxy<T_return, T_arg1> > DBus::InterfaceProxy::create_signal ( const std::string &  sig_name)
inline
template<class T_return , class T_arg1 , class T_arg2 >
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2> > DBus::InterfaceProxy::create_signal ( const std::string &  sig_name)
inline
template<class T_return , class T_arg1 , class T_arg2 , class T_arg3 >
DBusCxxPointer<signal_proxy<T_return, T_arg1,T_arg2,T_arg3> > DBus::InterfaceProxy::create_signal ( const std::string &  sig_name)
inline
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> > DBus::InterfaceProxy::create_signal ( const std::string &  sig_name)
inline
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> > DBus::InterfaceProxy::create_signal ( const std::string &  sig_name)
inline
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> > DBus::InterfaceProxy::create_signal ( const std::string &  sig_name)
inline
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> > DBus::InterfaceProxy::create_signal ( const std::string &  sig_name)
inline
bool DBus::InterfaceProxy::has_method ( const std::string &  name) const

True if the interface has a method with the given name.

References m_methods, and m_methods_rwlock.

Referenced by add_method().

bool DBus::InterfaceProxy::has_method ( MethodProxyBase::pointer  method) const

True if the interface has the specified method.

References m_methods, and m_methods_rwlock.

bool DBus::InterfaceProxy::has_signal ( const std::string &  signame) const

References m_signals.

Referenced by remove_signal().

bool DBus::InterfaceProxy::has_signal ( signal_proxy_base::pointer  sig) const

References m_signals.

MethodProxyBase::pointer DBus::InterfaceProxy::method ( const std::string &  name) const

Returns the first method with the given name.

References m_methods, and m_methods_rwlock.

Referenced by add_method(), create_method(), on_method_name_changed(), and remove_method().

const InterfaceProxy::Methods & DBus::InterfaceProxy::methods ( ) const

References m_methods.

const std::string & DBus::InterfaceProxy::name ( ) const

References m_name.

Referenced by add_signal().

ObjectProxy * DBus::InterfaceProxy::object ( ) const

References m_object.

void DBus::InterfaceProxy::on_method_name_changed ( const std::string &  oldname,
const std::string &  newname,
MethodProxyBase::pointer  method 
)
protected
void DBus::InterfaceProxy::on_object_set_connection ( DBusCxxPointer< Connection conn)
protected

References m_signals.

void DBus::InterfaceProxy::on_object_set_path ( const std::string &  path)
protected

References m_signals.

Path DBus::InterfaceProxy::path ( ) const

References m_object, and DBus::ObjectProxy::path().

Referenced by add_signal(), and create_signal().

void DBus::InterfaceProxy::remove_method ( const std::string &  name)

Removes the first method with the given name.

References m_method_signal_name_connections, m_methods, m_methods_rwlock, m_signal_method_removed, and method().

void DBus::InterfaceProxy::remove_method ( MethodProxyBase::pointer  method)
bool DBus::InterfaceProxy::remove_signal ( const std::string &  signame)

References signal().

bool DBus::InterfaceProxy::remove_signal ( signal_proxy_base::pointer  sig)

References connection(), has_signal(), and m_signals.

void DBus::InterfaceProxy::set_name ( const std::string &  new_name)
signal_proxy_base::pointer DBus::InterfaceProxy::signal ( const std::string &  signame)

References m_signals.

Referenced by remove_signal().

sigc::signal< void, MethodProxyBase::pointer > DBus::InterfaceProxy::signal_method_added ( )

Signal emitted when a method of the given name is added.

References m_signal_method_added.

sigc::signal< void, MethodProxyBase::pointer > DBus::InterfaceProxy::signal_method_removed ( )

Signal emitted when a method of the given name is removed.

References m_signal_method_removed.

sigc::signal< void, const std::string &, const std::string & > DBus::InterfaceProxy::signal_name_changed ( )

Signal emitted when the name is changed.

References m_signal_name_changed.

const InterfaceProxy::Signals & DBus::InterfaceProxy::signals ( ) const

References m_signals.

Friends And Related Function Documentation

friend class ObjectProxy
friend

Member Data Documentation

MethodSignalNameConnections DBus::InterfaceProxy::m_method_signal_name_connections
protected
Methods DBus::InterfaceProxy::m_methods
protected
pthread_rwlock_t DBus::InterfaceProxy::m_methods_rwlock
mutableprotected
std::string DBus::InterfaceProxy::m_name
protected
pthread_mutex_t DBus::InterfaceProxy::m_name_mutex
protected

Ensures that the name doesn't change while the name changed signal is emitting.

Referenced by InterfaceProxy(), and ~InterfaceProxy().

ObjectProxy* DBus::InterfaceProxy::m_object
protected
sigc::signal<void,MethodProxyBase::pointer> DBus::InterfaceProxy::m_signal_method_added
protected

Referenced by add_method(), and signal_method_added().

sigc::signal<void,MethodProxyBase::pointer> DBus::InterfaceProxy::m_signal_method_removed
protected
sigc::signal<void,const std::string&,const std::string&> DBus::InterfaceProxy::m_signal_name_changed
protected

Referenced by signal_name_changed().

Signals DBus::InterfaceProxy::m_signals
protected

The documentation for this class was generated from the following files:

Generated on Sun Mar 19 2017 14:54:27 for dbus-cxx by doxygen 1.8.8