An RPC source represents a file descriptor to monitor. More...
#include <XmlRpcSource.h>
Public Member Functions | |
virtual void | close () |
Close the owned fd. If deleteOnClose was specified at construction, the object is deleted. | |
int | getfd () const |
Return the file descriptor being monitored. | |
bool | getKeepOpen () const |
Return whether the file descriptor should be kept open if it is no longer monitored. | |
virtual unsigned | handleEvent (unsigned eventType)=0 |
Return true to continue monitoring this source. | |
void | setfd (int fd) |
Specify the file descriptor to monitor. | |
void | setKeepOpen (bool b=true) |
Specify whether the file descriptor should be kept open if it is no longer monitored. | |
XmlRpcSource (int fd=-1, bool deleteOnClose=false) | |
virtual | ~XmlRpcSource () |
Destructor. | |
Private Attributes | |
bool | _deleteOnClose |
int | _fd |
bool | _keepOpen |
An RPC source represents a file descriptor to monitor.
Definition at line 16 of file XmlRpcSource.h.
XmlRpc::XmlRpcSource::XmlRpcSource | ( | int | fd = -1 , |
bool | deleteOnClose = false |
||
) |
Constructor
fd | The socket file descriptor to monitor. |
deleteOnClose | If true, the object deletes itself when close is called. |
Definition at line 9 of file XmlRpcSource.cpp.
XmlRpc::XmlRpcSource::~XmlRpcSource | ( | ) | [virtual] |
Destructor.
Definition at line 14 of file XmlRpcSource.cpp.
void XmlRpc::XmlRpcSource::close | ( | ) | [virtual] |
Close the owned fd. If deleteOnClose was specified at construction, the object is deleted.
Reimplemented in XmlRpc::XmlRpcClient.
Definition at line 20 of file XmlRpcSource.cpp.
int XmlRpc::XmlRpcSource::getfd | ( | ) | const [inline] |
Return the file descriptor being monitored.
Definition at line 27 of file XmlRpcSource.h.
bool XmlRpc::XmlRpcSource::getKeepOpen | ( | ) | const [inline] |
Return whether the file descriptor should be kept open if it is no longer monitored.
Definition at line 32 of file XmlRpcSource.h.
virtual unsigned XmlRpc::XmlRpcSource::handleEvent | ( | unsigned | eventType | ) | [pure virtual] |
Return true to continue monitoring this source.
Implemented in XmlRpc::XmlRpcServer, XmlRpc::XmlRpcClient, and XmlRpc::XmlRpcServerConnection.
void XmlRpc::XmlRpcSource::setfd | ( | int | fd | ) | [inline] |
Specify the file descriptor to monitor.
Definition at line 29 of file XmlRpcSource.h.
void XmlRpc::XmlRpcSource::setKeepOpen | ( | bool | b = true | ) | [inline] |
Specify whether the file descriptor should be kept open if it is no longer monitored.
Definition at line 34 of file XmlRpcSource.h.
bool XmlRpc::XmlRpcSource::_deleteOnClose [private] |
Definition at line 50 of file XmlRpcSource.h.
int XmlRpc::XmlRpcSource::_fd [private] |
Definition at line 45 of file XmlRpcSource.h.
bool XmlRpc::XmlRpcSource::_keepOpen [private] |
Definition at line 53 of file XmlRpcSource.h.