diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-07 18:49:13 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-08 11:35:51 +0200 |
commit | 3b1278f5459514a6d6364f068ff97b8a0432057b (patch) | |
tree | 6e1369f28c64b45ac3254225242ebf3844ad0291 /src/operator-status.cc | |
parent | c0234d1b0cea8ac830e9397da8b2270a8f2b45ca (diff) |
formatted source and header files
Diffstat (limited to 'src/operator-status.cc')
-rw-r--r-- | src/operator-status.cc | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/src/operator-status.cc b/src/operator-status.cc index da74f16..82c3bcf 100644 --- a/src/operator-status.cc +++ b/src/operator-status.cc @@ -4,13 +4,6 @@ * @author Andreas Aardal Hanssen * @date 2002-2005 * ----------------------------------------------------------------- **/ -#include <string> -#include <iostream> - -#include <dirent.h> -#include <sys/stat.h> -#include <sys/types.h> - #include "convert.h" #include "depot.h" #include "iodevice.h" @@ -21,18 +14,21 @@ #include "session.h" #include "status.h" +#include <iostream> +#include <string> + +#include <dirent.h> +#include <sys/stat.h> +#include <sys/types.h> + using namespace ::std; using namespace Binc; //---------------------------------------------------------------------- -StatusOperator::StatusOperator(void) -{ -} +StatusOperator::StatusOperator(void) {} //---------------------------------------------------------------------- -StatusOperator::~StatusOperator(void) -{ -} +StatusOperator::~StatusOperator(void) {} //---------------------------------------------------------------------- const string StatusOperator::getName(void) const @@ -47,8 +43,7 @@ int StatusOperator::getState(void) const } //------------------------------------------------------------------------ -Operator::ProcessResult StatusOperator::process(Depot &depot, - Request &command) +Operator::ProcessResult StatusOperator::process(Depot &depot, Request &command) { Session &session = Session::getInstance(); @@ -59,10 +54,9 @@ Operator::ProcessResult StatusOperator::process(Depot &depot, } bincClient << "* STATUS " << toImapString(command.getMailbox()) << " ("; - + string prefix; - for (vector<string>::const_iterator i = command.statuses.begin(); - i != command.statuses.end(); ++i) { + for (vector<string>::const_iterator i = command.statuses.begin(); i != command.statuses.end(); ++i) { string tmp = *i; uppercase(tmp); if (tmp == "UIDNEXT") { @@ -72,13 +66,13 @@ Operator::ProcessResult StatusOperator::process(Depot &depot, bincClient << prefix << "MESSAGES " << status.getMessages(); prefix = " "; } else if (tmp == "RECENT") { - bincClient << prefix << "RECENT " << status.getRecent(); + bincClient << prefix << "RECENT " << status.getRecent(); prefix = " "; } else if (tmp == "UIDVALIDITY") { bincClient << prefix << "UIDVALIDITY " << status.getUidValidity(); prefix = " "; } else if (tmp == "UNSEEN") { - bincClient << prefix << "UNSEEN " << status.getUnseen(); + bincClient << prefix << "UNSEEN " << status.getUnseen(); prefix = " "; } } @@ -92,8 +86,7 @@ Operator::ParseResult StatusOperator::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) { |