Bincimap 2.0.16
Easy Imapping
|
#include <stdiodevice.h>
Public Member Functions | |
StdIODevice (int flags) | |
~StdIODevice () | |
std::string | service (void) const |
bool | canRead (void) const |
![]() | |
IODevice (int f=0) | |
virtual | ~IODevice (void) |
void | clear (void) |
void | setFlags (unsigned int f) |
void | clearFlags (unsigned int f) |
void | setMaxInputBufferSize (unsigned int max) |
void | setMaxOutputBufferSize (unsigned int max) |
void | setTimeout (unsigned int t) |
unsigned int | getTimeout (void) const |
void | setOutputLevel (LogLevel level) |
LogLevel | getOutputLevel (void) const |
void | setOutputLevelLimit (LogLevel level) |
LogLevel | getOutputLevelLimit (void) const |
unsigned int | getReadCount (void) const |
unsigned int | getWriteCount (void) const |
void | enableProtocolDumping (void) |
template<class T > | |
IODevice & | operator<< (const T &source) |
IODevice & | operator<< (std::ostream &(*source)(std::ostream &)) |
virtual bool | canRead (void) const |
bool | readStr (std::string *dest, unsigned int max=0) |
bool | readChar (char *dest=0) |
void | unreadChar (char c) |
void | unreadStr (const std::string &s) |
bool | skipTo (char c) |
bool | flush (void) |
Error | getLastError (void) const |
std::string | getLastErrorString (void) const |
virtual std::string | service (void) const |
Protected Member Functions | |
bool | waitForWrite (void) const |
bool | waitForRead (void) const |
WriteResult | write (void) |
bool | fillInputBuffer (void) |
virtual bool | waitForWrite (void) const |
virtual bool | waitForRead (void) const |
virtual WriteResult | write (void) |
virtual bool | fillInputBuffer (void) |
Additional Inherited Members | |
![]() | |
enum | Flags { None = 0 , FlushesOnEndl = 1 << 0 , HasInputLimit = 1 << 1 , HasOutputLimit = 1 << 2 , IsEnabled = 1 << 3 , HasTimeout = 1 << 4 } |
enum | Error { Unknown , Timeout } |
enum | LogLevel { ErrorLevel , InfoLevel , WarningLevel , DebugLevel } |
![]() | |
enum | WriteResult { WriteWait = 0 , WriteDone = 1 << 0 , WriteError = 1 << 1 } |
![]() | |
BincStream | inputBuffer |
BincStream | outputBuffer |
unsigned int | flags |
unsigned int | maxInputBufferSize |
unsigned int | maxOutputBufferSize |
unsigned int | timeout |
unsigned int | readCount |
unsigned int | writeCount |
LogLevel | outputLevel |
LogLevel | outputLevelLimit |
Error | error |
std::string | errorString |
int | dumpfd |
Definition at line 13 of file stdiodevice.h.
StdIODevice | ( | int | flags | ) |
Definition at line 25 of file stdiodevice.cc.
~StdIODevice | ( | void | ) |
Definition at line 30 of file stdiodevice.cc.
|
virtual |
Returns true if data can be read from the device; otherwise returns false.
Reimplemented from IODevice.
Definition at line 41 of file stdiodevice.cc.
|
protectedvirtual |
Reads data from the device, and stores it in the input buffer. Returns true on success; otherwise returns false.
This method will fail if there is no more data available, if a timeout occurred or if an error with the device prevents more data from being read.
The number of bytes read from the device is undefined.
Reimplemented from IODevice.
Definition at line 102 of file stdiodevice.cc.
|
virtual |
Returns the type of service provided by this device. Two valid return values are "client" and "log".
Reimplemented from IODevice.
Definition at line 35 of file stdiodevice.cc.
|
protectedvirtual |
Waits until data can be read from the device.
Reimplemented from IODevice.
Definition at line 64 of file stdiodevice.cc.
|
protectedvirtual |
Waits until data can be written to the device. If the timeout is 0, this function waits indefinitely. Otherwise, it waits until the timeout has expired.
If this function returns true, data can be written to the device; otherwise, getLastError() must be checked to determine whether a timeout occurred or whether an error with the device prevents further writing.
Reimplemented from IODevice.
Definition at line 48 of file stdiodevice.cc.
|
protectedvirtual |
Writes as much data as possible to the device. If some but not all data was written, returns WriteWait. If all data was written, returns WriteDone. If an error occurred, returns WriteError.
Reimplemented from IODevice.
Definition at line 80 of file stdiodevice.cc.