libbuffy  1.0
Public Member Functions | Static Public Member Functions | List of all members
buffy::MailFolder Class Reference

#include <mailfolder.h>

Inheritance diagram for buffy::MailFolder:

Public Member Functions

 MailFolder () throw ()
 
 MailFolder (const MailFolder &mf) throw ()
 
 MailFolder (MailFolderImpl *otherimpl) throw ()
 
bool valid () const throw ()
 Return true if this MailFolder is not a null mail folder. More...
 
const std::string & name () const throw ()
 Return the presentation name of this mail folder. More...
 
const std::string & path () const throw ()
 Return the path to this mail folder. More...
 
std::string type () const throw ()
 Return the name of the type of this mail folder. More...
 
int getMsgTotal () const throw ()
 Get the total number of messages. More...
 
int getMsgUnread () const throw ()
 Get the number of unread messages. More...
 
int getMsgNew () const throw ()
 Get the number of new messages. More...
 
int getMsgFlagged () const throw ()
 Get the number of messages flagged 'important'. More...
 
bool changed ()
 Return true if the folder has been changed since the last updateStatistics. More...
 
void updateStatistics ()
 Rescan the folder to update its statistics. More...
 

Static Public Member Functions

static MailFolder accessFolder (const std::string &path)
 Create a MailFolder object given a path, autodetecting the folder type. More...
 
static void enumerateFolders (const std::string &path, Consumer< MailFolder > &cons)
 Scan a directory and pass to a Consumer all the folders that are found. More...
 
static std::vector< MailFolderenumerateFolders (const std::string &path)
 Scan a directory and return the folder it contains. More...
 

Constructor & Destructor Documentation

◆ MailFolder() [1/3]

buffy::MailFolder::MailFolder ( )
throw (
)
inline

◆ MailFolder() [2/3]

buffy::MailFolder::MailFolder ( const MailFolder mf)
throw (
)
inline

◆ MailFolder() [3/3]

buffy::MailFolder::MailFolder ( MailFolderImpl otherimpl)
throw (
)
inline

Member Function Documentation

◆ accessFolder()

MailFolder MailFolder::accessFolder ( const std::string &  path)
static

Create a MailFolder object given a path, autodetecting the folder type.

If no suitable folder type has been found or other problems happened, it will return a null MailFolder object.

◆ changed()

bool buffy::MailFolder::changed ( )
inline

Return true if the folder has been changed since the last updateStatistics.

A folder is not scanned automatically when the MailFolder object is created: at the beginning, all statistics will return -1 and changed() will return true;

◆ enumerateFolders() [1/2]

void MailFolder::enumerateFolders ( const std::string &  path,
Consumer< MailFolder > &  cons 
)
static

Scan a directory and pass to a Consumer all the folders that are found.

◆ enumerateFolders() [2/2]

vector< MailFolder > MailFolder::enumerateFolders ( const std::string &  path)
static

Scan a directory and return the folder it contains.

◆ getMsgFlagged()

int buffy::MailFolder::getMsgFlagged ( ) const
throw (
)
inline

Get the number of messages flagged 'important'.

◆ getMsgNew()

int buffy::MailFolder::getMsgNew ( ) const
throw (
)
inline

Get the number of new messages.

◆ getMsgTotal()

int buffy::MailFolder::getMsgTotal ( ) const
throw (
)
inline

Get the total number of messages.

◆ getMsgUnread()

int buffy::MailFolder::getMsgUnread ( ) const
throw (
)
inline

Get the number of unread messages.

◆ name()

const std::string& buffy::MailFolder::name ( ) const
throw (
)
inline

Return the presentation name of this mail folder.

◆ path()

const std::string& buffy::MailFolder::path ( ) const
throw (
)
inline

Return the path to this mail folder.

◆ type()

std::string buffy::MailFolder::type ( ) const
throw (
)
inline

Return the name of the type of this mail folder.

For example: "Maildir" or "Mailbox"

◆ updateStatistics()

void buffy::MailFolder::updateStatistics ( )
inline

Rescan the folder to update its statistics.

References buffy::MailFolderImpl::path().

◆ valid()

bool buffy::MailFolder::valid ( ) const
throw (
)
inline

Return true if this MailFolder is not a null mail folder.


The documentation for this class was generated from the following files: