SBObject.h
1 #import <Foundation/Foundation.h> 2 #import <ApplicationServices/ApplicationServices.h> 3 4 NS_ASSUME_NONNULL_BEGIN 5 6 @class SBAppContext, SBElementArray; 7 8 NS_CLASS_AVAILABLE(10_5, NA) 9 @interface SBObject : NSObject <NSCoding> 10 { 11 AEDesc _specifier; 12 SBAppContext *_ctx; 13 id _reserved; 14 } 15 16 - (instancetype) init; 17 - (instancetype) initWithProperties:(NSDictionary *)properties; 18 - (instancetype) initWithData:(id)data; 19 20 - (nullable id) get; 21 22 - (nullable NSError *) lastError NS_AVAILABLE(10_6, NA); 23 24 @end 25 26 @interface SBObject (SBGlueInterface) 27 28 - (instancetype) initWithElementCode:(DescType)code properties:(nullable NSDictionary<NSString *, id> *)properties data:(nullable id)data; 29 30 - (SBObject *) propertyWithCode:(AEKeyword)code; 31 - (SBObject *) propertyWithClass:(Class)cls code:(AEKeyword)code; 32 33 - (SBElementArray *) elementArrayWithCode:(DescType)code; 34 35 - (id) sendEvent:(AEEventClass)eventClass id:(AEEventID)eventID parameters:(DescType)firstParamCode, ...; 36 37 - (void) setTo:(nullable id)value; 38 39 @end 40 41 NS_ASSUME_NONNULL_END