DBus::StandaloneDispatcher Class Reference

The StandaloneDispatcher creates a new thread that handles all of the reading and writing to the bus. More...

#include <standalonedispatcher.h>

Inheritance diagram for DBus::StandaloneDispatcher:

Public Member Functions

 ~StandaloneDispatcher ()
 
- Public Member Functions inherited from DBus::Dispatcher
virtual ~Dispatcher ()
 

Static Public Member Functions

static std::shared_ptr< StandaloneDispatchercreate (bool is_running=true)
 

Private Member Functions

 StandaloneDispatcher (bool is_running=true)
 

Managing Connections

void dispatch_thread_main ()
 
void wakeup_thread ()
 
void dispatch_connections ()
 Dispatch all of our connections. More...
 
 DBUS_CXX_PROPAGATE_CONST (std::unique_ptr< priv_data >) m_priv
 
std::shared_ptr< Connectioncreate_connection (BusType type)
 
std::shared_ptr< Connectioncreate_connection (std::string address)
 
bool add_connection (std::shared_ptr< Connection > connection)
 
bool start ()
 
bool stop ()
 
bool is_running ()
 

Detailed Description

The StandaloneDispatcher creates a new thread that handles all of the reading and writing to the bus.

One dispatcher can handle multiple connections.

Constructor & Destructor Documentation

◆ StandaloneDispatcher()

StandaloneDispatcher::StandaloneDispatcher ( bool  is_running = true)
private

References is_running(), LOGGER_NAME, SIMPLELOGGER_ERROR, and start().

Referenced by create().

◆ ~StandaloneDispatcher()

StandaloneDispatcher::~StandaloneDispatcher ( )

References stop().

Member Function Documentation

◆ add_connection()

bool StandaloneDispatcher::add_connection ( std::shared_ptr< Connection connection)
virtual

Implements DBus::Dispatcher.

References wakeup_thread().

Referenced by create_connection().

◆ create()

std::shared_ptr< StandaloneDispatcher > StandaloneDispatcher::create ( bool  is_running = true)
static

◆ create_connection() [1/2]

std::shared_ptr< DBus::Connection > StandaloneDispatcher::create_connection ( BusType  type)
virtual

◆ create_connection() [2/2]

std::shared_ptr< DBus::Connection > StandaloneDispatcher::create_connection ( std::string  address)
virtual

◆ DBUS_CXX_PROPAGATE_CONST()

DBus::StandaloneDispatcher::DBUS_CXX_PROPAGATE_CONST ( std::unique_ptr< priv_data >  )
private

◆ dispatch_connections()

void StandaloneDispatcher::dispatch_connections ( )
private

Dispatch all of our connections.

References DBus::COMPLETE, LOGGER_NAME, SIMPLELOGGER_DEBUG, and wakeup_thread().

Referenced by dispatch_thread_main().

◆ dispatch_thread_main()

void StandaloneDispatcher::dispatch_thread_main ( )
private

◆ is_running()

bool StandaloneDispatcher::is_running ( )

Referenced by create(), and StandaloneDispatcher().

◆ start()

bool StandaloneDispatcher::start ( )

References dispatch_thread_main().

Referenced by StandaloneDispatcher().

◆ stop()

bool StandaloneDispatcher::stop ( )

References wakeup_thread().

Referenced by ~StandaloneDispatcher().

◆ wakeup_thread()

void StandaloneDispatcher::wakeup_thread ( )
private

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