sensitivity.io for iOS & macOS  1.1.4
Instance Methods | List of all members
<Future > Protocol Reference

#import <Future.h>

Inheritance diagram for <Future >:

Instance Methods

(BOOL) - isStarted:withError:
 
(BOOL) - isRunning:withError:
 
(BOOL) - isFinished:withError:
 
(BOOL) - waitForFinishedWithError:
 
(BOOL) - isCanceled:withError:
 
(BOOL) - cancelWithError:
 
(BOOL) - isPaused:withError:
 
(BOOL) - pauseWithError:
 
(BOOL) - resumeWithError:
 
(BOOL) - setPaused:withError:
 
(BOOL) - togglePausedWithError:
 

Detailed Description

Future protocol provides the means to manipulate and check the status of the module task it represents

Method Documentation

◆ cancelWithError:()

- (BOOL Future) cancelWithError: (NSError *_Nullable *_Nullable)  error

Cancels the module task

Parameters
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ isCanceled:withError:()

- (BOOL Future) isCanceled: (BOOL *_Nonnull)  canceled
withError: (NSError *_Nullable *_Nullable)  error 

Checks if the module task is canceled

Parameters
canceledWill be set to true if module task is canceled, false otherwise
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ isFinished:withError:()

- (BOOL Future) isFinished: (BOOL *_Nonnull)  finished
withError: (NSError *_Nullable *_Nullable)  error 

Checks if the module task is finished

Parameters
finishedWill be set to true if module task is finished, false otherwise
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ isPaused:withError:()

- (BOOL Future) isPaused: (BOOL *_Nonnull)  paused
withError: (NSError *_Nullable *_Nullable)  error 

Checks if the module task is paused

Parameters
pausedWill be set to true if module task is paused, false otherwise
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ isRunning:withError:()

- (BOOL Future) isRunning: (BOOL *_Nonnull)  running
withError: (NSError *_Nullable *_Nullable)  error 

Checks if the module task is in progress

Parameters
runningWill be set to true if module task is in progress, false otherwise
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ isStarted:withError:()

- (BOOL Future) isStarted: (BOOL *_Nonnull)  started
withError: (NSError *_Nullable *_Nullable)  error 

Checks if the module task is started which means that it was added to the thread pool queue

Parameters
startedWill be set to true if module task is added to the thread pool queue, false otherwise
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ pauseWithError:()

- (BOOL Future) pauseWithError: (NSError *_Nullable *_Nullable)  error

Pauses the module task

Parameters
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ resumeWithError:()

- (BOOL Future) resumeWithError: (NSError *_Nullable *_Nullable)  error

Resumes the module task

Parameters
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ setPaused:withError:()

- (BOOL Future) setPaused: (BOOL)  paused
withError: (NSError *_Nullable *_Nullable)  error 

Sets the paused state of the module task to a given value

Parameters
pausedThe paused value to set
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ togglePausedWithError:()

- (BOOL Future) togglePausedWithError: (NSError *_Nullable *_Nullable)  error

Toggles the paused state of the module task

Parameters
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

◆ waitForFinishedWithError:()

- (BOOL Future) waitForFinishedWithError: (NSError *_Nullable *_Nullable)  error

Waits for the module task to finish

Remarks
Relevant errors: SENSITIVITYIO_ELICENSEEXPIRED, SENSITIVITYIO_EINVALIDLICENSE, SENSITIVITYIO_ESETTINGS, SENSITIVITYIO_EUNSUPPORTEDMIMETYPE, ENOENT, EIO
Parameters
errorThe error representing the reason for the failure
Returns
True on success, false in case an error occured

The documentation for this protocol was generated from the following file: