diff options
author | 2014-10-25 15:33:06 -0700 | |
---|---|---|
committer | 2014-10-25 15:33:06 -0700 | |
commit | 8caeae6e162faed40eb3ae2dce1a654789eff01c (patch) | |
tree | e8243d703e5c1985a1cc16bc1d51247508d64595 /src/objc/imap/MCOIMAPFetchParsedContentOperation.h | |
parent | 97de9211f38bf5823d08e529b65841c9a6f7962f (diff) | |
parent | ec1da36eaf2adfb5695f5c0d8ca92d23d31b56a5 (diff) |
Merge pull request #933 from michaellenaghan/fetch-parsed-message-operation
Add an operation to fetch a parsed message.
Diffstat (limited to 'src/objc/imap/MCOIMAPFetchParsedContentOperation.h')
-rw-r--r-- | src/objc/imap/MCOIMAPFetchParsedContentOperation.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/objc/imap/MCOIMAPFetchParsedContentOperation.h b/src/objc/imap/MCOIMAPFetchParsedContentOperation.h new file mode 100644 index 00000000..de2b1663 --- /dev/null +++ b/src/objc/imap/MCOIMAPFetchParsedContentOperation.h @@ -0,0 +1,44 @@ +// +// MCOIMAPFetchParsedContentOperation.h +// mailcore2 +// +// Created by DINH Viêt Hoà on 3/25/13. +// Copyright (c) 2013 MailCore. All rights reserved. +// + +#ifndef MAILCORE_MCOIMAPFETCHPARSEDCONTENTOPERATION_H + +#define MAILCORE_MCOIMAPFETCHPARSEDCONTENTOPERATION_H + +/** + This class implements an operation to fetch the parsed content of a message. +*/ + +#import <MailCore/MCOIMAPBaseOperation.h> +#import <MailCore/MCOConstants.h> + +@class MCOMessageParser; + +@interface MCOIMAPFetchParsedContentOperation : MCOIMAPBaseOperation + +/** + This block will be called as bytes are received from the network +*/ +@property (nonatomic, copy) MCOIMAPBaseOperationProgressBlock progress; + +/** + Starts the asynchronous fetch operation. + + @param completionBlock Called when the operation is finished. + + - On success `error` will be nil and `parser` will contain the requested message + + - On failure, `error` will be set with `MCOErrorDomain` as domain and an + error code available in `MCOConstants.h`, `data` will be nil +*/ + +- (void) start:(void (^)(NSError * error, MCOMessageParser * parser))completionBlock; + +@end + +#endif |