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 |
402 |
#include <menes-ext/string.hpp> |
19 |
|
|
|
20 |
douglas |
408 |
typedef api::Posix::FileStream<api::Posix::HandleWriter, O_WRONLY | O_CREAT | O_TRUNC, 0600> SecretFileWriter; |
21 |
|
|
|
22 |
douglas |
407 |
extern "C" |
23 |
|
|
{ |
24 |
|
|
#include <unistd.h> |
25 |
|
|
} |
26 |
|
|
|
27 |
douglas |
405 |
class Daemon; |
28 |
|
|
|
29 |
douglas |
402 |
class Spectre2 |
30 |
|
|
{ |
31 |
|
|
private: |
32 |
|
|
const ext::String& pid; |
33 |
|
|
public: |
34 |
|
|
Spectre2(const ext::String& config, const ext::String& pid); |
35 |
|
|
~Spectre2(); |
36 |
|
|
static ext::String program; |
37 |
|
|
static bool debug; |
38 |
douglas |
405 |
static ext::Vector<Daemon*> daemons; |
39 |
douglas |
402 |
}; |
40 |
|
|
|
41 |
|
|
#endif // _Spectre2_hpp_ |