diff options
Diffstat (limited to 'src/operator-logout.cc')
-rw-r--r-- | src/operator-logout.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/operator-logout.cc b/src/operator-logout.cc index af40b72..d58972b 100644 --- a/src/operator-logout.cc +++ b/src/operator-logout.cc @@ -28,9 +28,10 @@ const std::string LogoutOperator::getName() const return "LOGOUT"; } -int LogoutOperator::getState() const +Session::State LogoutOperator::getState() const { - return Session::NONAUTHENTICATED | Session::AUTHENTICATED | Session::SELECTED; + return Session::State(Session::NONAUTHENTICATED | Session::AUTHENTICATED + | Session::SELECTED); } Operator::ProcessResult LogoutOperator::process(Depot &depot, Request &command) @@ -50,21 +51,21 @@ Operator::ProcessResult LogoutOperator::process(Depot &depot, Request &command) Session &session = Session::getInstance(); session.setState(Session::LOGOUT); - return NOTHING; + return Operator::ProcessResult::NOTHING; } -Operator::ParseResult LogoutOperator::parse(Request &c_in) const +Parser::ParseResult LogoutOperator::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 = expectCRLF()) != ACCEPT) { + Parser::ParseResult res; + if ((res = expectCRLF()) != Parser::ParseResult::ACCEPT) { session.setLastError("Expected CRLF"); return res; } c_in.setName("LOGOUT"); - return ACCEPT; + return Parser::ParseResult::ACCEPT; } |