Main Page
Namespaces
Classes
Files
File List
File Members
include
xmlrpcpp
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
#if defined(_MSC_VER)
8
# pragma warning(disable:4786) // identifier was truncated in debug info
9
#endif
10
11
#include "
xmlrpcpp/XmlRpcDecl.h
"
12
13
#ifndef MAKEDEPEND
14
# include <list>
15
#endif
16
17
namespace
XmlRpc
{
18
19
// An RPC source represents a file descriptor to monitor
20
class
XmlRpcSource;
21
24
class
XMLRPCPP_DECL
XmlRpcDispatch
{
25
public
:
27
XmlRpcDispatch
();
28
~
XmlRpcDispatch
();
29
31
enum
EventType
{
32
ReadableEvent = 1,
33
WritableEvent = 2,
34
Exception = 4
35
};
36
41
void
addSource(
XmlRpcSource
* source,
unsigned
eventMask);
42
45
void
removeSource(
XmlRpcSource
* source);
46
48
void
setSourceEvents(
XmlRpcSource
* source,
unsigned
eventMask);
49
50
53
void
work(
double
msTime);
54
56
void
exit();
57
59
void
clear();
60
61
// helper returning current steady/monotonic time
62
double
getTime();
63
64
// A source to monitor and what to monitor it for
65
struct
MonitoredSource
{
66
MonitoredSource
(
XmlRpcSource
* src,
unsigned
mask) : _src(src), _mask(mask) {}
67
XmlRpcSource
*
getSource
()
const
{
return
_src; }
68
unsigned
&
getMask
() {
return
_mask; }
69
XmlRpcSource
*
_src
;
70
unsigned
_mask
;
71
};
72
73
// A list of sources to monitor
74
typedef
std::list< MonitoredSource >
SourceList
;
75
76
// Sources being monitored
77
SourceList
_sources
;
78
protected
:
79
80
// When work should stop (-1 implies wait forever, or until exit is called)
81
double
_endTime
;
82
83
bool
_doClear
;
84
bool
_inWork
;
85
86
};
87
}
// namespace XmlRpc
88
89
#endif // _XMLRPCDISPATCH_H_
XmlRpc
Definition:
XmlRpcClient.h:20
XmlRpc::XmlRpcDispatch::MonitoredSource::getSource
XmlRpcSource * getSource() const
Definition:
XmlRpcDispatch.h:67
XmlRpc::XmlRpcDispatch::MonitoredSource::getMask
unsigned & getMask()
Definition:
XmlRpcDispatch.h:68
XmlRpc::XmlRpcDispatch::_doClear
bool _doClear
Definition:
XmlRpcDispatch.h:83
XmlRpc::XmlRpcDispatch::_inWork
bool _inWork
Definition:
XmlRpcDispatch.h:84
XmlRpc::XmlRpcDispatch::_endTime
double _endTime
Definition:
XmlRpcDispatch.h:81
XmlRpc::XmlRpcDispatch::MonitoredSource::_mask
unsigned _mask
Definition:
XmlRpcDispatch.h:70
XmlRpc::XmlRpcDispatch::EventType
EventType
Values indicating the type of events a source is interested in.
Definition:
XmlRpcDispatch.h:31
XmlRpc::XmlRpcDispatch::MonitoredSource
Definition:
XmlRpcDispatch.h:65
XmlRpc::XmlRpcDispatch::MonitoredSource::_src
XmlRpcSource * _src
Definition:
XmlRpcDispatch.h:69
XmlRpc::XmlRpcSource
An RPC source represents a file descriptor to monitor.
Definition:
XmlRpcSource.h:16
XMLRPCPP_DECL
#define XMLRPCPP_DECL
Definition:
XmlRpcDecl.h:52
XmlRpc::XmlRpcDispatch
Definition:
XmlRpcDispatch.h:24
XmlRpcDecl.h
XmlRpc::XmlRpcDispatch::MonitoredSource::MonitoredSource
MonitoredSource(XmlRpcSource *src, unsigned mask)
Definition:
XmlRpcDispatch.h:66
XmlRpc::XmlRpcDispatch::SourceList
std::list< MonitoredSource > SourceList
Definition:
XmlRpcDispatch.h:74
XmlRpc::XmlRpcDispatch::_sources
SourceList _sources
Definition:
XmlRpcDispatch.h:77
xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley, Austin Hendrix
autogenerated on Sun Feb 3 2019 03:29:51