blob: f186e811366900cb18c092f7c9e86ed58782ab4a (
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
|
//
// MCONetService.h
// mailcore2
//
// Created by Robert Widmann on 4/28/13.
// Copyright (c) 2013 MailCore. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MailCore/MCOConstants.h>
/**
This class provides a specific way to access a given service
*/
@interface MCONetService : NSObject <NSCopying>
/**
The hostname of the server. [MCONetService hostnameWithEmail:] is recommended
instead as it can handle services with custom domains
*/
@property (nonatomic, copy) NSString * hostname;
/** The port number of the service */
@property (nonatomic, assign) unsigned int port;
/** What kind of connection type is supported, like SSL, Start TLS, Plain etc. */
@property (nonatomic, assign) MCOConnectionType connectionType;
+ (MCONetService *) serviceWithInfo:(NSDictionary *)info;
- (instancetype) initWithInfo:(NSDictionary *)info;
- (NSDictionary *) info;
/**
If the service uses a custom domain this will return the proper hostname based
off the email address
*/
- (NSString *) hostnameWithEmail:(NSString *)email;
@end
@interface MCONetService (MCOUnavailable)
/** Do not invoke this directly. */
- (instancetype) init NS_UNAVAILABLE;
@end
|