aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objc/nntp/MCONNTPFetchServerTimeOperation.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/objc/nntp/MCONNTPFetchServerTimeOperation.h')
-rw-r--r--src/objc/nntp/MCONNTPFetchServerTimeOperation.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/objc/nntp/MCONNTPFetchServerTimeOperation.h b/src/objc/nntp/MCONNTPFetchServerTimeOperation.h
new file mode 100644
index 00000000..a06dd746
--- /dev/null
+++ b/src/objc/nntp/MCONNTPFetchServerTimeOperation.h
@@ -0,0 +1,35 @@
+//
+// MCONNTPFetchServerTimeOperation.h
+// mailcore2
+//
+// Created by Robert Widmann on 10/21/14.
+// Copyright (c) 2014 MailCore. All rights reserved.
+//
+
+#ifndef MAILCORE_MCONNTPFETCHSERVERTIMEOPERATION_H
+
+#define MAILCORE_MCONNTPFETCHSERVERTIMEOPERATION_H
+
+#import <Foundation/Foundation.h>
+#import <MailCore/MCONNTPOperation.h>
+
+@class MCOIndexSet;
+
+/** This is an asynchronous operation that will fetch the list of a messages on the NNTP server. */
+@interface MCONNTPFetchServerTimeOperation : MCONNTPOperation
+
+/**
+ Starts the asynchronous fetch operation.
+
+ @param completionBlock Called when the operation is finished.
+
+ - On success `error` will be nil and `date` will be the server's date and time as an NSDate.
+
+ - On failure, `error` will be set with `MCOErrorDomain` as domain and an
+ error code available in MCOConstants.h, `messages` will be null
+ */
+- (void) start:(void (^)(NSError * error, NSDate * date))completionBlock;
+
+@end
+
+#endif