diff options
Diffstat (limited to 'src/operator-create.cc')
-rw-r--r-- | src/operator-create.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/operator-create.cc b/src/operator-create.cc index 83c5e1d..22fd37e 100644 --- a/src/operator-create.cc +++ b/src/operator-create.cc @@ -1,9 +1,10 @@ -/** -------------------------------------------------------------------- +/** * @file bincimapd-create.cc * @brief Implementation of the CREATE command. * @author Andreas Aardal Hanssen * @date 2002-2005 - * ----------------------------------------------------------------- **/ + */ + #include "convert.h" #include "depot.h" #include "imapparser.h" @@ -14,40 +15,33 @@ #include <string> -using namespace ::std; using namespace Binc; -//---------------------------------------------------------------------- CreateOperator::CreateOperator(void) {} -//---------------------------------------------------------------------- CreateOperator::~CreateOperator(void) {} -//---------------------------------------------------------------------- -const string CreateOperator::getName(void) const +const std::string CreateOperator::getName(void) const { return "CREATE"; } -//---------------------------------------------------------------------- int CreateOperator::getState(void) const { return Session::AUTHENTICATED | Session::SELECTED; } -//------------------------------------------------------------------------ Operator::ProcessResult CreateOperator::process(Depot &depot, Request &command) { - if (depot.createMailbox(command.getMailbox())) + if (depot.createMailbox(command.getMailbox())) { return OK; - else { + } else { Session &session = Session::getInstance(); session.setLastError(depot.getLastError()); return NO; } } -//---------------------------------------------------------------------- Operator::ParseResult CreateOperator::parse(Request &c_in) const { Session &session = Session::getInstance(); @@ -60,7 +54,7 @@ Operator::ParseResult CreateOperator::parse(Request &c_in) const return res; } - string mailbox; + std::string mailbox; if ((res = expectMailbox(mailbox)) != ACCEPT) { session.setLastError("Expected mailbox after CREATE SPACE"); return res; |