aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/nntp/MCONNTPSession.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/objc/nntp/MCONNTPSession.h')
-rw-r--r--src/objc/nntp/MCONNTPSession.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/objc/nntp/MCONNTPSession.h b/src/objc/nntp/MCONNTPSession.h
index 29fe18af..84b1c5e7 100644
--- a/src/objc/nntp/MCONNTPSession.h
+++ b/src/objc/nntp/MCONNTPSession.h
@@ -20,6 +20,7 @@
@class MCONNTPListNewsgroupsOperation;
@class MCONNTPFetchOverviewOperation;
@class MCONNTPFetchServerTimeOperation;
+@class MCONNTPSendOperation;
@class MCONNTPOperation;
@class MCOIndexSet;
@@ -182,6 +183,32 @@ NS_ASSUME_NONNULL_BEGIN
- (MCONNTPListNewsgroupsOperation *) listDefaultNewsgroupsOperation;
/**
+ Returns an operation that will send the given message through NNTP.
+ It will use the newsgroups set in the message data.
+ It will also filter out Bcc from the content of the message.
+
+ Generate RFC 822 data using MCOMessageBuilder
+
+ MCONNTPOperation * op = [session sendOperationWithData:rfc822Data];
+ [op start:^(NSError * __nullable error) {
+ ...
+ }];
+ */
+- (MCONNTPSendOperation *) sendOperationWithData:(NSData *)messageData;
+
+/**
+ Returns an operation that will send the message from the given file through NNTP.
+ It will use the newsgroups set in the message data.
+ It will also filter out Bcc from the content of the message.
+
+ MCONNTPOperation * op = [session sendOperationWithContentsOfFile:rfc822DataFilename];
+ [op start:^(NSError * __nullable error) {
+ ...
+ }];
+ */
+- (MCONNTPSendOperation *) sendOperationWithContentsOfFile:(NSString *)path;
+
+/**
Returns an operation that will disconnect the session.
MCONNTPOperation * op = [session disconnectOperation];