sensitivity.io for iOS & macOS  1.1.4
Future.h
1 //
2 // Future.h
3 //
4 // Created by Andreea ERDELYI <andreea.erdelyi@cososys.com>
5 //
6 // Copyright (C) 2017 CoSoSys Ltd team@sensitivity.io
7 // CoSoSys Ltd. All rights reserved.
8 // Please see the COPYING for more details.
9 //
10 
11 #import <Foundation/Foundation.h>
12 
16 @protocol Future <NSObject>
17 
25 - (BOOL) isStarted:(BOOL* _Nonnull)started withError:(NSError * _Nullable * _Nullable)error;
33 - (BOOL) isRunning:(BOOL* _Nonnull)running withError:(NSError * _Nullable * _Nullable)error;
41 - (BOOL) isFinished:(BOOL* _Nonnull)finished withError:(NSError * _Nullable * _Nullable)error;
50 - (BOOL) waitForFinishedWithError:(NSError * _Nullable * _Nullable)error;
58 - (BOOL) isCanceled:(BOOL* _Nonnull)canceled withError:(NSError * _Nullable * _Nullable)error;
65 - (BOOL) cancelWithError:(NSError * _Nullable * _Nullable)error;
73 - (BOOL) isPaused:(BOOL* _Nonnull)paused withError:(NSError * _Nullable * _Nullable)error;
80 - (BOOL) pauseWithError:(NSError * _Nullable * _Nullable)error;
87 - (BOOL) resumeWithError:(NSError * _Nullable * _Nullable)error;
95 - (BOOL) setPaused:(BOOL)paused withError:(NSError * _Nullable * _Nullable)error;
102 - (BOOL) togglePausedWithError:(NSError * _Nullable * _Nullable)error;
103 
104 @end