diff options
Diffstat (limited to 'src/operator-capability.cc')
-rw-r--r-- | src/operator-capability.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/operator-capability.cc b/src/operator-capability.cc index eff7e5a..33d787a 100644 --- a/src/operator-capability.cc +++ b/src/operator-capability.cc @@ -27,9 +27,10 @@ const string CapabilityOperator::getName() const return "CAPABILITY"; } -int CapabilityOperator::getState() const +Session::State CapabilityOperator::getState() const { - return Session::NONAUTHENTICATED | Session::AUTHENTICATED | Session::SELECTED; + return Session::State(Session::NONAUTHENTICATED | Session::AUTHENTICATED + | Session::SELECTED); } void CapabilityOperator::addCapability(const string &cap) @@ -69,22 +70,22 @@ Operator::ProcessResult CapabilityOperator::process(Depot &depot, Request &comma } bincClient << std::endl; - return OK; + return Operator::ProcessResult::OK; } -Operator::ParseResult CapabilityOperator::parse(Request &c_in) const +Parser::ParseResult CapabilityOperator::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 after CAPABILITY"); return res; } c_in.setName("CAPABILITY"); - return ACCEPT; + return Parser::ParseResult::ACCEPT; } |