# DBus-C++

## Desktop Communication Bus System

libdbus-c-- Documentation 0.9.0

- Files
- Data Structures
- Globals
- Main Page

Public Member Functions | Private Member Functions | Private Attributes | List of all members
DBus::Timeout Class Referenceabstract

`#include <dispatcher.h>`

Inheritance diagram for DBus::Timeout:

## Public Member Functions

| Timeout (Internal *i)
virtual | ~Timeout ()
int | interval () const
| Gets the timeout interval.
bool | enabled () const
bool | handle ()
| Calls the timeout handler for this timeout.
virtual void | toggle ()=0

## Private Member Functions

DXXAPILOCAL | Timeout (const Timeout &)

## Private Attributes

Internal * | _int

## Detailed Description

Definition at line 35 of file dispatcher.h.

## Constructor & Destructor Documentation

## ◆ Timeout() [1/2]

DBus::Timeout::Timeout | ( | Internal * | i | ) |

Referenced by DBus::BusTimeout::BusTimeout(), DBus::Ecore::BusTimeout::BusTimeout(), DBus::Glib::BusTimeout::BusTimeout(), and Timeout().

## ◆ ~Timeout()

virtual DBus::Timeout::~Timeout | ( |  | ) |

inline virtual

Definition at line 43 of file dispatcher.h.

## ◆ Timeout() [2/2]

DXXAPILOCAL DBus::Timeout::Timeout | ( | const Timeout & |  | ) |

private

References DXXAPILOCAL, and Timeout().

## Member Function Documentation

## ◆ enabled()

bool Timeout::enabled | ( |  | ) | const

Definition at line 51 of file dispatcher.cpp.

References _int.

Referenced by DBus::Ecore::BusDispatcher::add_timeout(), DBus::Glib::BusDispatcher::add_timeout(), DBus::BusTimeout::BusTimeout(), DBus::Ecore::BusTimeout::BusTimeout(), DBus::Glib::BusTimeout::BusTimeout(), DBus::BusTimeout::toggle(), DBus::Ecore::BusTimeout::toggle(), and DBus::Glib::BusTimeout::toggle().

## ◆ handle()

bool Timeout::handle | ( |  | ) |

Calls the timeout handler for this timeout.

This function should be called when the timeout occurs.

If this function returns FALSE, then there wasn't enough memory to handle the timeout. Typically just letting the timeout fire again next time it naturally times out is an adequate response to that problem, but you could try to do more if you wanted.

return false If there wasn't enough memory.

Definition at line 56 of file dispatcher.cpp.

References _int.

Referenced by DBus::BusDispatcher::timeout_expired(), DBus::Ecore::BusTimeout::timeout_handler(), and DBus::Glib::BusTimeout::timeout_handler().

## ◆ interval()

int Timeout::interval | ( |  | ) | const

Gets the timeout interval.

The handle() should be called each time this interval elapses, starting after it elapses once.

The interval may change during the life of the timeout; if so, the timeout will be disabled and re-enabled (calling the "timeout toggled function") to notify you of the change.

return The interval in miliseconds.

Definition at line 46 of file dispatcher.cpp.

References _int.

Referenced by DBus::Ecore::BusTimeout::_enable(), DBus::Glib::BusTimeout::_enable(), and DBus::BusTimeout::BusTimeout().

## ◆ toggle()

virtual void DBus::Timeout::toggle | ( |  | ) |

pure virtual

Implemented in DBus::BusTimeout, DBus::Ecore::BusTimeout, and DBus::Glib::BusTimeout.

Referenced by DBus::Dispatcher::Private::on_toggle_timeout().

## Member Data Documentation

## ◆ _int

Internal* DBus::Timeout::_int

private

Definition at line 83 of file dispatcher.h.

Referenced by enabled(), handle(), and interval().

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

- dispatcher.h
- dispatcher.cpp