2000-10-26 22:43:56 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
|
|
|
|
<gsdoc base="GSMimeDocument" next="GSMimeParser" up="GSMime">
|
|
|
|
<head>
|
|
|
|
<title>GSMimeDocument</title>
|
|
|
|
<author name="Richard Frith-Macdonald">
|
|
|
|
<email address="rfm@gnu.org"/>
|
|
|
|
<url url="http://www.gnustep.org/developers/whoiswho.html"/>
|
|
|
|
</author>
|
2001-03-03 09:58:53 +00:00
|
|
|
<version>$Revision$</version>
|
2001-03-03 09:56:29 +00:00
|
|
|
<date>$Date$</date>
|
2000-10-26 22:43:56 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<chapter>
|
|
|
|
<heading>GSMimeDocument</heading>
|
|
|
|
<class name="GSMimeDocument" super="NSObject">
|
|
|
|
<declared>Foundation/GSMime.h</declared>
|
|
|
|
<conform>NSObject</conform>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
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.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
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.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
The common dictionary keys used for elements provided for
|
|
|
|
<em>all</em> headers are -
|
|
|
|
</p>
|
|
|
|
<deflist>
|
|
|
|
<term>RawHeader</term>
|
|
|
|
<desc>This is the unmodified text of the header
|
|
|
|
</desc>
|
|
|
|
<term>BaseName</term>
|
|
|
|
<desc>This is the header name.
|
|
|
|
</desc>
|
|
|
|
<term>BaseValue</term>
|
|
|
|
<desc>This is the text after the header name and colon.
|
|
|
|
</desc>
|
|
|
|
<term>Name</term>
|
|
|
|
<desc>This is a lowercase representation of the header name.
|
|
|
|
</desc>
|
|
|
|
<term>Value</term>
|
|
|
|
<desc>This is the value of the header (normally lower case).
|
2000-11-17 06:55:58 +00:00
|
|
|
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.
|
2000-10-26 22:43:56 +00:00
|
|
|
</desc>
|
|
|
|
</deflist>
|
|
|
|
<p>
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
<method type="GSMimeDocument*" factory="yes">
|
|
|
|
<sel>mimeDocument</sel>
|
|
|
|
<desc>
|
|
|
|
Create an empty MIME document.
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
<method type="BOOL">
|
|
|
|
<sel>addHeader:</sel>
|
2000-11-16 12:10:37 +00:00
|
|
|
<arg type="NSDictionary*">headerInfo</arg>
|
2000-10-26 22:43:56 +00:00
|
|
|
<desc>
|
2000-11-16 12:10:37 +00:00
|
|
|
<p>
|
|
|
|
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.
|
|
|
|
</p>
|
2000-10-26 22:43:56 +00:00
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-11-16 12:10:37 +00:00
|
|
|
<method type="NSArray">
|
|
|
|
<sel>allHeaders</sel>
|
2000-10-26 22:43:56 +00:00
|
|
|
<desc>
|
2000-11-16 12:10:37 +00:00
|
|
|
<p>
|
|
|
|
This method returns an array containing NSDictionary objects
|
|
|
|
representing the headers associated with the document.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
The order of the headers in the array is the order of the
|
|
|
|
headers in the document.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
<method type="id">
|
|
|
|
<sel>content</sel>
|
|
|
|
<desc>
|
|
|
|
This returns the content data of the document in the
|
|
|
|
appropriate format for the type of data -
|
|
|
|
<deflist>
|
|
|
|
<term>text</term>
|
|
|
|
<desc>an NSString object</desc>
|
|
|
|
<term>binary</term>
|
|
|
|
<desc>an NSData object</desc>
|
|
|
|
<term>multipart</term>
|
|
|
|
<desc>an NSArray object containing GSMimeDocument objects</desc>
|
|
|
|
</deflist>
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
<method type="void">
|
|
|
|
<sel>deleteHeader:</sel>
|
2000-11-16 12:10:37 +00:00
|
|
|
<arg type="NSString*">rawHeader</arg>
|
2000-10-26 22:43:56 +00:00
|
|
|
<desc>
|
|
|
|
This method removes all occurrances of headers whose raw data
|
|
|
|
exactly matches the supplied string.
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
<method type="void">
|
|
|
|
<sel>deleteHeaderNamed:</sel>
|
|
|
|
<arg type="NSString*">aName</arg>
|
|
|
|
<desc>
|
|
|
|
This method removes all occurrances of headers whose name
|
|
|
|
matches the supplied string.
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
<method type="NSDictionary*">
|
2000-11-16 12:10:37 +00:00
|
|
|
<sel>headerNamed:</sel>
|
2000-10-26 22:43:56 +00:00
|
|
|
<arg type="NSString*">aName</arg>
|
|
|
|
<desc>
|
|
|
|
This method returns the info dictionary for the first header
|
|
|
|
whose name equals the supplied argument.
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
<method type="NSArray*">
|
2000-11-16 12:10:37 +00:00
|
|
|
<sel>headersNamed:</sel>
|
2000-10-26 22:43:56 +00:00
|
|
|
<arg type="NSString*">aName</arg>
|
|
|
|
<desc>
|
|
|
|
This method returns an array of info dictionaries for all headers
|
|
|
|
whose names equal the supplied argument.
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
<method type="BOOL">
|
|
|
|
<sel>setContent:</sel>
|
|
|
|
<arg type="id">newContent</arg>
|
|
|
|
<desc>
|
|
|
|
Sets a new value for the content of the document.
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
<method type="BOOL">
|
|
|
|
<sel>setHeader:</sel>
|
2000-11-16 12:10:37 +00:00
|
|
|
<arg type="NSDictionary*">headerInfo</arg>
|
2000-10-26 22:43:56 +00:00
|
|
|
<desc>
|
|
|
|
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.
|
|
|
|
</desc>
|
|
|
|
</method>
|
2000-10-27 11:03:42 +00:00
|
|
|
|
2000-10-26 22:43:56 +00:00
|
|
|
</class>
|
|
|
|
</chapter>
|
|
|
|
</body>
|
|
|
|
</gsdoc>
|