7#ifndef maildir_h_included
8#define maildir_h_included
17 static const std::string CACHEFILEVERSION =
"1.0.5";
18 static const std::string UIDVALFILEVERSION =
"1.0.5";
23 Lock(
const std::string &path);
41 std::map<std::string, MaildirIndexItem> idx;
44 void insert(
const std::string &unique,
unsigned int uid,
45 const std::string &fileName =
"");
46 void remove(
const std::string &unique);
50 unsigned int getSize(
void)
const;
57 typedef std::map<unsigned int, MaildirMessage>
MessageMap;
88 MessageMap::iterator i;
105 bool getUpdates(
bool doscan,
unsigned int type,
109 void setPath(
const std::string &path_in);
113 unsigned int getStatusID(
const std::string &)
const;
117 bool isMailbox(
const std::string &)
const;
118 bool isMarked(
const std::string &)
const;
119 bool selectMailbox(
const std::string &name,
const std::string &s_in);
122 bool createMailbox(
const std::string &s, mode_t mode, uid_t owner = 0, gid_t group = 0,
bool root =
false);
161 std::vector<MaildirMessage> newMessages;
163 unsigned int uidvalidity;
164 unsigned int uidnext;
168 mutable iterator beginIterator;
169 mutable iterator endIterator;
171 mutable bool firstscan;
172 mutable bool cacheRead;
176 mutable unsigned int oldrecent;
177 mutable unsigned int oldexists;
179 mutable time_t old_bincimap_cache_st_mtime;
180 mutable time_t old_bincimap_cache_st_ctime;
181 mutable time_t old_cur_st_mtime;
182 mutable time_t old_cur_st_ctime;
183 mutable time_t old_new_st_mtime;
184 mutable time_t old_new_st_ctime;
186 mutable bool mailboxchanged;
MaildirMessage & curMessage(void)
Message & operator*(void)
iterator & operator=(const iterator ©)
bool operator!=(const BaseIterator &) const
bool operator==(const BaseIterator &) const
void bumpUidValidity(const std::string &) const
const std::string getTypeName(void) const
unsigned int getUidValidity(void) const
void add(MaildirMessage &m)
unsigned int getStatusID(const std::string &) const
bool fastCopy(Message &source, Mailbox &desttype, const std::string &destname)
Mailbox::iterator end(void) const
void expungeMailbox(void)
bool createMailbox(const std::string &s, mode_t mode, uid_t owner=0, gid_t group=0, bool root=false)
bool commitNewMessages(const std::string &mbox)
ScanResult scan(bool forceScan=false)
unsigned int getMaxSqnr(void) const
bool isMailbox(const std::string &) const
bool selectMailbox(const std::string &name, const std::string &s_in)
void setPath(const std::string &path_in)
bool deleteMailbox(const std::string &s)
bool scanFileNames(void) const
Message * createMessage(const std::string &mbox, time_t idate=0)
ReadCacheResult readCache(void)
bool getUpdates(bool doscan, unsigned int type, PendingUpdates &updates, bool forceScan)
unsigned int getMaxUid(void) const
Mailbox::iterator begin(const SequenceSet &bset, unsigned int mod=INCLUDE_EXPUNGED|SQNR_MODE) const
bool isMarked(const std::string &) const
MaildirMessage * get(const std::string &id)
bool getStatus(const std::string &, Status &) const
bool rollBackNewMessages(void)
unsigned int getUidNext(void) const
const std::string & getPath(void) const
std::map< unsigned int, MaildirMessage > MessageMap
void clearFileNames(void)
void insert(const std::string &unique, unsigned int uid, const std::string &fileName="")
unsigned int getSize(void) const
MaildirIndexItem * find(const std::string &unique)
void remove(const std::string &unique)
The MaildirMessage class provides an interface for IMAP messages.
The Message class provides an interface for IMAP messages.
Declaration of the Mailbox class (Mailbox is logical container)
Declaration of the MaildirMessage class.