CWMIMEUtility |
MIME utility class.
This class provides static methods to deal with the MIME standard. Normally, you should not invoke any of those methods directly.
Superclass
NSObject
Declared In
compositeMessageContentFromRawSource: |
+ (CWMessage *) compositeMessageContentFromRawSource: (NSData *) theData;
A Message instance, nil on error.
This method is used to obtain a composite type (message) from theData.
compositeMultipartContentFromRawSource:boundary: |
+ (CWMIMEMultipart *) compositeMultipartContentFromRawSource: (NSData *) theData boundary: (NSData *) theBoundary;
A CWMIMEMultipart instance, nil on error.
This method is used to obtain a composity type (multipart) from theData, using theBoundary.
decodeHeader: charset: |
+ (NSString *) decodeHeader: (NSData *) theData charset: (NSString *) theCharset;
The decoded header.
This method is used to decode a header value encoded in base64 or quoted-printable. RFC 2047 describes how those headers should be encoded (in particular, "2. Syntax of encoded-words"). If theCharset is not nil, it is used to decode the header. Otherwise, the charset used in the header is used.
See Also
decodeHeader:charset:
decodeHeader:charset: |
+ (NSString *) decodeHeader: (NSData *) theData charset: (NSString *) theCharset;
This method is used to decode a header value encoded in base64 or quoted-printable. RFC 2047 describes how those headers should be encoded (in particular, "2. Syntax of encoded-words"). If theCharset is not nil, it is used to decode the header. Otherwise, the charset used in the header is used.
See Also
decodeHeader: charset:
discreteContentFromRawSource: encoding: charset: part: |
+ (id) discreteContentFromRawSource: (NSData *) theData encoding: (PantomimeEncoding) theEncoding;
A NSData instance.
This method is used to obtain discrete types such as text/, application/, image/, etc. It might return a NSString or a NSData object (if the encoding is PantomimeEncodingBase64).
See Also
discreteContentFromRawSource:encoding:
discreteContentFromRawSource:encoding: |
+ (id) discreteContentFromRawSource: (NSData *) theData encoding: (PantomimeEncoding) theEncoding;
This method is used to obtain discrete types such as text/, application/, image/, etc. It might return a NSString or a NSData object (if the encoding is PantomimeEncodingBase64).
See Also
discreteContentFromRawSource: encoding: charset: part:
encodeHeader: charset: encoding: |
+ (NSData *) encodeHeader: (NSString *) theText charset: (NSString *) theCharset encoding: (PantomimeEncoding) theEncoding;
The encoded data.
This method is used to encode a header value in the format specified by RFC 2047 (in particular, "2. Syntax of encoded-words").
See Also
encodeHeader:charset:encoding:
encodeHeader:charset:encoding: |
+ (NSData *) encodeHeader: (NSString *) theText charset: (NSString *) theCharset encoding: (PantomimeEncoding) theEncoding;
This method is used to encode a header value in the format specified by RFC 2047 (in particular, "2. Syntax of encoded-words").
See Also
encodeHeader: charset: encoding:
encodeWordUsingBase64:prefixLength: |
+ (NSData *) encodeWordUsingBase64: (NSString *) theWord prefixLength: (int) thePrefixLength;
encodeWordUsingQuotedPrintable:prefixLength: |
+ (NSData *) encodeWordUsingQuotedPrintable: (NSString *) theWord prefixLength: (unsigned int) thePrefixLength;
globallyUniqueBoundary |
+ (NSData *) globallyUniqueBoundary;
The boundary, as a NSData instance.
This method is used to generate a unique MIME boundary (or any kind of boundary).
globallyUniqueID |
+ (NSData *) globallyUniqueID;
The unique ID, as a NSData instance.
This method is used to generate a unique ID that CWMessage (or CWPart) instances use as their unique ID. (Message-ID, Content-ID, etc.)
plainTextContentFromPart: |
+ (NSData *) plainTextContentFromPart: (CWPart *) thePart;
The pure "text".
This method is used to obtain a pure "text" part. For example, it can be used to strip any HTML content from a part in order to get only the text.
setContentFromRawSource: inPart: |
+ (void) setContentFromRawSource: (NSData *) theData inPart: (CWPart *) thePart;
This method is used to initialize a message, or a part of the message using theData. The CWPart's Content-Type MUST be defined BEFORE calling this function otherwise the content will be considered as a pure string.
See Also
setContentFromRawSource:inPart:
setContentFromRawSource:inPart: |
+ (void) setContentFromRawSource: (NSData *) theData inPart: (CWPart *) thePart;
This method is used to initialize a message, or a part of the message using theData. The CWPart's Content-Type MUST be defined BEFORE calling this function otherwise the content will be considered as a pure string.
See Also
setContentFromRawSource: inPart: