1 #ifndef BUFFY_MAILFOLDER_H 2 #define BUFFY_MAILFOLDER_H 24 #include <buffy/utils/consumer.h> 25 #include <buffy/utils/smartpointer.h> 36 virtual const std::string&
name()
const throw () = 0;
37 virtual const std::string&
path()
const throw () = 0;
38 virtual std::string
type()
const throw () = 0;
42 virtual int getMsgNew()
const throw () = 0;
60 bool valid()
const throw () {
return impl; }
65 const std::string&
name()
const throw () {
return impl->name(); }
70 const std::string&
path()
const throw () {
return impl->path(); }
77 std::string
type()
const throw () {
return impl->type(); }
82 int getMsgTotal()
const throw () {
return impl->getMsgTotal(); }
92 int getMsgNew()
const throw () {
return impl->getMsgNew(); }
113 impl->updateStatistics();
127 static void enumerateFolders(
const std::string& path, Consumer<MailFolder>& cons);
132 static std::vector<MailFolder> enumerateFolders(
const std::string& path);
int getMsgNew() const
Get the number of new messages.
Definition: mailfolder.h:92
virtual int getMsgUnread() const =0
virtual int getMsgFlagged() const =0
virtual ~MailFolderImpl()
Definition: mailfolder.h:34
MailFolder(const MailFolder &mf)
Definition: mailfolder.h:54
virtual int getMsgTotal() const =0
virtual void updateStatistics()=0
int getMsgFlagged() const
Get the number of messages flagged 'important'.
Definition: mailfolder.h:97
Definition: mailfolder.h:50
std::string type() const
Return the name of the type of this mail folder.
Definition: mailfolder.h:77
bool changed()
Return true if the folder has been changed since the last updateStatistics.
Definition: mailfolder.h:106
void updateStatistics()
Rescan the folder to update its statistics.
Definition: mailfolder.h:111
virtual const std::string & name() const =0
Consumer< MailFolder > MailFolderConsumer
Definition: mailfolder.h:135
MailFolder(MailFolderImpl *otherimpl)
Definition: mailfolder.h:55
virtual int getMsgNew() const =0
MailFolder()
Definition: mailfolder.h:53
const std::string & name() const
Return the presentation name of this mail folder.
Definition: mailfolder.h:65
Filter< MailFolder > MailFolderFilter
Definition: mailfolder.h:136
virtual std::string type() const =0
Definition: mailfolder.h:29
Definition: mailfolder.h:31
int getMsgUnread() const
Get the number of unread messages.
Definition: mailfolder.h:87
int getMsgTotal() const
Get the total number of messages.
Definition: mailfolder.h:82
virtual const std::string & path() const =0
const std::string & path() const
Return the path to this mail folder.
Definition: mailfolder.h:70
bool valid() const
Return true if this MailFolder is not a null mail folder.
Definition: mailfolder.h:60