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

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

Issue 1920353002: Implement create attribute API functions for BTLE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@api_changes
Patch Set: owners 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 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_BLUEZ_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_ 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 // device::BluetoothGattService overrides. 52 // device::BluetoothGattService overrides.
53 device::BluetoothUUID GetUUID() const override; 53 device::BluetoothUUID GetUUID() const override;
54 bool IsPrimary() const override; 54 bool IsPrimary() const override;
55 55
56 // device::BluetoothLocalGattService overrides. 56 // device::BluetoothLocalGattService overrides.
57 void Register(const base::Closure& callback, 57 void Register(const base::Closure& callback,
58 const ErrorCallback& error_callback) override; 58 const ErrorCallback& error_callback) override;
59 void Unregister(const base::Closure& callback, 59 void Unregister(const base::Closure& callback,
60 const ErrorCallback& error_callback) override; 60 const ErrorCallback& error_callback) override;
61 device::BluetoothLocalGattCharacteristic* GetCharacteristic(
62 const std::string& identifier) override;
61 63
62 const std::vector<std::unique_ptr<BluetoothLocalGattCharacteristicBlueZ>>& 64 const std::map<dbus::ObjectPath,
65 std::unique_ptr<BluetoothLocalGattCharacteristicBlueZ>>&
63 GetCharacteristics() const; 66 GetCharacteristics() const;
64 67
65 Delegate* GetDelegate() { return delegate_; } 68 Delegate* GetDelegate() { return delegate_; }
66 69
67 static dbus::ObjectPath AddGuidToObjectPath(const std::string& path); 70 static dbus::ObjectPath AddGuidToObjectPath(const std::string& path);
68 71
69 private: 72 private:
70 friend class BluetoothLocalGattCharacteristicBlueZ; 73 friend class BluetoothLocalGattCharacteristicBlueZ;
71 // Needs access to weak_ptr_factory_. 74 // Needs access to weak_ptr_factory_.
72 friend class device::BluetoothLocalGattService; 75 friend class device::BluetoothLocalGattService;
(...skipping 11 matching lines...) Expand all
84 device::BluetoothUUID uuid_; 87 device::BluetoothUUID uuid_;
85 88
86 // If this service is primary. 89 // If this service is primary.
87 bool is_primary_; 90 bool is_primary_;
88 91
89 // Delegate to receive read/write requests for attribute values contained 92 // Delegate to receive read/write requests for attribute values contained
90 // in this service. 93 // in this service.
91 device::BluetoothLocalGattService::Delegate* delegate_; 94 device::BluetoothLocalGattService::Delegate* delegate_;
92 95
93 // Characteristics contained by this service. 96 // Characteristics contained by this service.
94 std::vector<std::unique_ptr<BluetoothLocalGattCharacteristicBlueZ>> 97 std::map<dbus::ObjectPath,
98 std::unique_ptr<BluetoothLocalGattCharacteristicBlueZ>>
95 characteristics_; 99 characteristics_;
96 100
97 // Note: This should remain the last member so it'll be destroyed and 101 // Note: This should remain the last member so it'll be destroyed and
98 // invalidate its weak pointers before any other members are destroyed. 102 // invalidate its weak pointers before any other members are destroyed.
99 base::WeakPtrFactory<BluetoothLocalGattServiceBlueZ> weak_ptr_factory_; 103 base::WeakPtrFactory<BluetoothLocalGattServiceBlueZ> weak_ptr_factory_;
100 104
101 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattServiceBlueZ); 105 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattServiceBlueZ);
102 }; 106 };
103 107
104 } // namespace bluez 108 } // namespace bluez
105 109
106 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_ 110 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_SERVICE_BLUEZ_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluez/bluetooth_adapter_bluez.cc ('k') | device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698