diff options
Diffstat (limited to 'src/include/depot.h')
-rw-r--r-- | src/include/depot.h | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/src/include/depot.h b/src/include/depot.h index bd4f743..3e65c8e 100644 --- a/src/include/depot.h +++ b/src/include/depot.h @@ -1,11 +1,13 @@ -/** -------------------------------------------------------------------- +/** * @filec depot.h * @file Declaration of the Depot class (the mail storage) * @author Andreas Aardal Hanssen * @date 2002-2005 - * ----------------------------------------------------------------- **/ + */ + #ifndef depot_h_included #define depot_h_included + #include <map> #include <string> #include <vector> @@ -18,7 +20,6 @@ namespace Binc { class Depot; class Status; - //------------------------------------------------------------------ class DepotFactory { private: std::vector<Depot *> depots; @@ -32,26 +33,24 @@ namespace Binc { ~DepotFactory(void); }; - //------------------------------------------------------------------ class Depot { public: - //-- class iterator { public: - std::string operator*(void) const; - void operator++(void); - bool operator!=(iterator) const; - bool operator==(iterator) const; - iterator(void); iterator(const iterator ©); iterator(DIR *, struct dirent *); ~iterator(void); - void deref(void); - iterator &operator=(const iterator ©); + std::string operator*(void) const; + void operator++(void); + bool operator!=(iterator) const; + bool operator==(iterator) const; + + void deref(void); + friend class Depot; private: @@ -77,11 +76,15 @@ namespace Binc { mutable std::map<std::string, Status> mailboxstatuses; public: + Depot(); + Depot(const std::string &name); + virtual ~Depot(void) = default; + virtual iterator begin(const std::string &) const; virtual const iterator &end(void) const; void setDelimiter(char); - const char getDelimiter(void) const; + char getDelimiter(void) const; virtual void assign(Mailbox *); @@ -116,14 +119,8 @@ namespace Binc { virtual bool unsubscribeTo(const std::string mailbox); virtual void loadSubscribes(void); virtual bool saveSubscribes(void) const; - - //-- - Depot(void); - Depot(const std::string &name); - virtual ~Depot(void); }; - //------------------------------------------------------------------ class MaildirPPDepot : public Depot { public: std::string mailboxToFilename(const std::string &m) const; @@ -131,7 +128,6 @@ namespace Binc { const std::string &getPersonalNamespace(void) const; - //-- MaildirPPDepot(); ~MaildirPPDepot(); @@ -139,13 +135,11 @@ namespace Binc { std::string privateNamespace; }; - //------------------------------------------------------------------ class IMAPdirDepot : public Depot { public: std::string mailboxToFilename(const std::string &m) const; std::string filenameToMailbox(const std::string &m) const; - //-- IMAPdirDepot(); ~IMAPdirDepot(); }; |