1 |
douglas |
104 |
// Windows XP FAQ Poll |
2 |
|
|
// |
3 |
|
|
// Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// Poller.h |
6 |
|
|
|
7 |
|
|
#ifndef _Poller_h_ |
8 |
|
|
#define _Poller_h_ |
9 |
|
|
|
10 |
|
|
#include "Contactor.h" |
11 |
|
|
|
12 |
|
|
class Poller : public Contactor |
13 |
|
|
{ |
14 |
|
|
private: |
15 |
douglas |
119 |
string file; |
16 |
douglas |
118 |
struct Find |
17 |
|
|
{ |
18 |
|
|
unsigned reply; |
19 |
|
|
unsigned news; |
20 |
|
|
unsigned sig; |
21 |
|
|
unsigned search; |
22 |
|
|
unsigned link; |
23 |
|
|
unsigned browse; |
24 |
|
|
unsigned other; |
25 |
|
|
vector<string> approved; |
26 |
|
|
vector<string> approve; |
27 |
|
|
} |
28 |
|
|
find; |
29 |
|
|
struct Help |
30 |
|
|
{ |
31 |
|
|
unsigned solved; |
32 |
|
|
unsigned note; |
33 |
|
|
unsigned link; |
34 |
|
|
unsigned news; |
35 |
|
|
unsigned lazy; |
36 |
|
|
} |
37 |
|
|
help; |
38 |
|
|
struct Improve |
39 |
|
|
{ |
40 |
|
|
unsigned nothing; |
41 |
|
|
unsigned links; |
42 |
|
|
unsigned suggest; |
43 |
|
|
vector<string> approved; |
44 |
|
|
vector<string> approve; |
45 |
|
|
} |
46 |
|
|
improve; |
47 |
douglas |
121 |
queue<unsigned> messages; |
48 |
douglas |
119 |
void load(); |
49 |
|
|
void save(); |
50 |
douglas |
121 |
void ballots(); |
51 |
|
|
void ballot(unsigned message); |
52 |
douglas |
123 |
void submit(const string& type, const string& text); |
53 |
douglas |
121 |
void approvals(); |
54 |
douglas |
123 |
void approval(unsigned message); |
55 |
douglas |
104 |
public: |
56 |
|
|
Poller(); |
57 |
douglas |
123 |
~Poller(); |
58 |
douglas |
118 |
void poll(bool nodelete, const string& file); |
59 |
douglas |
104 |
}; |
60 |
|
|
|
61 |
|
|
#endif // _Poller_h_ |