Main Page   Class Hierarchy   Compound List   File List   Compound Members  

XmlRpc::XmlRpcDispatch Class Reference

An object which monitors file descriptors for events and performs callbacks when interesting events happen. More...

#include <XmlRpcDispatch.h>

List of all members.

Public Types

enum  EventType { ReadableEvent = 1, WritableEvent = 2, Exception = 4 }
 Values indicating the type of events a source is interested in. More...


Public Member Functions

 XmlRpcDispatch ()
 Constructor.

void addSource (XmlRpcSource *source, unsigned eventMask)
 Monitor this source for the event types specified by the event mask and call its event handler when any of the events occur.

void removeSource (XmlRpcSource *source)
 Stop monitoring this source.

void setSourceEvents (XmlRpcSource *source, unsigned eventMask)
 Modify the types of events to watch for on this source.

void work (double msTime)
 Watch current set of sources and process events for the specified duration (in ms, -1 implies wait forever, or until exit is called).

void exit ()
 Exit from work routine.

void clear ()
 Clear all sources from the monitored sources list. Sources are closed.


Protected Types

typedef std::list< MonitoredSource > SourceList

Protected Member Functions

double getTime ()

Protected Attributes

SourceList _sources
double _endTime
bool _doClear
bool _inWork


Detailed Description

An object which monitors file descriptors for events and performs callbacks when interesting events happen.


Member Enumeration Documentation

enum XmlRpc::XmlRpcDispatch::EventType
 

Values indicating the type of events a source is interested in.

Enumeration values:
ReadableEvent  data available to read
WritableEvent  connected/data can be written without blocking
Exception  uh oh


Member Function Documentation

void XmlRpcDispatch::addSource XmlRpcSource   source,
unsigned    eventMask
 

Monitor this source for the event types specified by the event mask and call its event handler when any of the events occur.

Parameters:
source The source to monitor
eventMask Which event types to watch for.
See also:
EventType

void XmlRpcDispatch::removeSource XmlRpcSource   source
 

Stop monitoring this source.

Parameters:
source The source to stop monitoring


The documentation for this class was generated from the following files:
Generated on Thu Mar 6 11:32:58 2003 for XmlRpc++ by doxygen1.3-rc3