CWParser


Utility class providing class methods to parse messages.

Discussion

This class provide useful methods (all class methods) to parse messages from their raw representation.

Superclass

NSObject

Declared In

CWParser.h



Methods

+parseContentDescription: inPart:
+parseContentDescription:inPart:
+parseContentDisposition: inPart:
+parseContentDisposition:inPart:
+parseContentID: inPart:
+parseContentID:inPart:
+parseContentTransferEncoding: inPart:
+parseContentTransferEncoding:inPart:
+parseContentType: inPart:
+parseContentType:inPart:
+parseDate: inMessage:
+parseDate:inMessage:
+parseDestination: forType: inMessage:
+parseDestination:forType:inMessage:quick:
+parseFrom: inMessage:
+parseFrom:inMessage:quick:
+parseInReplyTo: inMessage:
+parseInReplyTo:inMessage:quick:
+parseMessageID: inMessage:
+parseMessageID:inMessage:quick:
+parseMIMEVersion: inMessage:
+parseMIMEVersion:inMessage:
+parseOrganization: inMessage:
+parseOrganization:inMessage:
+parseReferences: inMessage:
+parseReferences:inMessage:quick:
+parseReply: inMessage:
+parseReplyTo:inMessage:
+parseResentFrom: inMessage:
+parseResentFrom:inMessage:
+parseStatus: inMessage:
+parseStatus:inMessage:
+parseSubject: inMessage:
+parseSubject:inMessage:quick:
+parseUnknownHeader: inMessage:
+parseUnknownHeader:inMessage:
+parseXStatus: inMessage:
+parseXStatus:inMessage:

parseContentDescription: inPart:


+ (void) parseContentDescription: (NSData *) theLine inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed value, if any.

Discussion

This method is used to parse a Content-Disposition header line.

See Also

parseContentDescription:inPart:


parseContentDescription:inPart:


+ (void) parseContentDescription: (NSData *) theLine inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed value, if any.

Discussion

This method is used to parse a Content-Disposition header line.

See Also

parseContentDescription: inPart:


parseContentDisposition: inPart:


+ (void) parseContentDisposition: (NSData *) theLine inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed value, if any.

Discussion

This method is used to parse a Content-Disposition header line. It supports the following parameters: "filename" ; case-insensitive

See Also

parseContentDisposition:inPart:


parseContentDisposition:inPart:


+ (void) parseContentDisposition: (NSData *) theLine inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed value, if any.

Discussion

This method is used to parse a Content-Disposition header line. It supports the following parameters: "filename" ; case-insensitive

See Also

parseContentDisposition: inPart:


parseContentID: inPart:


+ (void) parseContentID: (NSData *) theLine inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed value, if any.

Discussion

This method is used to parse a Content-ID header line.

See Also

parseContentID:inPart:


parseContentID:inPart:


+ (void) parseContentID: (NSData *) theLine inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed value, if any.

Discussion

This method is used to parse a Content-ID header line.

See Also

parseContentID: inPart:


parseContentTransferEncoding: inPart:


+ (void) parseContentTransferEncoding: (NSData *) theLine 
        inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed value, if any.

Discussion

This method is used to parse a Content-Transfer-Encoding header line. It supports: "7bit" (or none) ; case-insensitive "quoted-printable" "base64" "8bit" "binary"

See Also

parseContentTransferEncoding:inPart:


parseContentTransferEncoding:inPart:


+ (void) parseContentTransferEncoding: (NSData *) theLine 
        inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed value, if any.

Discussion

This method is used to parse a Content-Transfer-Encoding header line. It supports: "7bit" (or none) ; case-insensitive "quoted-printable" "base64" "8bit" "binary"

See Also

parseContentTransferEncoding: inPart:


parseContentType: inPart:


+ (void) parseContentType: (NSData *) theLine inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed values, if any.

Discussion

This method is used to parse a Content-Type header line. This method parses correct lines like: "Content-Type: text/plain", "Content-Type: Text/plain;" "Content-Type: text/plain; charset="iso-8859-1"", "Content-Type: text", "Content-Type: text/plain", and so on. This method also parses (if it needs to) the following parameters: "boundary" (if Content-Type is multipart/something), "charset" (if Content-Type is text/plain) "name", "format" and so on.

See Also

parseContentType:inPart:


parseContentType:inPart:


+ (void) parseContentType: (NSData *) theLine inPart: (CWPart *) thePart; 
Parameters
theLine

The line to parse.

thePart

The part in which to store the parsed values, if any.

Discussion

This method is used to parse a Content-Type header line. This method parses correct lines like: "Content-Type: text/plain", "Content-Type: Text/plain;" "Content-Type: text/plain; charset="iso-8859-1"", "Content-Type: text", "Content-Type: text/plain", and so on. This method also parses (if it needs to) the following parameters: "boundary" (if Content-Type is multipart/something), "charset" (if Content-Type is text/plain) "name", "format" and so on.

See Also

parseContentType: inPart:


parseDate: inMessage:


+ (void) parseDate: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Date header line.

See Also

parseDate:inMessage:


parseDate:inMessage:


+ (void) parseDate: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Date header line.

See Also

parseDate: inMessage:


parseDestination: forType: inMessage:


+ (NSData *) parseDestination: (NSData *) theLine forType: (PantomimeRecipientType) theType 
        inMessage: (CWMessage *) theMessage quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theType

The type to parse (one of the values of the PantomimeRecipientType enum)

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse the To: Cc: Bcc: headers value.

See Also

parseDestination:forType:inMessage:quick:


parseDestination:forType:inMessage:quick:


+ (NSData *) parseDestination: (NSData *) theLine forType: (PantomimeRecipientType) theType 
        inMessage: (CWMessage *) theMessage quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theType

The type to parse (one of the values of the PantomimeRecipientType enum)

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse the To: Cc: Bcc: headers value.

See Also

parseDestination: forType: inMessage:


parseFrom: inMessage:


+ (NSData *) parseFrom: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a From header line.

See Also

parseFrom:inMessage:quick:


parseFrom:inMessage:quick:


+ (NSData *) parseFrom: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a From header line.

See Also

parseFrom: inMessage:


parseInReplyTo: inMessage:


+ (NSData *) parseInReplyTo: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a In-Reply-To header line.

See Also

parseInReplyTo:inMessage:quick:


parseInReplyTo:inMessage:quick:


+ (NSData *) parseInReplyTo: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a In-Reply-To header line.

See Also

parseInReplyTo: inMessage:


parseMessageID: inMessage:


+ (NSData *) parseMessageID: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Message-ID header line.

See Also

parseMessageID:inMessage:quick:


parseMessageID:inMessage:quick:


+ (NSData *) parseMessageID: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Message-ID header line.

See Also

parseMessageID: inMessage:


parseMIMEVersion: inMessage:


+ (void) parseMIMEVersion: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a MIME-Version header line.

See Also

parseMIMEVersion:inMessage:


parseMIMEVersion:inMessage:


+ (void) parseMIMEVersion: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a MIME-Version header line.

See Also

parseMIMEVersion: inMessage:


parseOrganization: inMessage:


+ (void) parseOrganization: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Organization header line.

See Also

parseOrganization:inMessage:


parseOrganization:inMessage:


+ (void) parseOrganization: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Organization header line.

See Also

parseOrganization: inMessage:


parseReferences: inMessage:


+ (NSData *) parseReferences: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a References header line.

See Also

parseReferences:inMessage:quick:


parseReferences:inMessage:quick:


+ (NSData *) parseReferences: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a References header line.

See Also

parseReferences: inMessage:


parseReply: inMessage:


+ (void) parseReplyTo: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Reply-To header line.

See Also

parseReplyTo:inMessage:


parseReplyTo:inMessage:


+ (void) parseReplyTo: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Reply-To header line.

See Also

parseReply: inMessage:


parseResentFrom: inMessage:


+ (void) parseResentFrom: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Resent-From header line.

See Also

parseResentFrom:inMessage:


parseResentFrom:inMessage:


+ (void) parseResentFrom: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Resent-From header line.

See Also

parseResentFrom: inMessage:


parseStatus: inMessage:


+ (void) parseStatus: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Status header line. This header is commonly added by some MUA:s like Pine.

See Also

parseStatus:inMessage:


parseStatus:inMessage:


+ (void) parseStatus: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Status header line. This header is commonly added by some MUA:s like Pine.

See Also

parseStatus: inMessage:


parseSubject: inMessage:


+ (NSData *) parseSubject: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Subject header line.

See Also

parseSubject:inMessage:quick:


parseSubject:inMessage:quick:


+ (NSData *) parseSubject: (NSData *) theLine inMessage: (CWMessage *) theMessage 
        quick: (BOOL) theBOOL; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a Subject header line.

See Also

parseSubject: inMessage:


parseUnknownHeader: inMessage:


+ (void) parseUnknownHeader: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse the headers that we don't "support natively".

See Also

parseUnknownHeader:inMessage:


parseUnknownHeader:inMessage:


+ (void) parseUnknownHeader: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse the headers that we don't "support natively".

See Also

parseUnknownHeader: inMessage:


parseXStatus: inMessage:


+ (void) parseXStatus: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a X-Status header line. This header is commonly added by some MUA:s like Pine.

See Also

parseXStatus:inMessage:


parseXStatus:inMessage:


+ (void) parseXStatus: (NSData *) theLine inMessage: (CWMessage *) theMessage; 
Parameters
theLine

The line to parse.

theMessage

The message in which to store the parsed value, if any.

Discussion

This method is used to parse a X-Status header line. This header is commonly added by some MUA:s like Pine.

See Also

parseXStatus: inMessage: