aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/provider/MCOMailProvider.h
blob: 53f09736d362be113f15c88bc9f90f42f2819f34 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//
//  MCOMailProvider.h
//  mailcore2
//
//  Created by Robert Widmann on 4/28/13.
//  Copyright (c) 2013 MailCore. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
   Represents a email service provider, like for example Gmail, Yahoo, Fastmail.fm etc.
*/

@interface MCOMailProvider : NSObject

@property (nonatomic, copy) NSString * identifier;

- (id) initWithInfo:(NSDictionary *)info;

/**
   A list of ways that you can connect to the IMAP server
   @return An array of MCONetService
*/
- (NSArray *) imapServices;

/**
   A list of ways that you can connect to the SMTP server
   @return An array of MCONetService
*/
- (NSArray *) smtpServices;

/**
   A list of ways that you can connect to the POP3 server
   @return An array of MCONetService
*/
- (NSArray *) popServices;

- (BOOL) matchEmail:(NSString *)email;
- (BOOL) matchMX:(NSString *)hostname;

/**
   Where sent mail is stored on the IMAP server
   @return Returns nil if it is unknown
*/
- (NSString *) sentMailFolderPath;

/**
   Where starred mail is stored on the IMAP server.
   This only applies to some servers like Gmail
   @return Returns nil if it is unknown
*/
- (NSString *) starredFolderPath;

/**
   Where all mail or the archive folder is stored on the IMAP server
   @return Returns nil if it is unknown
*/
- (NSString *) allMailFolderPath;

/**
   Where trash is stored on the IMAP server
   @return Returns nil if it is unknown
*/
- (NSString *) trashFolderPath;

/**
   Where draft messages are stored on the IMAP server
   @return Returns nil if it is unknown
*/
- (NSString *) draftsFolderPath;

/**
   Where spam messages are stored on the IMAP server
   @return Returns nil if it is unknown
*/
- (NSString *) spamFolderPath;

/**
   Where important messages are stored on the IMAP server
   This only applies to some servers, like Gmail
   @return Returns nil if it is unknown
*/
- (NSString *) importantFolderPath;

@end