7#ifndef maildirmessage_h_included
8#define maildirmessage_h_included
43 void setUID(
unsigned int uid);
48 unsigned int getUID(
void)
const;
57 void setSize(
unsigned int size);
67 unsigned int getSize(
bool determine =
false)
const;
188 const std::string &
getHeader(
const std::string &header);
191 const std::string &text);
201 std::vector<std::string> headers,
202 bool includeHeaders =
false,
203 unsigned int startOffset = 0,
205 bool mime =
false)
const;
208 std::vector<std::string> headers,
209 bool includeHeaders =
false,
210 unsigned int startOffset = 0,
212 bool mime =
false)
const;
214 bool printBody(
const std::string §ion =
"",
215 unsigned int startOffset = 0,
216 unsigned int length =
UINTMAX)
const;
217 unsigned int getBodySize(
const std::string §ion,
218 unsigned int startOffset = 0,
219 unsigned int length =
UINTMAX)
const;
221 bool printDoc(
unsigned int startOffset = 0,
223 bool onlyText =
false)
const;
225 unsigned int getDocSize(
unsigned int startOffset = 0,
227 bool onlyText =
false)
const;
230 const std::string &
getUnique(
void)
const;
269 mutable unsigned char internalFlags;
270 mutable unsigned char stdflags;
271 mutable unsigned int uid;
272 mutable unsigned int size;
273 mutable std::string unique;
274 mutable std::string safeName;
278 static std::string storage;
279 std::vector<std::string> *customFlags;
304 mutable std::map<const MaildirMessage *, ParseStatus> statuses;
305 mutable std::deque<const MaildirMessage *> parsed;
Declaration of the Address class.
void addStatus(const MaildirMessage *, ParseStatus pstat)
static MaildirMessageCache & getInstance(void)
void removeStatus(const MaildirMessage *)
ParseStatus getStatus(const MaildirMessage *) const
The MaildirMessage class provides an interface for IMAP messages.
bool printBody(const std::string §ion="", unsigned int startOffset=0, unsigned int length=UINTMAX) const
void setUnique(const std::string &s_in)
void setInternalDate(time_t internaldate)
bool appendChunk(const std::string &chunk)
unsigned int getBodySize(const std::string §ion, unsigned int startOffset=0, unsigned int length=UINTMAX) const
const std::string & getHeader(const std::string &header)
bool parseHeaders(void) const
unsigned char getInternalFlags(void) const
void setFlagsUnchanged(void)
std::vector< std::string > getCustomFlags(void) const
void setUID(unsigned int uid)
bool printDoc(unsigned int startOffset=0, unsigned int length=UINTMAX, bool onlyText=false) const
void setCustomFlag(const std::string &flag)
bool printBodyStructure(bool extended=true) const
bool textContains(const std::string &text)
bool parseFull(void) const
bool printHeader(const std::string §ion, std::vector< std::string > headers, bool includeHeaders=false, unsigned int startOffset=0, unsigned int length=UINTMAX, bool mime=false) const
bool bodyContains(const std::string &text)
bool printEnvelope(void) const
void resetCustomFlags(void)
std::string getFixedFilename(void) const
bool headerContains(const std::string &header, const std::string &text)
unsigned int getSize(bool determine=false) const
unsigned int getUID(void) const
const std::string & getSafeName(void) const
void setSize(unsigned int size)
unsigned int getDocSize(unsigned int startOffset=0, unsigned int length=UINTMAX, bool onlyText=false) const
void setSafeName(const std::string &name)
void setInternalFlag(unsigned char flags)
std::string getFileName(void) const
const std::string & getUnique(void) const
bool isExpunged(void) const
unsigned char getStdFlags(void) const
void clearInternalFlag(unsigned char flags)
void setStdFlag(unsigned char flags)
MaildirMessage & operator=(const MaildirMessage ©)
unsigned int getHeaderSize(const std::string §ion, std::vector< std::string > headers, bool includeHeaders=false, unsigned int startOffset=0, unsigned int length=UINTMAX, bool mime=false) const
int readChunk(std::string &chunk)
bool hasFlagsChanged(void) const
bool operator<(const MaildirMessage &a) const
void removeCustomFlag(const std::string &flag)
time_t getInternalDate(void) const
The Message class provides an interface for IMAP messages.
Declaration of the Message class.
Declaration of main mime parser components.