-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathPHTaskHandler.h
35 lines (22 loc) · 883 Bytes
/
PHTaskHandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Phoenix is released under the MIT License. Refer to https://github.com/kasper/phoenix/blob/master/LICENSE.md
*/
@import Foundation;
@import JavaScriptCore;
#import "PHHandler.h"
#import "PHIdentifiableJSExport.h"
@protocol PHTaskHandlerJSExport <JSExport, PHIdentifiableJSExport>
@property(readonly) int status;
@property(readonly) NSString *output;
@property(readonly) NSString *error;
#pragma mark - Constructing
- (instancetype)initWithPath:(NSString *)path arguments:(NSArray<NSString *> *)arguments callback:(JSValue *)callback;
#pragma mark - Terminating
- (void)terminate;
@end
@interface PHTaskHandler : PHHandler <PHTaskHandlerJSExport>
#pragma mark - Initialising
- (instancetype)initWithPath:(NSString *)path
arguments:(NSArray<NSString *> *)arguments
callback:(JSValue *)callback NS_DESIGNATED_INITIALIZER;
@end