GSMimeDocument $Revision$ $Date$ GSMimeDocument Foundation/GSMime.h NSObject

This class is intended to provide a wrapper for MIME messages permitting easy access to the contents of a message and providing a basis for parsing an unparsing messages that have arrived via email or as a web document.

The class keeps track of all the document headers, and provides methods for modifying the headers that apply to a document and for looking at the header structures, by providing an info dictionary containing the various parts of a header.

The common dictionary keys used for elements provided for all headers are -

RawHeader This is the unmodified text of the header BaseName This is the header name. BaseValue This is the text after the header name and colon. Name This is a lowercase representation of the header name. Value This is the value of the header (normally lower case). It may only be a small subset of the information in the header with other information being split into separate fields depending on the type of header.

mimeDocument Create an empty MIME document. addHeader: headerInfo

This method may be called to add a header to the document. The header must be a mutable dictionary object that contains at least the fields that are standard for all headers.

allHeaders

This method returns an array containing NSDictionary objects representing the headers associated with the document.

The order of the headers in the array is the order of the headers in the document.

content This returns the content data of the document in the appropriate format for the type of data - text an NSString object binary an NSData object multipart an NSArray object containing GSMimeDocument objects deleteHeader: rawHeader This method removes all occurrances of headers whose raw data exactly matches the supplied string. deleteHeaderNamed: aName This method removes all occurrances of headers whose name matches the supplied string. headerNamed: aName This method returns the info dictionary for the first header whose name equals the supplied argument. headersNamed: aName This method returns an array of info dictionaries for all headers whose names equal the supplied argument. setContent: newContent Sets a new value for the content of the document. setHeader: headerInfo This method may be called to set a header in the document. Any other headers with the same name will be removed from the document.