File: ExecSandboxProtocol.h

package info (click to toggle)
julia 1.5.3%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 91,132 kB
  • sloc: lisp: 278,486; ansic: 60,186; cpp: 29,801; sh: 2,403; makefile: 1,998; pascal: 1,313; objc: 647; javascript: 516; asm: 226; python: 161; xml: 34
file content (31 lines) | stat: -rw-r--r-- 1,161 bytes parent folder | download
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
// This file is a part of Julia. License is MIT: https://julialang.org/license

@import Foundation;

@protocol TaskProtocol
/// Launch the task and upon termination receive the exit status.
- (void)launch:(void (^_Nullable)(int status))onTermination;
/// Terminate (SIGTERM) the task.
- (void)terminate;
@end

@protocol ExecSandboxProtocol
/**
 Evaluate a Julia program with a Julia executable.

 @param juliaProgram Julia source code to be evaluated.
 @param executableBookmark NSURL file bookmark for the julia executable to run.
 @param args Arguments to pass to julia.
 @param reply Async result with task and standard in, out, and error. An error
 occurred if task is nil.
 */
- (void)eval:(NSString *_Nonnull)juliaProgram
    withJulia:(NSData *_Nonnull)executableBookmark
    arguments:(NSArray<NSString *> *_Nullable)args
         task:(void (^_Nonnull)(id<TaskProtocol> _Nullable task,
                                NSFileHandle *_Nullable stdIn,
                                NSFileHandle *_Nullable stdOut,
                                NSFileHandle *_Nullable stdErr))reply;
@end

NSXPCInterface *_Nonnull CreateExecSandboxXPCInterface(void);