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

Comparing trunk/IMAPHandler/IMAPHandler.cpp (file contents):
Revision 113 by douglas, 2003-03-31T22:44:44-08:00 vs.
Revision 114 by douglas, 2003-03-31T23:08:58-08:00

# Line 241 | Line 241 | string IMAPHandler::imap(const string& i
241   {
242          string result;
243  
244 <        //
244 >        string sequence = command();
245 >        putline(sequence + " " + imap + " " + args);
246 >        putline(message);
247 >
248 >        while (true)
249 >        {
250 >                string input = getline();
251 >
252 >                if (input.find(sequence + " OK") == 0)
253 >                {
254 >                        success = true;
255 >                        break;
256 >                }
257 >                else if (input.find(sequence + " NO") == 0 || input.find(sequence +
258 >                        " BAD") == 0)
259 >                {
260 >                        success = false;
261 >                        break;
262 >                }
263 >                else
264 >                {
265 >                        result += input + "\r\n";
266 >                }
267 >        }
268  
269          return result;
270   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines