summaryrefslogtreecommitdiff
path: root/src/operator-logout.cc
diff options
context:
space:
mode:
authorJannis M. Hoffmann <jannis@fehcom.de>2023-10-07 18:49:13 +0200
committerJannis M. Hoffmann <jannis@fehcom.de>2023-10-08 11:35:51 +0200
commit3b1278f5459514a6d6364f068ff97b8a0432057b (patch)
tree6e1369f28c64b45ac3254225242ebf3844ad0291 /src/operator-logout.cc
parentc0234d1b0cea8ac830e9397da8b2270a8f2b45ca (diff)
formatted source and header files
Diffstat (limited to 'src/operator-logout.cc')
-rw-r--r--src/operator-logout.cc38
1 files changed, 14 insertions, 24 deletions
diff --git a/src/operator-logout.cc b/src/operator-logout.cc
index 643d412..aabffdf 100644
--- a/src/operator-logout.cc
+++ b/src/operator-logout.cc
@@ -2,34 +2,28 @@
* @file operator-logout.cc
* @brief Implementation of the LOGOUT command
* @author Andreas Aardal Hanssen
- * @date 2002-2005
+ * @date 2002-2005
* ----------------------------------------------------------------- **/
-#include <string>
-#include <iostream>
-
+#include "convert.h"
+#include "depot.h"
#include "iodevice.h"
#include "iofactory.h"
-
#include "mailbox.h"
+#include "operators.h"
#include "recursivedescent.h"
#include "session.h"
-#include "convert.h"
-#include "depot.h"
-#include "operators.h"
+#include <iostream>
+#include <string>
using namespace ::std;
using namespace Binc;
//----------------------------------------------------------------------
-LogoutOperator::LogoutOperator(void)
-{
-}
+LogoutOperator::LogoutOperator(void) {}
//----------------------------------------------------------------------
-LogoutOperator::~LogoutOperator(void)
-{
-}
+LogoutOperator::~LogoutOperator(void) {}
//----------------------------------------------------------------------
const string LogoutOperator::getName(void) const
@@ -40,19 +34,16 @@ const string LogoutOperator::getName(void) const
//----------------------------------------------------------------------
int LogoutOperator::getState(void) const
{
- return Session::NONAUTHENTICATED
- | Session::AUTHENTICATED
- | Session::SELECTED;
+ return Session::NONAUTHENTICATED | Session::AUTHENTICATED | Session::SELECTED;
}
//------------------------------------------------------------------------
-Operator::ProcessResult LogoutOperator::process(Depot &depot,
- Request &command)
+Operator::ProcessResult LogoutOperator::process(Depot &depot, Request &command)
{
bincClient << "* BYE Binc IMAP shutting down" << endl;
bincClient << command.getTag() << " OK LOGOUT completed" << endl;
bincClient.flush();
-
+
#ifdef BINCIMAPD
Mailbox *mailbox = 0;
if ((mailbox = depot.getSelected()) != 0) {
@@ -60,7 +51,7 @@ Operator::ProcessResult LogoutOperator::process(Depot &depot,
delete mailbox;
}
#endif
-
+
Session &session = Session::getInstance();
session.setState(Session::LOGOUT);
@@ -68,12 +59,11 @@ Operator::ProcessResult LogoutOperator::process(Depot &depot,
}
//----------------------------------------------------------------------
-Operator::ParseResult LogoutOperator::parse(Request & c_in) const
+Operator::ParseResult LogoutOperator::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) {