CWMessage |
This class is used to describe Internet messages. This class extends the CWPart class and inherit all its methods.
Conforms to
NSCoding
Superclass
CWPart
Declared In
addHeader: withValue: |
- (void) addHeader: (NSString *) theName withValue: (NSString *) theValue;
This method is used to add an extra header to the list of headers of the message.
See Also
addHeader:withValue:
addHeader:withValue: |
- (void) addHeader: (NSString *) theName withValue: (NSString *) theValue;
This method is used to add an extra header to the list of headers of the message.
See Also
addHeader: withValue:
addHeadersFromData:record: |
- (void) addHeadersFromData: (NSData *) theHeaders record: (cache_record *) theRecord;
This method is used to add addionnal headers from their raw representation. It will not erase the currently defined headers. It also updates the cache record theRecord with the decoded information.
addRecipient: |
- (void) addRecipient: (CWInternetAddress *) theAddress;
This method is used to add a recipient to the list of all recipients for the receiver. The recipient type is determined by calling the -type method on the CWInternetAddress's instance.
allReferences |
- (NSArray *) allReferences;
The value of the "References" header. This corresponds to a NSArray of NSString instances. Each instance is normally a Message-ID.
This method is used to obtain the value of the "References" header. The values are particularly useful for message threading.
baseSubject |
- (NSString *) baseSubject;
The base subject.
This method is used to obtain the base subject. The base subject is basically the value of the "Subject" header but without the "re" or "fwd" (or whatever) prefix.
flags |
- (CWFlags *) flags;
The CWFlags instance of the receiver.
This method is used to obtain the flags associated to the receiver.
folder |
- (CWFolder *) folder;
The CWFolder instance in which the message is stored, nil if no folder holds the receiver.
This method is used to get the associated receiver's folder.
forward: |
- (CWMessage *) forward: (PantomimeForwardMode) theMode;
A CWMessage instance used for forwarding.
This method is used to contruct a new CWMessage instance to be used when forward a message. The returned message will always use the UTF-8 charset.
from |
- (CWInternetAddress *) from;
The value of the "From" header, as an CWInternetAddress instance.
This method is used to obtain the value of the "From" header.
initWithHeaders: |
- (id) initWithHeaders: (NSDictionary *) theHeaders;
A Message instance, nil on error.
This method is used to initialize the receiver with a predefined set of headers. The headers are specified in a NSDictionary instance where the keys are the header names (for example, "Content-Type") and the values are the respective values of for each keys. This method class -setHeaders:.
initWithHeadersFromData: |
- (id) initWithHeadersFromData: (NSData *) theHeaders;
A Message instance, nil on error.
This method is used to initialize the receiver with a predefined set of headers in their raw representation. This method calls -setHeadersFromData:.
inReplyTo |
- (NSString *) inReplyTo;
The value of the "In-Reply-To" header.
This method is used to obtain the value of the "In-Reply-To" header.
isInitialized |
- (BOOL) isInitialized;
YES if the message is initialized, NO otherwise.
This method is used to verify if a message has been initialized or not. An inititalized message is a message for which all parts have been initilized. A message for which only the headers are set is not an initialized message.
messageID |
- (NSString *) messageID;
The value of the "Message-ID" header.
This method is used to obtain the value of the "Message-ID" header.
messageNumber |
- (unsigned int) messageNumber;
The MSN, 0 if none was previously set.
This method is used to obtain the message sequence number (MSN) of the receiver. MSN have a special meaning for IMAP messages (see 2.3.1.2. of RFC3501 for details).
MIMEVersion |
- (NSString *) MIMEVersion;
The value of the header, nil if none was set.
This method is used to obtain the value of the "MIME-Version" header.
organization |
- (NSString *) organization;
The value of the "Organization" header.
This method is used to obtain the value of the "Organization" header.
propertyForKey: |
- (id) propertyForKey: (id) theKey;
The property for the specified key, nil if key isn't found.
This method is used to get an extra property for the specified key.
rawSource |
- (NSData *) rawSource;
The raw representation, or nil if it has not been loaded.
This method is used to obtain the raw representation of the receiver. Subclasses will overwrite this method so it's not blocking (see the documentation of this method for CWIMAPMessage, for example).
receivedDate |
- (NSCalendarDate *) receivedDate;
The value of the "Date" header, as a NSCalendarDate instance.
This method is used to obtain the value of the "Date" header.
recipients |
- (NSArray *) recipients;
The array of recipients which are all CWInternetAddress instances.
This method is used to obtain the list of recipients of the receiver. All recipient types are returned.
recipientsCount |
- (unsigned int) recipientsCount;
The count.
This method is used to obtain the number of recipients the receiver has.
removeAllRecipients |
- (void) removeAllRecipients;
This method is used to remove all recipients from the receiver.
removeRecipient: |
- (void) removeRecipient: (CWInternetAddress *) theAddress;
This method is used to remove the specified recipient from the receiver's list of recipients.
reply: |
- (CWMessage *) reply: (PantomimeReplyMode) theMode;
A CWMessage instance used for replying.
This method is used to contruct a new CWMessage instance to be used when replying to a message. The returned message will always use the UTF-8 charset. The message will NOT have a content other than the plain text one(s).
replyTo |
- (NSArray *) replyTo;
The value of the "Reply-To" header, as an array of CWInternetAddress instances. If there are none, nil is returned.
This method is used to obtain the value of the "Reply-To" header.
resentDate |
- (NSCalendarDate *) resentDate;
The value of the "Resent-Date" header.
This method is used to obtain the value of the "Resent-Date" header.
resentFrom |
- (CWInternetAddress *) resentFrom;
The value of the "Resent-From" header.
This method is used to obtain the value of the "Resent-From" header.
resentMessageID |
- (NSString *) resentMessageID;
The value of the "Resent-Message-ID" header.
This method is used to obtain the value of the "Resent-Message-ID" header.
resentSubject |
- (NSString *) resentSubject;
The value of the "Resent-Subject" header.
This method is used to obtain the value of the "Resent-Subject" header.
setBaseSubject: |
- (void) setBaseSubject: (NSString *) theBaseSubject;
This method is used to set the base subject of the receiver.
setFlags: |
- (void) setFlags: (CWFlags *) theFlags;
This method is used to set the flags of the receiver, replacing any previous values set. Subclasses of CWMessage sometimes overwrite this method.
setFolder: |
- (void) setFolder: (CWFolder *) theFolder;
This method is used to set the associated folder to the message.
setFrom: |
- (void) setFrom: (CWInternetAddress *) theInternetAddress;
This method is used to set the value of the "From:" header.
setHeadersFromData:record: |
- (void) setHeadersFromData: (NSData *) theHeaders record: (cache_record *) theRecord;
This method initalize all the headers of a message from the raw data source. It replaces previously defined values of headers found in theHeaders. It also updates the cache record theRecord with the decoded information.
setInitialized: |
- (void) setInitialized: (BOOL) theBOOL;
This method is used to initialize the message or free the resources taken by its content. Subclasses of CWMessage sometimes overwrite this method.
setInReplyTo: |
- (void) setInReplyTo: (NSString *) theInReplyTo;
This method is used to set the value of the "In-Reply-To" header.
setMessageID: |
- (void) setMessageID: (NSString *) theMessageID;
This method is used to set the value of the "Message-ID" header.
setMessageNumber: |
- (void) setMessageNumber: (unsigned int) theMessageNumber;
This method is used to set the message number value of the receiver.
setMIMEVersion: |
- (void) setMIMEVersion: (NSString *) theMIMEVersion;
This method is used to set the value of the "MIME-Version" header, replacing any values previously set.
setOrganization: |
- (void) setOrganization: (NSString *) theOrganization;
This method is used to set the value of the "Organization" header.
setProperty: forKey: |
- (void) setProperty: (id) theProperty forKey: (id) theKey;
This method is used to set an extra property for the specified key on this folder. If nil is passed for theProperty parameter, the value will actually be REMOVED for theKey.
See Also
setProperty:forKey:
setProperty:forKey: |
- (void) setProperty: (id) theProperty forKey: (id) theKey;
This method is used to set an extra property for the specified key on this folder. If nil is passed for theProperty parameter, the value will actually be REMOVED for theKey.
See Also
setProperty: forKey:
setRawSource: |
- (void) setRawSource: (NSData *) theRawSource;
This method is used to set the raw representation of the receiver. No specific actions are taken when invoking this method.
setReceivedDate: |
- (void) setReceivedDate: (NSCalendarDate *) theDate;
This method is used to set the value of the "Date" header.
setRecipients: |
- (void) setRecipients: (NSArray *) theRecipients;
This method is used to add theRecipients to the list of the receiver's recipients.
setReferences: |
- (void) setReferences: (NSArray *) theReferences;
This method is used to the value of the "References" header, replacing any previously defined value.
setReplyTo: |
- (void) setReplyTo: (NSArray *) theAddressList;
This method is used to set the value of the "Reply-To:" header.
setResentDate: |
- (void) setResentDate: (NSCalendarDate *) theResentDate;
This method is used to set the value of the "Resent-Date" header.
setResentFrom: |
- (void) setResentFrom: (CWInternetAddress *) theInternetAddress;
This method is used to set the value of the "Resent-From" header.
setResentMessageID: |
- (void) setResentMessageID: (NSString *) theResentMessageID;
This method is used to set the value of the "Resent-Message-ID" header.
setResentSubject: |
- (void) setResentSubject: (NSString *) theResentSubject;
This method is used to set the value of the "Resent-Subject" header.
setSubject: |
- (void) setSubject: (NSString *) theSubject;
This method is used to set the value of the "Subject" header.
subject |
- (NSString *) subject;
The value of the "Subject" header.
This method is used to obtain the value of the "Subject" header.
_flags |
private
CWFlags *_flags;
_folder |
private
CWFolder *_folder;
_initialized |
private
BOOL _initialized;
_message_number |
private
unsigned int _message_number;
_properties |
private
NSMutableDictionary *_properties;
_rawSource |
protected
NSData *_rawSource;
_recipients |
private
NSMutableArray *_recipients;
_references |
private
NSArray *_references;