diff options
author | silenteh <silenteh@gmail.com> | 2013-06-05 00:23:44 +0200 |
---|---|---|
committer | silenteh <silenteh@gmail.com> | 2013-06-05 00:23:44 +0200 |
commit | dc94dfdbc71c209a2c70002616de07d368e4ef3f (patch) | |
tree | 9dc0d5018d9c47abf306c86da7715510a8fc6db2 /src/objc/pop/MCOPOPSession.h | |
parent | f4ea2b37befa78edda1e5caafc2f5c3647506b05 (diff) | |
parent | 7282982279ff7f3aff23f361e8483b56ee574c09 (diff) |
Merge branch 'master' of github.com:silenteh/mailcore2
Diffstat (limited to 'src/objc/pop/MCOPOPSession.h')
-rw-r--r-- | src/objc/pop/MCOPOPSession.h | 131 |
1 files changed, 62 insertions, 69 deletions
diff --git a/src/objc/pop/MCOPOPSession.h b/src/objc/pop/MCOPOPSession.h index aa1f2904..52f5a9b7 100644 --- a/src/objc/pop/MCOPOPSession.h +++ b/src/objc/pop/MCOPOPSession.h @@ -20,102 +20,95 @@ @class MCOPOPOperation; @class MCOIndexSet; -// This class implements asynchronous POP3 protocol. +/** This class implements asynchronous access to the POP3 protocol.*/ @interface MCOPOPSession : NSObject -// This is the hostname of the POP3 server to connect to. +/** This is the hostname of the POP3 server to connect to.*/ @property (nonatomic, copy) NSString * hostname; -// This is the port of the POP3 server to connect to. +/** This is the port of the POP3 server to connect to.*/ @property (nonatomic, assign) unsigned int port; -// This is the username of the account. +/** This is the username of the account.*/ @property (nonatomic, copy) NSString * username; -// This is the password of the account. +/** This is the password of the account.*/ @property (nonatomic, copy) NSString * password; -// This is the authentication type to use to connect. -// MCOAuthTypeSASLNone means that it uses the clear-text password authentication. -// It's the default. -// Note: However, over a encrypted connection, the password will be safe. +/** + This is the authentication type to use to connect. + `MCOAuthTypeSASLNone` means that it uses the clear-text is used (and is the default). + @warning *Important*: Over an encrypted connection like TLS, the password will still be secure +*/ @property (nonatomic, assign) MCOAuthType authType; -// This is the encryption type to use. -// See MCOConnectionType for more information. +/** This is the encryption type to use. +See MCOConnectionType for more information.*/ @property (nonatomic, assign) MCOConnectionType connectionType; -// This is the timeout of the connection. +/** This is the timeout of the connection.*/ @property (nonatomic, assign) NSTimeInterval timeout; -// When set to YES, the connection will fail if the certificate is incorrect. +/** When set to YES, the connection will fail if the certificate is incorrect.*/ @property (nonatomic, assign, getter=isCheckCertificateEnabled) BOOL checkCertificateEnabled; -// Returns an operation that will fetch the list of messages. -// The operation needs to be started. -// -// { -// ... -// 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. -// }]; -// +/** @name Operations */ + +/** + Returns an operation that will fetch the list of messages. + + 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. + }]; +*/ - (MCOPOPFetchMessagesOperation *) fetchMessagesOperation; -// Returns an operation that will fetch the header of the given message. -// The operation needs to be started. -// -// { -// ... -// MCOPOPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx]; -// [op start:^(NSError * error, MCOMessageHeader * header) { -// // header is the parsed header of the message. -// }]; -// +/** + Returns an operation that will fetch the header of the given message. + + MCOPOPFetchHeaderOperation * op = [session fetchHeaderOperationWithIndex:idx]; + [op start:^(NSError * error, MCOMessageHeader * header) { + // header is the parsed header of the message. + }]; +*/ - (MCOPOPFetchHeaderOperation *) fetchHeaderOperationWithIndex:(unsigned int)index; -// Returns an operation that will fetch the content of the given message. -// The operation needs to be started. -// -// { -// ... -// MCOPOPFetchMessageOperation * op = [session fetchMessageOperationWithIndex:idx]; -// [op start:^(NSError * error, NSData * messageData) { -// // messageData is the RFC 822 formatted message data. -// }]; -// +/** + Returns an operation that will fetch the content of the given message. + + MCOPOPFetchMessageOperation * op = [session fetchMessageOperationWithIndex:idx]; + [op start:^(NSError * error, NSData * messageData) { + // messageData is the RFC 822 formatted message data. + }]; +*/ - (MCOPOPFetchMessageOperation *) fetchMessageOperationWithIndex:(unsigned int)index; -// Returns an operation that will delete the given messages. -// Will disconnect when finished. -// The operation needs to be started. -// -// { -// ... -// MCOIndexSet * indexes = [MCOIndexSet indexSet]; -// [indexes addIndex:1]; -// [indexes addIndex:2]; -// [indexes addIndex:3]; -// MCOPOPOperation * op = [session deleteMessagesOperationWithIndexes:indexes]; -// [op start:^(NSError * error) { -// ... -// }]; -// +/** + Returns an operation that will delete the given messages. + Will disconnect when finished. + + MCOIndexSet * indexes = [MCOIndexSet indexSet]; + [indexes addIndex:1]; + [indexes addIndex:2]; + [indexes addIndex:3]; + MCOPOPOperation * op = [session deleteMessagesOperationWithIndexes:indexes]; + [op start:^(NSError * error) { + ... + }]; +*/ - (MCOPOPOperation *) deleteMessagesOperationWithIndexes:(MCOIndexSet *)indexes; -// Returns an operation that will check whether the POP account is valid. -// The operation needs to be started. -// -// { -// ... -// MCOPOPOperation * op = [session checkAccountOperation]; -// [op start:^(NSError * error) { -// ... -// }]; -// +/** + Returns an operation that will check whether the POP account is valid. + + MCOPOPOperation * op = [session checkAccountOperation]; + [op start:^(NSError * error) { + ... + }]; +*/ - (MCOPOPOperation *) checkAccountOperation; @end |