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

Side by Side Diff: device/bluetooth/bluez/bluetooth_service_record_bluez.h

Issue 2302963002: device/bluetooth: Add a helper function to BluetoothServiceRecordBlueZ (Closed)
Patch Set: Rebase on ToT. Created 4 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
« no previous file with comments | « no previous file | device/bluetooth/bluez/bluetooth_service_record_bluez.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BLUEZ_BLUETOOTH_SERVICE_RECORD_BLUEZ_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_SERVICE_RECORD_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_SERVICE_RECORD_BLUEZ_H_ 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_SERVICE_RECORD_BLUEZ_H_
7 7
8 #include <cstdint> 8 #include <cstdint>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 24 matching lines...) Expand all
35 BluetoothServiceRecordBlueZ(); 35 BluetoothServiceRecordBlueZ();
36 BluetoothServiceRecordBlueZ(const BluetoothServiceRecordBlueZ& record); 36 BluetoothServiceRecordBlueZ(const BluetoothServiceRecordBlueZ& record);
37 ~BluetoothServiceRecordBlueZ(); 37 ~BluetoothServiceRecordBlueZ();
38 38
39 // Returns a list of Attribute IDs that exist within this service record. 39 // Returns a list of Attribute IDs that exist within this service record.
40 const std::vector<uint16_t> GetAttributeIds() const; 40 const std::vector<uint16_t> GetAttributeIds() const;
41 // Returns the value associated with a given attribute ID in |value|. 41 // Returns the value associated with a given attribute ID in |value|.
42 const BluetoothServiceAttributeValueBlueZ& GetAttributeValue( 42 const BluetoothServiceAttributeValueBlueZ& GetAttributeValue(
43 uint16_t attribute_id) const; 43 uint16_t attribute_id) const;
44 44
45 // Add an an entry to this service record. If a record with the given ID 45 // Adds an entry to this service record. If a record with the given ID already
46 // already exists, it is replaced. 46 // exists, it is replaced.
47 void AddRecordEntry(uint16_t id, 47 void AddRecordEntry(uint16_t id,
48 const BluetoothServiceAttributeValueBlueZ& value); 48 const BluetoothServiceAttributeValueBlueZ& value);
49 49
50 // Returns true if the given attribute ID is found in the attribute map, false
51 // otherwise.
52 bool IsAttributePresented(uint16_t id);
53
50 private: 54 private:
51 std::map<uint16_t, BluetoothServiceAttributeValueBlueZ> attributes_; 55 std::map<uint16_t, BluetoothServiceAttributeValueBlueZ> attributes_;
52 }; 56 };
53 57
54 } // namespace bluez 58 } // namespace bluez
55 59
56 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_SERVICE_RECORD_BLUEZ_H_ 60 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_SERVICE_RECORD_BLUEZ_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluez/bluetooth_service_record_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698