diff options
Diffstat (limited to 'src/include/mailbox.h')
-rw-r--r-- | src/include/mailbox.h | 48 |
1 files changed, 23 insertions, 25 deletions
diff --git a/src/include/mailbox.h b/src/include/mailbox.h index db98cc0..870a695 100644 --- a/src/include/mailbox.h +++ b/src/include/mailbox.h @@ -7,17 +7,18 @@ #ifndef mailbox_h_included #define mailbox_h_included +#include "imapparser.h" + #include <map> -#include <string> #include <queue> +#include <string> #include <vector> -#include <time.h> #include <stdio.h> #include <string.h> -#include <sys/types.h> +#include <time.h> -#include "imapparser.h" +#include <sys/types.h> namespace Binc { @@ -29,17 +30,16 @@ namespace Binc { //------------------------------------------------------------------------ class Mailbox { public: - //---------------------------------------------------------------------- class BaseIterator { public: BaseIterator(int sqn = 0); virtual ~BaseIterator(void); - virtual Message &operator *(void) = 0; - virtual void operator ++(void) = 0; - virtual bool operator !=(const BaseIterator &d) const = 0; - virtual bool operator ==(const BaseIterator &d) const = 0; + virtual Message &operator*(void) = 0; + virtual void operator++(void) = 0; + virtual bool operator!=(const BaseIterator &d) const = 0; + virtual bool operator==(const BaseIterator &d) const = 0; virtual void erase(void) = 0; @@ -51,10 +51,10 @@ namespace Binc { public: iterator(BaseIterator &i); - Message &operator *(void); - void operator ++(void); - bool operator ==(const iterator &) const; - bool operator !=(const iterator &) const; + Message &operator*(void); + void operator++(void); + bool operator==(const iterator &) const; + bool operator!=(const iterator &) const; unsigned int getSqnr() const; @@ -64,17 +64,12 @@ namespace Binc { BaseIterator &realIterator; }; - enum Iterator { - INCLUDE_EXPUNGED = 1, - SKIP_EXPUNGED = 2 - }; + enum Iterator { INCLUDE_EXPUNGED = 1, SKIP_EXPUNGED = 2 }; - enum Mode { - UID_MODE = 4, - SQNR_MODE = 8 - }; + enum Mode { UID_MODE = 4, SQNR_MODE = 8 }; - virtual iterator begin(const SequenceSet &bset, unsigned int mod = INCLUDE_EXPUNGED | SQNR_MODE) const = 0; + virtual iterator begin(const SequenceSet &bset, + unsigned int mod = INCLUDE_EXPUNGED | SQNR_MODE) const = 0; virtual iterator end(void) const = 0; //-- Generic for one mailbox type @@ -97,13 +92,16 @@ namespace Binc { virtual unsigned int getUidNext(void) const = 0; virtual unsigned int getUidValidity(void) const = 0; - virtual bool getUpdates(bool scan, unsigned int type, - PendingUpdates &updates, bool forceScan) = 0; + virtual bool getUpdates(bool scan, unsigned int type, PendingUpdates &updates, bool forceScan) = 0; virtual void updateFlags(void) = 0; virtual void expungeMailbox(void) = 0; virtual bool selectMailbox(const std::string &name, const std::string &s_in) = 0; - virtual bool createMailbox(const std::string &s, mode_t mode, uid_t owner = 0, gid_t group = 0, bool root = false) = 0; + virtual bool createMailbox(const std::string &s, + mode_t mode, + uid_t owner = 0, + gid_t group = 0, + bool root = false) = 0; virtual bool deleteMailbox(const std::string &s) = 0; virtual void closeMailbox(void) = 0; |