MCOPOPSession Class Reference
| Inherits from | NSObject |
| Declared in | MCOPOPSession.h MCOPOPSession.mm |
Tasks
Other Methods
-
hostnameproperty -
portproperty -
usernameproperty -
passwordproperty -
authTypeproperty -
connectionTypeproperty -
timeoutproperty -
checkCertificateEnabledproperty -
connectionLoggerproperty -
dispatchQueueproperty -
operationQueueRunningproperty -
operationQueueRunningChangeBlockproperty -
– cancelAllOperations
Operations
Properties
authType
This is the authentication type to use to connect.
MCOAuthTypeSASLNone means that it uses the clear-text is used (and is the default).
@property (nonatomic, assign) MCOAuthType authTypeDiscussion
Warning: Important: Over an encrypted connection like TLS, the password will still be secure
Declared In
MCOPOPSession.hcheckCertificateEnabled
When set to YES, the connection will fail if the certificate is incorrect.
@property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabledDeclared In
MCOPOPSession.hconnectionLogger
Sets logger callback. The network traffic will be sent to this block.
@property (nonatomic, copy) MCOConnectionLogger connectionLoggerDiscussion
[session setConnectionLogger:^(void * connectionID, MCOConnectionLogType type, NSData * data) { }];
Declared In
MCOPOPSession.hconnectionType
This is the encryption type to use. See MCOConnectionType for more information.
@property (nonatomic, assign) MCOConnectionType connectionTypeDeclared In
MCOPOPSession.hdispatchQueue
This property provides some hints to MCOPOPSession about where it’s called from. It will make MCOPOPSession safe. It will also set all the callbacks of operations to run on this given queue. Defaults to the main queue. This property should be used only if there’s performance issue using MCOPOPSession in the main thread.
@property (nonatomic, retain) dispatch_queue_t dispatchQueueDeclared In
MCOPOPSession.hhostname
This is the hostname of the POP3 server to connect to.
@property (nonatomic, copy) NSString *hostnameDeclared In
MCOPOPSession.hoperationQueueRunning
The value will be YES when asynchronous operations are running, else it will return NO.
@property (nonatomic, assign, readonly, getter=isOperationQueueRunning) BOOL operationQueueRunningDeclared In
MCOPOPSession.hoperationQueueRunningChangeBlock
Sets operation running callback. It will be called when operations start or stop running.
@property (nonatomic, copy) MCOOperationQueueRunningChangeBlock operationQueueRunningChangeBlockDiscussion
[session setOperationQueueRunningChangeBlock:^{ if ([session isOperationQueueRunning]) { } else { } }];
Declared In
MCOPOPSession.hpassword
This is the password of the account.
@property (nonatomic, copy) NSString *passwordDeclared In
MCOPOPSession.hport
This is the port of the POP3 server to connect to.
@property (nonatomic, assign) unsigned int portDeclared In
MCOPOPSession.hInstance Methods
checkAccountOperation
Returns an operation that will check whether the POP account is valid.
- (MCOPOPOperation *)checkAccountOperationDiscussion
MCOPOPOperation * op = [session checkAccountOperation];
[op start:^(NSError * error) {
}];
Declared In
MCOPOPSession.hdeleteMessagesOperationWithIndexes:
Returns an operation that will delete the given messages. Will disconnect when finished.
- (MCOPOPOperation *)deleteMessagesOperationWithIndexes:(MCOIndexSet *)indexesDiscussion
MCOIndexSet * indexes = [MCOIndexSet indexSet];
[indexes addIndex:1];
[indexes addIndex:2];
[indexes addIndex:3];
MCOPOPOperation * op = [session deleteMessagesOperationWithIndexes:indexes];
[op start:^(NSError * error) {
}];
Declared In
MCOPOPSession.hdisconnectOperation
Returns an operation that will disconnect the session.
- (MCOPOPOperation *)disconnectOperationDiscussion
MCOPOPOperation * op = [session disconnectOperation]; [op start:^(NSError * error) { }];
Declared In
MCOPOPSession.hfetchHeaderOperationWithIndex:
Returns an operation that will fetch the header of the given message.
- (MCOPOPFetchHeaderOperation *)fetchHeaderOperationWithIndex:(unsigned int)indexDiscussion
MCOPOPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx];
[op start:^(NSError * error, MCOMessageHeader * header) {
// header is the parsed header of the message.
}];
Declared In
MCOPOPSession.hfetchMessageOperationWithIndex:
Returns an operation that will fetch the content of the given message.
- (MCOPOPFetchMessageOperation *)fetchMessageOperationWithIndex:(unsigned int)indexDiscussion
MCOPOPFetchMessageOperation * op = [session fetchMessageOperationWithIndex:idx];
[op start:^(NSError * error, NSData * messageData) {
// messageData is the RFC 822 formatted message data.
}];
Declared In
MCOPOPSession.hfetchMessagesOperation
Returns an operation that will fetch the list of messages.
- (MCOPOPFetchMessagesOperation *)fetchMessagesOperationDiscussion
MCOPOPFetchMessagesOperation * op = [session fetchMessagesOperation];
[op start:^(NSError * error, NSArray * messages) {
// messages is an array of MCOPOPMessageInfo
// [info index] can be used as reference for a given message in the other operations.
}];
Declared In
MCOPOPSession.hnoopOperation
Returns an operation that will perform a No-Op operation.
- (MCOPOPOperation *)noopOperationDiscussion
MCOPOPOperation * op = [session noopOperation]; [op start:^(NSError * error) { }];
Declared In
MCOPOPSession.h