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

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: Fixing comments 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
« no previous file with comments | « device/bluetooth/bluetooth_device_unittest.cc ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c5e24b166a9ac59bf989c859daa9c454c1e890dd 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 {
@@ -89,6 +92,10 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
void CreateGattConnectionImpl() override;
void DisconnectGatt() override;
+ // Methods used by BluetoothLowEnergyPeripheralBridge.
+ void DidDiscoverPrimaryServices(NSError* error);
+ void DidModifyServices(NSArray* invalidatedServices);
+
// Updates information about the device.
virtual void Update(NSDictionary* advertisement_data, int rssi);
@@ -103,6 +110,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
private:
friend class BluetoothAdapterMac;
friend class BluetoothAdapterMacTest;
+ friend class BluetoothLowEnergyPeripheralBridge;
friend class BluetoothTestMac;
// Returns the Bluetooth adapter.
@@ -111,12 +119,20 @@ 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_;
+ // Objective-C delegate for the CBPeripheral.
+ base::scoped_nsobject<BluetoothLowEnergyPeripheralDelegate>
+ peripheral_delegate_;
+
// RSSI value.
int rssi_;
« no previous file with comments | « device/bluetooth/bluetooth_device_unittest.cc ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698