Main Page | Class Hierarchy | Class List | Class Members

AddressData Class Reference

List of all members.

Detailed Description

AddressData is a class that contains the data of an IMAP4 ADDRESS structure. Several ADDRESS structures are contained in the ENVELOPE structure that is returned in the ENVELOPE data item of a FETCH response. See the documentation for EnvelopeData and FetchResponse.

The ADDRESS structure contains information derived from an Internet email address. The fields are listed here:

For the email address "John Doe <jdoe@example.com>", the fields would be like this:

The source route has been deprecated for many years, so it is very rarely seen and is always ignored. (See RFC 1123 or RFC 2822 for details about the source route).

The class AddressData provides accessor functions for each of the fields of the ADDRESS structure.

See also:
EnvelopeData

FetchResponse


Public Member Functions

 AddressData ()
 Default constructor.
 AddressData (const AddressData &other)
 Copy constructor.
virtual ~AddressData ()
 Destructor.
AddressDataoperator= (const AddressData &)
 Assignment operator.
const char * PersonalName () const
 Returns the personal name.
const char * SourceRoute () const
 Returns the source route.
const char * MailboxName () const
 Returns the mailbox name.
const char * HostName () const
 Returns the host name.
void ImportData (ListItem *root)
 Called by the parser to set the data for this object.


Constructor & Destructor Documentation

AddressData  ) 
 

Default constructor.

AddressData const AddressData other  ) 
 

Copy constructor.

Parameters:
other other object to copy

~AddressData  )  [virtual]
 

Destructor.


Member Function Documentation

const char * HostName  )  const
 

Returns the host name.

For the email address "John Doe <jdoe@example.com>", the host name is "example.com".

Returns:
host name part of the address, if present; otherwise, the empty string

void ImportData ListItem *  root  ) 
 

Called by the parser to set the data for this object.

Only the parser should call this function.

Parameters:
root root item in the parsed tree

const char * MailboxName  )  const
 

Returns the mailbox name.

For the email address "John Doe <jdoe@example.com>", the mailbox name is "jdoe".

Returns:
mailbox name part of the address, if present; otherwise, the empty string

AddressData & operator= const AddressData other  ) 
 

Assignment operator.

Parameters:
other other object to copy
Returns:
*this

const char * PersonalName  )  const
 

Returns the personal name.

For the email address "John Doe <jdoe@example.com>", the personal name is "John Doe".

Returns:
personal name part of the address, if present; otherwise, the empty string

const char * SourceRoute  )  const
 

Returns the source route.

The source route in an email address has been deprecated for many years, and is rarely, if ever, seen. However, it is still valid according to RFC 2822 and is supported by IMAP4rev1.

Returns:
source route part of the address, if present; otherwise, the empty string

Copyright © 2001-2005 Hunny Software, Inc. All rights reserved.