Wittyshare  0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
WsFsDaemonLoader.h
Go to the documentation of this file.
1 /*
2  *
3  * Filename: WsFsDaemonLoader.h
4  *
5  * Description:
6  *
7  * Created: 02/15/12 14:07:18
8  *
9  * Author: Benoit Daccache, ben.daccache@gmail.com
10  *
11  */
12 #ifndef WS_FSDAEMON_LOADER_H__
13 #define WS_FSDAMEON_LOADER_H__
14 
15 #include <iostream>
16 #include <getopt.h>
17 #include "WsFsDaemon.h"
19 #include <signal.h>
20 
21 
26 public:
32  WsFsDaemonLoader(WsGlobalProperties* props, bool daemon = false);
33 
38 
43  int start();
44 
45 private:
46 
51  int daemonize();
52 
56  bool m_daemon;
57 
62 
67 
68 };
69 
70 #endif
71 
Global properties.
Global properties class.
int daemonize()
daemonize the server, fork and put it in backgroud
Loads the FsDaemon depending on the params passed as args.
Main class of the FsDaemon.
Definition: WsFsDaemon.h:44
int start()
launch the server
bool m_daemon
daemonize or not
WsGlobalProperties * m_props
Take charge of FS operations.
WsFsDaemonLoader(WsGlobalProperties *props, bool daemon=false)
Constructor.
WsFsDaemon * m_server
~WsFsDaemonLoader()
destructor