summaryrefslogtreecommitdiff
path: root/src/operator-list.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/operator-list.cc')
-rw-r--r--src/operator-list.cc16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/operator-list.cc b/src/operator-list.cc
index 25934fa..519eb79 100644
--- a/src/operator-list.cc
+++ b/src/operator-list.cc
@@ -39,9 +39,9 @@ const string ListOperator::getName() const
return "LIST";
}
-int ListOperator::getState() const
+Session::State ListOperator::getState() const
{
- return Session::AUTHENTICATED | Session::SELECTED;
+ return Session::State(Session::AUTHENTICATED | Session::SELECTED);
}
Operator::ProcessResult ListOperator::process(Depot &depot, Request &command)
@@ -54,7 +54,7 @@ Operator::ProcessResult ListOperator::process(Depot &depot, Request &command)
string wildcard;
if ((wildcard = command.getListMailbox()) == "") {
bincClient << "* LIST (\\Noselect) \"" << delim << "\" \"\"" << std::endl;
- return OK;
+ return Operator::ProcessResult::OK;
}
// remove leading or trailing delimiter in wildcard
@@ -196,16 +196,18 @@ Operator::ProcessResult ListOperator::process(Depot &depot, Request &command)
}
}
- return OK;
+ return Operator::ProcessResult::OK;
}
-Operator::ParseResult ListOperator::parse(Request &c_in) const
+Parser::ParseResult ListOperator::parse(Request &c_in)
{
+ constexpr auto ACCEPT = Parser::ParseResult::ACCEPT;
+
Session &session = Session::getInstance();
- if (c_in.getUidMode()) return REJECT;
+ if (c_in.getUidMode()) return Parser::ParseResult::REJECT;
- Operator::ParseResult res;
+ Parser::ParseResult res;
if ((res = expectSPACE()) != ACCEPT) {
session.setLastError("Expected SPACE after LIST");
return res;