btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / servers / syslog_daemon / SyslogDaemon.h
blobb544762fb919c6b6301feddf9e5f118100142f98
1 /*
2 * Copyright 2003-2015, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _SYSLOG_DAEMON_H_
6 #define _SYSLOG_DAEMON_H_
9 #include <Application.h>
10 #include <Locker.h>
11 #include <List.h>
12 #include <OS.h>
14 #include <syslog_daemon.h>
17 typedef void (*handler_func)(syslog_message&);
20 class SyslogDaemon : public BApplication {
21 public:
22 SyslogDaemon();
24 virtual void ReadyToRun();
25 virtual void AboutRequested();
26 virtual bool QuitRequested();
27 virtual void MessageReceived(BMessage* message);
29 void AddHandler(handler_func function);
31 private:
32 void _Daemon();
33 static int32 _DaemonThread(void* data);
35 private:
36 thread_id fDaemon;
37 port_id fPort;
39 BLocker fHandlerLock;
40 BList fHandlers;
44 #endif /* _SYSLOG_DAEMON_H_ */