Files
haiku-beta6/src/servers/syslog_daemon/SyslogDaemon.h
T
Axel Dörfler 95f0fd9010 Implemented the syslog_daemon. Actual syslog output is not yet implemented;
it currently only puts out everything to stdout.
Is able to accept listeners who will get the syslog notes as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-13 01:14:19 +00:00

43 lines
801 B
C++

/*
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
** Distributed under the terms of the OpenBeOS License.
*/
#ifndef _SYSLOG_DAEMON_H_
#define _SYSLOG_DAEMON_H_
#include <Application.h>
#include <Locker.h>
#include <List.h>
#include <OS.h>
#include <syslog_daemon.h>
typedef void (*handler_func)(syslog_message &);
class SyslogDaemon : public BApplication {
public:
SyslogDaemon();
virtual void ReadyToRun();
virtual void AboutRequested();
virtual bool QuitRequested();
virtual void MessageReceived(BMessage *msg);
void AddHandler(handler_func function);
void Daemon();
static int32 daemon_thread(void *data);
private:
thread_id fDaemon;
port_id fPort;
BLocker fHandlerLock;
BList fHandlers;
};
#endif /* _SYSLOG_DAEMON_H_ */