1 // Copyright 2009 The Archiveopteryx Developers <info@aox.org>
2 
3 #ifndef SERVERS_H
4 #define SERVERS_H
5 
6 #include "aoxcommand.h"
7 #include "list.h"
8 
9 
10 class Checker
11     : public EventHandler
12 {
13 public:
14     Checker( int, EventHandler * );
15 
16     void execute();
17     bool done() const;
18     bool failed() const;
19 
20 private:
21     class CheckerData * d;
22 };
23 
24 
25 class Starter
26     : public EventHandler
27 {
28 public:
29     Starter( int, EventHandler * );
30 
31     void execute();
32     bool done() const;
33     bool failed() const;
34 
35     static bool needed( const EString & );
36 
37 private:
38     class StarterData * d;
39     bool startServer( const char * );
40 };
41 
42 
43 class Stopper
44     : public EventHandler
45 {
46 public:
47     Stopper( int, EventHandler * );
48 
49     void execute();
50     bool done() const;
51     bool failed() const;
52 
53     void connect();
54     void disconnect();
55 
56 private:
57     class StopperData * d;
58 };
59 
60 
61 class CheckConfig
62     : public AoxCommand
63 {
64 public:
65     CheckConfig( EStringList * );
66     void execute();
67 
68 private:
69     class Checker * checker;
70 };
71 
72 
73 class Start
74     : public AoxCommand
75 {
76 public:
77     Start( EStringList * );
78     void execute();
79 
80 private:
81     class StartData * d;
82 };
83 
84 
85 class Stop
86     : public AoxCommand
87 {
88 public:
89     Stop( EStringList * );
90     void execute();
91 
92 private:
93     class Stopper * stopper;
94 };
95 
96 
97 class Restart
98     : public AoxCommand
99 {
100 public:
101     Restart( EStringList * );
102     void execute();
103 
104 private:
105     class RestartData * d;
106 };
107 
108 
109 class ShowStatus
110     : public AoxCommand
111 {
112 public:
113     ShowStatus( EStringList * );
114     void execute();
115 };
116 
117 
118 class ShowBuild
119     : public AoxCommand
120 {
121 public:
122     ShowBuild( EStringList * );
123     void execute();
124 };
125 
126 
127 class ShowConfiguration
128     : public AoxCommand
129 {
130 public:
131     ShowConfiguration( EStringList * );
132     void execute();
133 
134 private:
135     void addVariable( SortedList<EString> *,
136                       EString, EString, EString, bool );
137 };
138 
139 
140 #endif
141