Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: device/bluetooth/bluetooth_low_energy_device_mac.h

Issue 1948763003: Adding support for service scan on OS X (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup
Patch Set: Adding disconnect with error Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_low_energy_device_mac.h
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.h b/device/bluetooth/bluetooth_low_energy_device_mac.h
index 4466d67f13f9181d2adb21cd08994fe6d6f90546..ceb691a16ed83a3be9c4c7ef282f2a76da3af874 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.h
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.h
@@ -22,10 +22,13 @@
#include "crypto/sha2.h"
#include "device/bluetooth/bluetooth_device_mac.h"
+@class BluetoothLowEnergyPeripheralDelegate;
+
namespace device {
class BluetoothAdapterMac;
class BluetoothLowEnergyDiscoverManagerMac;
+class BluetoothRemoteGattServiceMac;
class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
: public BluetoothDeviceMac {
@@ -87,8 +90,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
// BluetoothDevice override.
std::string GetDeviceName() const override;
void CreateGattConnectionImpl() override;
+ void DidConnectGatt() override;
void DisconnectGatt() override;
+ // Methods for BluetoothLowEnergyPeripheralBridge.
ortuno 2016/05/06 16:03:32 nit: Methods used by BluetoothLowEnergyPeripheralB
jlebel 2016/05/07 00:16:10 Done.
+ void DidDiscoverPrimaryServices(NSError* error);
+ void DidModifyServices(NSArray* invalidatedServices);
+
// Updates information about the device.
virtual void Update(NSDictionary* advertisement_data, int rssi);
@@ -103,6 +111,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
private:
friend class BluetoothAdapterMac;
friend class BluetoothAdapterMacTest;
+ friend class BluetoothLowEnergyPeripheralBridge;
friend class BluetoothTestMac;
// Returns the Bluetooth adapter.
@@ -111,11 +120,17 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
// Returns the CoreBluetooth Peripheral.
CBPeripheral* GetPeripheral();
+ // Returns BluetoothRemoteGattServiceMac based on the CBService.
+ BluetoothRemoteGattServiceMac* GetBluetoothRemoteGattService(
+ CBService* service) const;
+
// Callback used when the CoreBluetooth Peripheral is disconnected.
void DidDisconnectPeripheral(BluetoothDevice::ConnectErrorCode error_code);
// CoreBluetooth data structure.
base::scoped_nsobject<CBPeripheral> peripheral_;
+ base::scoped_nsobject<BluetoothLowEnergyPeripheralDelegate>
ortuno 2016/05/06 16:03:32 nit: Add comment for this member.
jlebel 2016/05/07 00:16:10 Done.
+ peripheral_delegate_;
// RSSI value.
int rssi_;

Powered by Google App Engine
This is Rietveld 408576698