// Copyright 2009 University of Otago. All rights reserved.
//
-#import <Cocoa/Cocoa.h>
-#import <IOKit/hid/IOHIDLib.h>
+#import "NJActionPathElement.h"
-@interface JSAction : NSObject {
- int usage, index;
- void* cookie;
- NSArray *subActions;
- id base;
- NSString *name;
-}
+@interface JSAction : NSObject <NJActionPathElement>
-@property(readwrite) int usage;
-@property(readwrite) void* cookie;
-@property(readonly) int index;
-@property(copy) NSArray* subActions;
-@property(readwrite, strong) id base;
-@property(copy) NSString* name;
-@property(readonly) BOOL active;
+@property (nonatomic, assign) IOHIDElementCookie cookie;
+@property (nonatomic, copy) NSArray *children;
+@property (nonatomic, weak) id base;
+@property (nonatomic, copy) NSString *name;
+@property (nonatomic, assign) BOOL active;
+@property (nonatomic, readonly) float magnitude;
+@property (readonly) NSString *uid;
--(void) notifyEvent: (IOHIDValueRef) value;
--(NSString*) stringify;
--(NSArray*) subActions;
--(id) findSubActionForValue: (IOHIDValueRef) value;
+- (id)initWithName:(NSString *)newName base:(id <NJActionPathElement>)newBase;
+
+- (void)notifyEvent:(IOHIDValueRef)value;
+- (id)findSubActionForValue:(IOHIDValueRef)value;
@end