diff options
Diffstat (limited to 'src/include/syslogdevice.h')
-rw-r--r-- | src/include/syslogdevice.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/include/syslogdevice.h b/src/include/syslogdevice.h new file mode 100644 index 0000000..2269fb2 --- /dev/null +++ b/src/include/syslogdevice.h @@ -0,0 +1,41 @@ +/** -------------------------------------------------------------------- + * @file Syslogdevice.h + * @brief Declaration of the SyslogDevice class. + * @author Andreas Aardal Hanssen + * @date 2002, 2003 + * ----------------------------------------------------------------- **/ +#ifndef syslogdevice_h_included +#define syslogdevice_h_included + +#include "iodevice.h" +#include <syslog.h> + +namespace Binc { + class SyslogDevice : public IODevice { + public: + 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; + + protected: + bool waitForWrite(void) const; + bool waitForRead(void) const; + + WriteResult write(void); + bool fillInputBuffer(void); + + private: + static std::string ident; + + int option; + int facility; + int priority; + }; +} + +#endif |