7#ifndef message_h_included
8#define message_h_included
14#define UINTMAX ((unsigned int)-1)
50 virtual void setUID(
unsigned int) = 0;
51 virtual unsigned int getUID(
void)
const = 0;
54 virtual unsigned int getSize(
bool render =
false)
const = 0;
80 virtual const std::string &
getHeader(
const std::string &header) = 0;
83 const std::string &text) = 0;
93 std::vector<std::string> headers,
94 bool includeHeaders =
false,
95 unsigned int startOffset = 0,
97 bool mime =
false)
const = 0;
100 std::vector<std::string> headers,
101 bool includeHeaders =
false,
102 unsigned int startOffset = 0,
104 bool mime =
false)
const = 0;
107 unsigned int startOffset = 0,
108 unsigned int length =
UINTMAX)
const = 0;
111 unsigned int startOffset = 0,
112 unsigned int length =
UINTMAX)
const = 0;
114 virtual bool printDoc(
unsigned int startOffset = 0,
116 bool onlyText =
false)
const = 0;
118 virtual unsigned int getDocSize(
unsigned int startOffset = 0,
120 bool onlyText =
false)
const = 0;
129 static std::string lastError;
The Message class provides an interface for IMAP messages.
virtual void setInternalDate(time_t)=0
virtual bool printEnvelope(void) const =0
virtual void setUnExpunged(void)=0
virtual time_t getInternalDate(void) const =0
virtual bool textContains(const std::string &text)=0
virtual void close(void)=0
virtual unsigned int getUID(void) const =0
virtual unsigned int getBodySize(const std::string §ion, unsigned int startOffset=0, unsigned int length=UINTMAX) const =0
virtual void setFlagsUnchanged(void)=0
virtual void setCustomFlag(const std::string &flag)=0
virtual void resetStdFlags(void)=0
virtual bool printDoc(unsigned int startOffset=0, unsigned int length=UINTMAX, bool onlyText=false) const =0
virtual void setExpunged(void)=0
virtual bool printBody(const std::string §ion, unsigned int startOffset=0, unsigned int length=UINTMAX) const =0
virtual 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 =0
virtual bool isExpunged(void) const =0
virtual unsigned int getSize(bool render=false) const =0
virtual void setUID(unsigned int)=0
virtual void setStdFlag(unsigned char)=0
virtual 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 =0
virtual bool appendChunk(const std::string &)=0
virtual bool bodyContains(const std::string &text)=0
virtual void setSize(unsigned int)=0
virtual const std::string & getHeader(const std::string &header)=0
virtual unsigned char getStdFlags(void) const =0
virtual int readChunk(std::string &)=0
virtual bool printBodyStructure(bool extended=true) const =0
const std::string & getLastError(void) const
virtual std::vector< std::string > getCustomFlags(void) const =0
virtual void resetCustomFlags(void)=0
virtual void removeCustomFlag(const std::string &flag)=0
void setLastError(const std::string &) const
virtual unsigned int getDocSize(unsigned int startOffset=0, unsigned int length=UINTMAX, bool onlyText=false) const =0
virtual bool headerContains(const std::string &header, const std::string &text)=0
virtual bool hasFlagsChanged(void) const =0