ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/WinXPFAQPoll/Poller.h
Revision: 368
Committed: 2008-08-23T02:44:00-07:00 (16 years, 10 months ago) by douglas
Content type: text/x-c
File size: 1088 byte(s)
Log Message:
Rearranged everything else.

File Contents

# User Rev Content
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 douglas 126 vector<string> disapprove;
28 douglas 118 }
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 douglas 126 vector<string> disapprove;
47 douglas 118 }
48     improve;
49 douglas 121 queue<unsigned> messages;
50 douglas 126 vector<pair<string, string> > submits;
51 douglas 119 void load();
52     void save();
53 douglas 121 void ballots();
54     void ballot(unsigned message);
55 douglas 123 void submit(const string& type, const string& text);
56 douglas 121 void approvals();
57 douglas 126 short approval(const string& type, const string& text);
58 douglas 104 public:
59     Poller();
60 douglas 123 ~Poller();
61 douglas 219 void poll(bool nodelete, const string& file, bool approve);
62 douglas 104 };
63    
64     #endif // _Poller_h_