messages.h 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // Autogenerated from Pigeon (v9.1.0), do not edit directly.
  2. // See also: https://pub.dev/packages/pigeon
  3. #import <Foundation/Foundation.h>
  4. @protocol FlutterBinaryMessenger;
  5. @protocol FlutterMessageCodec;
  6. @class FlutterError;
  7. @class FlutterStandardTypedData;
  8. NS_ASSUME_NONNULL_BEGIN
  9. @class FLTOrientation;
  10. @class FLTPosition;
  11. @class FLTSportWear;
  12. @class FLTHeartRateMeasurement;
  13. @interface FLTOrientation : NSObject
  14. + (instancetype)makeWithX:(nullable NSNumber *)x
  15. y:(nullable NSNumber *)y
  16. z:(nullable NSNumber *)z;
  17. @property(nonatomic, strong, nullable) NSNumber * x;
  18. @property(nonatomic, strong, nullable) NSNumber * y;
  19. @property(nonatomic, strong, nullable) NSNumber * z;
  20. @end
  21. @interface FLTPosition : NSObject
  22. + (instancetype)makeWithLatitude:(nullable NSNumber *)latitude
  23. longitude:(nullable NSNumber *)longitude
  24. altitude:(nullable NSNumber *)altitude
  25. bearing:(nullable NSNumber *)bearing
  26. accuracy:(nullable NSNumber *)accuracy
  27. speed:(nullable NSNumber *)speed
  28. timeMs:(nullable NSNumber *)timeMs;
  29. @property(nonatomic, strong, nullable) NSNumber * latitude;
  30. @property(nonatomic, strong, nullable) NSNumber * longitude;
  31. @property(nonatomic, strong, nullable) NSNumber * altitude;
  32. @property(nonatomic, strong, nullable) NSNumber * bearing;
  33. @property(nonatomic, strong, nullable) NSNumber * accuracy;
  34. /// the speed at the time of this location in meters per second.
  35. @property(nonatomic, strong, nullable) NSNumber * speed;
  36. @property(nonatomic, strong, nullable) NSNumber * timeMs;
  37. @end
  38. @interface FLTSportWear : NSObject
  39. + (instancetype)makeWithAddress:(nullable NSString *)address
  40. name:(nullable NSString *)name
  41. rssi:(nullable NSNumber *)rssi
  42. batteryLevel:(nullable NSNumber *)batteryLevel;
  43. @property(nonatomic, copy, nullable) NSString * address;
  44. @property(nonatomic, copy, nullable) NSString * name;
  45. @property(nonatomic, strong, nullable) NSNumber * rssi;
  46. @property(nonatomic, strong, nullable) NSNumber * batteryLevel;
  47. @end
  48. @interface FLTHeartRateMeasurement : NSObject
  49. + (instancetype)makeWithDeviceMac:(nullable NSString *)deviceMac
  50. heartRate:(nullable NSNumber *)heartRate
  51. contactDetected:(nullable NSNumber *)contactDetected
  52. rrIntervals:(nullable NSArray<NSNumber *> *)rrIntervals
  53. timestampMill:(nullable NSNumber *)timestampMill;
  54. @property(nonatomic, copy, nullable) NSString * deviceMac;
  55. @property(nonatomic, strong, nullable) NSNumber * heartRate;
  56. @property(nonatomic, strong, nullable) NSNumber * contactDetected;
  57. @property(nonatomic, strong, nullable) NSArray<NSNumber *> * rrIntervals;
  58. @property(nonatomic, strong, nullable) NSNumber * timestampMill;
  59. @end
  60. /// The codec used by FLTSensorApi.
  61. NSObject<FlutterMessageCodec> *FLTSensorApiGetCodec(void);
  62. @protocol FLTSensorApi
  63. /// 获取当前位置,[force]为 false 时,
  64. /// 优先使用 lastPosition,为 true 强制重新获取当前位置。
  65. - (void)getCurrentPositionForce:(NSNumber *)force completion:(void (^)(FLTPosition *_Nullable, FlutterError *_Nullable))completion;
  66. - (void)locationStartMinTimeMs:(NSNumber *)minTimeMs minDistanceM:(NSNumber *)minDistanceM error:(FlutterError *_Nullable *_Nonnull)error;
  67. - (void)locationStopWithError:(FlutterError *_Nullable *_Nonnull)error;
  68. - (void)sportWearScanStartWithError:(FlutterError *_Nullable *_Nonnull)error;
  69. - (void)sportWearScanStopWithError:(FlutterError *_Nullable *_Nonnull)error;
  70. - (void)askEnableBluetoothWithCompletion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion;
  71. - (void)sportWearConnectWear:(FLTSportWear *)wear completion:(void (^)(FlutterError *_Nullable))completion;
  72. - (void)sportWearDisconnectWear:(FLTSportWear *)wear completion:(void (^)(FlutterError *_Nullable))completion;
  73. /// 是否开启位置服务
  74. ///
  75. /// @return `nil` only when `error != nil`.
  76. - (nullable NSNumber *)isLocationServiceOpenWithError:(FlutterError *_Nullable *_Nonnull)error;
  77. /// @return `nil` only when `error != nil`.
  78. - (nullable NSNumber *)getYDPIWithError:(FlutterError *_Nullable *_Nonnull)error;
  79. /// @return `nil` only when `error != nil`.
  80. - (nullable NSNumber *)getXDPIWithError:(FlutterError *_Nullable *_Nonnull)error;
  81. /// 只需要空实现即可,class必须有函数引用才会生成代码
  82. - (void)toGenAllClassOrientation:(FLTOrientation *)orientation hrm:(FLTHeartRateMeasurement *)hrm position:(FLTPosition *)position error:(FlutterError *_Nullable *_Nonnull)error;
  83. @end
  84. extern void FLTSensorApiSetup(id<FlutterBinaryMessenger> binaryMessenger, NSObject<FLTSensorApi> *_Nullable api);
  85. NS_ASSUME_NONNULL_END