Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members  

blue::ext::httpmail::Mailbox Class Reference
[HttpMail]

#include <Mailbox.h>

List of all members.


Detailed Description

Logs into the HttpMail account.


Public Member Functions

 Mailbox ()
 Constructor.

 ~Mailbox ()
 Destructor.

bool getHttpLogging () const
 Determines if the HTTP communication will be logged.

String getHttpLoggingFile () const
 If logging is set, this is the file it will log to.

String getHttpProxyHost () const
 Returns the Proxy host.

uint16_t getHttpProxyPort () const
 Returns the Proxy port.

bool isLoggedIn () const
 Determines if the Mailbox is currently logged in.

String getLoginUrl () const
 Gets the login url.

String getLoginContent () const
 Gets the WebDAV Xml content that is sent to the login url in order to obtain the information regarding the mailbox.

String getUser () const
 Gets the user name of the mailbox account.

String getPassword () const
 Gets the password of the mailbox account.

String getDomain () const
 Gets the domain of the mailbox account.

http::Session * getSession ()
 Gets the Http Session used for communicating with the server.

const http::Session * getSession () const
 overload

FoldergetRootFolder ()
 Gets the root level folder of the mailbox.

const FoldergetRootFolder () const
 overload

void setHttpLogging (bool logging)
 Sets if the HTTP communication should be logged.

void setHttpLoggingFile (String file)
 If logging is set, this is the file it will log to.

void setHttpProxy (String host, uint16_t port)
 Sets Proxy information if an HTTP proxy is to be used for communication.

void setLoginUrl (String url)
 Sets the login url.

void setLoginContent (String content)
 Sets the WebDAV Xml content that is sent to the login url in order to obtain the information regarding the mailbox.

void setUser (String user)
 Sets the user name of the mailbox account.

void setPassword (String password)
 Sets the password of the mailbox account.

void login ()
 Logs into the account.

void logout ()
 Logs out of the account.

void sendMessage (String msg, String mailFromRcpt=String::null)
 Sends an email.

String processWebDavRequest (const http::Url &url, String webDavMethod, String webDavContent, String &errMsg)
 Processes a WebDAV request.

String processWebDavRequest (const http::Url &url, String webDavMethod, String webDavContent, http::Headers &custHeaders, String &errMsg)
 Overloaded to allow for custom headers to be added to a request.


Constructor & Destructor Documentation

blue::ext::httpmail::Mailbox::Mailbox  
 

Constructor.

blue::ext::httpmail::Mailbox::~Mailbox  
 

Destructor.


Member Function Documentation

bool blue::ext::httpmail::Mailbox::getHttpLogging   const
 

Determines if the HTTP communication will be logged.

String blue::ext::httpmail::Mailbox::getHttpLoggingFile   const
 

If logging is set, this is the file it will log to.

String blue::ext::httpmail::Mailbox::getHttpProxyHost   const
 

Returns the Proxy host.

uint16_t blue::ext::httpmail::Mailbox::getHttpProxyPort   const
 

Returns the Proxy port.

bool blue::ext::httpmail::Mailbox::isLoggedIn   const
 

Determines if the Mailbox is currently logged in.

String blue::ext::httpmail::Mailbox::getLoginUrl   const
 

Gets the login url.

This is the url used to connect to the HttpMail server.

String blue::ext::httpmail::Mailbox::getLoginContent   const
 

Gets the WebDAV Xml content that is sent to the login url in order to obtain the information regarding the mailbox.

String blue::ext::httpmail::Mailbox::getUser   const
 

Gets the user name of the mailbox account.

String blue::ext::httpmail::Mailbox::getPassword   const
 

Gets the password of the mailbox account.

String blue::ext::httpmail::Mailbox::getDomain   const
 

Gets the domain of the mailbox account.

http::Session* blue::ext::httpmail::Mailbox::getSession  
 

Gets the Http Session used for communicating with the server.

This function will return 0 when the mailbox is not logged in.

const http::Session* blue::ext::httpmail::Mailbox::getSession   const
 

overload

Folder* blue::ext::httpmail::Mailbox::getRootFolder  
 

Gets the root level folder of the mailbox.

When logging in, this folder has its Folder::refresh() function called, so it's not required to be called initially. This function will return 0 when the mailbox is not logged in.

const Folder* blue::ext::httpmail::Mailbox::getRootFolder   const
 

overload

void blue::ext::httpmail::Mailbox::setHttpLogging bool    logging
 

Sets if the HTTP communication should be logged.

This must only be called before the mailbox logs in.

void blue::ext::httpmail::Mailbox::setHttpLoggingFile String    file
 

If logging is set, this is the file it will log to.

void blue::ext::httpmail::Mailbox::setHttpProxy String    host,
uint16_t    port
 

Sets Proxy information if an HTTP proxy is to be used for communication.

void blue::ext::httpmail::Mailbox::setLoginUrl String    url
 

Sets the login url.

This is the url used to connect to the HttpMail server. If this function is called while the mailbox is logged in, a MailboxInvalidModeException is thrown.

void blue::ext::httpmail::Mailbox::setLoginContent String    content
 

Sets the WebDAV Xml content that is sent to the login url in order to obtain the information regarding the mailbox.

There is a default value set for this by the mailbox and it should not be changed unless you know what you are doing. If this function is called while the mailbox is logged in, a MailboxInvalidModeException is thrown.

void blue::ext::httpmail::Mailbox::setUser String    user
 

Sets the user name of the mailbox account.

If this function is called while the mailbox is logged in, a MailboxInvalidModeException is thrown.

void blue::ext::httpmail::Mailbox::setPassword String    password
 

Sets the password of the mailbox account.

If this function is called while the mailbox is logged in, a MailboxInvalidModeException is thrown.

void blue::ext::httpmail::Mailbox::login  
 

Logs into the account.

The user name and password must have previously been set. If this function is called while the mailbox is logged in, a MailboxInvalidModeException is thrown.

void blue::ext::httpmail::Mailbox::logout  
 

Logs out of the account.

Any Folder instances and Message instance are deleted and should be discarded. They will not become valid again if the mailbox logs in again.

void blue::ext::httpmail::Mailbox::sendMessage String    msg,
String    mailFromRcpt = String::null
 

Sends an email.

The message string must contain a valid email as specified in RFC 2822.

String blue::ext::httpmail::Mailbox::processWebDavRequest const http::Url &    url,
String    webDavMethod,
String    webDavContent,
String &    errMsg
 

Processes a WebDAV request.

Parameters:
url - The url to send the request to
webDavMethod - The method of the request ("GET", "PROPFIND", etc)
webDavContent - The Xml content to be sent along with the request
errMsg - The String that will hold the error message if the request fails.

String blue::ext::httpmail::Mailbox::processWebDavRequest const http::Url &    url,
String    webDavMethod,
String    webDavContent,
http::Headers &    custHeaders,
String &    errMsg
 

Overloaded to allow for custom headers to be added to a request.


The documentation for this class was generated from the following file:
Generated on Wed Jun 30 14:44:26 2004 for Blue HttpMail Extension by doxygen1.3-rc3