Inherits from MCOIMAPBaseOperation : MCOOperation : NSObject
Declared in MCOIMAPFetchMessagesOperation.h
MCOIMAPFetchMessagesOperation.mm

Overview

This class implements an operation to fetch a list of messages from a folder

Tasks

Other Methods

Other Methods

Properties

extraHeaders

Extra headers to request. Must set requestKind | IMAPMessagesRequestKindExtraHeaders

@property (nonatomic, copy) NSArray *extraHeaders

Declared In

MCOIMAPFetchMessagesOperation.h

progress

This block will be called each time a new message is downloaded.

@property (nonatomic, copy) MCOIMAPBaseOperationItemProgressBlock progress

Declared In

MCOIMAPFetchMessagesOperation.h

Instance Methods

cancel

Cancel the operation.

- (void)cancel

Declared In

MCOOperation.h

operationCompleted

This methods is called on the main thread when the asynchronous operation is finished. Needs to be overriden by subclasses.

- (void)operationCompleted

Declared In

MCOOperation.h

start:

Starts the asynchronous fetch operation.

- (void)start:(void ( ^ ) ( NSError *error , NSArray *messages , MCOIndexSet *vanishedMessages ))completionBlock

Parameters

completionBlock

Called when the operation is finished.

  • On success error will be nil and messages will be an array of MCOIMAPMessage. vanishedMessages will contain the messages removed on the server if the server supports QRESYNC and if it was a sync request

  • On failure, error will be set with MCOErrorDomain as domain and an error code available in MCOConstants.h, messages and vanishedMessages will be nil

    If you are not supporting QRESYNC you can safely ignore vanishedMessages.

Declared In

MCOIMAPFetchMessagesOperation.h