capacitor-plugin-ihealth 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/CapacitorPluginIhealth.podspec +35 -0
  2. package/README.md +214 -0
  3. package/android/build.gradle +58 -0
  4. package/android/src/main/AndroidManifest.xml +2 -0
  5. package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealth.java +11 -0
  6. package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealthPlugin.java +22 -0
  7. package/android/src/main/res/.gitkeep +0 -0
  8. package/dist/docs.json +450 -0
  9. package/dist/esm/definitions.d.ts +29 -0
  10. package/dist/esm/definitions.js +2 -0
  11. package/dist/esm/definitions.js.map +1 -0
  12. package/dist/esm/index.d.ts +4 -0
  13. package/dist/esm/index.js +7 -0
  14. package/dist/esm/index.js.map +1 -0
  15. package/dist/esm/web.d.ts +37 -0
  16. package/dist/esm/web.js +42 -0
  17. package/dist/esm/web.js.map +1 -0
  18. package/dist/plugin.cjs.js +58 -0
  19. package/dist/plugin.cjs.js.map +1 -0
  20. package/dist/plugin.js +61 -0
  21. package/dist/plugin.js.map +1 -0
  22. package/ios/Plugin/Info.plist +24 -0
  23. package/ios/Plugin/Plugin-Bridging-Header.h +35 -0
  24. package/ios/Plugin/iHealthSDKHeaders/ABI.h +82 -0
  25. package/ios/Plugin/iHealthSDKHeaders/ABIController.h +28 -0
  26. package/ios/Plugin/iHealthSDKHeaders/ABPM.h +144 -0
  27. package/ios/Plugin/iHealthSDKHeaders/ABPMController.h +25 -0
  28. package/ios/Plugin/iHealthSDKHeaders/AM3.h +188 -0
  29. package/ios/Plugin/iHealthSDKHeaders/AM3Controller.h +29 -0
  30. package/ios/Plugin/iHealthSDKHeaders/AM3SController_V2.h +29 -0
  31. package/ios/Plugin/iHealthSDKHeaders/AM3S_V2.h +227 -0
  32. package/ios/Plugin/iHealthSDKHeaders/AM4.h +223 -0
  33. package/ios/Plugin/iHealthSDKHeaders/AM4Controller.h +31 -0
  34. package/ios/Plugin/iHealthSDKHeaders/AM5.h +335 -0
  35. package/ios/Plugin/iHealthSDKHeaders/AM5Controller.h +30 -0
  36. package/ios/Plugin/iHealthSDKHeaders/AM5Header.h +20 -0
  37. package/ios/Plugin/iHealthSDKHeaders/AMHeader.h +27 -0
  38. package/ios/Plugin/iHealthSDKHeaders/AMMacroFile.h +1171 -0
  39. package/ios/Plugin/iHealthSDKHeaders/BG1.h +53 -0
  40. package/ios/Plugin/iHealthSDKHeaders/BG1Controller.h +46 -0
  41. package/ios/Plugin/iHealthSDKHeaders/BG1S.h +64 -0
  42. package/ios/Plugin/iHealthSDKHeaders/BG1SController.h +25 -0
  43. package/ios/Plugin/iHealthSDKHeaders/BG3.h +83 -0
  44. package/ios/Plugin/iHealthSDKHeaders/BG3Controller.h +28 -0
  45. package/ios/Plugin/iHealthSDKHeaders/BG5.h +158 -0
  46. package/ios/Plugin/iHealthSDKHeaders/BG5Controller.h +28 -0
  47. package/ios/Plugin/iHealthSDKHeaders/BG5S.h +294 -0
  48. package/ios/Plugin/iHealthSDKHeaders/BG5SController.h +29 -0
  49. package/ios/Plugin/iHealthSDKHeaders/BGController.h +32 -0
  50. package/ios/Plugin/iHealthSDKHeaders/BGDevice.h +42 -0
  51. package/ios/Plugin/iHealthSDKHeaders/BGHeader.h +23 -0
  52. package/ios/Plugin/iHealthSDKHeaders/BGMacroFile.h +507 -0
  53. package/ios/Plugin/iHealthSDKHeaders/BP3.h +77 -0
  54. package/ios/Plugin/iHealthSDKHeaders/BP3Controller.h +27 -0
  55. package/ios/Plugin/iHealthSDKHeaders/BP3L.h +58 -0
  56. package/ios/Plugin/iHealthSDKHeaders/BP3LController.h +30 -0
  57. package/ios/Plugin/iHealthSDKHeaders/BP5.h +32 -0
  58. package/ios/Plugin/iHealthSDKHeaders/BP5C.h +131 -0
  59. package/ios/Plugin/iHealthSDKHeaders/BP5CController.h +25 -0
  60. package/ios/Plugin/iHealthSDKHeaders/BP5Controller.h +25 -0
  61. package/ios/Plugin/iHealthSDKHeaders/BP5S.h +97 -0
  62. package/ios/Plugin/iHealthSDKHeaders/BP5SController.h +27 -0
  63. package/ios/Plugin/iHealthSDKHeaders/BP5SRW.h +101 -0
  64. package/ios/Plugin/iHealthSDKHeaders/BP5SRWController.h +26 -0
  65. package/ios/Plugin/iHealthSDKHeaders/BP7.h +141 -0
  66. package/ios/Plugin/iHealthSDKHeaders/BP7Controller.h +25 -0
  67. package/ios/Plugin/iHealthSDKHeaders/BP7S.h +106 -0
  68. package/ios/Plugin/iHealthSDKHeaders/BP7SController.h +32 -0
  69. package/ios/Plugin/iHealthSDKHeaders/BPAV10Device.h +15 -0
  70. package/ios/Plugin/iHealthSDKHeaders/BPBTLEDevice.h +17 -0
  71. package/ios/Plugin/iHealthSDKHeaders/BPBV10Device.h +20 -0
  72. package/ios/Plugin/iHealthSDKHeaders/BPContinua.h +56 -0
  73. package/ios/Plugin/iHealthSDKHeaders/BPContinuaController.h +30 -0
  74. package/ios/Plugin/iHealthSDKHeaders/BPController.h +40 -0
  75. package/ios/Plugin/iHealthSDKHeaders/BPDevice.h +131 -0
  76. package/ios/Plugin/iHealthSDKHeaders/BPHeader.h +54 -0
  77. package/ios/Plugin/iHealthSDKHeaders/BPLoopMeasureSettingModel.h +120 -0
  78. package/ios/Plugin/iHealthSDKHeaders/BPM1AE.h +80 -0
  79. package/ios/Plugin/iHealthSDKHeaders/BPMacroFile.h +247 -0
  80. package/ios/Plugin/iHealthSDKHeaders/BPV24Device.h +16 -0
  81. package/ios/Plugin/iHealthSDKHeaders/BPV25Device.h +17 -0
  82. package/ios/Plugin/iHealthSDKHeaders/ConnectDeviceController.h +27 -0
  83. package/ios/Plugin/iHealthSDKHeaders/DFUController.h +160 -0
  84. package/ios/Plugin/iHealthSDKHeaders/DFUDeviceFirmwareInfo.h +56 -0
  85. package/ios/Plugin/iHealthSDKHeaders/DFUHeader.h +19 -0
  86. package/ios/Plugin/iHealthSDKHeaders/DFUMacro.h +264 -0
  87. package/ios/Plugin/iHealthSDKHeaders/DFUServerFirmwareInfo.h +48 -0
  88. package/ios/Plugin/iHealthSDKHeaders/ECG3.h +94 -0
  89. package/ios/Plugin/iHealthSDKHeaders/ECG3Controller.h +30 -0
  90. package/ios/Plugin/iHealthSDKHeaders/ECG3USB.h +145 -0
  91. package/ios/Plugin/iHealthSDKHeaders/ECG3USBController.h +31 -0
  92. package/ios/Plugin/iHealthSDKHeaders/ECGHeader.h +20 -0
  93. package/ios/Plugin/iHealthSDKHeaders/ECGMacroFile.h +84 -0
  94. package/ios/Plugin/iHealthSDKHeaders/HFSmartLink.h +88 -0
  95. package/ios/Plugin/iHealthSDKHeaders/HFSmartLinkDeviceInfo.h +14 -0
  96. package/ios/Plugin/iHealthSDKHeaders/HS2.h +64 -0
  97. package/ios/Plugin/iHealthSDKHeaders/HS2Controller.h +25 -0
  98. package/ios/Plugin/iHealthSDKHeaders/HS2S.h +399 -0
  99. package/ios/Plugin/iHealthSDKHeaders/HS2SController.h +27 -0
  100. package/ios/Plugin/iHealthSDKHeaders/HS3.h +63 -0
  101. package/ios/Plugin/iHealthSDKHeaders/HS3Controller.h +32 -0
  102. package/ios/Plugin/iHealthSDKHeaders/HS4.h +64 -0
  103. package/ios/Plugin/iHealthSDKHeaders/HS4Controller.h +26 -0
  104. package/ios/Plugin/iHealthSDKHeaders/HS5.h +141 -0
  105. package/ios/Plugin/iHealthSDKHeaders/HS5Controller.h +38 -0
  106. package/ios/Plugin/iHealthSDKHeaders/HSHeader.h +25 -0
  107. package/ios/Plugin/iHealthSDKHeaders/HSMacroFile.h +709 -0
  108. package/ios/Plugin/iHealthSDKHeaders/HealthHeader.h +67 -0
  109. package/ios/Plugin/iHealthSDKHeaders/HealthUser.h +126 -0
  110. package/ios/Plugin/iHealthSDKHeaders/IDOBindEnum.h +49 -0
  111. package/ios/Plugin/iHealthSDKHeaders/IDOBlueDataResponse.h +66 -0
  112. package/ios/Plugin/iHealthSDKHeaders/IDOBlueEnum.h +213 -0
  113. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothBaseModel.h +112 -0
  114. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothEngine.h +283 -0
  115. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothManager.h +166 -0
  116. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothServices.h +75 -0
  117. package/ios/Plugin/iHealthSDKHeaders/IDOCalculateBluetoothModel.h +263 -0
  118. package/ios/Plugin/iHealthSDKHeaders/IDOCommonMacro.h +89 -0
  119. package/ios/Plugin/iHealthSDKHeaders/IDODataExchangeModel.h +128 -0
  120. package/ios/Plugin/iHealthSDKHeaders/IDODataMigrationManager.h +79 -0
  121. package/ios/Plugin/iHealthSDKHeaders/IDOErrorCodeToStr.h +19 -0
  122. package/ios/Plugin/iHealthSDKHeaders/IDOFoundationCommand.h +1178 -0
  123. package/ios/Plugin/iHealthSDKHeaders/IDOGetInfoBluetoothModel.h +1924 -0
  124. package/ios/Plugin/iHealthSDKHeaders/IDOLogEnum.h +165 -0
  125. package/ios/Plugin/iHealthSDKHeaders/IDOPeripheralModel.h +59 -0
  126. package/ios/Plugin/iHealthSDKHeaders/IDORecordDeviceLog.h +56 -0
  127. package/ios/Plugin/iHealthSDKHeaders/IDOSetInfoBluetoothModel.h +1760 -0
  128. package/ios/Plugin/iHealthSDKHeaders/IDOSyncActivityDataModel.h +207 -0
  129. package/ios/Plugin/iHealthSDKHeaders/IDOSyncBpDataModel.h +191 -0
  130. package/ios/Plugin/iHealthSDKHeaders/IDOSyncEnum.h +316 -0
  131. package/ios/Plugin/iHealthSDKHeaders/IDOSyncGpsDataModel.h +133 -0
  132. package/ios/Plugin/iHealthSDKHeaders/IDOSyncHeartRateDataModel.h +442 -0
  133. package/ios/Plugin/iHealthSDKHeaders/IDOSyncManager.h +161 -0
  134. package/ios/Plugin/iHealthSDKHeaders/IDOSyncPressureDataModel.h +158 -0
  135. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSleepDataModel.h +224 -0
  136. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSpo2DataModel.h +175 -0
  137. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSportDataModel.h +221 -0
  138. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSwimDataModel.h +188 -0
  139. package/ios/Plugin/iHealthSDKHeaders/IDOTranEnum.h +93 -0
  140. package/ios/Plugin/iHealthSDKHeaders/IDOTransferFileManager.h +116 -0
  141. package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialInfoModel.h +95 -0
  142. package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialManager.h +75 -0
  143. package/ios/Plugin/iHealthSDKHeaders/IDOWeightBluetoothModel.h +124 -0
  144. package/ios/Plugin/iHealthSDKHeaders/IHSDKCloudUser.h +104 -0
  145. package/ios/Plugin/iHealthSDKHeaders/KN550BT.h +115 -0
  146. package/ios/Plugin/iHealthSDKHeaders/KN550BTController.h +32 -0
  147. package/ios/Plugin/iHealthSDKHeaders/ManageDeviceController.h +34 -0
  148. package/ios/Plugin/iHealthSDKHeaders/NT13B.h +33 -0
  149. package/ios/Plugin/iHealthSDKHeaders/NT13BController.h +28 -0
  150. package/ios/Plugin/iHealthSDKHeaders/NT13BHeader.h +16 -0
  151. package/ios/Plugin/iHealthSDKHeaders/NT13BMacroFile.h +34 -0
  152. package/ios/Plugin/iHealthSDKHeaders/PO1.h +82 -0
  153. package/ios/Plugin/iHealthSDKHeaders/PO1Controller.h +29 -0
  154. package/ios/Plugin/iHealthSDKHeaders/PO3.h +96 -0
  155. package/ios/Plugin/iHealthSDKHeaders/PO3Controller.h +29 -0
  156. package/ios/Plugin/iHealthSDKHeaders/POHeader.h +20 -0
  157. package/ios/Plugin/iHealthSDKHeaders/POMacroFile.h +142 -0
  158. package/ios/Plugin/iHealthSDKHeaders/PT3SBT.h +167 -0
  159. package/ios/Plugin/iHealthSDKHeaders/PT3SBTController.h +27 -0
  160. package/ios/Plugin/iHealthSDKHeaders/PT3SBTMacroFile.h +92 -0
  161. package/ios/Plugin/iHealthSDKHeaders/SDKFlowUpdateDevice.h +196 -0
  162. package/ios/Plugin/iHealthSDKHeaders/SDKInfo.h +30 -0
  163. package/ios/Plugin/iHealthSDKHeaders/SDKUpdateDevice.h +235 -0
  164. package/ios/Plugin/iHealthSDKHeaders/ScanDeviceController.h +47 -0
  165. package/ios/Plugin/iHealthSDKHeaders/THV3.h +104 -0
  166. package/ios/Plugin/iHealthSDKHeaders/THV3Controller.h +30 -0
  167. package/ios/Plugin/iHealthSDKHeaders/THV3Macro.h +17 -0
  168. package/ios/Plugin/iHealthSDKHeaders/TS28B.h +26 -0
  169. package/ios/Plugin/iHealthSDKHeaders/TS28BController.h +142 -0
  170. package/ios/Plugin/iHealthSDKHeaders/TS28BHeader.h +15 -0
  171. package/ios/Plugin/iHealthSDKHeaders/iHealthHS6.h +174 -0
  172. package/ios/Plugin/ihealth.swift +8 -0
  173. package/ios/Plugin/ihealthPlugin.h +10 -0
  174. package/ios/Plugin/ihealthPlugin.m +16 -0
  175. package/ios/Plugin/ihealthPlugin.swift +1502 -0
  176. package/ios/Plugin/libiHealthSDK2.7.8.a +0 -0
  177. package/ios/Plugin/test.m +9 -0
  178. package/package.json +78 -0
@@ -0,0 +1,27 @@
1
+ //
2
+ // HS2SController.h
3
+ // iHealthSDKStatic
4
+ //
5
+ // Created by jing on 2019/4/30.
6
+ // Copyright © 2019 ihealthSDK. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ NS_ASSUME_NONNULL_BEGIN
12
+ /**
13
+ HS2SController
14
+ */
15
+ @interface HS2SController : NSObject
16
+ /**
17
+ * Initialize HS2S controller class
18
+ */
19
+ +(HS2SController *)shareIHHS2SController;
20
+
21
+ /**
22
+ * Get all scale instance,use hsInstance to call HS related communication methods.
23
+ */
24
+ -(NSArray *)getAllCurrentHS2SInstace;
25
+ @end
26
+
27
+ NS_ASSUME_NONNULL_END
@@ -0,0 +1,63 @@
1
+ //
2
+ // HS3.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by daiqingquan on 13-10-10.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "HSMacroFile.h"
11
+
12
+
13
+ /**
14
+ HS3
15
+ */
16
+ @interface HS3 : NSObject
17
+ @property (retain, nonatomic) NSString *currentUUID;
18
+ @property (retain, nonatomic) NSString *deviceID;
19
+ @property (retain, nonatomic) NSString *modelNumber;
20
+ @property (retain, nonatomic) NSDictionary *commInfoDic;
21
+ @property (retain, nonatomic) NSString *firmwareVersion;
22
+
23
+
24
+
25
+ -(void)commandInitMeasureWeightID:(WeightID)weightID FinishInit:(FinishHS3Init)finishInit DisposeErrorBlock:(DisposeHS3ErrorBlock)disposeHS3ErrorBlock;
26
+
27
+
28
+ /**
29
+ Establish memory and measurement connection
30
+ The measurement via SDK will be operated in the case of 1-4, and will be terminated if any of 5-8 occurs. The interface needs to be re-called after analyzing the return parameters.
31
+
32
+ @param startTransmission Start Memory transmission,Success: Yes,Fail: No.
33
+ @param hs3UploadDataNum MemoryNumber,Range:0~200.
34
+ @param progress Memory transmission progress,Range:0.0~1.0.
35
+ @param memorryData Record data including weight(kg)[Range:0.0~150.0], measure time,coordinated key:weight、date.
36
+ @param finishTransmission Finish memory transmission.
37
+ @param stableWeight weight (Kg) [value range:0.0~150.0]
38
+ @param disposeHS3ErrorBlock Error code in measurement process
39
+ */
40
+ -(void)commandInitWithUser:(StartHS3Transmission)startTransmission UploadDataNum:(DisposeHS3UploadDataNum)hs3UploadDataNum DisposeProgress:(DisposeHS3Progress)progress MemorryData:(HS3MemorryData)memorryData FinishTransmission:(FinishHS3Transmission)finishTransmission StableWeight:(StableHS3Weight)stableWeight DisposeErrorBlock:(DisposeHS3ErrorBlock)disposeHS3ErrorBlock;
41
+
42
+ /**
43
+ Turn off Bluetooth Connection
44
+ This method can be called only for hsInstance.HS3 with FirmwareVersion>=1.0.2
45
+ Return parameters:
46
+ @param disposeResult — ‘YES’ means measurement has been terminated, ‘NO’ means termination failed.
47
+ @param disposeHS3ErrorBlock - refer to “error” : HS3 error instruction.
48
+ */
49
+ -(void)commandTurnOffBTConnectAutoResult:(DisposeResult)disposeResult DisposeErrorBlock:(DisposeHS3ErrorBlock)disposeHS3ErrorBlock;
50
+
51
+
52
+
53
+ /**
54
+ Turn on Bluetooth Connection
55
+ This method can be called only for hsInstance.HS3 with FirmwareVersion>=1.0.2
56
+ Return parameters:
57
+ @param disposeResult ‘YES’ means measurement has been terminated, ‘NO’ means termination failed.
58
+ @param disposeHS3ErrorBlock refer to “error” : HS3 error instruction.
59
+
60
+ */
61
+ -(void)commandTurnOnBTConnectAutoResult:(DisposeResult)disposeResult DisposeErrorBlock:(DisposeHS3ErrorBlock)disposeHS3ErrorBlock;
62
+
63
+ @end
@@ -0,0 +1,32 @@
1
+ //
2
+ // HS3Controller.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by daiqingquan on 13-10-10.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+
12
+ /**
13
+ HS3Controller
14
+ */
15
+ @interface HS3Controller : NSObject{
16
+
17
+ NSMutableArray *hs3Array;
18
+ }
19
+
20
+ /**
21
+ * Initialize HS3 controller class
22
+ */
23
+
24
+ +(HS3Controller *)shareIHHs3Controller;
25
+
26
+ /**
27
+ * Get all scale instance,use hsInstance to call HS related communication methods.
28
+ */
29
+ -(NSArray *)getAllCurrentHS3Instace;
30
+
31
+
32
+ @end
@@ -0,0 +1,64 @@
1
+ //
2
+ // HS4.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by daiqingquan on 13-12-2.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "HSMacroFile.h"
11
+
12
+
13
+ /**
14
+ HS4
15
+ */
16
+ @interface HS4 : NSObject
17
+ @property (strong, nonatomic) NSString *currentUUID;
18
+ @property (strong, nonatomic) NSString *deviceID;
19
+ @property (strong, nonatomic) NSNumber *daiModel;
20
+ @property (retain, nonatomic) NSString *firmwareVersion;
21
+
22
+
23
+ /**
24
+ Establish memory and measurement connection
25
+ Import parameter:
26
+ @param tempUnit Unit displayed on HS4: HSUnit_Kg、HSUnit_LB、HSUnit_ST。
27
+ Return parameters:
28
+ The measurement via SDK will be operated in the case of 1-4, and will be terminated if any of 5-8 occurs. The interface needs to be re-called after analyzing the return parameters.
29
+ @param unStableWeight Current weight, (Kg) [Value Range:0~180]
30
+ @param stableWeight Stable weight, (Kg) [Value Range:0~180]
31
+ @param disposeErrorBlock error code
32
+ */
33
+ -(void)commandMeasureWithUint:(HSUnit)tempUnit Weight:(UnStableWeight)unStableWeight StableWeight:(StableWeight)stableWeight DisposeErrorBlock:(DisposeHS4ErrorBlock)disposeErrorBlock;
34
+
35
+
36
+
37
+ /**
38
+ Upload memory data
39
+
40
+ Return parameters:
41
+ @param startTransmission Start Memory transmission.
42
+ @param progress Memory transmission progress,[Range:0.0~1.0].
43
+ @param memorryData Record data including weight (kg), measurement time,coordinated key:weight,date.[Range of weight 0.0~180.0(kg)]
44
+ @param finishTransmission Finish memory transmission.
45
+ @param disposeErrorBlock Record the error code in uploading process.
46
+ */
47
+ -(void)commandTransferMemorryData:(StartHS4Transmission)startTransmission DisposeProgress:(DisposeProgress)progress MemorryData:(MemorryData)memorryData FinishTransmission:(FinishHS4Transmission)finishTransmission DisposeErrorBlock:(DisposeHS4ErrorBlock)disposeErrorBlock;
48
+
49
+ /**
50
+ * End Current Measure Connection
51
+ * @param result - the result of end current action
52
+ * @param disposeErrorBlock - error code
53
+ * Error code definition ---refer to “error” : HS4 error instruction.
54
+ */
55
+
56
+ -(void)commandEndCurrentConnection:(DisposeResult)result DisposeErrorBlock:(DisposeHS4ErrorBlock)disposeErrorBlock;
57
+
58
+ /**
59
+ Disconnect current device
60
+ */
61
+
62
+ -(void)commandDisconnectDevice;
63
+
64
+ @end
@@ -0,0 +1,26 @@
1
+ //
2
+ // HS4Controller.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by daiqingquan on 13-12-2.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+
11
+ /**
12
+ HS4Controller
13
+ */
14
+ @interface HS4Controller : NSObject
15
+
16
+ /**
17
+ * Initialize HS4 controller class
18
+ */
19
+ +(HS4Controller *)shareIHHs4Controller;
20
+
21
+ /**
22
+ * Get all scale instance,use hsInstance to call HS related communication methods.
23
+ */
24
+ -(NSArray *)getAllCurrentHS4Instace;
25
+
26
+ @end
@@ -0,0 +1,141 @@
1
+ //
2
+ // HS5.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by zhiwei jing on 13-10-22.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "HealthUser.h"
11
+ #import "HSMacroFile.h"
12
+
13
+
14
+
15
+ /**
16
+ HS5
17
+ */
18
+ @interface HS5 : NSObject
19
+
20
+ @property (retain, nonatomic) NSString *currentUUID;
21
+ @property (retain, nonatomic) NSString *deviceID;
22
+ @property (retain, nonatomic) NSString *firmwareVersion;
23
+ @property (retain, nonatomic) NSString *modelNumber;
24
+
25
+
26
+
27
+ /**
28
+ Establish memory and measurement connection
29
+
30
+ Import Parameters:
31
+ @param tempUser included properties: userAccount、clientID、clientSecret。
32
+ userAccount: either email or mobile phone number (mobile phone number is not currently supported yet)
33
+ height: the height of a user (cm);
34
+ clientID & clientSecret: the only identification for users of the SDK, requires registration from iHealth administrator, please email: heguangming@ihealthlabs.com.cn for more information.
35
+
36
+ Return Parameters:
37
+ The measurement via SDK will be operated in the case of 1-3, and will be terminated if any of 4-8 occurs. The interface needs to be re-called after analyzing the return parameters.
38
+ Notice: when a new user registers via SDK, an ‘iHealth disclaimer’ will pop up automatically, and will require the user to agree in order to continue. SDK applications require an Internet connection; UserAuthen_TrySuccess is invalidate for HS5.
39
+ @param serialNub The only identification of a user,should be reserved in third party apps,provide to other Apps [Range:0~0xFFFFFFF]
40
+ @param MemorryUserListHS5Data Existing user info in HS5,including serialNub、Position of users. Related key: serialNumber、position
41
+ @param disposeErrorBlock error codes in transmission process: Errors in HS5
42
+ */
43
+ -(void)commandCreateUserManageConnectWithUser:(HealthUser *)tempUser currentUserSerialNub:(CurrentSerialNub)serialNub deviceUserList:(MemorryUserListHS5Data) MemorryUserListHS5Data Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock;
44
+
45
+ /**
46
+ * Create new user
47
+ * Use the function if the SerialNub of current user is not included in user list of HS5 and the user number is less than 20
48
+ * Import parameters:
49
+ * @param tempUser - included properties: serialNub、age、birthday、height、isAthlete、sex。
50
+ * serialNub: The only identification for user [Range:0~0x7FFFFFFF]
51
+ * age:user's age Range:7~99
52
+ * birthday: User’s birthday, NSDate
53
+ * height: User’s height, (cm) Range:81~219
54
+ * isAthlete: If user is an athelete, UserIsAthelete_No: no, UserIsAthelete_Yes: Yes
55
+ * sex: User’s sex, UserSex_Female: female, UserSex_Male: male
56
+ * @param tempPosition - Position of user, range: 0~19, pick from empty position that has never been occupied
57
+ * Return Parameters:
58
+ * @param disposeHS5Result - Success:Yes,Fail:No.
59
+ * @param disposeErrorBlock - error codes in transmission process: Errors in HS5
60
+ */
61
+ -(void)commandCreateUser:(HealthUser *)tempUser position:(uint8_t )tempPosition DisposeHS5Result:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock;
62
+
63
+
64
+ /**
65
+ * Edit User Info
66
+ * If the SerialNub of current user already exists in the user list of HS5, this will be used when user info is changed.
67
+ *Import Parameters:
68
+ * @param tempUser - included properties: serialNub、birthday、height、isAthlete、sex,instructions refer to “new user Api”.
69
+ *Return Parameters:
70
+ * @param disposeHS5Result - Success:Yes,Fail:No.
71
+ * @param disposeErrorBlock - error codes in transmission process: Errors in HS5
72
+ */
73
+ -(void)commandModifyUser:(HealthUser *)tempUser DisposeHS5Result:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock;
74
+
75
+ /**
76
+ * Delete Specified User
77
+ * This will be used deleting account in HS5.
78
+ *Import Parameters:
79
+ * @param tempUser - included properties: serialNub,instructions refer to “new user Api”.
80
+ *Return Parameters:
81
+ * @param disposeHS5Result - Success:Yes,Fail:No.
82
+ * @param disposeErrorBlock - error codes in transmission proces: Errors in HS5
83
+ */
84
+ -(void)commandDelteUser:(HealthUser *)tempUser DisposeHS5Result:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock;
85
+
86
+
87
+
88
+
89
+ /**
90
+ Create memory upload connection
91
+ Import Parameters:
92
+ @param tempUser included properties: serialNub [Range:0~0x7FFFFFFF],instructions refer to “new user Api”.
93
+ Return Parameters:
94
+ @param disposeHS5Result Success:Yes,Fail:No.
95
+ @param startTransmission Finish memory transmission.
96
+ @param progress Memory transmission progress,0.0~1.0.
97
+ @param memorryData Record data,More details and key refer Measure API. Additionally add time-measure property, related key: date.dataID
98
+ @param finishTransmission Finish Memory Transmission
99
+ @param disposeErrorBlock error codes in transmission process: Errors in HS5
100
+ */
101
+ -(void)commandCreateMemoryWithUser:(HealthUser *)tempUser uploadConnect: (DisposeHS5Result)disposeHS5Result TransferMemorryData:(StartHS5Transmission)startTransmission DisposeProgress:(DisposeHS5Progress)progress MemorryData:(MemorryHS5Data)memorryData FinishTransmission:(FinishHS5Transmission)finishTransmission Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock;
102
+
103
+
104
+ /**
105
+ * Establish Measurement Connection
106
+ * Import Parameters:
107
+ * @param tempUser - included properties: serialNub [Range:0~0x7FFFFFFF]、height,instructions refer to “new user Api”.
108
+ * Return Parameters:
109
+ * @param unStableHS5Weight - Current weight, (kg) [Value Range:0.0~150.0]
110
+ * @param stableHS5Weight - Stable weight, (kg) [Value Range:0.0~150.0]
111
+ * @param impedanceWeight - Weight by impedence, (kg)[Value Range:0.0~150.0]
112
+ * @param bodyCompositionMeasurements - body info, includes weight(kg) Range:0.0~150.0, fat content(%) Rnage:0.0~100.0, water content(%) Range:0.0~100.0, muscle content(%) Rnage:0.0~100.0, bone mass Range:0.0~25.5, visceral fat level Range:0~255, DCI(Kcal) Range:0~65535. keys: weight, weightFatValue, waterValue, muscleValue, skeletonValue, VFatLevelValue, DCIValue, dataID
113
+ * @param disposeErrorBlock - error codes in transmission process: Errors in HS5
114
+ */
115
+
116
+ -(void)commandCreateMeasureWithUser:(HealthUser *)tempUser unStableWeight:(UnStableHS5Weight)unStableHS5Weight MeasureWeight:(StableHS5Weight)stableHS5Weight ImpedanceType:(ImpedanceWeight)impedanceWeight BodyCompositionMeasurements:(BodyCompositionMeasurements)bodyCompositionMeasurements Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock;
117
+
118
+
119
+
120
+
121
+ /**
122
+ Stop Current Action and disconnect
123
+ Return Parameters:
124
+ @param disposeHS5Result Success:Yes,Fail:No.
125
+ @param disposeErrorBlock error codes in endCurrentConnect: Errors in HS5
126
+ */
127
+ -(void)commandEndCurrentConnect:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock;
128
+ /**
129
+ * Clean HS5
130
+ * Explanation:Delete current Auten Device and then rebuild connection.
131
+ * Return Parameters:
132
+ * @param disposeHS5Result - Success:Yes,Fail:No.
133
+ * @param disposeErrorBlock - error codes in transmission process: Errors in HS5
134
+ */
135
+ -(void)commandcleanDeviceDisposeHS5Result:(DisposeHS5Result)disposeHS5Result Disposehs5ErrorBlock:(DisposeHS5ErrorBlock)disposeErrorBlock;
136
+
137
+ /**
138
+ * Rebuild UDP connection
139
+ */
140
+ -(void)commandRebuildUdpLinker;
141
+ @end
@@ -0,0 +1,38 @@
1
+ //
2
+ // HS5Controller.h
3
+ // testShareCommunication
4
+ //
5
+ // Created by zhiwei jing on 13-10-22.
6
+ // Copyright (c) 2013年 my. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import "HSMacroFile.h"
11
+
12
+
13
+ /**
14
+ HS5Controller
15
+ */
16
+ @interface HS5Controller : NSObject
17
+
18
+ /**
19
+ * Initialize HS5 controller class
20
+ */
21
+ +(HS5Controller *)shareIHHs5Controller;
22
+
23
+ /**
24
+ * Get all scale instance,use hsInstance to call HS related communication methods.
25
+ */
26
+ -(NSArray *)getAllCurrentHS5Instace;
27
+
28
+ //Acquire HS5 data from cloud
29
+ //When connected to the internet, HS5 could upload measurement to cloud to be recorded. Get data in cloud using the below API.
30
+ -(void)getDownloadDataFromCloud:(BlockDataFromCloud )dataBlock;
31
+
32
+ /*Start search HS5*/
33
+ -(void)commandStartSearchScale;
34
+
35
+ /*Stop search HS5*/
36
+ -(void)commandStopSearchScale;
37
+
38
+ @end
@@ -0,0 +1,25 @@
1
+ //
2
+ // HSHeader.h
3
+ // HSDemoCode
4
+ //
5
+ // Created by zhiwei jing on 14-7-28.
6
+ // Copyright (c) 2014年 zhiwei jing. All rights reserved.
7
+ //
8
+
9
+ #ifndef HSDemoCode_HSHeader_h
10
+ #define HSDemoCode_HSHeader_h
11
+
12
+ #import "HealthUser.h"
13
+ #import "HS3.h"
14
+ #import "HS2.h"
15
+ #import "HS4.h"
16
+ #import "HS5.h"
17
+ #import "HS3Controller.h"
18
+ #import "HS2Controller.h"
19
+ #import "HS4Controller.h"
20
+ #import "HS5Controller.h"
21
+ #import "HSMacroFile.h"
22
+ #import "iHealthHS6.h"
23
+ #import "HS2S.h"
24
+ #import "HS2SController.h"
25
+ #endif