aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/imap/MCOIMAPFetchFoldersOperation.h
blob: a8e4b1fe6b2d3b43b5e9d3360b5254afff725fcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
//  MCOIMAPFetchFoldersOperation.h
//  mailcore2
//
//  Created by Matt Ronge on 1/31/13.
//  Copyright (c) 2013 MailCore. All rights reserved.
//

#ifndef MAILCORE_MCOIMAPFETCHFOLDERSOPERATION_H

#define MAILCORE_MCOIMAPFETCHFOLDERSOPERATION_H

/** This class implements an operation to fetch a list of folders. */

#import <MailCore/MCOIMAPBaseOperation.h>

@class MCOIMAPFolder;

NS_ASSUME_NONNULL_BEGIN
@interface MCOIMAPFetchFoldersOperation : MCOIMAPBaseOperation

/** 
 Starts the asynchronous fetch operation.

 @param completionBlock Called when the operation is finished.

 - On success `error` will be nil and `folders` will contain an array of MCOIMAPFolder
 
 - On failure, `error` will be set with `MCOErrorDomain` as domain and an 
   error code available in `MCOConstants.h`, `folders` will be nil
*/
- (void) start:(void (^)(NSError * __nullable error, NSArray<MCOIMAPFolder *> * __nullable folders))completionBlock;

@end
NS_ASSUME_NONNULL_END

#endif