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 ()
 
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)
 
- Static Public Member Functions inherited from DBus::Dispatcher
static pointer create (bool is_running=true)
 

Protected Member Functions

virtual void dispatch_thread_main ()
 
void on_glibmm_dispatch ()
 
- Protected Member Functions inherited from DBus::Dispatcher
 Dispatcher (bool is_running=true)
 
bool on_add_watch (Watch::pointer)
 
bool on_remove_watch (Watch::pointer)
 
void 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)
 
void wakeup_thread ()
 
void add_read_and_write_watches (std::vector< struct pollfd > *fds)
 Add all read and write watch FDs to the given vector to watch. More...
 
void handle_read_and_write_watches (std::vector< struct pollfd > *fds)
 Handle all of the read and write watches if the given FD needs to be serviced. More...
 
void dispatch_connections ()
 Dispatch all of our connections. More...
 

Protected Attributes

::Glib::Dispatcher m_glibmm_dispatcher
 
- Protected Attributes inherited from DBus::Dispatcher
Connections m_connections
 
bool m_running
 
std::thread * m_dispatch_thread
 
std::mutex m_mutex_watches
 
std::list< Watch::pointerm_watches
 
std::map< int, Watch::pointerm_watches_map
 
std::mutex m_mutex_exception_fd_set
 
std::vector< int > m_exception_fd_set
 
int process_fd [2]
 
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. More...
 

Additional Inherited Members

- Protected Types inherited from DBus::Dispatcher
typedef std::list
< Connection::pointer
Connections
 

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

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

::Glib::Dispatcher DBus::Glib::Dispatcher::m_glibmm_dispatcher
protected

Referenced by dispatch_thread_main(), and Dispatcher().


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