XmlRpcSource.h
Go to the documentation of this file.
1 
2 #ifndef _XMLRPCSOURCE_H_
3 #define _XMLRPCSOURCE_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 namespace XmlRpc {
14 
17  public:
21  XmlRpcSource(int fd = -1, bool deleteOnClose = false);
22 
24  virtual ~XmlRpcSource();
25 
27  int getfd() const { return _fd; }
29  void setfd(int fd) { _fd = fd; }
30 
32  bool getKeepOpen() const { return _keepOpen; }
34  void setKeepOpen(bool b=true) { _keepOpen = b; }
35 
37  virtual void close();
38 
40  virtual unsigned handleEvent(unsigned eventType) = 0;
41 
42  private:
43 
44  // Socket. This should really be a SOCKET (an alias for unsigned int*) on windows...
45  int _fd;
46 
47  // In the server, a new source (XmlRpcServerConnection) is created
48  // for each connected client. When each connection is closed, the
49  // corresponding source object is deleted.
51 
52  // In the client, keep connections open if you intend to make multiple calls.
53  bool _keepOpen;
54  };
55 } // namespace XmlRpc
56 
57 #endif //_XMLRPCSOURCE_H_
Definition: XmlRpc.h:39
bool getKeepOpen() const
Return whether the file descriptor should be kept open if it is no longer monitored.
Definition: XmlRpcSource.h:32
void setKeepOpen(bool b=true)
Specify whether the file descriptor should be kept open if it is no longer monitored.
Definition: XmlRpcSource.h:34
int getfd() const
Return the file descriptor being monitored.
Definition: XmlRpcSource.h:27
void setfd(int fd)
Specify the file descriptor to monitor.
Definition: XmlRpcSource.h:29
An RPC source represents a file descriptor to monitor.
Definition: XmlRpcSource.h:16
#define XMLRPCPP_DECL
Definition: XmlRpcDecl.h:52


xmlrpcpp
Author(s): Chris Morley, Konstantin Pilipchuk, Morgan Quigley
autogenerated on Mon Jun 10 2019 14:48:08