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

Reimplements DBus::Dispatcher to conduct all dispatching in the provided Glib MainContext if one is provided or in the default context otherwise. More...

#include <dispatcher.h>

Inheritance diagram for DBus::Glib::Dispatcher:
Inheritance graph
[legend]

Public Types

typedef DBusCxxPointer
< Dispatcher
pointer
typedef DBusCxxPointer< const
Dispatcher
const_pointer
- Public Types inherited from DBus::Dispatcher
typedef DBusCxxPointer
< Dispatcher
pointer
typedef DBusCxxPointer< const
Dispatcher
const_pointer

Public Member Functions

 Dispatcher (bool is_running=true)
 Dispatcher (bool is_running, const ::Glib::RefPtr< ::Glib::MainContext > &context)
virtual ~Dispatcher ()
- Public Member Functions inherited from DBus::Dispatcher
bool start ()
bool stop ()
bool is_running ()
struct timeval & responsiveness ()
void set_responsiveness (const struct timeval &r)
void set_responsiveness (time_t sec, suseconds_t usec)
Connection::pointer create_connection (DBusConnection *cobj=NULL, bool is_private=false)
Connection::pointer create_connection (BusType type, bool is_private=false)
Connection::pointer create_connection (const Connection &other)
bool add_connection (Connection::pointer connection)

Static Public Member Functions

static pointer create (bool is_running=true)
static pointer create (bool is_running, const ::Glib::RefPtr< ::Glib::MainContext > &context)

Protected Member Functions

virtual void dispatch_thread_main ()
void on_glibmm_dispatch ()
- Protected Member Functions inherited from DBus::Dispatcher
void build_read_fd_set ()
void build_write_fd_set ()
void watch_thread_main ()
bool on_add_watch (Watch::pointer)
bool on_remove_watch (Watch::pointer)
bool on_watch_toggled (Watch::pointer)
bool on_add_timeout (Timeout::pointer)
bool on_remove_timeout (Timeout::pointer)
bool on_timeout_toggled (Timeout::pointer)
void on_wakeup_main (Connection::pointer)
void on_dispatch_status_changed (DispatchStatus, Connection::pointer)

Protected Attributes

::Glib::Dispatcher m_glibmm_dispatcher
pthread_cond_t m_cond_glibmm_processing
pthread_mutex_t m_mutex_glibmm_processing
- Protected Attributes inherited from DBus::Dispatcher
Connections m_connections
bool m_running
pthread_t m_dispatch_thread
pthread_t m_watch_thread
pthread_mutex_t m_mutex_read_watches
std::map< int, Watch::pointerm_read_watches
std::set< int > m_enabled_read_fds
fd_set m_read_fd_set
int m_maximum_read_fd
pthread_mutex_t m_mutex_write_watches
std::map< int, Watch::pointerm_write_watches
std::set< int > m_enabled_write_fds
fd_set m_write_fd_set
int m_maximum_write_fd
fd_set m_exception_fd_set
pthread_mutex_t m_mutex_exception_fd_set
struct timeval m_responsiveness
unsigned int m_dispatch_loop_limit
 This is the maximum number of dispatches that will occur for a connection in one iteration of the dispatch thread.
bool m_initiate_processing
pthread_cond_t m_cond_initiate_processing
pthread_mutex_t m_mutex_initiate_processing

Additional Inherited Members

- Protected Types inherited from DBus::Dispatcher
typedef std::list
< Connection::pointer
Connections
- Static Protected Member Functions inherited from DBus::Dispatcher
static void * proxy_dispatch_thread_main (void *)
 Since pthread_create cannot take a class method as the thread-main parameter this function is called with an argument pointing to the Dispatcher instance to start in the thread.
static void * proxy_watch_thread_main (void *)
 Since pthread_create cannot take a class method as the thread-main parameter this function is called with an argument pointing to the Dispatcher instance to start in the thread.

Detailed Description

Reimplements DBus::Dispatcher to conduct all dispatching in the provided Glib MainContext if one is provided or in the default context otherwise.

This class still creates multiple threads for handling I/O file descriptors and for controlling dispatching. However, the actual dispatching will occur in the provided context' main loop.

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

Member Typedef Documentation

typedef DBusCxxPointer<const Dispatcher> DBus::Glib::Dispatcher::const_pointer

Constructor & Destructor Documentation

DBus::Glib::Dispatcher::Dispatcher ( bool  is_running = true)
DBus::Glib::Dispatcher::Dispatcher ( bool  is_running,
const ::Glib::RefPtr< ::Glib::MainContext > &  context 
)
DBus::Glib::Dispatcher::~Dispatcher ( )
virtual

Member Function Documentation

Dispatcher::pointer DBus::Glib::Dispatcher::create ( bool  is_running = true)
static

Reimplemented from DBus::Dispatcher.

References Dispatcher().

Dispatcher::pointer DBus::Glib::Dispatcher::create ( bool  is_running,
const ::Glib::RefPtr< ::Glib::MainContext > &  context 
)
static

References Dispatcher().

void DBus::Glib::Dispatcher::dispatch_thread_main ( )
protectedvirtual
void DBus::Glib::Dispatcher::on_glibmm_dispatch ( )
protected

Member Data Documentation

pthread_cond_t DBus::Glib::Dispatcher::m_cond_glibmm_processing
protected
::Glib::Dispatcher DBus::Glib::Dispatcher::m_glibmm_dispatcher
protected

Referenced by dispatch_thread_main(), and Dispatcher().

pthread_mutex_t DBus::Glib::Dispatcher::m_mutex_glibmm_processing
protected

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

Generated on Sat Sep 21 2013 17:22:40 for dbus-cxx by doxygen 1.8.1.2