Bincimap 2.0.16
Easy Imapping
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Friends
Maildir Class Reference

#include <maildir.h>

Data Structures

class  iterator
 

Public Types

typedef std::map< unsigned int, MaildirMessageMessageMap
 
- Public Types inherited from Mailbox
enum  Iterator { INCLUDE_EXPUNGED = 1 , SKIP_EXPUNGED = 2 }
 
enum  Mode { UID_MODE = 4 , SQNR_MODE = 8 }
 

Public Member Functions

const std::string getTypeName (void) const
 
Mailbox::iterator begin (const SequenceSet &bset, unsigned int mod=INCLUDE_EXPUNGED|SQNR_MODE) const
 
Mailbox::iterator end (void) const
 
unsigned int getMaxUid (void) const
 
unsigned int getMaxSqnr (void) const
 
unsigned int getUidValidity (void) const
 
unsigned int getUidNext (void) const
 
bool getUpdates (bool doscan, unsigned int type, PendingUpdates &updates, bool forceScan)
 
const std::string & getPath (void) const
 
void setPath (const std::string &path_in)
 
void bumpUidValidity (const std::string &) const
 
unsigned int getStatusID (const std::string &) const
 
bool getStatus (const std::string &, Status &) const
 
void updateFlags (void)
 
bool isMailbox (const std::string &) const
 
bool isMarked (const std::string &) const
 
bool selectMailbox (const std::string &name, const std::string &s_in)
 
void closeMailbox (void)
 
void expungeMailbox (void)
 
bool createMailbox (const std::string &s, mode_t mode, uid_t owner=0, gid_t group=0, bool root=false)
 
bool deleteMailbox (const std::string &s)
 
MessagecreateMessage (const std::string &mbox, time_t idate=0)
 
bool commitNewMessages (const std::string &mbox)
 
bool rollBackNewMessages (void)
 
bool fastCopy (Message &source, Mailbox &desttype, const std::string &destname)
 
 Maildir (void)
 
 ~Maildir (void)
 
- Public Member Functions inherited from Mailbox
virtual iterator begin (const SequenceSet &bset, unsigned int mod=INCLUDE_EXPUNGED|SQNR_MODE) const =0
 
virtual iterator end (void) const =0
 
virtual bool getStatus (const std::string &, Status &) const =0
 
virtual bool isMailbox (const std::string &) const =0
 
virtual bool isMarked (const std::string &) const =0
 
virtual unsigned int getStatusID (const std::string &) const =0
 
virtual void bumpUidValidity (const std::string &) const =0
 
void setReadOnly (bool readOnly)
 
bool isReadOnly (void) const
 
virtual const std::string getTypeName (void) const =0
 
const std::string getName (void) const
 
void setName (const std::string &name)
 
virtual unsigned int getMaxUid (void) const =0
 
virtual unsigned int getMaxSqnr (void) const =0
 
virtual unsigned int getUidNext (void) const =0
 
virtual unsigned int getUidValidity (void) const =0
 
virtual bool getUpdates (bool scan, unsigned int type, PendingUpdates &updates, bool forceScan)=0
 
virtual void updateFlags (void)=0
 
virtual void expungeMailbox (void)=0
 
virtual bool selectMailbox (const std::string &name, const std::string &s_in)=0
 
virtual bool createMailbox (const std::string &s, mode_t mode, uid_t owner=0, gid_t group=0, bool root=false)=0
 
virtual bool deleteMailbox (const std::string &s)=0
 
virtual void closeMailbox (void)=0
 
virtual MessagecreateMessage (const std::string &mbox, time_t idate=0)=0
 
virtual bool commitNewMessages (const std::string &mbox)=0
 
virtual bool rollBackNewMessages (void)=0
 
virtual bool fastCopy (Message &source, Mailbox &desttype, const std::string &destname)=0
 
const std::string & getLastError (void) const
 
void setLastError (const std::string &error) const
 
 Mailbox (void)
 
virtual ~Mailbox (void)
 

Protected Types

enum  ReadCacheResult { Ok , NoCache , Error }
 
enum  ScanResult { Success = 0 , TemporaryError = 1 , PermanentError = 2 }
 

Protected Member Functions

ReadCacheResult readCache (void)
 
bool writeCache (void)
 
bool scanFileNames (void) const
 
ScanResult scan (bool forceScan=false)
 
MaildirMessageget (const std::string &id)
 
void add (MaildirMessage &m)
 

Friends

class Maildir::iterator
 
class MaildirMessage
 

Additional Inherited Members

- Protected Attributes inherited from Mailbox
bool readOnly
 

Detailed Description

Definition at line 55 of file maildir.h.

Member Typedef Documentation

◆ MessageMap

typedef std::map<unsigned int, MaildirMessage> MessageMap

Definition at line 57 of file maildir.h.

Member Enumeration Documentation

◆ ReadCacheResult

enum ReadCacheResult
protected
Enumerator
Ok 
NoCache 
Error 

Definition at line 139 of file maildir.h.

◆ ScanResult

enum ScanResult
protected
Enumerator
Success 
TemporaryError 
PermanentError 

Definition at line 149 of file maildir.h.

Constructor & Destructor Documentation

◆ Maildir()

Maildir ( void  )

Definition at line 178 of file maildir.cc.

◆ ~Maildir()

~Maildir ( void  )

Definition at line 190 of file maildir.cc.

Member Function Documentation

◆ add()

void add ( MaildirMessage m)
protected

Definition at line 770 of file maildir.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ begin()

Mailbox::iterator begin ( const SequenceSet bset,
unsigned int  mod = INCLUDE_EXPUNGED | SQNR_MODE 
) const
virtual

Implements Mailbox.

Definition at line 146 of file maildir.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ bumpUidValidity()

void bumpUidValidity ( const std::string &  ) const
virtual

Implements Mailbox.

Definition at line 282 of file maildir.cc.

Here is the caller graph for this function:

◆ closeMailbox()

void closeMailbox ( void  )
virtual

Implements Mailbox.

Definition at line 16 of file maildir-close.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ commitNewMessages()

bool commitNewMessages ( const std::string &  mbox)
virtual

Implements Mailbox.

Definition at line 534 of file maildir.cc.

Here is the call graph for this function:

◆ createMailbox()

bool createMailbox ( const std::string &  s,
mode_t  mode,
uid_t  owner = 0,
gid_t  group = 0,
bool  root = false 
)
virtual

Implements Mailbox.

Definition at line 19 of file maildir-create.cc.

Here is the call graph for this function:

◆ createMessage()

Message * createMessage ( const std::string &  mbox,
time_t  idate = 0 
)
virtual

Implements Mailbox.

Definition at line 507 of file maildir.cc.

Here is the call graph for this function:

◆ deleteMailbox()

bool deleteMailbox ( const std::string &  s)
virtual

Implements Mailbox.

Definition at line 68 of file maildir-delete.cc.

Here is the call graph for this function:

◆ end()

Mailbox::iterator end ( void  ) const
virtual

Implements Mailbox.

Definition at line 156 of file maildir.cc.

Here is the caller graph for this function:

◆ expungeMailbox()

void expungeMailbox ( void  )
virtual

Implements Mailbox.

Definition at line 19 of file maildir-expunge.cc.

Here is the call graph for this function:

◆ fastCopy()

bool fastCopy ( Message source,
Mailbox desttype,
const std::string &  destname 
)
virtual

Implements Mailbox.

Definition at line 687 of file maildir.cc.

Here is the call graph for this function:

◆ get()

MaildirMessage * get ( const std::string &  id)
protected

Definition at line 756 of file maildir.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMaxSqnr()

unsigned int getMaxSqnr ( void  ) const
virtual

Implements Mailbox.

Definition at line 471 of file maildir.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMaxUid()

unsigned int getMaxUid ( void  ) const
virtual

Implements Mailbox.

Definition at line 449 of file maildir.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPath()

const std::string & getPath ( void  ) const

◆ getStatus()

bool getStatus ( const std::string &  ,
Status  
) const
virtual

Implements Mailbox.

Definition at line 327 of file maildir.cc.

Here is the call graph for this function:

◆ getStatusID()

unsigned int getStatusID ( const std::string &  ) const
virtual

Implements Mailbox.

Definition at line 310 of file maildir.cc.

◆ getTypeName()

const std::string getTypeName ( void  ) const
virtual

Implements Mailbox.

Definition at line 276 of file maildir.cc.

◆ getUidNext()

unsigned int getUidNext ( void  ) const
virtual

Implements Mailbox.

Definition at line 501 of file maildir.cc.

◆ getUidValidity()

unsigned int getUidValidity ( void  ) const
virtual

Implements Mailbox.

Definition at line 495 of file maildir.cc.

◆ getUpdates()

bool getUpdates ( bool  doscan,
unsigned int  type,
PendingUpdates updates,
bool  forceScan 
)
virtual

Implements Mailbox.

Definition at line 201 of file maildir.cc.

Here is the call graph for this function:

◆ isMailbox()

bool isMailbox ( const std::string &  s_in) const
virtual

Implements Mailbox.

Definition at line 263 of file maildir.cc.

◆ isMarked()

bool isMarked ( const std::string &  s_in) const
virtual

Implements Mailbox.

Definition at line 289 of file maildir.cc.

◆ readCache()

Maildir::ReadCacheResult readCache ( void  )
protected

Definition at line 16 of file maildir-readcache.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rollBackNewMessages()

bool rollBackNewMessages ( void  )
virtual

Implements Mailbox.

Definition at line 674 of file maildir.cc.

◆ scan()

Maildir::ScanResult scan ( bool  forceScan = false)
protected

Definition at line 70 of file maildir-scan.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scanFileNames()

bool scanFileNames ( void  ) const
protected

Definition at line 22 of file maildir-scanfilesnames.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ selectMailbox()

bool selectMailbox ( const std::string &  name,
const std::string &  s_in 
)
virtual

Implements Mailbox.

Definition at line 16 of file maildir-select.cc.

Here is the call graph for this function:

◆ setPath()

void setPath ( const std::string &  path_in)

Definition at line 195 of file maildir.cc.

Here is the caller graph for this function:

◆ updateFlags()

void updateFlags ( void  )
virtual

Implements Mailbox.

Definition at line 19 of file maildir-updateflags.cc.

Here is the call graph for this function:

◆ writeCache()

bool writeCache ( void  )
protected

Definition at line 17 of file maildir-writecache.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ Maildir::iterator

friend class Maildir::iterator
friend

Definition at line 135 of file maildir.h.

◆ MaildirMessage

friend class MaildirMessage
friend

Definition at line 136 of file maildir.h.


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