diff options
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AMMacroFile.h')
| -rwxr-xr-x | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AMMacroFile.h | 1171 |
1 files changed, 1171 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AMMacroFile.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AMMacroFile.h new file mode 100755 index 0000000..dbe0a96 --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/AMMacroFile.h | |||
| @@ -0,0 +1,1171 @@ | |||
| 1 | // | ||
| 2 | // AMMacroFile.h | ||
| 3 | // AMDemoCode | ||
| 4 | // | ||
| 5 | // Created by zhiwei jing on 14-8-12. | ||
| 6 | // Copyright (c) 2014年 zhiwei jing. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import "HealthUser.h" | ||
| 10 | |||
| 11 | #ifndef AMDemoCode_AMMacroFile_h | ||
| 12 | #define AMDemoCode_AMMacroFile_h | ||
| 13 | |||
| 14 | |||
| 15 | #define AM3Discover @"AM3Discover" | ||
| 16 | #define AM3ConnectFailed @"AM3ConnectFailed" | ||
| 17 | #define AM3ConnectNoti @"AM3ConnectNoti" | ||
| 18 | #define AM3DisConnectNoti @"AM3DisConnectNoti" | ||
| 19 | |||
| 20 | #define AM3SDiscover @"AM3SDiscover" | ||
| 21 | #define AM3SConnectFailed @"AM3SConnectFailed" | ||
| 22 | #define AM3SConnectNoti @"AM3SConnectNoti" | ||
| 23 | #define AM3SDisConnectNoti @"AM3SDisConnectNoti" | ||
| 24 | |||
| 25 | #define AM4Discover @"AM4Discover" | ||
| 26 | #define AM4ConnectFailed @"AM4ConnectFailed" | ||
| 27 | #define AM4ConnectNoti @"AM4ConnectNoti" | ||
| 28 | #define AM4DisConnectNoti @"AM4DisConnectNoti" | ||
| 29 | |||
| 30 | #define AMDeviceID @"ID" | ||
| 31 | #define AMSDKSportRightApi @"OpenApiActivity" | ||
| 32 | #define AMSDKSleepRightApi @"OpenApiSleep" | ||
| 33 | |||
| 34 | #define AM5Discover @"AM5Discover" | ||
| 35 | #define AM5ConnectFailed @"AM5ConnectFailed" | ||
| 36 | #define AM5ConnectNoti @"AM5ConnectNoti" | ||
| 37 | #define AM5DisConnectNoti @"AM5DisConnectNoti" | ||
| 38 | #define AM5Device @"AM5Device" | ||
| 39 | #define AM5Distance @"AM5Distance" | ||
| 40 | |||
| 41 | |||
| 42 | //cloud | ||
| 43 | #define AMDate @"AMDate" | ||
| 44 | #define AMCalorie @"AMcalorie" | ||
| 45 | #define AMStepNum @"AMstepNum" | ||
| 46 | #define AMStepSize @"AMstepSize" | ||
| 47 | //cloud | ||
| 48 | |||
| 49 | |||
| 50 | /////////////////////////////////////////////////////////////// | ||
| 51 | |||
| 52 | //AM3 | ||
| 53 | |||
| 54 | /////////////////////////////////////////////////////////////// | ||
| 55 | |||
| 56 | |||
| 57 | #define AM3TimeInterval @"TimeInterval" | ||
| 58 | |||
| 59 | #define AM3ActiveHistoryDateYear @"ActiveHistoryDateYear" | ||
| 60 | #define AM3ActiveHistoryDateMonth @"ActiveHistoryDateMonth" | ||
| 61 | #define AM3ActiveHistoryDateDay @"ActiveHistoryDateDay" | ||
| 62 | #define AM3ActiveHistoryTotoalNum @"ActiveHistoryTotoalNum" | ||
| 63 | #define AM3ActiveStepSize @"ActiveStepSize" | ||
| 64 | |||
| 65 | #define AM3SleepHistoryDateYear @"SleepHistoryDateYear" | ||
| 66 | #define AM3SleepHistoryDateMonth @"SleepHistoryDateMonth" | ||
| 67 | #define AM3SleepHistoryDateDay @"SleepHistoryDateDay" | ||
| 68 | #define AM3SleepHistoryDateHour @"SleepHistoryDateHour" | ||
| 69 | #define AM3SleepHistoryDateMinute @"SleepHistoryDateMinute" | ||
| 70 | #define AM3SleepHistoryDateSeconds @"SleepHistoryDateSeconds" | ||
| 71 | #define AM3SleepHistoryTotoalNum @"SleepHistoryTotoalNum" | ||
| 72 | |||
| 73 | |||
| 74 | /** | ||
| 75 | AM3 error code | ||
| 76 | */ | ||
| 77 | typedef NS_ENUM(NSUInteger, AM3ErrorID) { | ||
| 78 | /// Communication error | ||
| 79 | AM3Error_OverTime = 0, | ||
| 80 | /// You did not receive a response within a certain period of time, usually clogged Bluetooth | ||
| 81 | AM3Error_NoRespond, | ||
| 82 | /// Reset failed | ||
| 83 | AM3Error_ResetDeviceFaild, | ||
| 84 | /// AM disconnect | ||
| 85 | AM3Error_Disconnect, | ||
| 86 | /// ParameterError | ||
| 87 | AM3Error_ParameterError = 400, | ||
| 88 | /// firmware version is not supported | ||
| 89 | AM3Error_FirmwareVersionIsNotSupported | ||
| 90 | }; | ||
| 91 | |||
| 92 | |||
| 93 | /** | ||
| 94 | AM3 Time Format | ||
| 95 | */ | ||
| 96 | typedef NS_ENUM(NSUInteger, AM3TimeFormat) { | ||
| 97 | /// 12 | ||
| 98 | AM3TimeFormat_hh, | ||
| 99 | /// 24 | ||
| 100 | AM3TimeFormat_HH | ||
| 101 | }; | ||
| 102 | |||
| 103 | /** | ||
| 104 | AM3 State Unit | ||
| 105 | */ | ||
| 106 | typedef NS_ENUM(NSUInteger, AM3StateUnit){ | ||
| 107 | /// mile | ||
| 108 | AM3StateUnit_mile, | ||
| 109 | /// km | ||
| 110 | AM3StateUnit_km | ||
| 111 | }; | ||
| 112 | |||
| 113 | |||
| 114 | /** | ||
| 115 | AM3 State Model | ||
| 116 | */ | ||
| 117 | typedef NS_ENUM(NSUInteger, AM3StateModel){ | ||
| 118 | /// sleep | ||
| 119 | AM3StateModel_sleep, | ||
| 120 | /// active | ||
| 121 | AM3StateModel_active, | ||
| 122 | /// fly | ||
| 123 | AM3StateModel_fly, | ||
| 124 | /// drive | ||
| 125 | AM3StateModel_drive | ||
| 126 | }; | ||
| 127 | |||
| 128 | /** | ||
| 129 | AM3 State Info | ||
| 130 | */ | ||
| 131 | typedef NS_ENUM(NSUInteger, AM3StateInfo){ | ||
| 132 | /// waist | ||
| 133 | AM3StateInfo_waist, | ||
| 134 | /// wrist | ||
| 135 | AM3StateInfo_wrist, | ||
| 136 | /// sleep | ||
| 137 | AM3StateInfo_sleep | ||
| 138 | }; | ||
| 139 | |||
| 140 | |||
| 141 | |||
| 142 | /** | ||
| 143 | Error Block | ||
| 144 | |||
| 145 | @param errorID AM3ErrorID descriptions | ||
| 146 | */ | ||
| 147 | typedef void (^DisposeAM3ErrorBlock)(AM3ErrorID errorID); | ||
| 148 | |||
| 149 | |||
| 150 | /** | ||
| 151 | get user ID | ||
| 152 | |||
| 153 | @param userID userID | ||
| 154 | */ | ||
| 155 | typedef void (^DisposeAM3GetDeviceUserIDBlock)(unsigned int userID); | ||
| 156 | |||
| 157 | |||
| 158 | /** | ||
| 159 | sync time | ||
| 160 | |||
| 161 | @param resetSuc yes:success no:fail | ||
| 162 | */ | ||
| 163 | typedef void (^DisposeAM3SyncTimeBlock)(BOOL resetSuc); | ||
| 164 | |||
| 165 | |||
| 166 | /** | ||
| 167 | get dateFormatter | ||
| 168 | |||
| 169 | @param timeFormat AM3TimeFormat description | ||
| 170 | */ | ||
| 171 | typedef void (^DisposeAM3TimeFormatBlock)(AM3TimeFormat timeFormat); | ||
| 172 | |||
| 173 | |||
| 174 | |||
| 175 | /** | ||
| 176 | set timeFormat | ||
| 177 | |||
| 178 | @param resetSuc yes:success no:fail | ||
| 179 | */ | ||
| 180 | typedef void (^DisposeAM3TimeFormatSettingBlock)(BOOL resetSuc); | ||
| 181 | |||
| 182 | |||
| 183 | |||
| 184 | /** | ||
| 185 | set userID | ||
| 186 | |||
| 187 | @param resetSuc yes:success no:fail | ||
| 188 | */ | ||
| 189 | typedef void (^DisposeAM3SetDeviceUserIDBlock)(BOOL resetSuc); | ||
| 190 | |||
| 191 | |||
| 192 | /** | ||
| 193 | set user info | ||
| 194 | |||
| 195 | @param resetSuc yes:success no:fail | ||
| 196 | */ | ||
| 197 | typedef void (^DisposeAM3SetUserInfoBlock)(BOOL resetSuc); | ||
| 198 | |||
| 199 | |||
| 200 | /** | ||
| 201 | set BMR | ||
| 202 | @param resetSuc yes:success no:fail | ||
| 203 | */ | ||
| 204 | typedef void (^DisposeAM3SetBMRBlock)(BOOL resetSuc); | ||
| 205 | |||
| 206 | |||
| 207 | /** | ||
| 208 | active start transmission | ||
| 209 | |||
| 210 | @param startDataDictionary including parameters:Start date,yyyy-MM-dd(ActiveHistoryDateYear,ActiveHistoryDateMonth,ActiveHistoryDateDay),ActiveStepSize:Length of each step,ActiveHistoryTotoalNum:Number of records. | ||
| 211 | */ | ||
| 212 | typedef void (^DisposeAM3ActiveStartTransmission)(NSDictionary *startDataDictionary); | ||
| 213 | |||
| 214 | |||
| 215 | /** | ||
| 216 | active history data | ||
| 217 | |||
| 218 | @param historyDataArray including the following parameters:AMDate、AMCalorie、AMstepNum、AMstepSize、dataID、Start. AMDate:Workout time,AMCalorie: Current time total calories,AMStepNum:Total number of steps,dataID:data ID,Start:represents the beginning of a movement. | ||
| 219 | */ | ||
| 220 | typedef void (^DisposeAM3ActiveHistoryData)(NSArray *historyDataArray); | ||
| 221 | |||
| 222 | |||
| 223 | |||
| 224 | /** | ||
| 225 | active finish transmission | ||
| 226 | */ | ||
| 227 | typedef void (^DisposeAM3ActiveFinishTransmission)(void); | ||
| 228 | |||
| 229 | |||
| 230 | |||
| 231 | |||
| 232 | /** | ||
| 233 | sleep start transmission | ||
| 234 | |||
| 235 | @param startDataDictionary including parameters:SleepHistoryDate、AM3SleepHistoryTotoalNum.SleepHistoryDate:Sleep start time,yyyy-MM-dd HH:mm:ss(SleepHistoryDateYear,SleepHistoryDateMonth,SleepHistoryDateDay,SleepHistoryDateHour,SleepHistoryDateMinute,SleepHistoryDateSeconds).SleepHistoryTotoalNum: Number of records | ||
| 236 | */ | ||
| 237 | typedef void (^DisposeAM3SleepStartTransmission)(NSDictionary *startDataDictionary); | ||
| 238 | |||
| 239 | |||
| 240 | /** | ||
| 241 | sleep history data | ||
| 242 | |||
| 243 | @param historyDataArray including the following parameters::AMDate、SleepData、dataID.AMDate:Sleep time, SleepData: Sleep grade, 0: awake, 1: light sleep, 2: deep sleep ,dataID: data ID | ||
| 244 | */ | ||
| 245 | typedef void (^DisposeAM3SleepHistoryData)(NSArray *historyDataArray); | ||
| 246 | |||
| 247 | |||
| 248 | /** | ||
| 249 | sleep finish transmission | ||
| 250 | */ | ||
| 251 | typedef void (^DisposeAM3SleepFinishTransmission)(void); | ||
| 252 | |||
| 253 | |||
| 254 | /** | ||
| 255 | get current active info | ||
| 256 | |||
| 257 | @param activeDictionary Total calories and steps for today, including parameters:Step、Calories、TotalCalories.Step:Number of steps taken today.Calories:Number of calories burned today.TotalCalories:Sum calories burned and bmr today. | ||
| 258 | */ | ||
| 259 | typedef void (^DisposeAM3GetCurrentActiveInfo)(NSDictionary *activeDictionary); | ||
| 260 | |||
| 261 | |||
| 262 | /** | ||
| 263 | totoal alarm array | ||
| 264 | |||
| 265 | @param totoalAlarmArray totoalAlarmArray contains up to 3 alarms, each one needs the following parameters:AlarmId、Time、IsRepeat、Switch、(Sun、Mon、Tue、Wed、Thu、Fri、Sat) | ||
| 266 | */ | ||
| 267 | typedef void (^DisposeAM3TotoalAlarmData)(NSMutableArray *totoalAlarmArray); | ||
| 268 | |||
| 269 | |||
| 270 | /** | ||
| 271 | set alarm | ||
| 272 | |||
| 273 | @param resetSuc yes:success no:fail | ||
| 274 | */ | ||
| 275 | typedef void (^DisposeAM3SetAlarmBlock)(BOOL resetSuc); | ||
| 276 | |||
| 277 | |||
| 278 | /** | ||
| 279 | delete Alarm | ||
| 280 | |||
| 281 | @param resetSuc yes:success no:fail | ||
| 282 | |||
| 283 | */ | ||
| 284 | typedef void (^DisposeAM3DeleteAlarmBlock)(BOOL resetSuc); | ||
| 285 | |||
| 286 | |||
| 287 | /** | ||
| 288 | get remind info | ||
| 289 | |||
| 290 | @param remindInfo array containing following parameters:ReminderID、Time、Switch.ReminderID:Reminder ID.Time:format HH:mm, time between reminders (HH*60+mm) minutes.Switch:Reminder on/off,True: On, False: Off. | ||
| 291 | */ | ||
| 292 | typedef void (^DisposeAM3RemindInfoBlock)(NSArray *remindInfo); | ||
| 293 | |||
| 294 | |||
| 295 | |||
| 296 | /** | ||
| 297 | set reminder | ||
| 298 | |||
| 299 | @param resetSuc yes:success no:fail | ||
| 300 | */ | ||
| 301 | typedef void (^DisposeAM3SetReminderBlock)(BOOL resetSuc); | ||
| 302 | |||
| 303 | |||
| 304 | /** | ||
| 305 | get state info | ||
| 306 | |||
| 307 | @param queryState AM3StateInfo description | ||
| 308 | */ | ||
| 309 | typedef void (^DisposeAM3StateInfoBlock)(AM3StateInfo queryState); | ||
| 310 | |||
| 311 | |||
| 312 | /** | ||
| 313 | get battery | ||
| 314 | |||
| 315 | @param battery 1~100 | ||
| 316 | */ | ||
| 317 | typedef void (^DisposeAM3BatteryBlock)(NSNumber *battery); | ||
| 318 | |||
| 319 | |||
| 320 | /** | ||
| 321 | reset device | ||
| 322 | |||
| 323 | @param resetSuc yes:success no:fail | ||
| 324 | */ | ||
| 325 | typedef void (^DisposeAM3ResetDeviceBlock)(BOOL resetSuc); | ||
| 326 | |||
| 327 | |||
| 328 | /** | ||
| 329 | disconnect | ||
| 330 | |||
| 331 | @param resetSuc yes:success no:fail | ||
| 332 | */ | ||
| 333 | typedef void (^DisposeAM3DisconnectBlock)(BOOL resetSuc); | ||
| 334 | |||
| 335 | |||
| 336 | /** | ||
| 337 | get user info | ||
| 338 | |||
| 339 | @param userInfo including parameters:Age,Step,Height,Gender,Weight,Unit,goal(TotalStep1、TotalStep2、TotalStep3) | ||
| 340 | */ | ||
| 341 | typedef void (^DisposeAM3UserInfoBlock)(NSDictionary *userInfo); | ||
| 342 | |||
| 343 | |||
| 344 | /** | ||
| 345 | set State | ||
| 346 | |||
| 347 | @param resetSuc yes:success no:fail | ||
| 348 | */ | ||
| 349 | typedef void (^DisposeAM3SetStateBlock)(BOOL resetSuc); | ||
| 350 | |||
| 351 | |||
| 352 | /** | ||
| 353 | set state model | ||
| 354 | |||
| 355 | @param resetSuc yes:success no:fail | ||
| 356 | */ | ||
| 357 | typedef void (^DisposeAM3SetStateModelBlock)(BOOL resetSuc); | ||
| 358 | /////////////////////////////////////////////////////////////// | ||
| 359 | |||
| 360 | //AM3S | ||
| 361 | |||
| 362 | /////////////////////////////////////////////////////////////// | ||
| 363 | |||
| 364 | #define AM3STimeInterval @"TimeInterval" | ||
| 365 | |||
| 366 | #define AM3SActiveHistoryDateYear @"ActiveHistoryDateYear" | ||
| 367 | #define AM3SActiveHistoryDateMonth @"ActiveHistoryDateMonth" | ||
| 368 | #define AM3SActiveHistoryDateDay @"ActiveHistoryDateDay" | ||
| 369 | #define AM3SActiveHistoryTotoalNum @"ActiveHistoryTotoalNum" | ||
| 370 | #define AM3SActiveStepSize @"ActiveStepSize" | ||
| 371 | |||
| 372 | #define AM3SSleepHistoryDateYear @"SleepHistoryDateYear" | ||
| 373 | #define AM3SSleepHistoryDateMonth @"SleepHistoryDateMonth" | ||
| 374 | #define AM3SSleepHistoryDateDay @"SleepHistoryDateDay" | ||
| 375 | #define AM3SSleepHistoryDateHour @"SleepHistoryDateHour" | ||
| 376 | #define AM3SSleepHistoryDateMinute @"SleepHistoryDateMinute" | ||
| 377 | #define AM3SSleepHistoryDateSeconds @"SleepHistoryDateSeconds" | ||
| 378 | #define AM3SSleepHistoryTotoalNum @"SleepHistoryTotoalNum" | ||
| 379 | |||
| 380 | |||
| 381 | #define ReportState @"ReportState" | ||
| 382 | |||
| 383 | #define Work_outMeasureDate @"Work_outMeasureDate" | ||
| 384 | #define Work_outTimeNumber @"Work_outTimeNumber" | ||
| 385 | #define Work_outStepNumber @"Work_outStepNumber" | ||
| 386 | #define Work_outLengthNumber @"Work_outLengthNumber" | ||
| 387 | #define Work_outCalories @"Work_outCalories" | ||
| 388 | #define Work_outTimeZone @"Work_outTimeZone" | ||
| 389 | |||
| 390 | #define Sleep_summaryMeasureDate @"Sleep_summaryMeasureDate" | ||
| 391 | #define Sleep_summarySleepTime @"Sleep_summarySleepTime" | ||
| 392 | #define Sleep_summarysleepEfficiency @"Sleep_summarysleepEfficiency" | ||
| 393 | #define Sleep_summarysleepAddMinute @"Sleep_summarysleepAddMinute" | ||
| 394 | #define Sleep_summaryTimeZone @"Sleep_summaryTimeZone" | ||
| 395 | |||
| 396 | |||
| 397 | /** | ||
| 398 | AM3S error code | ||
| 399 | */ | ||
| 400 | typedef NS_ENUM(NSUInteger, AM3SErrorID) { | ||
| 401 | /// Communication error | ||
| 402 | AM3SError_OverTime = 0, | ||
| 403 | /// You did not receive a response within a certain period of time, usually clogged Bluetooth | ||
| 404 | AM3SError_NoRespond, | ||
| 405 | /// Reset failed | ||
| 406 | AM3SError_ResetDeviceFaild, | ||
| 407 | /// AM disconnect | ||
| 408 | AM3SError_Disconnect, | ||
| 409 | /// ParameterError | ||
| 410 | AM3SError_ParameterError = 400, | ||
| 411 | /// firmware version is not supported | ||
| 412 | AM3SError_FirmwareVersionIsNotSupported | ||
| 413 | }; | ||
| 414 | |||
| 415 | |||
| 416 | |||
| 417 | /** | ||
| 418 | AM3S Time Format | ||
| 419 | */ | ||
| 420 | typedef NS_ENUM(NSUInteger, AM3STimeFormatAndNation) { | ||
| 421 | /// 12 | ||
| 422 | AM3STimeFormat_hh = 0, | ||
| 423 | /// 24 | ||
| 424 | AM3STimeFormat_HH, | ||
| 425 | /// No europe and hh | ||
| 426 | AM3STimeFormat_NoEuropeAndhh, | ||
| 427 | /// europe and hh | ||
| 428 | AM3STimeFormat_EuropeAndhh, | ||
| 429 | /// no europe and HH | ||
| 430 | AM3STimeFormat_NoEuropeAndHH, | ||
| 431 | /// europe and HH | ||
| 432 | AM3STimeFormat_EuropeAndHH, | ||
| 433 | }; | ||
| 434 | |||
| 435 | |||
| 436 | /** | ||
| 437 | AM3S State Unit | ||
| 438 | */ | ||
| 439 | typedef NS_ENUM(NSUInteger, AM3SKmUnit){ | ||
| 440 | /// mile | ||
| 441 | AM3SKmUnit_mile, | ||
| 442 | /// km | ||
| 443 | AM3SKmUnit_km | ||
| 444 | }; | ||
| 445 | |||
| 446 | |||
| 447 | /** | ||
| 448 | AM3S Query State | ||
| 449 | */ | ||
| 450 | typedef NS_ENUM(NSUInteger, AM3SQueryState){ | ||
| 451 | /// waist | ||
| 452 | AM3SState_waist, | ||
| 453 | /// wrist | ||
| 454 | AM3SState_wrist, | ||
| 455 | /// sleep | ||
| 456 | AM3SState_sleep | ||
| 457 | }; | ||
| 458 | |||
| 459 | |||
| 460 | /** | ||
| 461 | AM3S Picture | ||
| 462 | */ | ||
| 463 | typedef NS_ENUM(NSUInteger, AM3SPicture){ | ||
| 464 | /// one | ||
| 465 | AM3SPicture_one, | ||
| 466 | /// two | ||
| 467 | AM3SPicture_two, | ||
| 468 | }; | ||
| 469 | |||
| 470 | /** | ||
| 471 | AM3S ReportStage | ||
| 472 | */ | ||
| 473 | typedef NS_ENUM(NSUInteger, AM3SReportStage){ | ||
| 474 | /// Work_out | ||
| 475 | AM3SReportStage_Work_out = 1, | ||
| 476 | /// Sleep_summary | ||
| 477 | AM3SReportStage_Sleep_summary, | ||
| 478 | }; | ||
| 479 | |||
| 480 | /** | ||
| 481 | AM3S ActiveState | ||
| 482 | */ | ||
| 483 | typedef NS_ENUM(NSUInteger, AM3SActiveState){ | ||
| 484 | /// Active | ||
| 485 | AM3SActive_State = 0, | ||
| 486 | /// sleep | ||
| 487 | AM3SSleep_State = 1, | ||
| 488 | /// flight | ||
| 489 | AM3SFly_State = 2, | ||
| 490 | /// workout | ||
| 491 | AM3SWorkout_State = 4, | ||
| 492 | }; | ||
| 493 | |||
| 494 | |||
| 495 | /** | ||
| 496 | get user ID | ||
| 497 | |||
| 498 | @param userID userID | ||
| 499 | */ | ||
| 500 | typedef void (^DisposeAM3SGetDeviceUserIDBlock)(unsigned int userID); | ||
| 501 | |||
| 502 | /** | ||
| 503 | Error Block | ||
| 504 | |||
| 505 | @param errorID AM3SErrorID descriptions | ||
| 506 | */ | ||
| 507 | typedef void (^DisposeAM3SErrorBlock)(AM3SErrorID errorID); | ||
| 508 | |||
| 509 | |||
| 510 | /** | ||
| 511 | set random number | ||
| 512 | |||
| 513 | @param randomNumString randomNumString | ||
| 514 | */ | ||
| 515 | typedef void (^DisposeAM3SSetRandomNumberBlock)(NSString *randomNumString); | ||
| 516 | /** | ||
| 517 | sync time | ||
| 518 | |||
| 519 | @param resetSuc yes:success no:fail | ||
| 520 | */ | ||
| 521 | typedef void (^DisposeAM3SSyncTimeBlock)(BOOL resetSuc); | ||
| 522 | |||
| 523 | /** | ||
| 524 | set timeFormat and nation | ||
| 525 | |||
| 526 | @param timeFormatAndNation AM3STimeFormatAndNation description | ||
| 527 | */ | ||
| 528 | typedef void (^DisposeAM3STimeFormatAndNationBlock)(AM3STimeFormatAndNation timeFormatAndNation); | ||
| 529 | |||
| 530 | /** | ||
| 531 | set date Formatter | ||
| 532 | |||
| 533 | @param resetSuc yes:success no:fail | ||
| 534 | */ | ||
| 535 | typedef void (^DisposeAM3STimeFormatAndNationSettingBlock)(BOOL resetSuc); | ||
| 536 | |||
| 537 | /** | ||
| 538 | set userID | ||
| 539 | |||
| 540 | @param resetSuc yes:success no:fail | ||
| 541 | */ | ||
| 542 | typedef void (^DisposeAM3SSetDeviceUserIDBlock)(BOOL resetSuc); | ||
| 543 | |||
| 544 | |||
| 545 | /** | ||
| 546 | set user info | ||
| 547 | |||
| 548 | @param resetSuc yes:success no:fail | ||
| 549 | */ | ||
| 550 | typedef void (^DisposeAM3SSetUserInfoBlock)(BOOL resetSuc); | ||
| 551 | |||
| 552 | /** | ||
| 553 | set BMR | ||
| 554 | @param resetSuc yes:success no:fail | ||
| 555 | */ | ||
| 556 | typedef void (^DisposeAM3SSetBMRBlock)(BOOL resetSuc); | ||
| 557 | |||
| 558 | /** | ||
| 559 | active start transmission | ||
| 560 | |||
| 561 | @param startDataDictionary including parameters:Start date,yyyy-MM-dd(ActiveHistoryDateYear,ActiveHistoryDateMonth,ActiveHistoryDateDay),ActiveStepSize:Length of each step,ActiveHistoryTotoalNum:Number of records. | ||
| 562 | */ | ||
| 563 | typedef void (^DisposeAM3SActiveStartTransmission)(NSDictionary *startDataDictionary); | ||
| 564 | |||
| 565 | |||
| 566 | /** | ||
| 567 | active history data | ||
| 568 | |||
| 569 | @param historyDataArray including the following parameters:AMDate、AMCalorie、AMstepNum、AMstepSize、dataID、Start. AMDate:Workout time,AMCalorie: Current time total calories,AMStepNum:Total number of steps,dataID:data ID,Start:represents the beginning of a movement. | ||
| 570 | */ | ||
| 571 | typedef void (^DisposeAM3SActiveHistoryData)(NSArray *historyDataArray); | ||
| 572 | |||
| 573 | /** | ||
| 574 | active finish transmission | ||
| 575 | */ | ||
| 576 | typedef void (^DisposeAM3SActiveFinishTransmission)(void);// | ||
| 577 | |||
| 578 | |||
| 579 | /** | ||
| 580 | sleep start transmission | ||
| 581 | |||
| 582 | @param startDataDictionary including parameters:SleepHistoryDate、AM3SleepHistoryTotoalNum.SleepHistoryDate:Sleep start time,yyyy-MM-dd HH:mm:ss(SleepHistoryDateYear,SleepHistoryDateMonth,SleepHistoryDateDay,SleepHistoryDateHour,SleepHistoryDateMinute,SleepHistoryDateSeconds).SleepHistoryTotoalNum: Number of records | ||
| 583 | */ | ||
| 584 | typedef void (^DisposeAM3SSleepStartTransmission)(NSDictionary *startDataDictionary); | ||
| 585 | /** | ||
| 586 | sleep history data | ||
| 587 | |||
| 588 | @param historyDataArray including the following parameters::AMDate、SleepData、dataID.AMDate:Sleep time, SleepData: Sleep grade, 0: awake, 1: light sleep, 2: deep sleep ,dataID: data ID | ||
| 589 | */ | ||
| 590 | typedef void (^DisposeAM3SSleepHistoryData)(NSArray *historyDataArray); | ||
| 591 | |||
| 592 | /** | ||
| 593 | sleep finish transmission | ||
| 594 | */ | ||
| 595 | typedef void (^DisposeAM3SSleepFinishTransmission)(void); | ||
| 596 | |||
| 597 | /** | ||
| 598 | get current active info | ||
| 599 | |||
| 600 | @param activeDictionary Total calories and steps for today, including parameters:Step、Calories、TotalCalories.Step:Number of steps taken today.Calories:Number of calories burned today.TotalCalories:Sum calories burned and bmr today. | ||
| 601 | */ | ||
| 602 | typedef void (^DisposeAM3SGetCurrentActiveInfo)(NSDictionary *activeDictionary); | ||
| 603 | |||
| 604 | /** | ||
| 605 | reset device | ||
| 606 | |||
| 607 | @param resetSuc yes:success no:fail | ||
| 608 | */ | ||
| 609 | typedef void (^DisposeAM3SResetDeviceBlock)(BOOL resetSuc); | ||
| 610 | |||
| 611 | /** | ||
| 612 | totoal alarm array | ||
| 613 | |||
| 614 | @param totoalAlarmArray totoalAlarmArray contains up to 3 alarms, each one needs the following parameters:AlarmId、Time、IsRepeat、Switch、(Sun、Mon、Tue、Wed、Thu、Fri、Sat) | ||
| 615 | */ | ||
| 616 | typedef void (^DisposeAM3STotoalAlarmData)(NSMutableArray *totoalAlarmArray); | ||
| 617 | |||
| 618 | |||
| 619 | /** | ||
| 620 | set alarm | ||
| 621 | |||
| 622 | @param resetSuc yes:success no:fail | ||
| 623 | */ | ||
| 624 | typedef void (^DisposeAM3SSetAlarmBlock)(BOOL resetSuc); | ||
| 625 | /** | ||
| 626 | delete Alarm | ||
| 627 | |||
| 628 | @param resetSuc yes:success no:fail | ||
| 629 | |||
| 630 | */ | ||
| 631 | typedef void (^DisposeAM3SDeleteAlarmBlock)(BOOL resetSuc); | ||
| 632 | |||
| 633 | /** | ||
| 634 | get remind info | ||
| 635 | |||
| 636 | @param remindInfo array containing following parameters:ReminderID、Time、Switch.ReminderID:Reminder ID.Time:format HH:mm, time between reminders (HH*60+mm) minutes.Switch:Reminder on/off,True: On, False: Off. | ||
| 637 | */ | ||
| 638 | typedef void (^DisposeAM3SRemindInfoBlock)(NSArray *remindInfo); | ||
| 639 | |||
| 640 | |||
| 641 | /** | ||
| 642 | set reminder | ||
| 643 | |||
| 644 | @param resetSuc yes:success no:fail | ||
| 645 | */ | ||
| 646 | typedef void (^DisposeAM3SSetReminderBlock)(BOOL resetSuc); | ||
| 647 | |||
| 648 | /** | ||
| 649 | get state info | ||
| 650 | |||
| 651 | @param queryState AM3StateInfo description | ||
| 652 | */ | ||
| 653 | typedef void (^DisposeAM3SStateInfoBlock)(AM3SQueryState queryState); | ||
| 654 | |||
| 655 | /** | ||
| 656 | get battery | ||
| 657 | |||
| 658 | @param battery 1~100 | ||
| 659 | */ | ||
| 660 | typedef void (^DisposeAM3SBatteryBlock)(NSNumber *battery); | ||
| 661 | |||
| 662 | /** | ||
| 663 | disconnect | ||
| 664 | |||
| 665 | @param resetSuc yes:success no:fail | ||
| 666 | */ | ||
| 667 | typedef void (^DisposeAM3SDisconnectBlock)(BOOL resetSuc); | ||
| 668 | |||
| 669 | /** | ||
| 670 | stage measure data | ||
| 671 | |||
| 672 | @param measureDataArray including workout and sleepSummary | ||
| 673 | */ | ||
| 674 | typedef void (^DisposeAM3SStageMeasureDataBlock)(NSArray *measureDataArray); | ||
| 675 | |||
| 676 | |||
| 677 | /** | ||
| 678 | stage measure dinish | ||
| 679 | |||
| 680 | @param resetSuc yes:success no:fail | ||
| 681 | */ | ||
| 682 | typedef void (^DisposeAM3SStageMeasureFinishBlock)(BOOL resetSuc); | ||
| 683 | |||
| 684 | |||
| 685 | /** | ||
| 686 | get user info | ||
| 687 | |||
| 688 | @param userInfo including parameters:Age,Step,Height,Gender,Weight,Unit,goal(TotalStep1、TotalStep2、TotalStep3) | ||
| 689 | */ | ||
| 690 | typedef void (^DisposeAM3SUserInfoBlock)(NSDictionary *userInfo); | ||
| 691 | |||
| 692 | /** | ||
| 693 | query picture | ||
| 694 | */ | ||
| 695 | typedef void (^DisposeAM3SGetPictureBlock)(AM3SPicture picture); | ||
| 696 | |||
| 697 | /** | ||
| 698 | set picture | ||
| 699 | */ | ||
| 700 | typedef void (^DisposeAM3SSetPictureBlock)(BOOL resetSuc); | ||
| 701 | |||
| 702 | |||
| 703 | |||
| 704 | /////////////////////////////////////////////////////////////// | ||
| 705 | |||
| 706 | |||
| 707 | //AM4 | ||
| 708 | |||
| 709 | /////////////////////////////////////////////////////////////// | ||
| 710 | |||
| 711 | |||
| 712 | #define AM4TimeInterval @"TimeInterval" | ||
| 713 | |||
| 714 | #define AM4ActiveHistoryDateYear @"ActiveHistoryDateYear" | ||
| 715 | #define AM4ActiveHistoryDateMonth @"ActiveHistoryDateMonth" | ||
| 716 | #define AM4ActiveHistoryDateDay @"ActiveHistoryDateDay" | ||
| 717 | #define AM4ActiveHistoryTotoalNum @"ActiveHistoryTotoalNum" | ||
| 718 | #define AM4ActiveStepSize @"ActiveStepSize" | ||
| 719 | #define AM4ActiveTimeZone @"ActiveTimeZone" | ||
| 720 | |||
| 721 | #define AM4SleepHistoryDateYear @"SleepHistoryDateYear" | ||
| 722 | #define AM4SleepHistoryDateMonth @"SleepHistoryDateMonth" | ||
| 723 | #define AM4SleepHistoryDateDay @"SleepHistoryDateDay" | ||
| 724 | #define AM4SleepHistoryDateHour @"SleepHistoryDateHour" | ||
| 725 | #define AM4SleepHistoryDateMinute @"SleepHistoryDateMinute" | ||
| 726 | #define AM4SleepHistoryDateSeconds @"SleepHistoryDateSeconds" | ||
| 727 | #define AM4SleepHistoryTotoalNum @"SleepHistoryTotoalNum" | ||
| 728 | #define AM4SleepHistoryTimeZone @"SleepHistoryTimeZone" | ||
| 729 | |||
| 730 | |||
| 731 | |||
| 732 | #define AM4SwimmingMeasureDate @"SwimmingMeasureDate" | ||
| 733 | #define AM4SwimmingTimeNumber @"SwimmingTimeNumber" | ||
| 734 | #define AM4SwimmingTimes @"SwimmingTimes" | ||
| 735 | #define AM4Swimmingcalories @"Swimmingcalories" | ||
| 736 | #define AM4SwimmingAct @"SwimmingAct" | ||
| 737 | #define AM4SwimmingPoollength @"SwimmingPoollength" | ||
| 738 | #define AM4SwimmingCircleCount @"SwimmingCircleCount" | ||
| 739 | #define AM4EnterSwimmingTime @"EnterSwimmingTime" | ||
| 740 | #define AM4OutSwimmingTime @"OutSwimmingTime" | ||
| 741 | #define AM4SwimmingProcessMark @"SwimmingProcessMark" | ||
| 742 | #define AM4SwimStartTimeStamp @"SwimStartTimeStamp" | ||
| 743 | #define AM4SwimmingTimeZone @"SwimmingTimeZone" | ||
| 744 | |||
| 745 | |||
| 746 | /** | ||
| 747 | AM4 error code | ||
| 748 | */ | ||
| 749 | typedef NS_ENUM(NSUInteger, AM4ErrorID) { | ||
| 750 | /// Communication error | ||
| 751 | AM4Error_OverTime = 0, | ||
| 752 | /// You did not receive a response within a certain period of time, usually clogged Bluetooth | ||
| 753 | AM4Error_NoRespond, | ||
| 754 | /// Reset failed | ||
| 755 | AM4Error_ResetDeviceFaild, | ||
| 756 | /// AM disconnect | ||
| 757 | AM4Error_Disconnect, | ||
| 758 | /// ParameterError | ||
| 759 | AM4Error_ParameterError = 400, | ||
| 760 | /// firmware version is not supported | ||
| 761 | AM4Error_FirmwareVersionIsNotSupported | ||
| 762 | }; | ||
| 763 | |||
| 764 | |||
| 765 | |||
| 766 | /** | ||
| 767 | AM4 Time Format | ||
| 768 | */ | ||
| 769 | typedef NS_ENUM(NSUInteger, AM4TimeFormatAndNation) { | ||
| 770 | /// 12 | ||
| 771 | AM4TimeFormat_hh = 0, | ||
| 772 | /// 24 | ||
| 773 | AM4TimeFormat_HH, | ||
| 774 | /// No europe and hh | ||
| 775 | AM4TimeFormat_NoEuropeAndhh, | ||
| 776 | /// europe and hh | ||
| 777 | AM4TimeFormat_EuropeAndhh, | ||
| 778 | /// no europe and HH | ||
| 779 | AM4TimeFormat_NoEuropeAndHH, | ||
| 780 | /// europe and HH | ||
| 781 | AM4TimeFormat_EuropeAndHH, | ||
| 782 | }; | ||
| 783 | |||
| 784 | /** | ||
| 785 | AM4 State Unit | ||
| 786 | */ | ||
| 787 | typedef NS_ENUM(NSUInteger, AM4KmUnit){ | ||
| 788 | /// mile | ||
| 789 | AM4KmUnit_mile, | ||
| 790 | /// km | ||
| 791 | AM4KmUnit_km | ||
| 792 | }; | ||
| 793 | |||
| 794 | |||
| 795 | /** | ||
| 796 | AM4 Swimming Unit | ||
| 797 | */ | ||
| 798 | typedef NS_ENUM(NSUInteger, AM4SwimmingUnit){ | ||
| 799 | /// m | ||
| 800 | AM4SwimmingUnit_m, | ||
| 801 | /// km | ||
| 802 | AM4SwimmingUnit_km, | ||
| 803 | }; | ||
| 804 | |||
| 805 | /** | ||
| 806 | AM4 Query State | ||
| 807 | */ | ||
| 808 | typedef NS_ENUM(NSUInteger, AM4QueryState){ | ||
| 809 | /// waist | ||
| 810 | AM4State_waist, | ||
| 811 | /// waist | ||
| 812 | AM4State_wrist, | ||
| 813 | /// waist | ||
| 814 | AM4State_sleep | ||
| 815 | }; | ||
| 816 | |||
| 817 | /** | ||
| 818 | AM4 Swimming Action | ||
| 819 | */ | ||
| 820 | typedef NS_ENUM(NSUInteger, AM4SwimmingAction){ | ||
| 821 | /// Crawl | ||
| 822 | AM4SwimmingAction_Crawl, | ||
| 823 | /// Breaststroke | ||
| 824 | AM4SwimmingAction_Breaststroke, | ||
| 825 | /// Backstroke | ||
| 826 | AM4SwimmingAction_Backstroke, | ||
| 827 | /// Butterfly | ||
| 828 | AM4SwimmingAction_Butterfly, | ||
| 829 | /// MixedSwimming | ||
| 830 | AM4SwimmingAction_MixedSwimming, | ||
| 831 | /// Unkonw | ||
| 832 | AM4SwimmingAction_Unkonw | ||
| 833 | }; | ||
| 834 | |||
| 835 | /** | ||
| 836 | AM4 Report Stage | ||
| 837 | */ | ||
| 838 | typedef NS_ENUM(NSUInteger, AM4ReportStage){ | ||
| 839 | /// Swimming | ||
| 840 | AM4ReportStage_Swimming, | ||
| 841 | /// Work_out | ||
| 842 | AM4ReportStage_Work_out, | ||
| 843 | /// summary | ||
| 844 | AM4ReportStage_Sleep_summary, | ||
| 845 | }; | ||
| 846 | |||
| 847 | /** | ||
| 848 | AM4 Active State | ||
| 849 | */ | ||
| 850 | typedef NS_ENUM(NSUInteger, AM4ActiveState){ | ||
| 851 | /// Active_State | ||
| 852 | AM4Active_State =0, | ||
| 853 | /// Sleep_State | ||
| 854 | AM4Sleep_State =1, | ||
| 855 | /// Fly_State | ||
| 856 | AM4Fly_State =2, | ||
| 857 | /// Workout_State | ||
| 858 | AM4Workout_State=4, | ||
| 859 | /// Swimming_State | ||
| 860 | AM4Swimming_State=5, | ||
| 861 | }; | ||
| 862 | |||
| 863 | |||
| 864 | |||
| 865 | /** | ||
| 866 | get user ID | ||
| 867 | |||
| 868 | @param userID userID | ||
| 869 | */ | ||
| 870 | typedef void (^DisposeAM4GetDeviceUserIDBlock)(unsigned int userID); | ||
| 871 | |||
| 872 | /** | ||
| 873 | Error Block | ||
| 874 | |||
| 875 | @param errorID AM4ErrorID descriptions | ||
| 876 | */ | ||
| 877 | typedef void (^DisposeAM4ErrorBlock)(AM4ErrorID errorID); | ||
| 878 | |||
| 879 | /** | ||
| 880 | set random number | ||
| 881 | |||
| 882 | @param randomNumString randomNumString | ||
| 883 | */ | ||
| 884 | typedef void (^DisposeAM4SetRandomNumberBlock)(NSString *randomNumString); | ||
| 885 | |||
| 886 | /** | ||
| 887 | sync time | ||
| 888 | |||
| 889 | @param resetSuc yes:success no:fail | ||
| 890 | */ | ||
| 891 | typedef void (^DisposeAM4SyncTimeBlock)(BOOL resetSuc); | ||
| 892 | |||
| 893 | |||
| 894 | /** | ||
| 895 | set timeFormat and nation | ||
| 896 | |||
| 897 | @param timeFormatAndNation AM4TimeFormatAndNation description | ||
| 898 | */ | ||
| 899 | typedef void (^DisposeAM4TimeFormatAndNationBlock)(AM4TimeFormatAndNation timeFormatAndNation); | ||
| 900 | |||
| 901 | |||
| 902 | /** | ||
| 903 | set date Formatter | ||
| 904 | |||
| 905 | @param resetSuc yes:success no:fail | ||
| 906 | */ | ||
| 907 | typedef void (^DisposeAM4TimeFormatAndNationSettingBlock)(BOOL resetSuc); | ||
| 908 | |||
| 909 | /** | ||
| 910 | set userID | ||
| 911 | |||
| 912 | @param resetSuc yes:success no:fail | ||
| 913 | */ | ||
| 914 | typedef void (^DisposeAM4SetDeviceUserIDBlock)(BOOL resetSuc); | ||
| 915 | |||
| 916 | /** | ||
| 917 | set user info | ||
| 918 | |||
| 919 | @param resetSuc yes:success no:fail | ||
| 920 | */ | ||
| 921 | typedef void (^DisposeAM4SetUserInfoBlock)(BOOL resetSuc); | ||
| 922 | |||
| 923 | /** | ||
| 924 | set BMR | ||
| 925 | */ | ||
| 926 | typedef void (^DisposeAM4SetBMRBlock)(BOOL resetSuc); | ||
| 927 | |||
| 928 | /** | ||
| 929 | active start transmission | ||
| 930 | |||
| 931 | @param startDataDictionary including parameters:Start date,yyyy-MM-dd(ActiveHistoryDateYear,ActiveHistoryDateMonth,ActiveHistoryDateDay),ActiveStepSize:Length of each step,ActiveHistoryTotoalNum:Number of records. | ||
| 932 | */ | ||
| 933 | typedef void (^DisposeAM4ActiveStartTransmission)(NSDictionary *startDataDictionary); | ||
| 934 | |||
| 935 | /** | ||
| 936 | active history data | ||
| 937 | |||
| 938 | @param historyDataArray including the following parameters:AMDate、AMCalorie、AMstepNum、AMstepSize、dataID、Start. AMDate:Workout time,AMCalorie: Current time total calories,AMStepNum:Total number of steps,dataID:data ID,Start:represents the beginning of a movement. | ||
| 939 | */ | ||
| 940 | typedef void (^DisposeAM4ActiveHistoryData)(NSArray *historyDataArray); | ||
| 941 | |||
| 942 | /** | ||
| 943 | active finish transmission | ||
| 944 | */ | ||
| 945 | typedef void (^DisposeAM4ActiveFinishTransmission)(void); | ||
| 946 | |||
| 947 | /** | ||
| 948 | sleep start transmission | ||
| 949 | |||
| 950 | @param startDataDictionary including parameters:SleepHistoryDate、AM3SleepHistoryTotoalNum.SleepHistoryDate:Sleep start time,yyyy-MM-dd HH:mm:ss(SleepHistoryDateYear,SleepHistoryDateMonth,SleepHistoryDateDay,SleepHistoryDateHour,SleepHistoryDateMinute,SleepHistoryDateSeconds).SleepHistoryTotoalNum: Number of records | ||
| 951 | */ | ||
| 952 | typedef void (^DisposeAM4SleepStartTransmission)(NSDictionary *startDataDictionary); | ||
| 953 | |||
| 954 | /** | ||
| 955 | sleep history data | ||
| 956 | |||
| 957 | @param historyDataArray including the following parameters::AMDate、SleepData、dataID.AMDate:Sleep time, SleepData: Sleep grade, 0: awake, 1: light sleep, 2: deep sleep ,dataID: data ID | ||
| 958 | */ | ||
| 959 | typedef void (^DisposeAM4SleepHistoryData)(NSArray *historyDataArray); | ||
| 960 | |||
| 961 | /** | ||
| 962 | sleep finish transmission | ||
| 963 | */ | ||
| 964 | typedef void (^DisposeAM4SleepFinishTransmission)(void); | ||
| 965 | |||
| 966 | /** | ||
| 967 | get current active info | ||
| 968 | |||
| 969 | @param activeDictionary Total calories and steps for today, including parameters:Step、Calories、TotalCalories.Step:Number of steps taken today.Calories:Number of calories burned today.TotalCalories:Sum calories burned and bmr today. | ||
| 970 | */ | ||
| 971 | typedef void (^DisposeAM4GetCurrentActiveInfo)(NSDictionary *activeDictionary); | ||
| 972 | |||
| 973 | /** | ||
| 974 | reset device | ||
| 975 | |||
| 976 | @param resetSuc yes:success no:fail | ||
| 977 | */ | ||
| 978 | typedef void (^DisposeAM4ResetDeviceBlock)(BOOL resetSuc); | ||
| 979 | |||
| 980 | /** | ||
| 981 | totoal alarm array | ||
| 982 | |||
| 983 | @param totoalAlarmArray totoalAlarmArray contains up to 3 alarms, each one needs the following parameters:AlarmId、Time、IsRepeat、Switch、(Sun、Mon、Tue、Wed、Thu、Fri、Sat) | ||
| 984 | */ | ||
| 985 | typedef void (^DisposeAM4TotoalAlarmData)(NSMutableArray *totoalAlarmArray); | ||
| 986 | |||
| 987 | /** | ||
| 988 | set alarm | ||
| 989 | |||
| 990 | @param resetSuc yes:success no:fail | ||
| 991 | */ | ||
| 992 | typedef void (^DisposeAM4SetAlarmBlock)(BOOL resetSuc); | ||
| 993 | |||
| 994 | /** | ||
| 995 | delete Alarm | ||
| 996 | |||
| 997 | @param resetSuc yes:success no:fail | ||
| 998 | |||
| 999 | */ | ||
| 1000 | typedef void (^DisposeAM4DeleteAlarmBlock)(BOOL resetSuc); | ||
| 1001 | |||
| 1002 | /** | ||
| 1003 | get remind info | ||
| 1004 | |||
| 1005 | @param remindInfo array containing following parameters:ReminderID、Time、Switch.ReminderID:Reminder ID.Time:format HH:mm, time between reminders (HH*60+mm) minutes.Switch:Reminder on/off,True: On, False: Off. | ||
| 1006 | */ | ||
| 1007 | typedef void (^DisposeAM4RemindInfoBlock)(NSArray *remindInfo); | ||
| 1008 | |||
| 1009 | /** | ||
| 1010 | set reminder | ||
| 1011 | |||
| 1012 | @param resetSuc yes:success no:fail | ||
| 1013 | */ | ||
| 1014 | typedef void (^DisposeAM4SetReminderBlock)(BOOL resetSuc); | ||
| 1015 | |||
| 1016 | /** | ||
| 1017 | get state info | ||
| 1018 | |||
| 1019 | @param queryState AM3StateInfo description | ||
| 1020 | */ | ||
| 1021 | typedef void (^DisposeAM4StateInfoBlock)(AM4QueryState queryState); | ||
| 1022 | |||
| 1023 | /** | ||
| 1024 | get battery | ||
| 1025 | |||
| 1026 | @param battery 1~100 | ||
| 1027 | */ | ||
| 1028 | typedef void (^DisposeAM4BatteryBlock)(NSNumber *battery); | ||
| 1029 | |||
| 1030 | /** | ||
| 1031 | disconnect | ||
| 1032 | |||
| 1033 | @param resetSuc yes:success no:fail | ||
| 1034 | */ | ||
| 1035 | typedef void (^DisposeAM4DisconnectBlock)(BOOL resetSuc); | ||
| 1036 | |||
| 1037 | |||
| 1038 | /** | ||
| 1039 | get Swimming info | ||
| 1040 | |||
| 1041 | @param swimmingIsOpen yes open ,no close | ||
| 1042 | @param swimmingLaneLength lane length | ||
| 1043 | @param NOSwimmingTime no swimming time | ||
| 1044 | @param unit AM4SwimmingUnit description | ||
| 1045 | */ | ||
| 1046 | typedef void (^DisposeAM4SwimmingBlock)(BOOL swimmingIsOpen, NSNumber * swimmingLaneLength,NSNumber * NOSwimmingTime, AM4SwimmingUnit unit); | ||
| 1047 | |||
| 1048 | |||
| 1049 | /** | ||
| 1050 | setting swimming | ||
| 1051 | |||
| 1052 | @param resetSuc yes:success no:fail | ||
| 1053 | */ | ||
| 1054 | typedef void (^DisposeAM4SettingSwimmingBlock)(BOOL resetSuc); | ||
| 1055 | |||
| 1056 | /** | ||
| 1057 | stage measure data | ||
| 1058 | |||
| 1059 | @param measureDataArray including workout、swimming and sleepSummary | ||
| 1060 | */ | ||
| 1061 | typedef void (^DisposeAM4StageMeasureDataBlock)(NSArray *measureDataArray); | ||
| 1062 | |||
| 1063 | /** | ||
| 1064 | stage measure dinish | ||
| 1065 | |||
| 1066 | @param resetSuc yes:success no:fail | ||
| 1067 | */ | ||
| 1068 | typedef void (^DisposeAM4StageMeasureFinishBlock)(BOOL resetSuc); | ||
| 1069 | |||
| 1070 | |||
| 1071 | /** | ||
| 1072 | get user info | ||
| 1073 | |||
| 1074 | @param userInfo including parameters:Age,Step,Height,Gender,Weight,Unit,goal(TotalStep1、TotalStep2、TotalStep3) | ||
| 1075 | */ | ||
| 1076 | typedef void (^DisposeAM4UserInfoBlock)(NSDictionary *userInfo); | ||
| 1077 | |||
| 1078 | |||
| 1079 | |||
| 1080 | /** | ||
| 1081 | send AM3 data | ||
| 1082 | */ | ||
| 1083 | typedef void (^DisposeSendAM3DataBlock)(void); | ||
| 1084 | |||
| 1085 | /** | ||
| 1086 | send AM3S data | ||
| 1087 | */ | ||
| 1088 | typedef void (^DisposeSendAM3SDataBlock)(void); | ||
| 1089 | |||
| 1090 | |||
| 1091 | /** | ||
| 1092 | send AM4 data | ||
| 1093 | |||
| 1094 | */ | ||
| 1095 | typedef void (^DisposeSendAM4DataBlock)(void); | ||
| 1096 | |||
| 1097 | |||
| 1098 | |||
| 1099 | |||
| 1100 | /************AM5**************/ | ||
| 1101 | |||
| 1102 | typedef NS_ENUM(NSUInteger, AM5DeviceError) { | ||
| 1103 | AM5DeviceError_GetDataFailError = 0, | ||
| 1104 | AM5DeviceError_SetTimeFaild, | ||
| 1105 | AM5DeviceError_SetUnitFaild, | ||
| 1106 | AM5DeviceError_SetUserInfoFaild, | ||
| 1107 | AM5DeviceError_BindFaild, | ||
| 1108 | AM5DeviceError_SyncConfigComplete, | ||
| 1109 | }; | ||
| 1110 | |||
| 1111 | |||
| 1112 | |||
| 1113 | |||
| 1114 | typedef void (^DisposeAM5ErrorBlock)(AM5DeviceError errorID); | ||
| 1115 | |||
| 1116 | typedef void (^DisposeBindingAM5Result)(BOOL result); | ||
| 1117 | |||
| 1118 | typedef void (^DisposeUnBindingAM5Result)(BOOL result); | ||
| 1119 | |||
| 1120 | typedef void (^DisposeGetAM5DeviceInfo)(NSMutableDictionary * DeviceInfo); | ||
| 1121 | |||
| 1122 | typedef void (^DisposeGetAM5FuncTable)(NSMutableDictionary * DeviceFuncTable); | ||
| 1123 | |||
| 1124 | typedef void (^DisposeGetAM5Mac)(NSString* deviceMac); | ||
| 1125 | |||
| 1126 | typedef void (^DisposeGetAM5LiveData)(NSMutableDictionary * liveDataDic); | ||
| 1127 | |||
| 1128 | typedef void (^DisposeGetAM5ActivityCount)(NSMutableDictionary * activityCountDic); | ||
| 1129 | |||
| 1130 | typedef void (^DisposeAM5SetCurrentTime)(BOOL result); | ||
| 1131 | |||
| 1132 | typedef void (^DisposeAM5SetAlarm)(BOOL result); | ||
| 1133 | |||
| 1134 | typedef void (^DisposeAM5SetUserTarget)(BOOL result); | ||
| 1135 | |||
| 1136 | typedef void (^DisposeAM5SetUserInfo)(BOOL result); | ||
| 1137 | |||
| 1138 | typedef void (^DisposeAM5SetUnit)(BOOL result); | ||
| 1139 | |||
| 1140 | typedef void (^DisposeAM5SetLongSit)(BOOL result); | ||
| 1141 | |||
| 1142 | typedef void (^DisposeAM5SetLeftRightHand)(BOOL result); | ||
| 1143 | |||
| 1144 | typedef void (^DisposeAM5SetHrInterval)(BOOL result); | ||
| 1145 | |||
| 1146 | typedef void (^DisposeAM5SetHrMode)(BOOL result); | ||
| 1147 | |||
| 1148 | typedef void (^DisposeAM5SetNoDisturbMode)(BOOL result); | ||
| 1149 | |||
| 1150 | typedef void (^DisposeAM5SetSportModeSelect)(BOOL result); | ||
| 1151 | |||
| 1152 | typedef void (^DisposeAM5SetSwitchNotice)(BOOL result); | ||
| 1153 | |||
| 1154 | typedef void (^DisposeGetAM5SyncConfigComplete)(BOOL result); | ||
| 1155 | |||
| 1156 | typedef void (^DisposeGetAM5SyncHeartRateData)(NSDictionary * syncDataDic); | ||
| 1157 | |||
| 1158 | typedef void (^DisposeGetAM5SyncSleepData)(NSDictionary * syncDataDic); | ||
| 1159 | |||
| 1160 | typedef void (^DisposeGetAM5SyncActivityData)(NSDictionary * syncDataDic); | ||
| 1161 | |||
| 1162 | typedef void (^DisposeAM5SyncDataProgress)(NSNumber * syncDataProgress); | ||
| 1163 | |||
| 1164 | typedef void (^DisposeAM5SyncDataSuccess)(void); | ||
| 1165 | |||
| 1166 | typedef void (^DisposeAM5SetAppReboot)(BOOL result); | ||
| 1167 | |||
| 1168 | typedef void (^DisposeAM5SetHandUp)(BOOL result); | ||
| 1169 | |||
| 1170 | #endif | ||
| 1171 | |||
