HeartBLEManager.h 758 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // HeartBLEManager.h
  3. // HeartTestDemo
  4. //
  5. // Created by 郭志奇 on 2019/8/7.
  6. // Copyright © 2019 郭志奇. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @class HeartBLEDevice;
  11. @protocol BLEManagerDelegate <NSObject>
  12. - (void)onDeviceFound:(NSArray *)deviceArray;
  13. - (void)isConnected:(BOOL)isConnected withDevice:(HeartBLEDevice *)device;
  14. - (void)disconnected:(HeartBLEDevice *)device;
  15. @end
  16. @interface HeartBLEManager : NSObject
  17. @property (nonatomic,assign) BOOL isBLEPoweredOn;
  18. @property (nonatomic,assign) NSArray *connectedDevices;
  19. + (instancetype)sharedInstance;
  20. - (void)setDelegate:(id)delegate;
  21. - (void)StartScanDevice;
  22. - (void)stopScan;
  23. - (void)closeAllDevice;
  24. @end
  25. NS_ASSUME_NONNULL_END