// Copyright (c) 2010 Martin Knafve / hMailServer.com. // http://www.hmailserver.com #pragma once namespace HM { class ACL; class IMAPFolders; class IMAPFolder; class IMAPFolderContainer : public Singleton { public: IMAPFolderContainer(); virtual ~IMAPFolderContainer(); std::shared_ptr GetFoldersForAccount(__int64 AccountID); // Returns a list of all folders for the specified account. std::shared_ptr GetPublicFolders(); void UncacheAccount(__int64 iAccountID); void UpdateCurrentUID(__int64 accountID, __int64 folderID, unsigned int currentUID); bool Clear(); static bool IsPublicFolder(const std::vector &vecFolderPath); static std::shared_ptr GetTopMostExistingFolder(std::shared_ptr pContainer, const std::vector &vecFolderPath); private: std::map<__int64, std::shared_ptr > folders_; static boost::recursive_mutex fetch_list_mutex_; }; }