1 |
douglas |
402 |
// Spectre 2 |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#ifndef _Spectre2_hpp_ |
8 |
|
|
#define _Spectre2_hpp_ |
9 |
|
|
|
10 |
|
|
#include <menes/platform.hpp> |
11 |
|
|
|
12 |
|
|
#ifdef MENES_PRAGMA_ONCE |
13 |
|
|
#pragma once |
14 |
|
|
#endif |
15 |
|
|
|
16 |
|
|
#include <menes-api/console.hpp> |
17 |
douglas |
408 |
#include <menes-api/files.hpp> |
18 |
douglas |
418 |
#include <menes-api/path.hpp> |
19 |
douglas |
402 |
#include <menes-ext/string.hpp> |
20 |
douglas |
418 |
#include <menes-xml/document.hpp> |
21 |
|
|
#include <menes-xml/nodeset.hpp> |
22 |
|
|
#include <menes-xml/parse.hpp> |
23 |
douglas |
402 |
|
24 |
douglas |
414 |
#include <unistd.h> |
25 |
|
|
|
26 |
douglas |
408 |
typedef api::Posix::FileStream<api::Posix::HandleWriter, O_WRONLY | O_CREAT | O_TRUNC, 0600> SecretFileWriter; |
27 |
|
|
|
28 |
douglas |
414 |
#ifndef _Spectre2_prefix_ |
29 |
|
|
#define _Spectre2_prefix_ "/usr/local" |
30 |
|
|
#endif |
31 |
douglas |
407 |
|
32 |
douglas |
414 |
#ifndef _Spectre2_root_ |
33 |
|
|
#define _Spectre2_root_ "/smb" |
34 |
|
|
#endif |
35 |
|
|
|
36 |
douglas |
405 |
class Daemon; |
37 |
|
|
|
38 |
douglas |
402 |
class Spectre2 |
39 |
|
|
{ |
40 |
|
|
private: |
41 |
douglas |
418 |
ext::String pid; |
42 |
douglas |
402 |
public: |
43 |
douglas |
418 |
Spectre2(const api::Path& config); |
44 |
douglas |
402 |
~Spectre2(); |
45 |
douglas |
414 |
static ext::String program, prefix, root; |
46 |
douglas |
402 |
static bool debug; |
47 |
douglas |
405 |
static ext::Vector<Daemon*> daemons; |
48 |
douglas |
402 |
}; |
49 |
|
|
|
50 |
|
|
#endif // _Spectre2_hpp_ |