00001
00002 #ifndef _XMLRPCSOURCE_H_
00003 #define _XMLRPCSOURCE_H_
00004
00005
00006
00007 #if defined(_MSC_VER)
00008 # pragma warning(disable:4786) // identifier was truncated in debug info
00009 #endif
00010
00011 namespace XmlRpc {
00012
00014 class XmlRpcSource {
00015 public:
00019 XmlRpcSource(int fd = -1, bool deleteOnClose = false);
00020
00022 virtual ~XmlRpcSource();
00023
00025 int getfd() const { return _fd; }
00027 void setfd(int fd) { _fd = fd; }
00028
00030 bool getKeepOpen() const { return _keepOpen; }
00032 void setKeepOpen(bool b=true) { _keepOpen = b; }
00033
00035 virtual void close();
00036
00038 virtual unsigned handleEvent(unsigned eventType) = 0;
00039
00040 private:
00041
00042
00043 int _fd;
00044
00045
00046
00047
00048 bool _deleteOnClose;
00049
00050
00051 bool _keepOpen;
00052 };
00053 }
00054
00055 #endif //_XMLRPCSOURCE_H_