1 // Copyright 2015-present 650 Industries. All rights reserved.
2 
3 #import <Foundation/Foundation.h>
4 
5 // forward declaration for consumer interface
6 @protocol EXTaskConsumerInterface;
7 
8 @protocol EXTaskInterface
9 
10 /**
11  *  Name of the task.
12  */
13 @property (nonatomic, strong, readonly) NSString *__nonnull name;
14 
15 /**
16  *  Identifier of the application for which the task was created.
17  */
18 @property (nonatomic, strong, readonly) NSString *__nonnull appId;
19 
20 /**
21  *  The URL to the application for which the task was created.
22  */
23 @property (nonatomic, strong, readonly) NSString *__nonnull appUrl;
24 
25 /**
26  *  Task consumer instance that is responsible for handling (consuming) this task.
27  */
28 @property (nonatomic, strong, readonly) id<EXTaskConsumerInterface> __nonnull consumer;
29 
30 /**
31  *  Options passed to the task.
32  */
33 @property (nonatomic, strong) NSDictionary *__nullable options;
34 
35 /**
36  *  Executes the task with given dictionary data and given error.
37  */
38 - (void)executeWithData:(nullable NSDictionary *)data withError:(nullable NSError *)error;
39 
40 @end
41