27 |
|
} |
28 |
|
} |
29 |
|
|
30 |
< |
void Poller::poll(bool nodelete, const string& file) |
30 |
> |
void Poller::poll(bool nodelete, const string& file, bool approve) |
31 |
|
{ |
32 |
|
this->nodelete = nodelete; |
33 |
|
this->file = file; |
34 |
|
|
35 |
|
load(); |
36 |
|
|
37 |
< |
ballots(); |
38 |
< |
approvals(); |
37 |
> |
session->select('\"' + account.getMailbox() + '\"'); |
38 |
> |
|
39 |
> |
if (!approve) |
40 |
> |
{ |
41 |
> |
ballots(); |
42 |
> |
} |
43 |
> |
else |
44 |
> |
{ |
45 |
> |
approvals(); |
46 |
> |
} |
47 |
|
|
48 |
|
save(); |
49 |
|
} |
258 |
|
|
259 |
|
void Poller::ballots() |
260 |
|
{ |
253 |
– |
session->select('\"' + account.getMailbox() + '\"'); |
254 |
– |
|
261 |
|
stringstream search; |
262 |
|
search << session->search(string("ALL HEADER X-Mailer \"WinXPFAQPoll 1.0 ") |
263 |
|
+ "(Perl)\" SUBJECT \"Windows XP FAQ | Poll Ballot\" FROM \"Windows XP" |
506 |
|
|
507 |
|
void Poller::approvals() |
508 |
|
{ |
503 |
– |
unsigned index; |
504 |
– |
|
509 |
|
session->check(); |
510 |
|
|
511 |
+ |
unsigned index; |
512 |
+ |
|
513 |
|
for (index = find.approve.size(); index > 0; index--) |
514 |
|
{ |
515 |
|
cout << "Checking find: " << index << "..." << flush; |