diff options
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) { |