summaryrefslogtreecommitdiff
path: root/src/operator-expunge.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/operator-expunge.cc')
-rw-r--r--src/operator-expunge.cc36
1 files changed, 15 insertions, 21 deletions
diff --git a/src/operator-expunge.cc b/src/operator-expunge.cc
index 24904d5..03fd655 100644
--- a/src/operator-expunge.cc
+++ b/src/operator-expunge.cc
@@ -2,30 +2,26 @@
* @file operator-expunge.cc
* @brief Implementation of the EXPUNGE command
* @author Andreas Aardal Hanssen
- * @date 2002-2005
+ * @date 2002-2005
* ----------------------------------------------------------------- **/
-#include <string>
-
#include "depot.h"
+#include "imapparser.h"
#include "mailbox.h"
#include "operators.h"
-#include "imapparser.h"
-#include "recursivedescent.h"
#include "pendingupdates.h"
+#include "recursivedescent.h"
#include "session.h"
+#include <string>
+
using namespace ::std;
using namespace Binc;
//----------------------------------------------------------------------
-ExpungeOperator::ExpungeOperator(void)
-{
-}
+ExpungeOperator::ExpungeOperator(void) {}
//----------------------------------------------------------------------
-ExpungeOperator::~ExpungeOperator(void)
-{
-}
+ExpungeOperator::~ExpungeOperator(void) {}
//----------------------------------------------------------------------
const string ExpungeOperator::getName(void) const
@@ -40,16 +36,15 @@ int ExpungeOperator::getState(void) const
}
//----------------------------------------------------------------------
-Operator::ProcessResult ExpungeOperator::process(Depot &depot,
- Request &command)
+Operator::ProcessResult ExpungeOperator::process(Depot &depot, Request &command)
{
Mailbox *mailbox = depot.getSelected();
mailbox->expungeMailbox();
- pendingUpdates(mailbox, PendingUpdates::EXPUNGE
- | PendingUpdates::EXISTS
- | PendingUpdates::RECENT
- | PendingUpdates::FLAGS, true);
+ pendingUpdates(mailbox,
+ PendingUpdates::EXPUNGE | PendingUpdates::EXISTS | PendingUpdates::RECENT
+ | PendingUpdates::FLAGS,
+ true);
return OK;
}
@@ -59,11 +54,10 @@ Operator::ParseResult ExpungeOperator::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 = expectCRLF()) != ACCEPT) {
+ Operator::ParseResult res;
+ if ((res = expectCRLF()) != ACCEPT) {
session.setLastError("Expected CRLF");
return res;
}