CWIMAPStore


Pantomime IMAP client code.

Discussion

This class, which extends the CWService class and implements the CWStore protocol, is Pantomime's IMAP client code.

Conforms to

CWStore

Superclass

CWService

Declared In

CWIMAPStore.h



Methods

-folderForName:mode:prefetch:
-folderForName:select:
-folderStatus:
-lastTag
-nextTag
-sendCommand:info:arguments:
-sendCommand:info:arguments: ...
-subscribeToFolderWithName:
-unsubscribeToFolderWithName:

folderForName:mode:prefetch:


- (CWIMAPFolder *) folderForName: (NSString *) theName mode: (PantomimeFolderMode) theMode 
        prefetch: (BOOL) aBOOL; 
Parameters
theName

The name of the folder to obtain.

theMode

The mode to use. The value is one of the PantomimeFolderMode enum.

aBOOL

YES if prefetch should be done on the folder, NO otherwise.

Return Value

A CWIMAPFolder instance.

Discussion

This method is used to get the folder with the specified name and mode.


folderForName:select:


- (CWIMAPFolder *) folderForName: (NSString *) theName select: (BOOL) aBOOL; 
Parameters
theName

The name of the folder to obtain.

aBOOL

YES to select the folder, NO otherwise.

Return Value

A CWIMAPFolder instance.

Discussion

This method is used to obtain the folder with the specified name. If aBOOL is YES, the folder will be selected. Otherwise, a non-selected folder will be returned which is used to proceed with an append operation. Note that when aBOOL is equal to NO, the returned folder is NOT part of the list of opened folders.


folderStatus:


- (NSDictionary *) folderStatus: (NSArray *) theArray; 
Parameters
theArray

The array of folder names.

Return Value

A NSDictionary instance for which the keys are the folder names (NSString instance) and the values are CWFolderInformation instance if the information was loaded, nil otherwise.

Discussion

This method is used to obtain the status of the specified folder names in theArray. It is fully asynchronous. The first time it is invoked, it'll perform its work asynchronously and post a PantomimeFolderStatusCompleted notification (and call -folderStatusCompleted on the delegate, if any) if succeeded. If not, it will post a PantomimeFolderStatusFailed notification (and call -folderStatusFailed: on the delegate, if any). Further calls of this method on the same set of folders will immediately return the status information.


lastTag


- (NSData *) lastTag; 
Return Value

The tag as a NSData instance.

Discussion

This method is used to obtain the last IMAP tag sent to the IMAP server.


nextTag


- (NSData *) nextTag; 
Return Value

The tag as a NSData instance.

Discussion

This method is used to obtain the next IMAP tag that will be sent to the IMAP server. Normally you shouldn't call this method directly.


sendCommand:info:arguments:


- (void) sendCommand: (IMAPCommand) theCommand info: (NSDictionary *) theInfo 
        arguments: (NSString *) theFormat, ...; 
Parameters
theCommand

The IMAP command to send.

theInfo

The addition info to pass.

theFormat

The format defining the variable arguments list.

Discussion

This method is used to send commands to the IMAP server. Normally, you should not call this method directly.

See Also

sendCommand:info:arguments: ...


sendCommand:info:arguments: ...


- (void) sendCommand: (IMAPCommand) theCommand info: (NSDictionary *) theInfo 
        arguments: (NSString *) theFormat, ...; 
Parameters
theCommand

The IMAP command to send.

theInfo

The addition info to pass.

theFormat

The format defining the variable arguments list.

Discussion

This method is used to send commands to the IMAP server. Normally, you should not call this method directly.

See Also

sendCommand:info:arguments:


subscribeToFolderWithName:


- (void) subscribeToFolderWithName: (NSString *) theName; 
Parameters
theName

The name of the folder to subscribe to.

Discussion

This method is used to subscribe to the specified folder. The method will post a PantomimeFolderSubscribeCompleted notification (and call -folderSubscribeCompleted: on the delegate, if any) if it succeeded. If not, it will post a PantomimeFolderSubscribeFailed notification (and call -folderSubscribeFailed: on the delegate, if any)


unsubscribeToFolderWithName:


- (void) unsubscribeToFolderWithName: (NSString *) theName; 
Parameters
theName

The name of the folder to subscribe to.

Discussion

This method is used to unsubscribe to the specified folder. The method will post a PantomimeFolderUnsubscribeCompleted notification (and call -folderUnsubscribeCompleted: on the delegate, if any) if it succeeded. If not, it will post a PantomimeFolderUnsubscribeFailed notification (and call -folderUnsubscribeFailed: on the delegate, if any)


Member Data

_currentQueueObject
_folders
_folderSeparator
_folderStatus
_openFolders
_selectedFolder
_subscribedFolders
_tag

_currentQueueObject


private

CWIMAPQueueObject *_currentQueueObject;

_folders


private

NSMutableDictionary *_folders;

_folderSeparator


private

unichar _folderSeparator;

_folderStatus


private

NSMutableDictionary *_folderStatus;

_openFolders


private

NSMutableDictionary *_openFolders;

_selectedFolder


private

CWIMAPFolder *_selectedFolder;

_subscribedFolders


private

NSMutableArray *_subscribedFolders;

_tag


private

int _tag;