|
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
#import "EMConnectionType.h"
#import <Foundation/Foundation.h>
/**
* kEMConnectionManagerDidStartUpdating is the name of a notification that is posted when the list manager begins updating, or scanning, for available devices
*/
extern NSString * const kEMConnectionManagerDidStartUpdating;
/**
* kEMConnectionManagerDidStopUpdating is the name of a notification that is posted when the list manager stops updating, or scanning, for available devices
*/
extern NSString * const kEMConnectionManagerDidStopUpdating;
/**
* EMConnectionListManager is a singleton class used for viewing a list of devices available for interaction.
*/
@interface EMConnectionListManager : NSObject <EMConnectionTypeScannerDelegate>
/**
* @property devices
* A list of devices that has been discovered as available by the connection list manager
*/
@property (nonatomic, strong, readonly) NSArray *devices;
/**
* @property filterPredicate
* A filter that allows only devices conforming to the predicate to be visible
*/
@property (nonatomic, strong) NSPredicate *filterPredicate;
/**
* @property updating
* A boolean value indicating whether or not the connection list manager is actively updating the devices list
*/
@property (nonatomic, getter = isUpdating, readonly) BOOL updating;
/**
* @property updateRate
* updateRate determines the scan frequency for discovering devices
*/
@property (nonatomic) NSTimeInterval updateRate;
/**
* @param automaticallyConnectsToLastDevice
* A boolean value indicating whether or not the connection list manager should automatically connect to the last device it was connected to if it encounters it in a scan.
*/
@property (nonatomic) BOOL automaticallyConnectsToLastDevice;
/**
* Use the +sharedManager to get the singleton, shared instance of EMConnectionListManager
*/
+(EMConnectionListManager *)sharedManager;
/**
* Retrieve a device description for a given unique identifier
* @param name The name of the device
*/
-(EMDeviceBasicDescription *)deviceBasicDescriptionForDeviceNamed:(NSString *)name;
/**
* Tells the connection list manager to begin actively looking for devices to interact with.
*/
-(void)startUpdating;
/**
* Tells the connection list manager to stop looking for devices to interact with.
*/
-(void)stopUpdating;
/**
* Manually clears out all devices on the connection list manager.
*/
-(void)reset;
/**
* Detect if Bluetooth is available
*/
-(BOOL)isBluetoothAvailable;
/**
* Add your own connection type outside of bluetooth low energy
*/
-(void)addConnectionTypeToUpdates:(id<EMConnectionType>)connectionType;
/**
* Remove your own connection type outside of bluetooth low energy
*/
-(void)removeConnectionToFromUpdates:(id<EMConnectionType>)connectionType;
@end
|