diff options
author | Daryle Walker <dwalker07@yahoo.com> | 2015-12-29 00:18:13 -0500 |
---|---|---|
committer | Daryle Walker <dwalker07@yahoo.com> | 2015-12-29 00:18:13 -0500 |
commit | 3a1641a7c7fbef9420fee48ba25b95fc94ef6673 (patch) | |
tree | d15953d6b62d78fcf22ac1c09a6fd6e94aef9921 /src/objc/nntp | |
parent | a82888636dabb374686310801f526f1d5a782f92 (diff) |
Remove extraneous group parameter from fetch-article-by-message-ID methods.
Diffstat (limited to 'src/objc/nntp')
-rw-r--r-- | src/objc/nntp/MCONNTPSession.h | 12 | ||||
-rw-r--r-- | src/objc/nntp/MCONNTPSession.mm | 8 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/objc/nntp/MCONNTPSession.h b/src/objc/nntp/MCONNTPSession.h index 0637ec7e..6b540947 100644 --- a/src/objc/nntp/MCONNTPSession.h +++ b/src/objc/nntp/MCONNTPSession.h @@ -138,12 +138,22 @@ /** Returns an operation that will fetch the content of a message with the given messageID. + MCONNTPFetchArticleOperation * op = [session fetchArticleOperationWithMessageID:@"<MessageID123@mail.google.com>"]; + [op start:^(NSError * __nullable error, NSData * messageData) { + // messageData is the RFC 822 formatted message data. + }]; + */ +- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID; + +/** + Obsolete. Use -fetchArticleOperationWithMessageID: instead. + MCONNTPFetchArticleOperation * op = [session fetchArticleOperationWithMessageID:@"<MessageID123@mail.google.com>" inGroup:@"comp.lang.c"]; [op start:^(NSError * __nullable error, NSData * messageData) { // messageData is the RFC 822 formatted message data. }]; */ -- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID inGroup:(NSString *)group; +- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID inGroup:(NSString * __nullable)group; /** Returns an operation that will fetch the server's date and time. diff --git a/src/objc/nntp/MCONNTPSession.mm b/src/objc/nntp/MCONNTPSession.mm index 374e6018..cc47ae5e 100644 --- a/src/objc/nntp/MCONNTPSession.mm +++ b/src/objc/nntp/MCONNTPSession.mm @@ -176,11 +176,15 @@ MCO_OBJC_SYNTHESIZE_SCALAR(dispatch_queue_t, dispatch_queue_t, setDispatchQueue, return MCO_TO_OBJC_OP(coreOp); } -- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID inGroup:(NSString *)group { - mailcore::NNTPFetchArticleOperation * coreOp = MCO_NATIVE_INSTANCE->fetchArticleByMessageIDOperation(MCO_FROM_OBJC(mailcore::String, group), MCO_FROM_OBJC(mailcore::String, messageID)); +- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID { + mailcore::NNTPFetchArticleOperation * coreOp = MCO_NATIVE_INSTANCE->fetchArticleByMessageIDOperation(MCO_FROM_OBJC(mailcore::String, messageID)); return MCO_TO_OBJC_OP(coreOp); } +- (MCONNTPFetchArticleOperation *) fetchArticleOperationWithMessageID:(NSString *)messageID inGroup:(NSString * __nullable)group { + return [self fetchArticleOperationWithMessageID:messageID]; +} + - (MCONNTPFetchOverviewOperation *)fetchOverviewOperationWithIndexes:(MCOIndexSet *)indexes inGroup:(NSString *)group { mailcore::NNTPFetchOverviewOperation * coreOp = MCO_NATIVE_INSTANCE->fetchOverviewOperationWithIndexes(MCO_FROM_OBJC(mailcore::String, group), MCO_FROM_OBJC(mailcore::IndexSet, indexes)); return MCO_TO_OBJC_OP(coreOp); |