CWIMAPFolder


Discussion

This class, which extends the CWFolder class, is used to implement IMAP-specific features such as server-side operations for copying messages between mailboxes.

Superclass

CWFolder

Declared In

CWIMAPFolder.h



Methods

-appendMessageFromRawSource:flags:internalDate:
-copyMessages: toFolder:
-copyMessages:toFolder:
-initWithName: mode:
-initWithName:mode:
-prefetch
-selected
-setSelected:
-setUIDValidity:
-UIDValidity

appendMessageFromRawSource:flags:internalDate:


- (void) appendMessageFromRawSource: (NSData *) theData flags:(CWFlags *) theFlags 
        internalDate: (NSCalendarDate *) theDate; 
Parameters
theData

The raw representation of the message to append.

theFlags

The flags of the message, nil if no flags need to be kept.

theDate

The INTERNALDATE of the message, or nil to use the current date.

Discussion

This method is used to append a message from its raw source representation (RFC2822 compliant) to the underlying store. It differs from -appendMessageFromRawSource:flags: in that this method supplies the given date to the server to use as the INTERNALDATE. Not supplying this date will cause some servers and clients to report the date of the message as the current date and time, rather than that specified in the Received header.


copyMessages: toFolder:


- (void) copyMessages: (NSArray *) theMessages toFolder: (NSString *) theFolder; 
Parameters
theMessages

The messages to copy.

theFolder

The name of the target folder. The name must include hierarchy separators if the target folder is a subfolder.

Discussion

This method copies the messages in theMessages array from the receiver to the destination folder's name, theFolder. On success, this method posts a PantomimeMessagesCopyCompleted notification (and calls -messagesCopyCompleted: on the delegate, if any). On failure, it posts a PantomimeMessagesCopyFailed notification (and calls -messagesCopyFailed: on the delegate, if any). This method is fully asynchronous.

See Also

copyMessages:toFolder:


copyMessages:toFolder:


- (void) copyMessages: (NSArray *) theMessages toFolder: (NSString *) theFolder; 
Parameters
theMessages

The messages to copy.

theFolder

The name of the target folder. The name must include hierarchy separators if the target folder is a subfolder.

Discussion

This method copies the messages in theMessages array from the receiver to the destination folder's name, theFolder. On success, this method posts a PantomimeMessagesCopyCompleted notification (and calls -messagesCopyCompleted: on the delegate, if any). On failure, it posts a PantomimeMessagesCopyFailed notification (and calls -messagesCopyFailed: on the delegate, if any). This method is fully asynchronous.

See Also

copyMessages: toFolder:


initWithName: mode:


- (id) initWithName: (NSString *) theName mode: (PantomimeFolderMode) theMode; 
Parameters
theName

The name of the folder.

theMode

The mode to use. Accepted values are part of the PantomimeFolderMode enum.

Return Value

An CWIMAPFolder instance, nil on error.

Discussion

This method is used to initialize the receiver with theName using theMode. Normally, you should not invoke this method directly. You must rather use one of CWIMAPStore's folderForName: ... method.

See Also

initWithName:mode:


initWithName:mode:


- (id) initWithName: (NSString *) theName mode: (PantomimeFolderMode) theMode; 
Parameters
theName

The name of the folder.

theMode

The mode to use. Accepted values are part of the PantomimeFolderMode enum.

Discussion

This method is used to initialize the receiver with theName using theMode. Normally, you should not invoke this method directly. You must rather use one of CWIMAPStore's folderForName: ... method.

See Also

initWithName: mode:


prefetch


- (void) prefetch; 
Discussion

This method is used to cache part of the message headers from the IMAP server. On completion, it posts the PantomimeFolderPrefetchCompleted notification (and calls -folderPrefetchCompleted: on the delegate, if any). This method is fully asynchronous.


selected


- (BOOL) selected; 
Return Value

YES if it is in a selected state, NO otherwise.

Discussion

This method is used to verify if the folder is in a selected state.


setSelected:


- (void) setSelected: (BOOL) theBOOL; 
Parameters
theBOOL

YES if it is in a selected state, NO otherwise.

Discussion

This method is used to specify if the folder is in a selected state or not. You should never call this method directly. Instead, call IMAPStore: -folderForName: select:.


setUIDValidity:


- (void) setUIDValidity: (unsigned int) theUIDValidity; 
Parameters
theUIDValidity

The UID validity value.

Discussion

This method is used to set the UID validity of the receiver. If the receiver has a cache (instance of CWIMAPCacheManager) and the UID validity of its cache differs from theUIDValidity, all cache entries are invalidated.


UIDValidity


- (unsigned int) UIDValidity; 
Return Value

The UID validity of the folder.

Discussion

This method is used to obtain the UID validity of an IMAP folder. Refer to "2.3.1.1. Unique Identifier (UID) Message Attribute" of RFC 3501 for a detailed description of this parameter.


Member Data

_selected
_uid_validity

_selected


private

BOOL _selected;

_uid_validity


private

unsigned int _uid_validity;