/
EAAccessory.h
49 lines (41 loc) · 1.38 KB
/
EAAccessory.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
//
// EAAccessory.h
// ExternalAccessory
//
// NOTE: Data to the external accessory is automatically wrapped into an iAP
// packet after bring sent to the output stream. The iAP wrapper is
// automatically stripped from incoming packets before being sent to
// the EAAccessory input stream.
//
// Further information related to these wrapper can be found in the
// iAP specifications.
//
// Copyright 2008 Apple, Inc. All rights reserved.
//
@class EAAccessoryInternal;
@protocol EAAccessoryDelegate;
enum {
EAConnectionIDNone = 0,
};
@interface EAAccessory : NSObject {
@private
EAAccessoryInternal *_internal;
}
@property(readonly, getter=isConnected) BOOL connected;
@property(readonly) NSUInteger connectionID;
@property(readonly) NSString *manufacturer;
@property(readonly) NSString *name;
@property(readonly) NSString *modelNumber;
@property(readonly) NSString *serialNumber;
@property(readonly) NSString *firmwareRevision;
@property(readonly) NSString *hardwareRevision;
// Array of strings representing the protocols supported by the accessory
@property(readonly) NSArray *protocolStrings;
@property(retain) id<EAAccessoryDelegate> delegate;
- (id)_initWithAccessory:(EAAccessoryInternal *)accessory;
- (void)_setConnected:(BOOL)connected;
@end
@protocol EAAccessoryDelegate <NSObject>
@optional
- (void)accessoryDidDisconnect:(id)accessory;
@end