diff options
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HealthUser.h')
| -rw-r--r-- | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HealthUser.h | 126 |
1 files changed, 126 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HealthUser.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HealthUser.h new file mode 100644 index 0000000..03fc9f9 --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HealthUser.h | |||
| @@ -0,0 +1,126 @@ | |||
| 1 | // | ||
| 2 | // HealthUser.h | ||
| 3 | // iHealthDemoCode | ||
| 4 | // | ||
| 5 | // Created by jing on 16/5/13. | ||
| 6 | // Copyright © 2016年 zhiwei jing. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import <Foundation/Foundation.h> | ||
| 10 | |||
| 11 | |||
| 12 | typedef enum{ | ||
| 13 | UserAuthen_RegisterSuccess = 1,//New-user registration succeeded | ||
| 14 | UserAuthen_LoginSuccess,// User login succeeded | ||
| 15 | UserAuthen_CombinedSuccess,// The user is iHealth user as well, measurement via SDK has been activated, and the data from the measurement belongs to the user | ||
| 16 | UserAuthen_TrySuccess,//Testing without Internet connection succeeded | ||
| 17 | UserAuthen_InvalidateUserInfo,//Userid/clientID/clientSecret verification failed | ||
| 18 | UserAuthen_SDKInvalidateRight,//SDK has not been authorized | ||
| 19 | UserAuthen_UserInvalidateRight,//User has not been authorized | ||
| 20 | UserAuthen_InternetError,//Internet error, verification failed | ||
| 21 | UserAuthen_AppSecretVerifySuccess, // appsecrect is right | ||
| 22 | UserAuthen_AppSecretVerifyFailed, //appsecrect error | ||
| 23 | UserAuthen_InputError, //Input error | ||
| 24 | UserAuthen_CertificateExpired, //Certificate expired | ||
| 25 | UserAuthen_InvalidCertificate, //Invalid certificate | ||
| 26 | }UserAuthenResult; | ||
| 27 | |||
| 28 | //User | ||
| 29 | typedef enum{ | ||
| 30 | LengthUnit_Mile = 0, | ||
| 31 | LengthUnit_Kilometer, | ||
| 32 | }LengthUnit; | ||
| 33 | |||
| 34 | typedef enum{ | ||
| 35 | UserSex_Female = 0, | ||
| 36 | UserSex_Male, | ||
| 37 | }UserSex; | ||
| 38 | |||
| 39 | typedef enum{ | ||
| 40 | UserType_Guest = 0, | ||
| 41 | UserType_Normal, | ||
| 42 | }HS2SUserType; | ||
| 43 | typedef enum{ | ||
| 44 | HS2SImpedanceMark_NO = 0, | ||
| 45 | HS2SImpedanceMark_YES, | ||
| 46 | }HS2SImpedanceMark; | ||
| 47 | typedef enum{ | ||
| 48 | HS2SFitnessMark_NO = 0, | ||
| 49 | HS2SFitnessMark_YES, | ||
| 50 | }HS2SFitnessMark; | ||
| 51 | |||
| 52 | typedef enum{ | ||
| 53 | HSUnit_Kg = 1, //kg | ||
| 54 | HSUnit_LB, //lb | ||
| 55 | HSUnit_ST //st | ||
| 56 | }HSUnit; | ||
| 57 | |||
| 58 | typedef enum{ | ||
| 59 | UserIsAthelete_No = 0, //No athelete | ||
| 60 | UserIsAthelete_Yes //athelete | ||
| 61 | }UserIsAthelete; | ||
| 62 | |||
| 63 | |||
| 64 | typedef enum{ | ||
| 65 | AppSecretVerifySucess = 1, | ||
| 66 | AppSecretVerifyFailed | ||
| 67 | }AppSecretVerifyStatus; | ||
| 68 | |||
| 69 | typedef enum{ | ||
| 70 | iHealthSDK_BP= 0, | ||
| 71 | iHealthSDK_BG, | ||
| 72 | iHealthSDK_HS, | ||
| 73 | iHealthSDK_PO, | ||
| 74 | iHealthSDK_AM, | ||
| 75 | iHealthSDK_ECG, | ||
| 76 | iHealthSDK_TH, | ||
| 77 | iHealthSDK_All | ||
| 78 | }SDKDeviceAccessType; | ||
| 79 | |||
| 80 | typedef void(^DisposeSDKUserDeviceAccess)(NSArray*DeviceAccessArray); | ||
| 81 | |||
| 82 | typedef void(^DisposeSDKUserValidationSuccess)(UserAuthenResult result); | ||
| 83 | |||
| 84 | typedef void(^DisposeSDKUserValidationReturn)(NSString *userID); | ||
| 85 | |||
| 86 | typedef void (^DisposeSDKUserValidationErrorBlock)(UserAuthenResult errorID); | ||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | @interface HealthUser : NSObject | ||
| 91 | |||
| 92 | |||
| 93 | @property (nonatomic, strong) NSString * clientID; | ||
| 94 | @property (nonatomic, strong) NSString * clientSecret; | ||
| 95 | @property (nonatomic, strong) NSString * userID; | ||
| 96 | @property (nonatomic, strong) NSString * userAccount; | ||
| 97 | @property (nonatomic, strong) NSString * certificatePath; | ||
| 98 | @property (nonatomic, strong) NSString * certificateSecret; | ||
| 99 | |||
| 100 | @property (nonatomic, strong) NSNumber * serialNub; | ||
| 101 | @property (nonatomic, strong) NSDate *birthday; | ||
| 102 | @property (nonatomic, strong) NSNumber *age; | ||
| 103 | |||
| 104 | //unit:cm | ||
| 105 | @property (nonatomic, strong) NSNumber * height; | ||
| 106 | //kg | ||
| 107 | @property (strong, nonatomic)NSNumber *weight; | ||
| 108 | //invalidate | ||
| 109 | @property (strong, nonatomic)NSNumber *bmr; | ||
| 110 | //activityLevel=1, Sedentary,spend most of day sitting. | ||
| 111 | //activityLevel=2, Active,spend a good part of day doing some physical activity. | ||
| 112 | //activityLevel=3, Very Active,spend most of day doing heavy physical activity. | ||
| 113 | @property (strong, nonatomic)NSNumber *activityLevel; | ||
| 114 | |||
| 115 | @property UserIsAthelete isAthlete; | ||
| 116 | @property UserSex sex; | ||
| 117 | @property LengthUnit lengthUnit; | ||
| 118 | |||
| 119 | @property HS2SUserType userType; | ||
| 120 | @property HS2SImpedanceMark impedanceMark; | ||
| 121 | @property HS2SFitnessMark fitnessMark; | ||
| 122 | @property NSInteger newDevice; | ||
| 123 | @property NSInteger createTS; | ||
| 124 | @property (nonatomic, strong) NSData * hs2SUserID; | ||
| 125 | |||
| 126 | @end | ||
