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

This class serves as a receiver of incoming signal messages. More...

#include <signalreceiver.h>

Inheritance diagram for DBus::SignalReceiver:
Inheritance graph
[legend]

Public Types

typedef DBusCxxPointer
< SignalReceiver
pointer
 
typedef DBusCxxWeakPointer
< SignalReceiver
weak_pointer
 
- Public Types inherited from DBus::MessageHandler
typedef DBusCxxPointer
< MessageHandler
pointer
 
typedef DBusCxxWeakPointer
< MessageHandler
weak_pointer
 
typedef sigc::signal
< HandlerResult,
DBusCxxPointer< Connection >
, Message::const_pointer >
::accumulated
< MessageHandlerAccumulator
MessageSignal
 

Public Member Functions

 ~SignalReceiver ()
 
virtual HandlerResult handle_message (DBusCxxPointer< Connection >, Message::const_pointer)
 
const std::string & sender ()
 
void set_sender (const std::string &s)
 
const std::string & interface ()
 
void set_interface (const std::string &s)
 
const std::string & member ()
 
void set_member (const std::string &s)
 
const Pathpath ()
 
void set_path (const std::string &s)
 
const std::string & destination ()
 
void set_destination (const std::string &s)
 
sigc::signal< void > & signal_sender_changed ()
 
sigc::signal< void > & signal_interface_changed ()
 
sigc::signal< void > & signal_member_changed ()
 
sigc::signal< void > & signal_path_changed ()
 
sigc::signal< void > & signal_destination_changed ()
 
const std::string & match_rule ()
 
bool matches (Message::const_pointer msg)
 
- Public Member Functions inherited from DBus::MessageHandler
virtual ~MessageHandler ()
 
MessageSignalsignal_message ()
 

Static Public Member Functions

static pointer create (const std::string &interface, const std::string &member)
 
static pointer create (const std::string &path, const std::string &interface, const std::string &member)
 

Protected Member Functions

 SignalReceiver (const std::string &path, const std::string &interface, const std::string &member)
 
- Protected Member Functions inherited from DBus::MessageHandler
 MessageHandler ()
 

Protected Attributes

std::string m_sender
 
Path m_path
 
std::string m_interface
 
std::string m_member
 
std::string m_destination
 
sigc::signal< void > m_signal_sender_changed
 
sigc::signal< void > m_signal_interface_changed
 
sigc::signal< void > m_signal_member_changed
 
sigc::signal< void > m_signal_path_changed
 
sigc::signal< void > m_signal_destination_changed
 
std::string m_match_rule
 
- Protected Attributes inherited from DBus::MessageHandler
MessageSignal m_signal_message
 

Additional Inherited Members

- Static Protected Member Functions inherited from DBus::MessageHandler
static DBusHandlerResult message_handler_callback (DBusConnection *connection, DBusMessage *message, void *user_data)
 When used as a callback, this method expects. More...
 

Detailed Description

This class serves as a receiver of incoming signal messages.

The messages this receiver will process are determined by the sender, interface, member, path and destination values.

A value that is not set will not be used in determining processing. Thus, if the only two values set a interface ('org.freedesktop.Hal.Manager') and member ('NameOwnerChanged') then the signal will be processed for all senders.

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

Member Typedef Documentation

Constructor & Destructor Documentation

DBus::SignalReceiver::SignalReceiver ( const std::string &  path,
const std::string &  interface,
const std::string &  member 
)
protected

Referenced by create().

DBus::SignalReceiver::~SignalReceiver ( )

Member Function Documentation

SignalReceiver::pointer DBus::SignalReceiver::create ( const std::string &  interface,
const std::string &  member 
)
static

References SignalReceiver().

SignalReceiver::pointer DBus::SignalReceiver::create ( const std::string &  path,
const std::string &  interface,
const std::string &  member 
)
static

References SignalReceiver().

const std::string & DBus::SignalReceiver::destination ( )

References m_destination.

HandlerResult DBus::SignalReceiver::handle_message ( DBusCxxPointer< Connection conn,
Message::const_pointer  msg 
)
virtual
const std::string & DBus::SignalReceiver::interface ( )

References m_interface.

const std::string & DBus::SignalReceiver::match_rule ( )
bool DBus::SignalReceiver::matches ( Message::const_pointer  msg)
const std::string & DBus::SignalReceiver::member ( )

References m_member.

const Path & DBus::SignalReceiver::path ( )

References m_path.

const std::string & DBus::SignalReceiver::sender ( )

References m_sender.

void DBus::SignalReceiver::set_destination ( const std::string &  s)
void DBus::SignalReceiver::set_interface ( const std::string &  s)
void DBus::SignalReceiver::set_member ( const std::string &  s)
void DBus::SignalReceiver::set_path ( const std::string &  s)

References m_path, and m_signal_path_changed.

void DBus::SignalReceiver::set_sender ( const std::string &  s)
sigc::signal< void > & DBus::SignalReceiver::signal_destination_changed ( )
sigc::signal< void > & DBus::SignalReceiver::signal_interface_changed ( )
sigc::signal< void > & DBus::SignalReceiver::signal_member_changed ( )
sigc::signal< void > & DBus::SignalReceiver::signal_path_changed ( )

References m_signal_path_changed.

sigc::signal< void > & DBus::SignalReceiver::signal_sender_changed ( )

Member Data Documentation

std::string DBus::SignalReceiver::m_destination
protected
std::string DBus::SignalReceiver::m_interface
protected
std::string DBus::SignalReceiver::m_match_rule
protected

Referenced by match_rule().

std::string DBus::SignalReceiver::m_member
protected
Path DBus::SignalReceiver::m_path
protected

Referenced by match_rule(), matches(), path(), and set_path().

std::string DBus::SignalReceiver::m_sender
protected
sigc::signal<void> DBus::SignalReceiver::m_signal_destination_changed
protected
sigc::signal<void> DBus::SignalReceiver::m_signal_interface_changed
protected
sigc::signal<void> DBus::SignalReceiver::m_signal_member_changed
protected
sigc::signal<void> DBus::SignalReceiver::m_signal_path_changed
protected

Referenced by set_path(), and signal_path_changed().

sigc::signal<void> DBus::SignalReceiver::m_signal_sender_changed
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