Line data Source code
1 0 : /* 2 : 3 : OOJSInterfaceDefinition.h 4 : 5 : 6 : Oolite 7 : Copyright (C) 2004-2013 Giles C Williams and contributors 8 : 9 : This program is free software; you can redistribute it and/or 10 : modify it under the terms of the GNU General Public License 11 : as published by the Free Software Foundation; either version 2 12 : of the License, or (at your option) any later version. 13 : 14 : This program is distributed in the hope that it will be useful, 15 : but WITHOUT ANY WARRANTY; without even the implied warranty of 16 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 : GNU General Public License for more details. 18 : 19 : You should have received a copy of the GNU General Public License 20 : along with this program; if not, write to the Free Software 21 : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 22 : MA 02110-1301, USA. 23 : 24 : */ 25 : 26 : #import "OOJSScript.h" 27 : #include <jsapi.h> 28 : 29 0 : @interface OOJSInterfaceDefinition: OOWeakRefObject 30 : { 31 : @private 32 0 : jsval _callback; 33 0 : JSObject *_callbackThis; 34 0 : OOJSScript *_owningScript; 35 : 36 0 : NSString *_title; 37 0 : NSString *_summary; 38 0 : NSString *_category; 39 : } 40 : 41 0 : - (NSString *)title; 42 0 : - (void)setTitle:(NSString *)title; 43 0 : - (NSString *)category; 44 0 : - (void)setCategory:(NSString *)category; 45 0 : - (NSString *)summary; 46 0 : - (void)setSummary:(NSString *)summary; 47 0 : - (jsval)callback; 48 0 : - (void)setCallback:(jsval)callback; 49 0 : - (JSObject *)callbackThis; 50 0 : - (void)setCallbackThis:(JSObject *)callbackthis; 51 : 52 0 : - (void)runCallback:(NSString *)key; 53 : 54 0 : - (NSComparisonResult)interfaceCompare:(OOJSInterfaceDefinition *)other; 55 : 56 : @end 57 :