MailSource Class Reference

A generic mail source object. More...

#include <Mail.h>

Inheritance diagram for MailSource:

MailProtocol

List of all members.

Public Member Functions

virtual bool Open (GSocketI *S, char *RemoteHost, int Port, char *User, char *Password, char *&Cookie, int Flags=0)=0
 Opens a connection to the server.
virtual bool Close ()=0
 Closes the connection.
virtual int GetMessages ()=0
 Returns the number of messages available on the server.
virtual bool Receive (GArray< MailTransaction * > &Trans, MailCallbacks *Callbacks=0)=0
 Receives a list of messages from the server.
virtual bool Delete (int Message)=0
 Deletes a message on the server.
virtual int Sizeof (int Message)=0
 Gets the size of the message on the server.
virtual bool GetSizes (GArray< int > &Sizes)
 Gets the size of all the messages on the server.
virtual bool GetUid (int Message, char *Id)=0
 Gets the unique identifier of the message.
virtual bool GetUidList (List< char > &Id)=0
 Gets the unique identifiers of a list of messages.
virtual char * GetHeaders (int Message)=0
 Gets the headers associated with a given message.
virtual void SetProxy (char *Server, int Port)
 Sets the proxy server. e.g. HTTP mail.


Detailed Description

A generic mail source object.

Member Function Documentation

virtual bool MailSource::Open ( GSocketI S,
char *  RemoteHost,
int  Port,
char *  User,
char *  Password,
char *&  Cookie,
int  Flags = 0 
) [pure virtual]

Opens a connection to the server.

Parameters:
S  The transport socket
RemoteHost  The hostname or IP of the server
Port  The port on the host to connect to
User  The username for authentication
Password  The password for authentication
Cookie  A cookie that the implementation can store things in, which persists across sessions. (Dynamically allocated string)
Flags  Any optional flags: MAIL_SOURCE_STARTTLS, MAIL_SOURCE_AUTH, MAIL_SOURCE_USE_PLAIN, MAIL_SOURCE_USE_LOGIN

virtual bool MailSource::Receive ( GArray< MailTransaction * > &  Trans,
MailCallbacks Callbacks = 0 
) [pure virtual]

Receives a list of messages from the server.

Parameters:
Trans  An array of messages to receive. The MailTransaction objects contains the index of the message to receive and various status values returned after the operation.
Callbacks  An optional set of callback functions.


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

Generated on Wed Dec 1 15:41:05 2010 for Lgi by  doxygen 1.5.7.1