aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/pop/MCOPOPSession.h
blob: ae9bf1d9252164b1b664a9a025707256e8cc7436 (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
38
39
40
41
42
43
//
//  MCOPOPSession.h
//  mailcore2
//
//  Created by DINH Viêt Hoà on 3/29/13.
//  Copyright (c) 2013 MailCore. All rights reserved.
//

#ifndef __MAILCORE_MCOPOPSESSION_H_

#define __MAILCORE_MCOPOPSESSION_H_

#import <Foundation/Foundation.h>

#import <mailcore/MCOConstants.h>

@class MCOPOPFetchMessagesOperation;
@class MCOPOPFetchHeaderOperation;
@class MCOPOPFetchMessageOperation;
@class MCOPOPOperation;
@class MCOIndexSet;

@interface MCOPOPSession : NSObject

@property (nonatomic, copy) NSString * hostname;
@property (nonatomic, assign) unsigned int port;
@property (nonatomic, copy) NSString * username;
@property (nonatomic, copy) NSString * password;
@property (nonatomic, assign) MCOAuthType authType;
@property (nonatomic, assign) MCOConnectionType connectionType;
@property (nonatomic, assign) NSTimeInterval timeout;
@property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabled;

- (MCOPOPFetchMessagesOperation *) fetchMessagesOperation;
- (MCOPOPFetchHeaderOperation *) fetchHeaderOperationWithIndex:(unsigned int)index;
- (MCOPOPFetchMessageOperation *) fetchMessageOperationWithIndex:(unsigned int)index;

// Will disconnect.
- (MCOPOPOperation *) deleteMessagesWithIndexes:(MCOIndexSet *)indexes;

@end

#endif