ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/WinXPFAQPoll/Poller.cpp
(Generate patch)

Comparing trunk/WinXPFAQPoll/Poller.cpp (file contents):
Revision 129 by douglas, 2003-04-03T21:13:24-08:00 vs.
Revision 219 by douglas, 2003-07-23T19:09:16-07:00

# Line 27 | Line 27 | Poller::~Poller()
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   }
# Line 250 | Line 258 | void Poller::save()
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"
# Line 500 | Line 506 | void Poller::submit(const string& type,
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;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines