Bincimap 2.0.16
Easy Imapping
|
#include <syslogdevice.h>
Public Member Functions | |
SyslogDevice (int flags, const char *ident="bincimap", int option=LOG_NDELAY|LOG_PID, int facility=LOG_USER) | |
~SyslogDevice () | |
void | setPriority (int p) |
std::string | service (void) const |
Public Member Functions inherited from IODevice | |
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 | |
Public Types inherited from IODevice | |
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 } |
Protected Types inherited from IODevice | |
enum | WriteResult { WriteWait = 0 , WriteDone = 1 << 0 , WriteError = 1 << 1 } |
Protected Attributes inherited from IODevice | |
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 14 of file syslogdevice.h.
SyslogDevice | ( | int | flags, |
const char * | ident = "bincimap" , |
||
int | option = LOG_NDELAY | LOG_PID , |
||
int | facility = LOG_USER |
||
) |
Definition at line 19 of file syslogdevice.cc.
~SyslogDevice | ( | void | ) |
Definition at line 27 of file syslogdevice.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 72 of file syslogdevice.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 33 of file syslogdevice.cc.
void setPriority | ( | int | p | ) |
|
protectedvirtual |
Waits until data can be read from the device.
Reimplemented from IODevice.
Definition at line 45 of file syslogdevice.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 39 of file syslogdevice.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 51 of file syslogdevice.cc.