Class AddressField.

Inherits HeaderField

Represents a field containing a list of addresses.

This simple class encapsulates a List< Address > in a HeaderField. It is responsible for parsing the field (with Address) and setting the correct field value.

AddressField::AddressField( HeaderField::Type type, Address * address )

Constructs an AddressField of type, containing the single Address address .

List<Address> * AddressField::addresses() const

Returns a pointer to the List of addresses contained in this field.

This is never a null pointer.

void AddressField::outlawBounce()

Checks whether '<>' is present in this address field, and records an error if it is. '<>' is legal in Return-Path, but as of April 2005, not in any other field.

void AddressField::parseAddressList( const EString & s )

Parses the RFC 2822 address-list production from s and records the first problem found.

void AddressField::parseContentId( const EString & s )

Like parseMessageId( s ), except that it also accepts <blah>.

void AddressField::parseMailbox( const EString & s )

Parses the RFC 2822 mailbox production from s and records the first problem found.

void AddressField::parseMailboxList( const EString & s )

Parses the RFC 2822 mailbox-list production from s and records the first problem found.

void AddressField::parseMessageId( const EString & s )

Parses the RFC 2822 msg-id production from s and/or records the first serious error found.

void AddressField::parseReferences( const EString & s )

Parses the contents of an RFC 2822 references field in s. This is nominally 1*msg-id, but in practice we need to be a little more flexible. Overlooks common problems and records the first serious problems found.

EString AddressField::rfc822() const

Generates the RFC 822 representation of the field, based on the addresses().

Reimplements HeaderField::rfc822().

void AddressField::setAddresses( List<Address>* addr )

Records addr as the new list of addresses in this address.

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.