1 |
// 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 |
string file; |
16 |
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 |
vector<string> disapprove; |
28 |
} |
29 |
find; |
30 |
struct Help |
31 |
{ |
32 |
unsigned solved; |
33 |
unsigned note; |
34 |
unsigned link; |
35 |
unsigned news; |
36 |
unsigned lazy; |
37 |
} |
38 |
help; |
39 |
struct Improve |
40 |
{ |
41 |
unsigned nothing; |
42 |
unsigned links; |
43 |
unsigned suggest; |
44 |
vector<string> approved; |
45 |
vector<string> approve; |
46 |
vector<string> disapprove; |
47 |
} |
48 |
improve; |
49 |
queue<unsigned> messages; |
50 |
vector<pair<string, string> > submits; |
51 |
void load(); |
52 |
void save(); |
53 |
void ballots(); |
54 |
void ballot(unsigned message); |
55 |
void submit(const string& type, const string& text); |
56 |
void approvals(); |
57 |
short approval(const string& type, const string& text); |
58 |
public: |
59 |
Poller(); |
60 |
~Poller(); |
61 |
void poll(bool nodelete, const string& file); |
62 |
}; |
63 |
|
64 |
#endif // _Poller_h_ |