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

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

Issue 2785383002: Update unit tests for BluetoothDevice::GetPrimaryServicesByUUID() etc. (Closed)
Patch Set: added TODO Created 3 years, 8 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 2016 The Chromium Authors. All rights reserved. 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 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_REMOTE_GATT_SERVICE_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "device/bluetooth/bluetooth_export.h" 12 #include "device/bluetooth/bluetooth_export.h"
13 #include "device/bluetooth/bluetooth_gatt_service.h" 13 #include "device/bluetooth/bluetooth_gatt_service.h"
14 14
15 namespace device { 15 namespace device {
16 16
17 class BluetoothDevice; 17 class BluetoothDevice;
18 class BluetoothRemoteGattCharacteristic; 18 class BluetoothRemoteGattCharacteristic;
19 class BluetoothUUID;
19 20
20 // BluetoothRemoteGattService represents a remote GATT service. 21 // BluetoothRemoteGattService represents a remote GATT service.
21 // 22 //
22 // Instances of the BluetoothRemoteGATTService class are used to represent GATT 23 // Instances of the BluetoothRemoteGATTService class are used to represent GATT
23 // attribute hierarchies that have been received from a 24 // attribute hierarchies that have been received from a
24 // remote Bluetooth GATT peripheral. Such BluetoothRemoteGattService instances 25 // remote Bluetooth GATT peripheral. Such BluetoothRemoteGattService instances
25 // are constructed and owned by a BluetoothDevice. 26 // are constructed and owned by a BluetoothDevice.
26 // 27 //
27 // Note: We use virtual inheritance on the GATT service since it will be 28 // Note: We use virtual inheritance on the GATT service since it will be
28 // inherited by platform specific versions of the GATT service classes also. The 29 // inherited by platform specific versions of the GATT service classes also. The
(...skipping 14 matching lines...) Expand all
43 44
44 // List of GATT services that are included by this service. 45 // List of GATT services that are included by this service.
45 virtual std::vector<BluetoothRemoteGattService*> GetIncludedServices() 46 virtual std::vector<BluetoothRemoteGattService*> GetIncludedServices()
46 const = 0; 47 const = 0;
47 48
48 // Returns the GATT characteristic with identifier |identifier| if it belongs 49 // Returns the GATT characteristic with identifier |identifier| if it belongs
49 // to this GATT service. 50 // to this GATT service.
50 virtual BluetoothRemoteGattCharacteristic* GetCharacteristic( 51 virtual BluetoothRemoteGattCharacteristic* GetCharacteristic(
51 const std::string& identifier) const = 0; 52 const std::string& identifier) const = 0;
52 53
54 std::vector<BluetoothRemoteGattCharacteristic*> GetCharacteristicsByUUID(
55 const BluetoothUUID& characteristic_uuid);
56
53 protected: 57 protected:
54 BluetoothRemoteGattService(); 58 BluetoothRemoteGattService();
55 59
56 private: 60 private:
57 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattService); 61 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattService);
58 }; 62 };
59 63
60 } // namespace device 64 } // namespace device
61 65
62 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_H_ 66 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698