diff options
Diffstat (limited to 'src/operator-subscribe.cc')
-rw-r--r-- | src/operator-subscribe.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/operator-subscribe.cc b/src/operator-subscribe.cc index b05590b..3209986 100644 --- a/src/operator-subscribe.cc +++ b/src/operator-subscribe.cc @@ -28,9 +28,9 @@ const string SubscribeOperator::getName() const return "SUBSCRIBE"; } -int SubscribeOperator::getState() const +Session::State SubscribeOperator::getState() const { - return Session::AUTHENTICATED | Session::SELECTED; + return Session::State(Session::AUTHENTICATED | Session::SELECTED); } Operator::ProcessResult SubscribeOperator::process(Depot &depot, Request &command) @@ -42,32 +42,32 @@ Operator::ProcessResult SubscribeOperator::process(Depot &depot, Request &comman depot.subscribeTo(canonmailbox); depot.saveSubscribes(); - return OK; + return ProcessResult::OK; } -Operator::ParseResult SubscribeOperator::parse(Request &c_in) const +Parser::ParseResult SubscribeOperator::parse(Request &c_in) { Session &session = Session::getInstance(); - if (c_in.getUidMode()) return REJECT; + if (c_in.getUidMode()) return Parser::ParseResult::REJECT; - Operator::ParseResult res; - if ((res = expectSPACE()) != ACCEPT) { + Parser::ParseResult res; + if ((res = expectSPACE()) != Parser::ParseResult::ACCEPT) { session.setLastError("Expected SPACE"); return res; } string mailbox; - if ((res = expectMailbox(mailbox)) != ACCEPT) { + if ((res = expectMailbox(mailbox)) != Parser::ParseResult::ACCEPT) { session.setLastError("Expected mailbox"); return res; } c_in.setMailbox(mailbox); - if ((res = expectCRLF()) != ACCEPT) { + if ((res = expectCRLF()) != Parser::ParseResult::ACCEPT) { session.setLastError("Expected CRLF"); return res; } - return ACCEPT; + return Parser::ParseResult::ACCEPT; } |