From 3b1278f5459514a6d6364f068ff97b8a0432057b Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sat, 7 Oct 2023 18:49:13 +0200 Subject: formatted source and header files --- src/operator-logout.cc | 38 ++++++++++++++------------------------ 1 file changed, 14 insertions(+), 24 deletions(-) (limited to 'src/operator-logout.cc') 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 -#include - +#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 +#include 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) { -- cgit v1.2.3