diff options
Diffstat (limited to 'src/depot.cc')
-rw-r--r-- | src/depot.cc | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/depot.cc b/src/depot.cc index 629bda9..4039bfd 100644 --- a/src/depot.cc +++ b/src/depot.cc @@ -25,9 +25,9 @@ using namespace Binc; using std::endl; using std::string; -DepotFactory::DepotFactory(void) {} +DepotFactory::DepotFactory() {} -DepotFactory::~DepotFactory(void) +DepotFactory::~DepotFactory() { for (auto i : depots) delete i; @@ -46,7 +46,7 @@ void DepotFactory::assign(Depot *depot) depots.push_back(depot); } -DepotFactory &DepotFactory::getInstance(void) +DepotFactory &DepotFactory::getInstance() { static DepotFactory depotfactory; return depotfactory; @@ -62,7 +62,7 @@ Depot::Depot(const std::string &name) , delimiter('/') {} -const string &Depot::getLastError(void) const +const string &Depot::getLastError() const { return lastError; } @@ -102,22 +102,22 @@ bool Depot::setSelected(Mailbox *m) return false; } -const string &Depot::getName(void) const +const string &Depot::getName() const { return name; } -const string &Depot::getPersonalNamespace(void) const +const string &Depot::getPersonalNamespace() const { return personalNamespace; } -const string &Depot::getOthersNamespace(void) const +const string &Depot::getOthersNamespace() const { return othersNamespace; } -const string &Depot::getSharedNamespace(void) const +const string &Depot::getSharedNamespace() const { return sharedNamespace; } @@ -127,7 +127,7 @@ void Depot::setDelimiter(char c) delimiter = c; } -char Depot::getDelimiter(void) const +char Depot::getDelimiter() const { return delimiter; } @@ -145,17 +145,17 @@ bool Depot::setDefaultType(const string &name) return false; } -Mailbox *Depot::getSelected(void) const +Mailbox *Depot::getSelected() const { return selectedmailbox; } -void Depot::resetSelected(void) +void Depot::resetSelected() { selectedmailbox = nullptr; } -Mailbox *Depot::getDefault(void) const +Mailbox *Depot::getDefault() const { return defaultmailbox; } @@ -277,7 +277,7 @@ bool Depot::getStatus(const std::string &s_in, Status &dest) const return true; } -std::vector<string> Depot::getSubscriptions(void) const +std::vector<string> Depot::getSubscriptions() const { return subscribed; } @@ -302,7 +302,7 @@ bool Depot::unsubscribeTo(const string mailbox) return false; } -void Depot::loadSubscribes(void) +void Depot::loadSubscribes() { // drop all existing subscribed folders. subscribed.clear(); @@ -342,7 +342,7 @@ void Depot::loadSubscribes(void) } } -bool Depot::saveSubscribes(void) const +bool Depot::saveSubscribes() const { // create a safe file name string ftemplate = ".subscribed-tmp-XXXXXX"; @@ -379,7 +379,7 @@ bool Depot::saveSubscribes(void) const return true; } -Depot::iterator::iterator(void) +Depot::iterator::iterator() { dirp = nullptr; ref = new int; @@ -404,7 +404,7 @@ Depot::iterator::iterator(const iterator ©) direntp = copy.direntp; } -Depot::iterator::~iterator(void) +Depot::iterator::~iterator() { deref(); } @@ -422,7 +422,7 @@ Depot::iterator &Depot::iterator::operator=(const iterator ©) return *this; } -void Depot::iterator::deref(void) +void Depot::iterator::deref() { // decrease existing copy ref if there is one if (*ref != 0 && --(*ref) == 0) { @@ -436,14 +436,14 @@ void Depot::iterator::deref(void) } } -string Depot::iterator::operator*(void) const +string Depot::iterator::operator*() const { if (direntp == nullptr) return ""; return direntp->d_name; } -void Depot::iterator::operator++(void) +void Depot::iterator::operator++() { direntp = readdir(dirp); } @@ -472,20 +472,20 @@ Depot::iterator Depot::begin(const string &path) const return i; } -const Depot::iterator &Depot::end(void) const +const Depot::iterator &Depot::end() const { return enditerator; } -MaildirPPDepot::MaildirPPDepot(void) : Depot("Maildir++") +MaildirPPDepot::MaildirPPDepot() : Depot("Maildir++") { privateNamespace = "INBOX"; privateNamespace += getDelimiter(); } -MaildirPPDepot::~MaildirPPDepot(void) {} +MaildirPPDepot::~MaildirPPDepot() {} -const string &MaildirPPDepot::getPersonalNamespace(void) const +const string &MaildirPPDepot::getPersonalNamespace() const { return privateNamespace; } @@ -553,9 +553,9 @@ string MaildirPPDepot::filenameToMailbox(const string &m) const } } -IMAPdirDepot::IMAPdirDepot(void) : Depot("IMAPdir") {} +IMAPdirDepot::IMAPdirDepot() : Depot("IMAPdir") {} -IMAPdirDepot::~IMAPdirDepot(void) {} +IMAPdirDepot::~IMAPdirDepot() {} string IMAPdirDepot::mailboxToFilename(const string &m) const { |