summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/foundation/NSUserScriptTask.inc
blob: df78016b90a064b62a02711c0a38531cdb81266b (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{ Parsed from Foundation.framework NSUserScriptTask.h }


{ Types from NSUserScriptTask }
{$ifdef TYPES}

type
  NSUserScriptTaskCompletionHandler = OpaqueCBlock;
{$endif}


{ Types from NSUserUnixTask }
{$ifdef TYPES}

type
  NSUserUnixTaskCompletionHandler = OpaqueCBlock;
{$endif}


{ Types from NSUserAppleScriptTask }
{$ifdef TYPES}

type
  NSUserAppleScriptTaskCompletionHandler = OpaqueCBlock;
{$endif}


{ Types from NSUserAutomatorTask }
{$ifdef TYPES}

type
  NSUserAutomatorTaskCompletionHandler = OpaqueCBlock;
{$endif}


{$ifdef TYPES}
type
  NSUserScriptTaskPtr = ^NSUserScriptTask;
  NSUserUnixTaskPtr = ^NSUserUnixTask;
  NSUserAppleScriptTaskPtr = ^NSUserAppleScriptTask;
  NSUserAutomatorTaskPtr = ^NSUserAutomatorTask;
{$endif}

{$ifdef CLASSES}

type
  NSUserScriptTask = objcclass external (NSObject)
  private
    _scriptURL: NSURL;
    _connection: NSXPCConnection;
    _hasExeced: ObjCBOOL;
    _hasTerminated: ObjCBOOL;
    _stdin: NSFileHandle;
    _stdout: NSFileHandle;
    _stderr: NSFileHandle;
  public
    function initWithURL_error (url: NSURL; error: NSErrorPtr): instancetype; message 'initWithURL:error:'; { NS_DESIGNATED_INITIALIZER }
    function scriptURL: NSURL; message 'scriptURL';
    procedure executeWithCompletionHandler (handler: NSUserScriptTaskCompletionHandler); message 'executeWithCompletionHandler:';
  end;

type
  NSUserUnixTask = objcclass external (NSUserScriptTask)
  public
    procedure setStandardInput(newValue: NSFileHandle); message 'setStandardInput:';
    function standardInput: NSFileHandle; message 'standardInput';
    procedure setStandardOutput(newValue: NSFileHandle); message 'setStandardOutput:';
    function standardOutput: NSFileHandle; message 'standardOutput';
    procedure setStandardError(newValue: NSFileHandle); message 'setStandardError:';
    function standardError: NSFileHandle; message 'standardError';
    procedure executeWithArguments_completionHandler (arguments: NSArray; handler: NSUserUnixTaskCompletionHandler); message 'executeWithArguments:completionHandler:';
  end;

type
  NSUserAppleScriptTask = objcclass external (NSUserScriptTask)
  private
    _isParentDefaultTarget: ObjCBOOL;
  public
    procedure executeWithAppleEvent_completionHandler (event: NSAppleEventDescriptor; handler: NSUserAppleScriptTaskCompletionHandler); message 'executeWithAppleEvent:completionHandler:';
  end;

type
  NSUserAutomatorTask = objcclass external (NSUserScriptTask)
  private
    _variables: NSDictionary;
  public
    procedure setVariables(newValue: NSDictionary); message 'setVariables:';
    function variables: NSDictionary; message 'variables';
    procedure executeWithInput_completionHandler (input: NSSecureCodingProtocol; handler: NSUserAutomatorTaskCompletionHandler); message 'executeWithInput:completionHandler:';
  end;
{$endif}