summaryrefslogtreecommitdiff
path: root/src/operator-noop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/operator-noop.cc')
-rw-r--r--src/operator-noop.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/operator-noop.cc b/src/operator-noop.cc
index 77d2d9d..9d72e8f 100644
--- a/src/operator-noop.cc
+++ b/src/operator-noop.cc
@@ -24,29 +24,30 @@ const std::string NoopOperator::getName() const
return "NOOP";
}
-int NoopOperator::getState() const
+Session::State NoopOperator::getState() const
{
- return Session::NONAUTHENTICATED | Session::AUTHENTICATED | Session::SELECTED;
+ return Session::State(Session::NONAUTHENTICATED | Session::AUTHENTICATED
+ | Session::SELECTED);
}
Operator::ProcessResult NoopOperator::process(Depot &depot, Request &command)
{
- return OK;
+ return Operator::ProcessResult::OK;
}
-Operator::ParseResult NoopOperator::parse(Request &c_in) const
+Parser::ParseResult NoopOperator::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 NOOP");
return res;
}
c_in.setName("NOOP");
- return ACCEPT;
+ return Parser::ParseResult::ACCEPT;
}