diff options
Diffstat (limited to 'src/operator-append.cc')
-rw-r--r-- | src/operator-append.cc | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/operator-append.cc b/src/operator-append.cc index 9463723..0e856ba 100644 --- a/src/operator-append.cc +++ b/src/operator-append.cc @@ -31,13 +31,17 @@ const string AppendOperator::getName() const return "APPEND"; } -int AppendOperator::getState() const +Session::State AppendOperator::getState() const { - return Session::AUTHENTICATED | Session::SELECTED; + return Session::State(Session::State::AUTHENTICATED | Session::State::SELECTED); } Operator::ProcessResult AppendOperator::process(Depot &depot, Request &command) { + constexpr auto NO = ProcessResult::NO; + constexpr auto ABORT = ProcessResult::ABORT; + constexpr auto BAD = ProcessResult::BAD; + Session &session = Session::getInstance(); const string &srcmailbox = command.getMailbox(); @@ -242,15 +246,17 @@ Operator::ProcessResult AppendOperator::process(Depot &depot, Request &command) true); } - return OK; + return ProcessResult::OK; } -Operator::ParseResult AppendOperator::parse(Request &c_in) const +Parser::ParseResult AppendOperator::parse(Request &c_in) { + constexpr auto ACCEPT = Parser::ParseResult::ACCEPT; + Session &session = Session::getInstance(); - Operator::ParseResult res; + Parser::ParseResult res; - if (c_in.getUidMode()) return REJECT; + if (c_in.getUidMode()) return Parser::ParseResult::REJECT; if ((res = expectSPACE()) != ACCEPT) { session.setLastError("Expected SPACE after APPEND"); |