bluetooth_low_energy_peripheral_delegate.h 1022 B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_PERIPHERAL_DELEGATE_H_
  5. #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_PERIPHERAL_DELEGATE_H_
  6. #import <CoreBluetooth/CoreBluetooth.h>
  7. #include "base/memory/ref_counted.h"
  8. #include "build/build_config.h"
  9. #if !BUILDFLAG(IS_IOS)
  10. #import <IOBluetooth/IOBluetooth.h>
  11. #endif
  12. namespace device {
  13. class BluetoothLowEnergyDeviceMac;
  14. class BluetoothLowEnergyPeripheralBridge;
  15. } // namespace device
  16. // This class will serve as the Objective-C delegate of CBPeripheral.
  17. @interface BluetoothLowEnergyPeripheralDelegate
  18. : NSObject<CBPeripheralDelegate> {
  19. std::unique_ptr<device::BluetoothLowEnergyPeripheralBridge> _bridge;
  20. }
  21. - (instancetype)initWithBluetoothLowEnergyDeviceMac:
  22. (device::BluetoothLowEnergyDeviceMac*)device_mac;
  23. @end
  24. #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_PERIPHERAL_DELEGATE_H_