15 |
|
|
16 |
|
#include <menes-api/console.hpp> |
17 |
|
#include <menes-api/files.hpp> |
18 |
+ |
#include <menes-api/locks.hpp> |
19 |
+ |
#include <menes-api/path.hpp> |
20 |
+ |
#include <menes-api/process.hpp> |
21 |
+ |
#include <menes-ext/scopes.hpp> |
22 |
|
#include <menes-ext/string.hpp> |
23 |
+ |
#include <menes-ios/helpers.hpp> |
24 |
+ |
#include <menes-xml/document.hpp> |
25 |
+ |
#include <menes-xml/nodeset.hpp> |
26 |
+ |
#include <menes-xml/parse.hpp> |
27 |
|
|
20 |
– |
typedef api::Posix::FileStream<api::Posix::HandleWriter, O_WRONLY | O_CREAT | O_TRUNC, 0600> SecretFileWriter; |
21 |
– |
|
22 |
– |
extern "C" |
23 |
– |
{ |
28 |
|
#include <unistd.h> |
29 |
< |
} |
29 |
> |
|
30 |
> |
#include "Matcher/Matcher.hpp" |
31 |
> |
|
32 |
> |
#ifndef _Spectre2_prefix_ |
33 |
> |
#define _Spectre2_prefix_ "/usr/local" |
34 |
> |
#endif |
35 |
> |
|
36 |
> |
#ifndef _Spectre2_root_ |
37 |
> |
#define _Spectre2_root_ "/smb" |
38 |
> |
#endif |
39 |
> |
|
40 |
> |
#ifndef _Spectre2_mount_ |
41 |
> |
#define _Spectre2_mount_ "/sbin/mount" |
42 |
> |
#endif |
43 |
> |
|
44 |
> |
#ifndef _Spectre2_umount_ |
45 |
> |
#define _Spectre2_umount_ "/sbin/umount" |
46 |
> |
#endif |
47 |
|
|
48 |
|
class Daemon; |
49 |
|
|
50 |
|
class Spectre2 |
51 |
|
{ |
52 |
|
private: |
53 |
< |
const ext::String& pid; |
53 |
> |
ext::String pid; |
54 |
|
public: |
55 |
< |
Spectre2(const ext::String& config, const ext::String& pid); |
55 |
> |
Spectre2(const api::Path& config); |
56 |
|
~Spectre2(); |
57 |
< |
static ext::String program; |
57 |
> |
static ext::String program, prefix, root, mount, umount; |
58 |
|
static bool debug; |
59 |
< |
static ext::Vector<Daemon*> daemons; |
59 |
> |
static Daemon* daemon; |
60 |
|
}; |
61 |
|
|
62 |
< |
#endif // _Spectre2_hpp_ |
62 |
> |
#endif//_Spectre2_hpp_ |