More fixing so it actually builds
[ITFoundation.git] / ITAppleEvent.h
1 /*
2  *      ITFoundation
3  *      ITAppleEvent
4  *
5  *      Class that provides utilities for sending AppleEvents
6  *      (and OSA scripts) using Carbon function calls in Cocoa
7  *
8  *      Original Author : Joseph Spiros <joseph.spiros@ithinksw.com>
9  *      Responsibility  : Joseph Spiros <joseph.spiros@ithinksw.com>
10  *                      : Kent Sutherland <kent.sutherland@ithinksw.com>
11  *
12  *      Copyright (c) 2002 - 2003 iThink Software.
13  *      All Rights Reserved
14  *
15  */
16
17 #import <Cocoa/Cocoa.h>
18 #import <Carbon/Carbon.h>
19
20
21 @interface ITAppleEvent : NSObject {
22     long int osaScriptID;
23     AppleEvent event, reply;
24 }
25 /*
26  *      INITIALIZATION METHODS - AppleScript
27  *
28  *      These methods initialize an instance of ITAppleEvent
29  *      with AppleScript/OpenScripting data
30  */
31 - (id)initWithOSASource:(NSString *)source;
32 - (id)initWithOSACompiledData:(NSData *)data;
33 - (id)initWithOSAFromContentsOfURL:(NSURL *)url;
34 - (id)initWithOSAFromContentsOfPath:(NSString *)path;
35 /*
36 `*      INITIALIZATION METHODS - AppleEvent
37  *
38  *      This method initializes an instance of ITAppleEvent
39  *      with an AppleEvent class (usually the creator id
40  *      of the AppleEvent's target) and an AppleEvent ID
41  */
42 - (id)initWithAppleEventClass:(AEEventClass)eventClass appleEventID:(AEEventID)eventID;
43 /*
44  *      INSTANCE METHODS
45  */
46 - (NSString *)OSASource;
47 - (void)setOSASource:(NSString *)source;
48 - (NSData *)OSACompiledData;
49 - (void)setOSACompiledData:(NSData *)data;
50 - (AEEventClass)appleEventClass;
51 - (AEEventID)appleEventID;
52 - (NSString *)execute;
53 @end