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
|
//
// MCOAccountValidator.h
// mailcore2
//
// Created by Christopher Hockley on 20/01/15.
// Copyright (c) 2015 MailCore. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MailCore/MCOOperation.h>
#import <MailCore/MCOConstants.h>
/**
This class is used to validate an email provider and it's associated
metadata and credentials.
An app might want to use this during setup to limit the number of settings
a user has to input.
*/
@class MCONetService;
@interface MCOAccountValidator : MCOOperation
@property (nonatomic, copy) NSString * email; /* for SMTP */
@property (nonatomic, copy) NSString * username;
@property (nonatomic, copy) NSString * password;
@property (nonatomic, copy) NSString * OAuth2Token;
@property (nonatomic, retain) NSArray * /* MCONetService */ imapServers;
@property (nonatomic, retain) NSArray * /* MCONetService */ popServers;
@property (nonatomic, retain) NSArray * /* MCONetService */ smtpServers;
@property (nonatomic, assign, getter=isImapEnabled) BOOL imapEnabled;
@property (nonatomic, assign, getter=isPopEnabled) BOOL popEnabled;
@property (nonatomic, assign, getter=isSmtpEnabled) BOOL smtpEnabled;
@property (nonatomic, copy) MCOConnectionLogger connectionLogger;
// result
@property (nonatomic, retain, readonly) NSString * identifier;
@property (nonatomic, retain, readonly) MCONetService * imapServer;
@property (nonatomic, retain, readonly) MCONetService * popServer;
@property (nonatomic, retain, readonly) MCONetService * smtpServer;
@property (nonatomic, retain, readonly) NSError * imapError;
@property (nonatomic, retain, readonly) NSError * popError;
@property (nonatomic, retain, readonly) NSError * smtpError;
/**
Starts the asynchronous account validation operation.
@param completionBlock Called when the operation is finished.
*/
- (void) start:(void (^)(void))completionBlock;
@end
|