VMime
IMAPCommand Class Reference

#include <IMAPCommand.hpp>

Inheritance diagram for IMAPCommand:
Collaboration diagram for IMAPCommand:

Public Member Functions

virtual void send (shared_ptr< IMAPConnection > conn)
virtual const string getText () const
virtual const string getTraceText () const

Static Public Member Functions

static shared_ptr< IMAPCommandLOGIN (const string &username, const string &password)
static shared_ptr< IMAPCommandAUTHENTICATE (const string &mechName)
static shared_ptr< IMAPCommandAUTHENTICATE (const string &mechName, const string &initialResponse)
static shared_ptr< IMAPCommandLIST (const string &refName, const string &mailboxName)
static shared_ptr< IMAPCommandSELECT (const bool readOnly, const string &mailboxName, const std::vector< string > &params)
static shared_ptr< IMAPCommandSTATUS (const string &mailboxName, const std::vector< string > &attribs)
static shared_ptr< IMAPCommandCREATE (const string &mailboxName, const std::vector< string > &params)
static shared_ptr< IMAPCommandDELETE (const string &mailboxName)
static shared_ptr< IMAPCommandRENAME (const string &mailboxName, const string &newMailboxName)
static shared_ptr< IMAPCommandFETCH (const messageSet &msgs, const std::vector< string > &params)
static shared_ptr< IMAPCommandSTORE (const messageSet &msgs, const int mode, const std::vector< string > &flags)
static shared_ptr< IMAPCommandAPPEND (const string &mailboxName, const std::vector< string > &flags, vmime::datetime *date, const size_t size)
static shared_ptr< IMAPCommandCOPY (const messageSet &msgs, const string &mailboxName)
static shared_ptr< IMAPCommandSEARCH (const std::vector< string > &keys, const vmime::charset *charset)
static shared_ptr< IMAPCommandSTARTTLS ()
static shared_ptr< IMAPCommandCAPABILITY ()
static shared_ptr< IMAPCommandNOOP ()
static shared_ptr< IMAPCommandEXPUNGE ()
static shared_ptr< IMAPCommandCLOSE ()
static shared_ptr< IMAPCommandLOGOUT ()
static shared_ptr< IMAPCommandcreateCommand (const string &text, const string &traceText="")

Protected Member Functions

 IMAPCommand (const string &text, const string &traceText)
 IMAPCommand (const IMAPCommand &)
Protected Member Functions inherited from object
 object ()
 object (const object &)
objectoperator= (const object &)
virtual ~object ()

Detailed Description

An IMAP command that will be sent to the server.

Constructor & Destructor Documentation

◆ IMAPCommand() [1/2]

IMAPCommand ( const string & text,
const string & traceText )
protected

Referenced by createCommand(), and IMAPCommand().

◆ IMAPCommand() [2/2]

IMAPCommand ( const IMAPCommand & )
protected

References IMAPCommand().

Member Function Documentation

◆ APPEND()

shared_ptr< IMAPCommand > APPEND ( const string & mailboxName,
const std::vector< string > & flags,
vmime::datetime * date,
const size_t size )
static

References createCommand().

Referenced by IMAPFolder::addMessage().

◆ AUTHENTICATE() [1/2]

shared_ptr< IMAPCommand > AUTHENTICATE ( const string & mechName)
static

References createCommand().

◆ AUTHENTICATE() [2/2]

shared_ptr< IMAPCommand > AUTHENTICATE ( const string & mechName,
const string & initialResponse )
static

References createCommand().

◆ CAPABILITY()

shared_ptr< IMAPCommand > CAPABILITY ( )
static

References createCommand().

◆ CLOSE()

shared_ptr< IMAPCommand > CLOSE ( )
static

References createCommand().

Referenced by IMAPFolder::close().

◆ COPY()

shared_ptr< IMAPCommand > COPY ( const messageSet & msgs,
const string & mailboxName )
static

◆ CREATE()

shared_ptr< IMAPCommand > CREATE ( const string & mailboxName,
const std::vector< string > & params )
static

References createCommand().

Referenced by IMAPFolder::create().

◆ createCommand()

shared_ptr< IMAPCommand > createCommand ( const string & text,
const string & traceText = "" )
static

Creates a new IMAP command with the specified text.

Parameters
textcommand text
traceTexttrace text (if empty, command text is used)
Returns
a new IMAPCommand object

References IMAPCommand().

Referenced by APPEND(), AUTHENTICATE(), AUTHENTICATE(), CAPABILITY(), CLOSE(), COPY(), CREATE(), DELETE(), EXPUNGE(), FETCH(), LIST(), LOGIN(), LOGOUT(), NOOP(), RENAME(), SEARCH(), SELECT(), STARTTLS(), STATUS(), and STORE().

◆ DELETE()

shared_ptr< IMAPCommand > DELETE ( const string & mailboxName)
static

References createCommand().

Referenced by IMAPFolder::destroy().

◆ EXPUNGE()

shared_ptr< IMAPCommand > EXPUNGE ( )
static

References createCommand().

Referenced by IMAPFolder::expunge().

◆ FETCH()

shared_ptr< IMAPCommand > FETCH ( const messageSet & msgs,
const std::vector< string > & params )
static

◆ getText()

const string getText ( ) const
virtual

Returns the full text of the command, including command name and parameters (if any).

This is the text that will be sent to the server.

Returns
command text (eg. "LOGIN myusername mypassword")

◆ getTraceText()

const string getTraceText ( ) const
virtual

Returns the full text of the command, suitable for outputing to the tracer.

Returns
trace text (eg. "LOGIN {username} {password}")

◆ LIST()

shared_ptr< IMAPCommand > LIST ( const string & refName,
const string & mailboxName )
static

References createCommand().

Referenced by IMAPFolder::getFolders().

◆ LOGIN()

shared_ptr< IMAPCommand > LOGIN ( const string & username,
const string & password )
static

References createCommand().

◆ LOGOUT()

shared_ptr< IMAPCommand > LOGOUT ( )
static

References createCommand().

◆ NOOP()

shared_ptr< IMAPCommand > NOOP ( )
static

References createCommand().

Referenced by IMAPFolder::noop(), and IMAPStore::noop().

◆ RENAME()

shared_ptr< IMAPCommand > RENAME ( const string & mailboxName,
const string & newMailboxName )
static

References createCommand().

Referenced by IMAPFolder::rename().

◆ SEARCH()

shared_ptr< IMAPCommand > SEARCH ( const std::vector< string > & keys,
const vmime::charset * charset )
static

◆ SELECT()

shared_ptr< IMAPCommand > SELECT ( const bool readOnly,
const string & mailboxName,
const std::vector< string > & params )
static

References createCommand().

Referenced by IMAPFolder::open().

◆ send()

void send ( shared_ptr< IMAPConnection > conn)
virtual

Sends this command over the specified connection.

Parameters
connconnection onto which the command will be sent

References vmime::dynamicCast().

◆ STARTTLS()

shared_ptr< IMAPCommand > STARTTLS ( )
static

References createCommand().

◆ STATUS()

shared_ptr< IMAPCommand > STATUS ( const string & mailboxName,
const std::vector< string > & attribs )
static

References createCommand().

Referenced by IMAPFolder::getStatus().

◆ STORE()

shared_ptr< IMAPCommand > STORE ( const messageSet & msgs,
const int mode,
const std::vector< string > & flags )
static

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