summaryrefslogtreecommitdiff
path: root/src/operator-delete.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/operator-delete.cc')
-rw-r--r--src/operator-delete.cc20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/operator-delete.cc b/src/operator-delete.cc
index 350e572..00d7ecb 100644
--- a/src/operator-delete.cc
+++ b/src/operator-delete.cc
@@ -1,9 +1,10 @@
-/** --------------------------------------------------------------------
+/**
* @file operator-delete.cc
* @briefe Implementation of the DELETE 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;
-//----------------------------------------------------------------------
DeleteOperator::DeleteOperator(void) {}
-//----------------------------------------------------------------------
DeleteOperator::~DeleteOperator(void) {}
-//----------------------------------------------------------------------
-const string DeleteOperator::getName(void) const
+const std::string DeleteOperator::getName(void) const
{
return "DELETE";
}
-//----------------------------------------------------------------------
int DeleteOperator::getState(void) const
{
return Session::AUTHENTICATED | Session::SELECTED;
}
-//------------------------------------------------------------------------
Operator::ProcessResult DeleteOperator::process(Depot &depot, Request &command)
{
- if (depot.deleteMailbox(command.getMailbox()))
+ if (depot.deleteMailbox(command.getMailbox())) {
return OK;
- else {
+ } else {
Session &session = Session::getInstance();
session.setLastError(depot.getLastError());
return NO;
}
}
-//----------------------------------------------------------------------
Operator::ParseResult DeleteOperator::parse(Request &c_in) const
{
Session &session = Session::getInstance();
@@ -60,7 +54,7 @@ Operator::ParseResult DeleteOperator::parse(Request &c_in) const
return res;
}
- string mailbox;
+ std::string mailbox;
if ((res = expectMailbox(mailbox)) != ACCEPT) {
session.setLastError("Expected mailbox after DELETE SPACE");
return res;