Bincimap 2.0.16
Easy Imapping
Loading...
Searching...
No Matches
Public Types | Public Member Functions
Message Class Referenceabstract

The Message class provides an interface for IMAP messages. More...

#include <message.h>

Public Types

enum  Flags {
  F_NONE = 0x00 , F_SEEN = 0x01 , F_ANSWERED = 0x02 , F_DELETED = 0x04 , F_DRAFT = 0x08 ,
  F_RECENT = 0x10 , F_FLAGGED = 0x20 , F_EXPUNGED = 0x40 , F_PASSED = 0x80
}
 

Public Member Functions

virtual void setUID (unsigned int)=0
 
virtual unsigned int getUID (void) const =0
 
virtual void setSize (unsigned int)=0
 
virtual unsigned int getSize (bool render=false) const =0
 
virtual void setStdFlag (unsigned char)=0
 
virtual void resetStdFlags (void)=0
 
virtual unsigned char getStdFlags (void) const =0
 
virtual void setCustomFlag (const std::string &flag)=0
 
virtual void removeCustomFlag (const std::string &flag)=0
 
virtual void resetCustomFlags (void)=0
 
virtual std::vector< std::string > getCustomFlags (void) const =0
 
virtual void setFlagsUnchanged (void)=0
 
virtual bool hasFlagsChanged (void) const =0
 
virtual void setInternalDate (time_t)=0
 
virtual time_t getInternalDate (void) const =0
 
virtual int readChunk (std::string &)=0
 
virtual bool appendChunk (const std::string &)=0
 
virtual void close (void)=0
 
virtual void setExpunged (void)=0
 
virtual void setUnExpunged (void)=0
 
virtual bool isExpunged (void) const =0
 
virtual const std::string & getHeader (const std::string &header)=0
 
virtual bool headerContains (const std::string &header, const std::string &text)=0
 
virtual bool bodyContains (const std::string &text)=0
 
virtual bool textContains (const std::string &text)=0
 
virtual bool printBodyStructure (bool extended=true) const =0
 
virtual bool printEnvelope (void) const =0
 
virtual bool printHeader (const std::string &section, std::vector< std::string > headers, bool includeHeaders=false, unsigned int startOffset=0, unsigned int length=UINTMAX, bool mime=false) const =0
 
virtual unsigned int getHeaderSize (const std::string &section, std::vector< std::string > headers, bool includeHeaders=false, unsigned int startOffset=0, unsigned int length=UINTMAX, bool mime=false) const =0
 
virtual bool printBody (const std::string &section, unsigned int startOffset=0, unsigned int length=UINTMAX) const =0
 
virtual unsigned int getBodySize (const std::string &section, unsigned int startOffset=0, unsigned int length=UINTMAX) const =0
 
virtual bool printDoc (unsigned int startOffset=0, unsigned int length=UINTMAX, bool onlyText=false) const =0
 
virtual unsigned int getDocSize (unsigned int startOffset=0, unsigned int length=UINTMAX, bool onlyText=false) const =0
 
 Message (void)
 
virtual ~Message (void)
 
void setLastError (const std::string &) const
 
const std::string & getLastError (void) const
 

Detailed Description

The Message class provides an interface for IMAP messages.

Mailbox independent operations and properties are available through this interface.

This class is an abstract, and has no implementation.

See also
MaildirMessage

Definition at line 31 of file message.h.

Member Enumeration Documentation

◆ Flags

enum Flags

Standard IMAP message flags.

Enumerator
F_NONE 

No flag is set

F_SEEN 

The message has been seen

F_ANSWERED 

The message has been answered

F_DELETED 

The message is marked as deleted

F_DRAFT 

The message is a draft

F_RECENT 

The message arrived recently

F_FLAGGED 

The message is flagged / important

F_EXPUNGED 

The message has been expunged

F_PASSED 

The message has been bounced

Definition at line 38 of file message.h.

Constructor & Destructor Documentation

◆ Message()

Message ( void  )
inline

Definition at line 132 of file message.h.

◆ ~Message()

~Message ( void  )
inlinevirtual

Definition at line 136 of file message.h.

Member Function Documentation

◆ appendChunk()

virtual bool appendChunk ( const std::string &  )
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ bodyContains()

virtual bool bodyContains ( const std::string &  text)
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ close()

virtual void close ( void  )
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getBodySize()

virtual unsigned int getBodySize ( const std::string &  section,
unsigned int  startOffset = 0,
unsigned int  length = UINTMAX 
) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getCustomFlags()

virtual std::vector< std::string > getCustomFlags ( void  ) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getDocSize()

virtual unsigned int getDocSize ( unsigned int  startOffset = 0,
unsigned int  length = UINTMAX,
bool  onlyText = false 
) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getHeader()

virtual const std::string & getHeader ( const std::string &  header)
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getHeaderSize()

virtual unsigned int getHeaderSize ( const std::string &  section,
std::vector< std::string >  headers,
bool  includeHeaders = false,
unsigned int  startOffset = 0,
unsigned int  length = UINTMAX,
bool  mime = false 
) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getInternalDate()

virtual time_t getInternalDate ( void  ) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getLastError()

const std::string & getLastError ( void  ) const
inline

Definition at line 145 of file message.h.

Here is the caller graph for this function:

◆ getSize()

virtual unsigned int getSize ( bool  render = false) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getStdFlags()

virtual unsigned char getStdFlags ( void  ) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ getUID()

virtual unsigned int getUID ( void  ) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ hasFlagsChanged()

virtual bool hasFlagsChanged ( void  ) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ headerContains()

virtual bool headerContains ( const std::string &  header,
const std::string &  text 
)
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ isExpunged()

virtual bool isExpunged ( void  ) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ printBody()

virtual bool printBody ( const std::string &  section,
unsigned int  startOffset = 0,
unsigned int  length = UINTMAX 
) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ printBodyStructure()

virtual bool printBodyStructure ( bool  extended = true) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ printDoc()

virtual bool printDoc ( unsigned int  startOffset = 0,
unsigned int  length = UINTMAX,
bool  onlyText = false 
) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ printEnvelope()

virtual bool printEnvelope ( void  ) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ printHeader()

virtual bool printHeader ( const std::string &  section,
std::vector< std::string >  headers,
bool  includeHeaders = false,
unsigned int  startOffset = 0,
unsigned int  length = UINTMAX,
bool  mime = false 
) const
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ readChunk()

virtual int readChunk ( std::string &  )
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ removeCustomFlag()

virtual void removeCustomFlag ( const std::string &  flag)
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ resetCustomFlags()

virtual void resetCustomFlags ( void  )
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ resetStdFlags()

virtual void resetStdFlags ( void  )
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ setCustomFlag()

virtual void setCustomFlag ( const std::string &  flag)
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ setExpunged()

virtual void setExpunged ( void  )
pure virtual

Implemented in MaildirMessage.

◆ setFlagsUnchanged()

virtual void setFlagsUnchanged ( void  )
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ setInternalDate()

virtual void setInternalDate ( time_t  )
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ setLastError()

void setLastError ( const std::string &  error) const
inline

Definition at line 140 of file message.h.

Here is the caller graph for this function:

◆ setSize()

virtual void setSize ( unsigned int  )
pure virtual

Implemented in MaildirMessage.

◆ setStdFlag()

virtual void setStdFlag ( unsigned char  )
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

◆ setUID()

virtual void setUID ( unsigned int  )
pure virtual

Implemented in MaildirMessage.

◆ setUnExpunged()

virtual void setUnExpunged ( void  )
pure virtual

Implemented in MaildirMessage.

◆ textContains()

virtual bool textContains ( const std::string &  text)
pure virtual

Implemented in MaildirMessage.

Here is the caller graph for this function:

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