# DBus-C++

## Desktop Communication Bus System

libdbus-c-- Documentation 0.9.0

- Files
- Data Structures
- Globals
- Main Page

Public Member Functions | Private Attributes | List of all members
DBus::BusDispatcher Class Reference

`#include <eventloop-integration.h>`

Inheritance diagram for DBus::BusDispatcher:

## Public Member Functions

| BusDispatcher ()
| ~BusDispatcher ()
virtual void | enter ()
virtual void | leave ()
virtual Pipe * | add_pipe (void(*handler)(const void *data, void *buffer, unsigned int nbyte), const void *data)
virtual void | del_pipe (Pipe *pipe)
virtual void | do_iteration ()
virtual Timeout * | add_timeout (Timeout::Internal *)
virtual void | rem_timeout (Timeout *)
virtual Watch * | add_watch (Watch::Internal *)
virtual void | rem_watch (Watch *)
void | watch_ready (DefaultWatch &)
void | timeout_expired (DefaultTimeout &)
Public Member Functions inherited from DBus::Dispatcher
virtual | ~Dispatcher ()
void | queue_connection (Connection::Private *)
void | dispatch_pending ()
bool | has_something_to_dispatch ()
Public Member Functions inherited from DBus::DefaultMainLoop
| DefaultMainLoop ()
virtual | ~DefaultMainLoop ()
virtual void | dispatch ()

## Private Attributes

bool | _running
int | _pipe [2]
std::list< Pipe * > | pipe_list

## Additional Inherited Members

Public Attributes inherited from DBus::DefaultMainLoop
int | _fdunlock [2]

## Detailed Description

Definition at line 62 of file eventloop-integration.h.

## Constructor & Destructor Documentation

## ◆ BusDispatcher()

BusDispatcher::BusDispatcher | ( |  | ) |

Definition at line 80 of file eventloop-integration.cpp.

References DBus::DefaultMainLoop::_fdunlock, _pipe, _running, and DBus::toString().

## ◆ ~BusDispatcher()

DBus::BusDispatcher::~BusDispatcher | ( |  | ) |

inline

Definition at line 67 of file eventloop-integration.h.

## Member Function Documentation

## ◆ add_pipe()

Pipe * BusDispatcher::add_pipe | ( | void(* | handler )(const void *data, void *buffer, unsigned int nbyte),
|  | const void * | data )

virtual

Definition at line 132 of file eventloop-integration.cpp.

References pipe_list.

## ◆ add_timeout()

Timeout * BusDispatcher::add_timeout | ( | Timeout::Internal * | ti | ) |

virtual

Implements DBus::Dispatcher.

Definition at line 152 of file eventloop-integration.cpp.

References DBus::DefaultTimeout::data(), DBus::debug_log, DBus::DefaultTimeout::expired, and timeout_expired().

## ◆ add_watch()

Watch * BusDispatcher::add_watch | ( | Watch::Internal * | wi | ) |

virtual

Implements DBus::Dispatcher.

Definition at line 175 of file eventloop-integration.cpp.

References DBus::DefaultWatch::data(), DBus::debug_log, DBus::DefaultWatch::ready, and watch_ready().

## ◆ del_pipe()

void BusDispatcher::del_pipe | ( | Pipe * | pipe | ) |

virtual

Definition at line 140 of file eventloop-integration.cpp.

References pipe_list.

## ◆ do_iteration()

void BusDispatcher::do_iteration | ( |  | ) |

virtual

Definition at line 146 of file eventloop-integration.cpp.

References DBus::DefaultMainLoop::dispatch(), and DBus::Dispatcher::dispatch_pending().

Referenced by enter().

## ◆ enter()

void BusDispatcher::enter | ( |  | ) |

virtual

Implements DBus::Dispatcher.

Definition at line 92 of file eventloop-integration.cpp.

References DBus::Pipe::_data, DBus::Pipe::_handler, _running, DBus::debug_log, do_iteration(), pipe_list, and DBus::Pipe::read().

## ◆ leave()

void BusDispatcher::leave | ( |  | ) |

virtual

Implements DBus::Dispatcher.

Definition at line 121 of file eventloop-integration.cpp.

References DBus::DefaultMainLoop::_fdunlock, _running, and DBus::toString().

## ◆ rem_timeout()

void BusDispatcher::rem_timeout | ( | Timeout * | t | ) |

virtual

Implements DBus::Dispatcher.

Definition at line 168 of file eventloop-integration.cpp.

References DBus::debug_log.

## ◆ rem_watch()

void BusDispatcher::rem_watch | ( | Watch * | w | ) |

virtual

Implements DBus::Dispatcher.

Definition at line 188 of file eventloop-integration.cpp.

References DBus::debug_log.

## ◆ timeout_expired()

void BusDispatcher::timeout_expired | ( | DefaultTimeout & | et | ) |

Definition at line 195 of file eventloop-integration.cpp.

References DBus::DefaultTimeout::data(), DBus::debug_log, DBus::DefaultMainLoop::DefaultTimeout, and DBus::Timeout::handle().

Referenced by add_timeout().

## ◆ watch_ready()

void BusDispatcher::watch_ready | ( | DefaultWatch & | ew | ) |

Definition at line 204 of file eventloop-integration.cpp.

References DBus::DefaultWatch::data(), DBus::debug_log, DBus::DefaultMainLoop::DefaultWatch, DBus::Watch::handle(), and DBus::DefaultWatch::state().

Referenced by add_watch().

## Member Data Documentation

## ◆ _pipe

int DBus::BusDispatcher::_pipe[2]

private

Definition at line 93 of file eventloop-integration.h.

Referenced by BusDispatcher().

## ◆ _running

bool DBus::BusDispatcher::_running

private

Definition at line 92 of file eventloop-integration.h.

Referenced by BusDispatcher(), enter(), and leave().

## ◆ pipe_list

std::list<Pipe *> DBus::BusDispatcher::pipe_list

private

Definition at line 94 of file eventloop-integration.h.

Referenced by add_pipe(), del_pipe(), and enter().

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

- eventloop-integration.h
- eventloop-integration.cpp