DBus::Timeout Class Reference

#include <dispatcher.h>

Inheritance diagram for DBus::Timeout:

DBus::BusTimeout DBus::Glib::BusTimeout

List of all members.

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


Detailed Description

Definition at line 34 of file dispatcher.h.


Constructor & Destructor Documentation

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

virtual DBus::Timeout::~Timeout (  )  [inline, virtual]

Definition at line 42 of file dispatcher.h.


Member Function Documentation

bool Timeout::enabled (  )  const

Definition at line 52 of file dispatcher.cpp.

Referenced by DBus::Glib::BusDispatcher::add_timeout().

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 57 of file dispatcher.cpp.

Referenced by DBus::BusDispatcher::timeout_expired().

int Timeout::interval (  )  const

Gets the timeout interval.

The dbus_timeout_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 47 of file dispatcher.cpp.

virtual void DBus::Timeout::toggle (  )  [pure virtual]


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

Generated on Sat Jul 11 11:14:28 2009 for libdbus-c++ by  doxygen 1.5.9