summaryrefslogtreecommitdiff
path: root/src/operator-rename.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/operator-rename.cc')
-rw-r--r--src/operator-rename.cc34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/operator-rename.cc b/src/operator-rename.cc
index cc11d14..bfbe226 100644
--- a/src/operator-rename.cc
+++ b/src/operator-rename.cc
@@ -2,13 +2,6 @@
* @file operator-rename.cc
* @brief Implementation of the RENAME command.
* ----------------------------------------------------------------- **/
-#include <string>
-#include <iostream>
-
-#include <dirent.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
#include "convert.h"
#include "depot.h"
#include "mailbox.h"
@@ -16,18 +9,21 @@
#include "recursivedescent.h"
#include "session.h"
+#include <iostream>
+#include <string>
+
+#include <dirent.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
using namespace ::std;
using namespace Binc;
//----------------------------------------------------------------------
-RenameOperator::RenameOperator(void)
-{
-}
+RenameOperator::RenameOperator(void) {}
//----------------------------------------------------------------------
-RenameOperator::~RenameOperator(void)
-{
-}
+RenameOperator::~RenameOperator(void) {}
//----------------------------------------------------------------------
const string RenameOperator::getName(void) const
@@ -42,8 +38,7 @@ int RenameOperator::getState(void) const
}
//------------------------------------------------------------------------
-Operator::ProcessResult RenameOperator::process(Depot &depot,
- Request &command)
+Operator::ProcessResult RenameOperator::process(Depot &depot, Request &command)
{
Session &session = Session::getInstance();
@@ -75,9 +70,8 @@ Operator::ProcessResult RenameOperator::process(Depot &depot,
Operator::ParseResult RenameOperator::parse(Request &c_in) const
{
Session &session = Session::getInstance();
-
- if (c_in.getUidMode())
- return REJECT;
+
+ if (c_in.getUidMode()) return REJECT;
Operator::ParseResult res;
if ((res = expectSPACE()) != ACCEPT) {
@@ -99,13 +93,13 @@ Operator::ParseResult RenameOperator::parse(Request &c_in) const
string newmailbox;
if ((res = expectMailbox(newmailbox)) != ACCEPT) {
session.setLastError("Expected mailbox after RENAME SPACE"
- " mailbox SPACE");
+ " mailbox SPACE");
return res;
}
if ((res = expectCRLF()) != ACCEPT) {
session.setLastError("Expected CRLF after RENAME SPACE"
- " mailbox SPACE mailbox");
+ " mailbox SPACE mailbox");
return res;
}