diff options
Diffstat (limited to 'src/pendingupdates.cc')
-rw-r--r-- | src/pendingupdates.cc | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/pendingupdates.cc b/src/pendingupdates.cc index 0f76526..1e4af8d 100644 --- a/src/pendingupdates.cc +++ b/src/pendingupdates.cc @@ -4,17 +4,18 @@ * @author Andreas Aardal Hanssen * @date 2002-2005 * ----------------------------------------------------------------- **/ -#include <iostream> -#include <string> -#include <vector> +#include "pendingupdates.h" #include "iodevice.h" #include "iofactory.h" #include "mailbox.h" #include "message.h" -#include "pendingupdates.h" #include "session.h" +#include <iostream> +#include <string> +#include <vector> + using namespace ::std; using namespace Binc; @@ -29,9 +30,7 @@ PendingUpdates::PendingUpdates(void) : expunges(), flagupdates() } //------------------------------------------------------------------------ -PendingUpdates::~PendingUpdates(void) -{ -} +PendingUpdates::~PendingUpdates(void) {} //------------------------------------------------------------------------ void PendingUpdates::addExpunged(unsigned int uid) @@ -40,8 +39,10 @@ void PendingUpdates::addExpunged(unsigned int uid) } //------------------------------------------------------------------------ -void PendingUpdates::addFlagUpdates(unsigned int sqnr, unsigned int uid, - unsigned int flags, const vector<string> &cflags) +void PendingUpdates::addFlagUpdates(unsigned int sqnr, + unsigned int uid, + unsigned int flags, + const vector<string> &cflags) { flagupdates[sqnr] = flags; sqnrtouid[sqnr] = uid; @@ -87,35 +88,33 @@ bool PendingUpdates::newRecent(void) const } //------------------------------------------------------------------------ -PendingUpdates::expunged_const_iterator::expunged_const_iterator(void) -{ -} +PendingUpdates::expunged_const_iterator::expunged_const_iterator(void) {} //------------------------------------------------------------------------ -PendingUpdates::expunged_const_iterator::expunged_const_iterator(vector<unsigned int>::iterator i) : internal(i) -{ -} +PendingUpdates::expunged_const_iterator::expunged_const_iterator(vector<unsigned int>::iterator i) + : internal(i) +{} //------------------------------------------------------------------------ -unsigned int PendingUpdates::expunged_const_iterator::operator * (void) const +unsigned int PendingUpdates::expunged_const_iterator::operator*(void) const { return *internal; } //------------------------------------------------------------------------ -void PendingUpdates::expunged_const_iterator::operator ++ (void) +void PendingUpdates::expunged_const_iterator::operator++(void) { ++internal; } //------------------------------------------------------------------------ -bool PendingUpdates::expunged_const_iterator::operator == (expunged_const_iterator i) const +bool PendingUpdates::expunged_const_iterator::operator==(expunged_const_iterator i) const { return internal == i.internal; } //------------------------------------------------------------------------ -bool PendingUpdates::expunged_const_iterator::operator != (expunged_const_iterator i) const +bool PendingUpdates::expunged_const_iterator::operator!=(expunged_const_iterator i) const { return internal != i.internal; } @@ -133,27 +132,27 @@ PendingUpdates::expunged_const_iterator PendingUpdates::endExpunged(void) } //------------------------------------------------------------------------ -PendingUpdates::flagupdates_const_iterator::flagupdates_const_iterator(void) -{ -} +PendingUpdates::flagupdates_const_iterator::flagupdates_const_iterator(void) {} //------------------------------------------------------------------------ PendingUpdates::flagupdates_const_iterator::flagupdates_const_iterator( - map<unsigned int, unsigned int>::iterator i, - map<unsigned int, vector<string> > *j, - map<unsigned int, unsigned int> *sqnrmap) : internal(i), sqnrtocflags(j) + map<unsigned int, unsigned int>::iterator i, + map<unsigned int, vector<string>> *j, + map<unsigned int, unsigned int> *sqnrmap) + : internal(i) + , sqnrtocflags(j) { sqnrtouid = sqnrmap; } //------------------------------------------------------------------------ -void PendingUpdates::flagupdates_const_iterator::operator ++ (void) +void PendingUpdates::flagupdates_const_iterator::operator++(void) { ++internal; } //------------------------------------------------------------------------ -bool PendingUpdates::flagupdates_const_iterator::operator != (flagupdates_const_iterator i) const +bool PendingUpdates::flagupdates_const_iterator::operator!=(flagupdates_const_iterator i) const { return internal != i.internal; } @@ -195,13 +194,16 @@ unsigned int PendingUpdates::flagupdates_const_iterator::getUID(void) const } //-------------------------------------------------------------------- -bool Binc::pendingUpdates(Mailbox *mailbox, int type, bool rescan, bool showAll, - bool forceScan, bool uidfetchflags) +bool Binc::pendingUpdates(Mailbox *mailbox, + int type, + bool rescan, + bool showAll, + bool forceScan, + bool uidfetchflags) { Session &session = Session::getInstance(); - if (mailbox == 0) - return true; + if (mailbox == 0) return true; PendingUpdates p; if (!mailbox->getUpdates(rescan, type, p, forceScan)) { @@ -241,15 +243,13 @@ bool Binc::pendingUpdates(Mailbox *mailbox, int type, bool rescan, bool showAll, if (flags & Message::F_FLAGGED) flagv.push_back("\\Flagged"); bincClient << "* " << i.first() << " FETCH (FLAGS ("; - for (vector<string>::const_iterator k - = flagv.begin(); k != flagv.end(); ++k) { + for (vector<string>::const_iterator k = flagv.begin(); k != flagv.end(); ++k) { if (k != flagv.begin()) bincClient << " "; bincClient << *k; } vector<string> customFlags = i.getCustomFlags(); - for (vector<string>::const_iterator it = customFlags.begin(); - it != customFlags.end(); ++it) { + for (vector<string>::const_iterator it = customFlags.begin(); it != customFlags.end(); ++it) { if (flagv.size() > 0 || it != customFlags.begin()) bincClient << " "; bincClient << *it; } |