Dacons LLP Mailit for C/C++ Version 1.0.8

Emai::ImapSession Class Reference

Wrapper class for EmaiImapSession. More...

#include <EmaiIMAP.hpp>

Inheritance diagram for Emai::ImapSession:

Emai::Object< EmaiImapSession > List of all members.

Public Member Functions

 ImapSession (ImapResponseHandler *inResponseHandler, ImapStatusCallback &inStatusCallback, EmaiUint32 inTimeout, EmaiOptions inOptions=EmaiNullOptions)
 ImapSession (EmaiImapResponseCallback inResponseCallback, void *inResponseUserData, EmaiImapStatusCallback inStatusCallback, void *inStatusUserData, EmaiUint32 inTimeout, EmaiOptions inOptions=EmaiNullOptions)
 ImapSession (const ImapSession &inCopy)
 ImapSession (EmaiImapSession inSession, bool inAddRef)
 ~ImapSession ()
void Connect (EmaiConstUniCharPtr inMailServer, short inPort=EmaiDefaultImapPort, EmaiOptions inOptions=EmaiNullOptions)
 Creates IMAP session object, and connects the object to the specified mail server by calling EmaiImapSessionCreate and EmaiImapConnect functions accordingly.
void ConnectEx (EmaiConstUniCharPtr inMailServer, short inPort=EmaiDefaultImapPort, const EmaiProxyInfo *inProxyInfo=NULL, void *inUserData=NULL, EmaiOptions inOptions=EmaiNullOptions)
 Creates IMAP session object, and connects the object to the specified mail server by calling EmaiImapSessionCreate and EmaiImapConnect functions accordingly.
void Disconnect (EmaiOptions inOptions=EmaiNullOptions)
 Disconnects IMAP session object from mail server by calling the EmaiImapDisconnect function.
void Authenticate (EmaiConstUniCharPtr inAccount, EmaiConstUniCharPtr inPassword, EmaiOptions inOptions=EmaiIMAPAuthAutomatic)
 Authenticates IMAP session, by calling the EmaiImapAuthenticate function for the session.
void SelectMailbox (EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions=EmaiNullOptions)
 The SELECT command selects a mailbox so that messages in the mailbox can be accessed. Only one mailbox can be selected at a time in a connection; simultaneous access to multiple mailboxes requires multiple connections. The SELECT command automatically deselects any currently selected mailbox before attempting the new selection. Consequently, if a mailbox is selected and a SELECT command that fails is attempted, no mailbox is selected.
.
void ExamineMailbox (EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions=EmaiNullOptions)
 The EXAMINE command is identical to SELECT and returns the same output; however, the selected mailbox is identified as read-only. No changes to the permanent state of the mailbox, including per-user state, are permitted; in particular, EXAMINE MUST NOT cause messages to lose the \Recent flag.
.
void CreateMailbox (EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions=EmaiNullOptions)
 The CREATE command creates a mailbox with the given name. A positive response is returned only if a new mailbox with that name has been created. It is an error to attempt to create INBOX or a mailbox with a name that refers to an extant mailbox. Any error in creation will return an apropriate error code.
.
void DeleteMailbox (EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions=EmaiNullOptions)
 The DELETE command permanently removes the mailbox with the given name. A positive response is returned only if the mailbox has been deleted. It is an error to attempt to delete INBOX or a mailbox name that does not exist.
.
void RenameMailbox (EmaiConstUniCharPtr inMailbox, EmaiConstUniCharPtr inNewMailboxName, EmaiOptions inOptions=EmaiNullOptions)
 The RENAME command changes the name of a mailbox. A positive response is returned only if the mailbox has been renamed. It is an error to attempt to rename from a mailbox name that does not exist or to a mailbox name that already exists. Any error in renaming will return an apropriate error code.
.
void SubscribeMailbox (EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions=EmaiNullOptions)
 The SUBSCRIBE command adds the specified mailbox name to the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command. This command returns a positive response only if the subscription is successful.
.
void UnsubscribeMailbox (EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions=EmaiNullOptions)
 The UNSUBSCRIBE command removes the specified mailbox name from the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command. This command returns a positive response only if the unsubscription is successful.
.
void ListMailboxes (EmaiConstUniCharPtr inReferenceName, EmaiConstUniCharPtr inWildcardedMailboxName, EmaiOptions inOptions=EmaiNullOptions)
 The LIST command returns a subset of names from the complete set of all names available to the client. Zero or more untagged LIST replies are returned, containing the name attributes, hierarchy delimiter, and name; see the description of the LIST reply for more detail.
.
void ListSubscribedMailboxes (EmaiConstUniCharPtr inReferenceName, EmaiConstUniCharPtr inWildcardedMailboxName, EmaiOptions inOptions=EmaiNullOptions)
 The LSUB command returns a subset of names from the set of names that the user has declared as being "active" or "subscribed". Zero or more untagged LSUB replies are returned. The arguments to LSUB are in the same form as those for LIST.
.
void MailboxStatus (EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions=EmaiAllStatusData)
 The STATUS command requests the status of the indicated mailbox. It does not change the currently selected mailbox, nor does it affect the state of any messages in the queried mailbox (in particular, STATUS MUST NOT cause messages to lose the \Recent flag).
.
void AppendMessage (EmaiConstUniCharPtr inMailbox, const EmaiFlags *inMessageFlags, EmaiConstUniCharPtr inDateTime, const Message &inMessage, EmaiOptions inOptions=EmaiNullOptions)
 The APPEND command appends the new message to the end of the specified destination mailbox. This argument SHOULD be in the format of an [RFC-2822] message. 8-bit characters are permitted in the message.
.
void Check (EmaiOptions inOptions=EmaiNullOptions)
 The CHECK command requests a checkpoint of the currently selected mailbox. A checkpoint refers to any implementation-dependent housekeeping associated with the mailbox (e.g., resolving the server's in-memory state of the mailbox with the state on its disk) that is not normally executed as part of each command. A checkpoint MAY take a non-instantaneous amount of real time to complete. If a server implementation has no such housekeeping considerations, CHECK is equivalent to NOOP.
.
void CloseMailbox (EmaiOptions inOptions=EmaiNullOptions)
 Permanently removes all messages that have flag set from the currently selected mailbox, and returns to the authenticated state from the selected state.
.
void Expunge (const ImapSequenceSet &inMessageUIDSequence, EmaiOptions inOptions=EmaiNullOptions)
 Permanently removes all messages that have flag set from the currently selected mailbox.
.
void Search (const EmaiSearchingCriteria *inSearchingCriteria, EmaiOptions inOptions=EmaiNullOptions)
 The SEARCH command searches the mailbox for messages that match the given searching criteria. Searching criteria consist of one or more search keys.
.
void Fetch (const ImapSequenceSet &inMessageSequence, const EmaiFetchMessageData *inMessageData, EmaiOptions inOptions=EmaiNullOptions)
 The FETCH command retrieves data associated with a message in the mailbox. The data items to be fetched can be either a single atom or a parenthesized list.
.
void Store (const ImapSequenceSet &inMessageSequence, const EmaiStoreMessageData *inMessageData, EmaiOptions inOptions=EmaiNullOptions)
 The STORE command alters data associated with a message in the mailbox.
.
void Copy (const ImapSequenceSet &inMessageSequence, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions=EmaiNullOptions)
 The COPY command copies the specified message(s) to the end of the specified destination mailbox. The flags and internal date of the message(s) SHOULD be preserved, and the Recent flag SHOULD be set, in the copy.
.
void Cancel (EmaiOptions inOptions=EmaiNullOptions)
 Marks IMAP session to be cancelled ASAP.
void Noop (EmaiOptions inOptions=EmaiNullOptions)
 Can be used as a periodic poll for new messages or message status updates during a period of inactivity.
.

Detailed Description

Wrapper class for EmaiImapSession.

See also:
Emai::EmaiImapSession

Definition at line 313 of file EmaiIMAP.hpp.


Member Function Documentation

void Emai::ImapSession::Connect ( EmaiConstUniCharPtr  inMailServer,
short  inPort = EmaiDefaultImapPort,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Creates IMAP session object, and connects the object to the specified mail server by calling EmaiImapSessionCreate and EmaiImapConnect functions accordingly.

Parameters:
EmaiConstCharPtr inMailServer - pointer to null-teminated string which specifies name or IP address of IMAP server
short inPort - port number of IMAP server
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapSessionCreate

EmaiImapConnect

Definition at line 1115 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapConnect(), and Emai::Object< EmaiImapSession >::mObject.

01120 {
01121     CheckErrorCode(EmaiImapConnect(mObject, inMailServer, inPort, inOptions));
01122 }

void Emai::ImapSession::ConnectEx ( EmaiConstUniCharPtr  inMailServer,
short  inPort = EmaiDefaultImapPort,
const EmaiProxyInfo inProxyInfo = NULL,
void *  inUserData = NULL,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Creates IMAP session object, and connects the object to the specified mail server by calling EmaiImapSessionCreate and EmaiImapConnect functions accordingly.

Parameters:
EmaiConstCharPtr inMailServer - pointer to null-teminated string which specifies name or IP address of IMAP server
short inPort - port number of IMAP server
inProxyInfo - proxy server information struct
inUserData - user data specified parameter, use NULL
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapSessionCreate

EmaiImapConnectEx

Definition at line 1125 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapConnectEx(), and Emai::Object< EmaiImapSession >::mObject.

01132 {
01133     CheckErrorCode(EmaiImapConnectEx(mObject, inMailServer, inPort, inProxyInfo, inUserData,inOptions));
01134 }

void Emai::ImapSession::Disconnect ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

Disconnects IMAP session object from mail server by calling the EmaiImapDisconnect function.

Parameters:
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapDisconnect

Definition at line 1137 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapDisconnect(), and Emai::Object< EmaiImapSession >::mObject.

01140 {
01141     CheckErrorCode(EmaiImapDisconnect(mObject, inOptions));
01142 }

void Emai::ImapSession::Authenticate ( EmaiConstUniCharPtr  inAccount,
EmaiConstUniCharPtr  inPassword,
EmaiOptions  inOptions = EmaiIMAPAuthAutomatic 
) [inline]

Authenticates IMAP session, by calling the EmaiImapAuthenticate function for the session.

Parameters:
EmaiConstCharPtr inAccount - pointer to null-teminated string to specify account name for authentication
EmaiConstCharPtr inPassword - pointer to null-teminated string to specify password for authentication
EmaiOptions inOptions - Authentication method to be used. For example: EmaiIMAPAuthAutomatic, EmaiIMAPAuthLogin, etc
See also:
EmaiImapAuthenticate

EmaiEnumImapAuthModes

Definition at line 1145 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapAuthenticate(), and Emai::Object< EmaiImapSession >::mObject.

01150 {
01151     CheckErrorCode(EmaiImapAuthenticate(mObject, inAccount,
01152                             inPassword, inOptions));
01153 }

void Emai::ImapSession::SelectMailbox ( EmaiConstUniCharPtr  inMailbox,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The SELECT command selects a mailbox so that messages in the mailbox can be accessed. Only one mailbox can be selected at a time in a connection; simultaneous access to multiple mailboxes requires multiple connections. The SELECT command automatically deselects any currently selected mailbox before attempting the new selection. Consequently, if a mailbox is selected and a SELECT command that fails is attempted, no mailbox is selected.
.

Refer to RFC3501 (chapter 6.3.1) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - mailbox name
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapSelectMailbox

Definition at line 1156 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapSelectMailbox(), and Emai::Object< EmaiImapSession >::mObject.

01160 {
01161     CheckErrorCode(EmaiImapSelectMailbox(mObject, inMailbox, inOptions));
01162 }

void Emai::ImapSession::ExamineMailbox ( EmaiConstUniCharPtr  inMailbox,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The EXAMINE command is identical to SELECT and returns the same output; however, the selected mailbox is identified as read-only. No changes to the permanent state of the mailbox, including per-user state, are permitted; in particular, EXAMINE MUST NOT cause messages to lose the \Recent flag.
.

Refer to RFC3501 (chapter 6.3.2) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - mailbox name
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapExamineMailbox

Definition at line 1165 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapExamineMailbox(), and Emai::Object< EmaiImapSession >::mObject.

01169 {
01170     CheckErrorCode(EmaiImapExamineMailbox(mObject, inMailbox, inOptions));
01171 }

void Emai::ImapSession::CreateMailbox ( EmaiConstUniCharPtr  inMailbox,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The CREATE command creates a mailbox with the given name. A positive response is returned only if a new mailbox with that name has been created. It is an error to attempt to create INBOX or a mailbox with a name that refers to an extant mailbox. Any error in creation will return an apropriate error code.
.

Refer to RFC3501 (chapter 6.3.3) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - mailbox name
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapCreateMailbox

Definition at line 1174 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapCreateMailbox(), and Emai::Object< EmaiImapSession >::mObject.

01178 {
01179     CheckErrorCode(EmaiImapCreateMailbox(mObject, inMailbox, inOptions));
01180 }

void Emai::ImapSession::DeleteMailbox ( EmaiConstUniCharPtr  inMailbox,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The DELETE command permanently removes the mailbox with the given name. A positive response is returned only if the mailbox has been deleted. It is an error to attempt to delete INBOX or a mailbox name that does not exist.
.

Refer to RFC3501 (chapter 6.3.4) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - mailbox name
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapDeleteMailbox

Definition at line 1183 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapDeleteMailbox(), and Emai::Object< EmaiImapSession >::mObject.

01187 {
01188     CheckErrorCode(EmaiImapDeleteMailbox(mObject, inMailbox, inOptions));
01189 }

void Emai::ImapSession::RenameMailbox ( EmaiConstUniCharPtr  inMailbox,
EmaiConstUniCharPtr  inNewMailboxName,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The RENAME command changes the name of a mailbox. A positive response is returned only if the mailbox has been renamed. It is an error to attempt to rename from a mailbox name that does not exist or to a mailbox name that already exists. Any error in renaming will return an apropriate error code.
.

Renaming INBOX is permitted, and has special behavior. It moves all messages in INBOX to a new mailbox with the given name, leaving INBOX empty. If the server implementation supports inferior hierarchical names of INBOX, these are unaffected by a rename of INBOX.

Refer to RFC3501 (chapter 6.3.5) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - original mailbox to be renamed
EmaiConstUniCharPtr inNewMailboxName - new name for the mailbox
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapRenameMailbox

Definition at line 1192 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapRenameMailbox(), and Emai::Object< EmaiImapSession >::mObject.

01197 {
01198     CheckErrorCode(EmaiImapRenameMailbox(mObject, inMailbox,
01199                         inNewMailboxName, inOptions));
01200 }

void Emai::ImapSession::SubscribeMailbox ( EmaiConstUniCharPtr  inMailbox,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The SUBSCRIBE command adds the specified mailbox name to the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command. This command returns a positive response only if the subscription is successful.
.

Refer to RFC3501 (chapter 6.3.6) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - mailbox name
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapSubscribeMailbox

Definition at line 1203 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapSubscribeMailbox(), and Emai::Object< EmaiImapSession >::mObject.

01207 {
01208     CheckErrorCode(EmaiImapSubscribeMailbox(mObject, inMailbox, inOptions));
01209 }

void Emai::ImapSession::UnsubscribeMailbox ( EmaiConstUniCharPtr  inMailbox,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The UNSUBSCRIBE command removes the specified mailbox name from the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command. This command returns a positive response only if the unsubscription is successful.
.

Refer to RFC3501 (chapter 6.3.7) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - mailbox name
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapUnsubscribeMailbox

Definition at line 1212 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapUnsubscribeMailbox(), and Emai::Object< EmaiImapSession >::mObject.

01216 {
01217     CheckErrorCode(EmaiImapUnsubscribeMailbox(mObject, inMailbox, inOptions));
01218 }

void Emai::ImapSession::ListMailboxes ( EmaiConstUniCharPtr  inReferenceName,
EmaiConstUniCharPtr  inWildcardedMailboxName,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The LIST command returns a subset of names from the complete set of all names available to the client. Zero or more untagged LIST replies are returned, containing the name attributes, hierarchy delimiter, and name; see the description of the LIST reply for more detail.
.

The character "*" is a wildcard, and matches zero or more characters at this position. The character "%" is similar to "*", but it does not match a hierarchy delimiter.

Refer to RFC3501 (chapter 6.3.8) for more information.

Parameters:
EmaiConstUniCharPtr inReferenceName - reference name
EmaiConstUniCharPtr inWildcardedMailboxName - mailbox name with possible wildcards
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapListMailboxes

Definition at line 1221 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapListMailboxes(), and Emai::Object< EmaiImapSession >::mObject.

01226 {
01227     CheckErrorCode(EmaiImapListMailboxes(mObject, inReferenceName,
01228                         inWildcardedMailboxName, inOptions));
01229 }

void Emai::ImapSession::ListSubscribedMailboxes ( EmaiConstUniCharPtr  inReferenceName,
EmaiConstUniCharPtr  inWildcardedMailboxName,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The LSUB command returns a subset of names from the set of names that the user has declared as being "active" or "subscribed". Zero or more untagged LSUB replies are returned. The arguments to LSUB are in the same form as those for LIST.
.

Refer to RFC3501 (chapter 6.3.9) for more information.

Parameters:
EmaiConstUniCharPtr inReferenceName - reference name
EmaiConstUniCharPtr inWildcardedMailboxName - mailbox name with possible wildcards
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapListSubscribedMailboxes

Definition at line 1232 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapListSubscribedMailboxes(), and Emai::Object< EmaiImapSession >::mObject.

01237 {
01238     CheckErrorCode(EmaiImapListSubscribedMailboxes(mObject, inReferenceName,
01239                         inWildcardedMailboxName, inOptions));
01240 }

void Emai::ImapSession::MailboxStatus ( EmaiConstUniCharPtr  inMailbox,
EmaiOptions  inOptions = EmaiAllStatusData 
) [inline]

The STATUS command requests the status of the indicated mailbox. It does not change the currently selected mailbox, nor does it affect the state of any messages in the queried mailbox (in particular, STATUS MUST NOT cause messages to lose the \Recent flag).
.

The STATUS command provides an alternative to opening a second IMAP4rev1 connection and doing an EXAMINE command on a mailbox to query that mailbox's status without deselecting the current mailbox in the first IMAP4rev1 connection.

Refer to RFC3501 (chapter 6.3.10) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - mailbox name
EmaiOptions inOptions - EmaiMessagesNumber, etc
See also:
EmaiImapMailboxStatus

EmaiEnumImapMailboxStatus

Definition at line 1243 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapMailboxStatus(), and Emai::Object< EmaiImapSession >::mObject.

01247 {
01248     CheckErrorCode(EmaiImapMailboxStatus(mObject, inMailbox, inOptions));
01249 }

void Emai::ImapSession::AppendMessage ( EmaiConstUniCharPtr  inMailbox,
const EmaiFlags inMessageFlags,
EmaiConstUniCharPtr  inDateTime,
const Message inMessage,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The APPEND command appends the new message to the end of the specified destination mailbox. This argument SHOULD be in the format of an [RFC-2822] message. 8-bit characters are permitted in the message.
.

If the destination mailbox does not exist, a server MUST return an error, and MUST NOT automatically create the mailbox. If the mailbox is currently selected, the normal new message actions SHOULD occur.

Refer to RFC3501 (chapter 6.3.11) for more information.

Parameters:
EmaiConstUniCharPtr inMailbox - mailbox name
EmaiConstCharPtr inMessageFlags - zero terminated string with space delimited message flags (for example: "\\Draft \\Flagged")
EmaiConstCharPtr inDateTime - zero terminated date/time string, which indicates internal message date (for example: " 1-Jan-2006 21:34:27 +0200")
const Message& inMessage - message object to be appended
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapAppendMessage

Definition at line 1252 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapAppendMessage(), and Emai::Object< EmaiImapSession >::mObject.

01259 {
01260     CheckErrorCode(EmaiImapAppendMessage(mObject, inMailbox,
01261                         inMessageFlags, inDateTime, inMessage, inOptions));
01262 }

void Emai::ImapSession::Check ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

The CHECK command requests a checkpoint of the currently selected mailbox. A checkpoint refers to any implementation-dependent housekeeping associated with the mailbox (e.g., resolving the server's in-memory state of the mailbox with the state on its disk) that is not normally executed as part of each command. A checkpoint MAY take a non-instantaneous amount of real time to complete. If a server implementation has no such housekeeping considerations, CHECK is equivalent to NOOP.
.

Refer to RFC3501 (chapter 6.4.1) for more information.

Parameters:
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapCheck

Definition at line 1265 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapCheck(), and Emai::Object< EmaiImapSession >::mObject.

01268 {
01269     CheckErrorCode(EmaiImapCheck(mObject, inOptions));
01270 }

void Emai::ImapSession::CloseMailbox ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

Permanently removes all messages that have flag set from the currently selected mailbox, and returns to the authenticated state from the selected state.
.

Refer to RFC3501 (chapter 6.4.2) for more information.

Parameters:
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapCloseMailbox

Definition at line 1273 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapCloseMailbox(), and Emai::Object< EmaiImapSession >::mObject.

01276 {
01277     CheckErrorCode(EmaiImapCloseMailbox(mObject, inOptions));
01278 }

void Emai::ImapSession::Expunge ( const ImapSequenceSet inMessageUIDSequence,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Permanently removes all messages that have flag set from the currently selected mailbox.
.

Refer to RFC3501 (chapter 6.4.3) for more information.

Parameters:
const ImapSequenceSet& inMessageUIDSequence - sequence of the message UIDs to be expunged
EmaiOptions inOptions - EmaiImapNoCustomExpungeOption or EmaiNullOptions
See also:
EmaiImapExpunge

EmaiEnumImapExpungeOptions

Definition at line 1281 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapExpunge(), and Emai::Object< EmaiImapSession >::mObject.

01285 {
01286     CheckErrorCode(EmaiImapExpunge(mObject, inMessageUIDSequence, inOptions));
01287 }

void Emai::ImapSession::Search ( const EmaiSearchingCriteria inSearchingCriteria,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The SEARCH command searches the mailbox for messages that match the given searching criteria. Searching criteria consist of one or more search keys.
.

When multiple keys are specified, the result is the intersection (AND function) of all the messages that match those keys. For example, the criteria DELETED FROM "SMITH" SINCE 1-Feb-1994 refers to all deleted messages from Smith that were placed in the mailbox since February 1, 1994. A search key can also be a parenthesized list of one or more search keys (e.g., for use with the OR and NOT keys).

Refer to RFC3501 (chapter 6.4.4) for more information.

Parameters:
const EmaiSearchingCriteria* inSearchingCriteria
  • if NULL all messages in mailbox will be found
EmaiOptions inOptions - specify EmaiImapUIDOption if you want to receive message UIDs instead of message numbers in SEARCH response
See also:
EmaiImapSearch

EmaiEnumImapUIDOptions

EmaiEnumImapSearchOptions

EmaiSearchingKey

EmaiEnumImapSearching

EmaiSearchingCriteria

Definition at line 1290 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapSearch(), and Emai::Object< EmaiImapSession >::mObject.

01294 {
01295     CheckErrorCode(EmaiImapSearch(mObject, inSearchingCriteria, inOptions));
01296 }

void Emai::ImapSession::Fetch ( const ImapSequenceSet inMessageSequence,
const EmaiFetchMessageData inMessageData,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The FETCH command retrieves data associated with a message in the mailbox. The data items to be fetched can be either a single atom or a parenthesized list.
.

Refer to RFC3501 (chapter 6.4.5) for more information.

Parameters:
const ImapSequenceSet& inMessageSequence - sequence of the messages to be fetched
const EmaiFetchMessageData* inMessageData - message data to be retrieved
EmaiOptions inOptions - if EmaiImapUIDOption is specified inMsgSequence should specify message UIDs sequense instead of message numbers sequense
See also:
EmaiImapFetch

EmaiEnumImapFetchOptions

EmaiFetchMessageAttribute

EmaiEnumImapDataFetchOptions

EmaiFetchMessageData

Definition at line 1299 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapFetch(), and Emai::Object< EmaiImapSession >::mObject.

01304 {
01305     CheckErrorCode(EmaiImapFetch(mObject, inMessageSequence,
01306                             inMessageData, inOptions));
01307 }

void Emai::ImapSession::Store ( const ImapSequenceSet inMessageSequence,
const EmaiStoreMessageData inMessageData,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The STORE command alters data associated with a message in the mailbox.
.

Refer to RFC3501 (chapter 6.4.6) for more information.

Parameters:
const ImapSequenceSet& inMessageSequence - sequence of the messages
const EmaiStoreMessageData* inMessageData - message data to be set
EmaiOptions inOptions - if EmaiImapUIDOption is specified inMsgSequence should specify message UIDs sequense instead of message numbers sequense
See also:
EmaiImapStore

EmaiEnumImapStoreOptions

EmaiEnumImapDataStoreOptions

Definition at line 1310 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapStore(), and Emai::Object< EmaiImapSession >::mObject.

01315 {
01316     CheckErrorCode(EmaiImapStore(mObject, inMessageSequence,
01317                             inMessageData, inOptions));
01318 }

void Emai::ImapSession::Copy ( const ImapSequenceSet inMessageSequence,
EmaiConstUniCharPtr  inMailbox,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

The COPY command copies the specified message(s) to the end of the specified destination mailbox. The flags and internal date of the message(s) SHOULD be preserved, and the Recent flag SHOULD be set, in the copy.
.

If the destination mailbox does not exist, a server SHOULD return an error. It SHOULD NOT automatically create the mailbox.

If the COPY command is unsuccessful for any reason, server implementations MUST restore the destination mailbox to its state before the COPY attempt.

Refer to RFC3501 (chapter 6.4.7) for more information.

Parameters:
const ImapSequenceSet& inMessageSequence - sequence of the messages to be copied
EmaiConstUniCharPtr inMailbox - destination mailbox
EmaiOptions inOptions - if EmaiImapUIDOption is specified inMsgSequence should specify message UIDs sequense instead of message numbers sequense
See also:
EmaiImapCopy

Definition at line 1321 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapCopy(), and Emai::Object< EmaiImapSession >::mObject.

01326 {
01327     CheckErrorCode(EmaiImapCopy(mObject, inMessageSequence, inMailbox, inOptions));
01328 }

void Emai::ImapSession::Cancel ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

Marks IMAP session to be cancelled ASAP.

Parameters:
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapCancel()

Definition at line 1331 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapCancel(), and Emai::Object< EmaiImapSession >::mObject.

01334 {
01335     CheckErrorCode(EmaiImapCancel(mObject, inOptions));
01336 }

void Emai::ImapSession::Noop ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

Can be used as a periodic poll for new messages or message status updates during a period of inactivity.
.

Refer to RFC3501 (chapter 6.4.1) for more information

Parameters:
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiImapNoop()

Definition at line 1339 of file EmaiIMAP.hpp.

References Emai::CheckErrorCode(), EmaiImapNoop(), and Emai::Object< EmaiImapSession >::mObject.

01342 {
01343     CheckErrorCode(EmaiImapNoop(mObject, inOptions));
01344 }


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