Licensing ITMac under the GNU Lesser General Public License version 2.1.
[ITMac.git] / ITOSAScript.h
1 /*
2  *      ITMac
3  *      ITOSAScript.h
4  *
5  *      Class that wraps OpenScripting scripts.
6  *
7  *      Copyright (c) 2005 iThink Software
8  *
9  */
10
11 #import <Foundation/Foundation.h>
12 #import <Carbon/Carbon.h>
13
14 @class ITOSAComponent;
15
16 @interface ITOSAScript : NSObject {
17         NSString *_source;
18         ITOSAComponent *_component;
19         OSAID _scriptID;
20 }
21
22 - (id)initWithContentsOfFile:(NSString *)path;
23 - (id)initWithSource:(NSString *)source;
24
25 - (NSString *)source;
26
27 - (ITOSAComponent *)component;
28 - (void)setComponent:(ITOSAComponent *)newComponent;
29
30 - (BOOL)compileAndReturnError:(NSDictionary **)errorInfo;
31 - (BOOL)isCompiled;
32
33 - (NSAppleEventDescriptor *)executeAndReturnError:(NSDictionary **)errorInfo;
34
35 @end