Bincimap 2.0.16
Easy Imapping
Loading...
Searching...
No Matches
operator-check.cc
Go to the documentation of this file.
1
7#include <string>
8
9#include "depot.h"
10#include "mailbox.h"
11#include "operators.h"
12#include "recursivedescent.h"
13#include "pendingupdates.h"
14#include "session.h"
15
16using namespace ::std;
17using namespace Binc;
18
19//----------------------------------------------------------------------
21{
22}
23
24
25//----------------------------------------------------------------------
27{
28}
29
30//----------------------------------------------------------------------
31const string CheckOperator::getName(void) const
32{
33 return "CHECK";
34}
35
36//----------------------------------------------------------------------
38{
39 return Session::SELECTED;
40}
41
42//------------------------------------------------------------------------
44 Request &command)
45{
46 Mailbox *mailbox = depot.getSelected();
47 if (mailbox != 0)
51
52 return OK;
53}
54
55//----------------------------------------------------------------------
57{
58 Session &session = Session::getInstance();
59
60 if (c_in.getUidMode()) return REJECT;
61
63 if ((res = expectCRLF()) != ACCEPT) {
64 session.setLastError("Expected CRLF after CHECK");
65 return res;
66 }
67
68 c_in.setName("CHECK");
69 return ACCEPT;
70}
71
virtual ParseResult parse(Request &) const
int getState(void) const
ProcessResult process(Depot &, Request &)
const std::string getName(void) const
virtual Mailbox * getSelected(void) const
Definition: depot.cc:183
void setName(const std::string &s_in)
Definition: imapparser.cc:70
bool getUidMode(void) const
Definition: imapparser.cc:40
void setLastError(const std::string &error) const
Definition: session.cc:185
static Session & getInstance(void)
Definition: session.cc:33
Declaration of the Mailbox class (Mailbox is logical container)
Definition: bincimapd.cc:9
bool pendingUpdates(Mailbox *, int type, bool rescan, bool showAll=false, bool forceScan=false, bool uidfetchflags=false)
Operator::ParseResult expectCRLF(void)
Declaration of all operators.
Declaration of a recursive descent IMAP command parser.