MedM DeviceKit
MedMDeviceManager.h
Go to the documentation of this file.
1 //
2 // MedMDeviceManager.h
3 // MedMDeviceKit
4 //
5 // Copyright (C) 2017 MedM. All rights reserved.
6 //
7 
8 #ifndef MedMDeviceManager_h
9 #define MedMDeviceManager_h
10 
11 #import "AddDeviceCallback.h"
13 #import "DeviceInfo.h"
14 #import "MeasurementType.h"
15 #import "PostponedAddFilter.h"
16 
17 
24 @interface MedMDeviceManager : NSObject
25 
33 - (id<DeviceAddingCancellationToken> _Nonnull)addDevice:(id<AddDeviceCallback> _Nullable)addDeviceCallback : (DeviceInfo *_Nonnull)device;
34 
35 #ifndef NO_MFI
36 
44 - (id<DeviceAddingCancellationToken> _Nonnull)addMFIDevice:(id<AddDeviceCallback> _Nullable)addDeviceCallback : (NSError *_Nullable *_Nullable)error;
45 #endif
46 
55 - (id<DeviceAddingCancellationToken> _Nonnull)addDeviceManually:(id<AddDeviceCallback>_Nullable)pairCallback : (NSString*_Nonnull)address : (NSNumber*_Nonnull)sku;
56 
65 - (BOOL)addDevicePostponed:(NSNumber* _Nonnull)sku : (PostponedAddFilter*_Nonnull)filter : (NSError *_Nullable *_Nullable)error;
66 
72 - (NSArray<DeviceInfo *> * _Nonnull)getDevicesList;
73 
79 - (void)removeDevice:(DeviceInfo * _Nonnull)device;
80 
86 - (void)removeDeviceByAddress:(NSString * _Nonnull)deviceAddress;
87 
92 - (NSArray<NSNumber *> * _Nonnull)getSupportedSKUs;
93 
100 - (NSArray<MeasurementTypeObj * > *_Nonnull)getSupportedMeasurementTypes:(NSNumber *_Nonnull)sku;
101 
108  - (NSString* _Nonnull)getDeviceModelName:(NSNumber * _Nonnull)sku;
109 
116 - (NSString* _Nonnull)getDeviceManufacturer:(NSNumber * _Nonnull)sku;
117 
118 - (NSArray<DeviceSetting*>* _Nonnull)getSettings:(NSNumber*_Nonnull)sku : (NSString*_Nonnull)address;
119 
120 @end
121 
122 #endif /* MedMDeviceManager_h */
Device description.
Definition: DeviceInfo.h:17
Describes filter for postponed adding.
Definition: PostponedAddFilter.h:18
NSArray< DeviceInfo * > *_Nonnull getDevicesList()
Get the list of added devices.
Definition: MedMDeviceManager.mm:141
Definition: MeasurementType.h:28
Represents setting as its kind and fixed array of possible string values.
Definition: DeviceSetting.h:33
Callback to notify that add operation was finished.
Definition: AddDeviceCallback.h:18
Cancellation token – could be used to cancel asynchronous add operation.
Definition: DeviceAddingCancellationToken.h:14
MedM Device Manager is where you can control devices list.
Definition: MedMDeviceManager.h:24
NSArray< NSNumber * > *_Nonnull getSupportedSKUs()
Get list of SKUs supported by this DeviceKit.
Definition: MedMDeviceManager.mm:168