forked from ccjensen/expandrive-nl-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSKPlugin.h
52 lines (44 loc) · 1.42 KB
/
SKPlugin.h
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
//
// SKPlugin.h
// NetworkLocation
//
// Created by Chris Farber on 2/7/07.
// Copyright 2007 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
/**
* There should be one subclass of SKPlugin in your plugin bundle. This subclass
* should be your bundle's principal class. SKPlugin serves two purposes, the first
* of which is managing certain responsibilites. The second purpose is to inform
* NetworkLocation what actions are provided by the plugin, and hold any common code
* useful to other classes (such as SKAction subclasses).
*/
@class SKAction;
__attribute__((visibility("default")))
@interface SKPlugin : NSObject {
@private
NSBundle * pluginBundle;
NSDictionary * actionsByID;
}
+ (id)pluginForClass:(Class)aClass;
- (id)initInBundle:(NSBundle *)bundle;
- (SKAction *)actionForID:(NSString *)actionID;
- (NSBundle *)bundle;
//Must be overriden
//Return an array of the classes of SKAction in your plugin.
/**
* This is the only method you must implement in your subclass. Since there's no
* good way to autodetect the SKAction subclasses within the bundle, or at least I
* haven't found a suitable way yet, you have to implement this method to let
* NetworkLocation know.
* Here's an example implementation:
*
* - (NSArray *)actions
* {
* return [NSArray arrayWithObject:[MySuperCoolSKActionSubclass class]];
* }
*
* Note that you can use this method
*/
- (NSArray *)actions;
@end