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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_device_mac.h

Issue 1292263002: bluetooth: Create base class BluetoothDevice::CreateGattConnection impl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bt-adapter-
Patch Set: fix ProximityAuthBluetoothLowEnergyConnectionTest Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
7 7
8 #if defined(OS_IOS) 8 #if defined(OS_IOS)
9 #import <CoreBluetooth/CoreBluetooth.h> 9 #import <CoreBluetooth/CoreBluetooth.h>
10 #else // !defined(OS_IOS) 10 #else // !defined(OS_IOS)
(...skipping 26 matching lines...) Expand all
37 // BluetoothDevice overrides. 37 // BluetoothDevice overrides.
38 std::string GetIdentifier() const override; 38 std::string GetIdentifier() const override;
39 uint32 GetBluetoothClass() const override; 39 uint32 GetBluetoothClass() const override;
40 std::string GetAddress() const override; 40 std::string GetAddress() const override;
41 BluetoothDevice::VendorIDSource GetVendorIDSource() const override; 41 BluetoothDevice::VendorIDSource GetVendorIDSource() const override;
42 uint16 GetVendorID() const override; 42 uint16 GetVendorID() const override;
43 uint16 GetProductID() const override; 43 uint16 GetProductID() const override;
44 uint16 GetDeviceID() const override; 44 uint16 GetDeviceID() const override;
45 bool IsPaired() const override; 45 bool IsPaired() const override;
46 bool IsConnected() const override; 46 bool IsConnected() const override;
47 bool IsGattConnected() const override;
47 bool IsConnectable() const override; 48 bool IsConnectable() const override;
48 bool IsConnecting() const override; 49 bool IsConnecting() const override;
49 BluetoothDevice::UUIDList GetUUIDs() const override; 50 BluetoothDevice::UUIDList GetUUIDs() const override;
50 int16 GetInquiryRSSI() const override; 51 int16 GetInquiryRSSI() const override;
51 int16 GetInquiryTxPower() const override; 52 int16 GetInquiryTxPower() const override;
52 bool ExpectingPinCode() const override; 53 bool ExpectingPinCode() const override;
53 bool ExpectingPasskey() const override; 54 bool ExpectingPasskey() const override;
54 bool ExpectingConfirmation() const override; 55 bool ExpectingConfirmation() const override;
55 void GetConnectionInfo(const ConnectionInfoCallback& callback) override; 56 void GetConnectionInfo(const ConnectionInfoCallback& callback) override;
56 void Connect(PairingDelegate* pairing_delegate, 57 void Connect(PairingDelegate* pairing_delegate,
(...skipping 18 matching lines...) Expand all
75 void CreateGattConnection( 76 void CreateGattConnection(
76 const GattConnectionCallback& callback, 77 const GattConnectionCallback& callback,
77 const ConnectErrorCallback& error_callback) override; 78 const ConnectErrorCallback& error_callback) override;
78 79
79 // BluetoothDeviceMac override. 80 // BluetoothDeviceMac override.
80 NSDate* GetLastUpdateTime() const override; 81 NSDate* GetLastUpdateTime() const override;
81 82
82 protected: 83 protected:
83 // BluetoothDevice override. 84 // BluetoothDevice override.
84 std::string GetDeviceName() const override; 85 std::string GetDeviceName() const override;
86 void CreateGattConnectionImpl() override;
87 void DisconnectGatt() override;
85 88
86 // Updates information about the device. 89 // Updates information about the device.
87 virtual void Update(CBPeripheral* peripheral, 90 virtual void Update(CBPeripheral* peripheral,
88 NSDictionary* advertisement_data, 91 NSDictionary* advertisement_data,
89 int rssi); 92 int rssi);
90 93
91 static std::string GetPeripheralIdentifier(CBPeripheral* peripheral); 94 static std::string GetPeripheralIdentifier(CBPeripheral* peripheral);
92 95
93 // Hashes and truncates the peripheral identifier to deterministically 96 // Hashes and truncates the peripheral identifier to deterministically
94 // construct an address. The use of fake addresses is a temporary fix before 97 // construct an address. The use of fake addresses is a temporary fix before
(...skipping 29 matching lines...) Expand all
124 127
125 // The services (identified by UUIDs) that this device provides. 128 // The services (identified by UUIDs) that this device provides.
126 std::set<BluetoothUUID> advertised_uuids_; 129 std::set<BluetoothUUID> advertised_uuids_;
127 130
128 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac); 131 DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac);
129 }; 132 };
130 133
131 } // namespace device 134 } // namespace device
132 135
133 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_ 136 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_DEVICE_MAC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_gatt_connection_chromeos.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