diff options
author | 2013-04-06 23:51:04 -0700 | |
---|---|---|
committer | 2013-04-06 23:51:04 -0700 | |
commit | 7db9464d7c53e2529de0005771408f0fac4120f3 (patch) | |
tree | 4612748d66df9f2c83b92a91c3158c5dbb9d140d /src/objc/pop | |
parent | 86707e3713ecfebdc518406ea0f67767432922c6 (diff) |
Implemented checkAccount operation for POP
Diffstat (limited to 'src/objc/pop')
-rw-r--r-- | src/objc/pop/MCOPOPSession.h | 12 | ||||
-rw-r--r-- | src/objc/pop/MCOPOPSession.mm | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/objc/pop/MCOPOPSession.h b/src/objc/pop/MCOPOPSession.h index 16b95a16..aa1f2904 100644 --- a/src/objc/pop/MCOPOPSession.h +++ b/src/objc/pop/MCOPOPSession.h @@ -106,6 +106,18 @@ // - (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) { +// ... +// }]; +// +- (MCOPOPOperation *) checkAccountOperation; + @end #endif diff --git a/src/objc/pop/MCOPOPSession.mm b/src/objc/pop/MCOPOPSession.mm index b82c1f23..cb060784 100644 --- a/src/objc/pop/MCOPOPSession.mm +++ b/src/objc/pop/MCOPOPSession.mm @@ -77,7 +77,13 @@ MCO_OBJC_SYNTHESIZE_BOOL(setCheckCertificateEnabled, isCheckCertificateEnabled) - (MCOPOPOperation *) deleteMessagesOperationWithIndexes:(MCOIndexSet *)indexes { mailcore::POPOperation * coreOp = MCO_NATIVE_INSTANCE->deleteMessagesOperation(MCO_FROM_OBJC(mailcore::IndexSet, indexes)); - return [[[MCOPOPOperation alloc] initWithMCOperation:coreOp] autorelease]; + return [[[MCOPOPOperation alloc] initWithMCOperation:coreOp] autorelease]; +} + +- (MCOPOPOperation *) checkAccountOperation +{ + mailcore::POPOperation * coreOp = MCO_NATIVE_INSTANCE->checkAccountOperation(); + return [[[MCOPOPOperation alloc] initWithMCOperation:coreOp] autorelease]; } @end |