OverSim
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
XmlRpcDispatch.h
Go to the documentation of this file.
1
2
#ifndef _XMLRPCDISPATCH_H_
3
#define _XMLRPCDISPATCH_H_
4
//
5
// XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
6
//
7
13
#if defined(_MSC_VER)
14
# pragma warning(disable:4786) // identifier was truncated in debug info
15
#endif
16
17
#ifndef MAKEDEPEND
18
# include <list>
19
#endif
20
21
namespace
XmlRpc {
22
23
// An RPC source represents a file descriptor to monitor
24
class
XmlRpcSource;
25
28
class
XmlRpcDispatch
{
29
public
:
31
XmlRpcDispatch
();
32
~XmlRpcDispatch
();
33
35
enum
EventType
{
36
ReadableEvent
= 1,
37
WritableEvent
= 2,
38
Exception
= 4
39
};
40
45
void
addSource
(
XmlRpcSource
* source,
unsigned
eventMask);
46
50
void
removeSource
(
XmlRpcSource
* source);
51
53
void
setSourceEvents
(
XmlRpcSource
* source,
unsigned
eventMask);
54
55
58
void
work
(
double
msTime);
59
61
void
exit
();
62
64
void
clear
();
65
66
protected
:
67
69
bool
waitForAndProcessEvents
(
double
timeout);
70
71
72
// helper
73
double
getTime
();
74
75
// A source to monitor and what to monitor it for
76
struct
MonitoredSource
{
77
MonitoredSource
(
XmlRpcSource
* src,
unsigned
mask) :
_src
(src),
_mask
(mask) {}
78
XmlRpcSource
*
getSource
()
const
{
return
_src
; }
79
unsigned
&
getMask
() {
return
_mask
; }
80
XmlRpcSource
*
_src
;
81
unsigned
_mask
;
82
};
83
84
// A list of sources to monitor
85
typedef
std::list< MonitoredSource >
SourceList
;
86
87
// Sources being monitored
88
SourceList
_sources
;
89
90
// When work should stop (-1 implies wait forever, or until exit is called)
91
double
_endTime
;
92
93
bool
_doClear
;
94
bool
_inWork
;
95
96
};
97
}
// namespace XmlRpc
98
99
#endif // _XMLRPCDISPATCH_H_
src
tier3
xmlrpcinterface
xmlrpc++
XmlRpcDispatch.h
Generated on Fri Dec 7 2012 13:37:53 for OverSim by
1.8.1.2