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

Side by Side Diff: device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider_impl.h

Issue 1974633002: Implement DBus changes needed for notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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_DBUS_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_IMPL_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_IMPL_H_
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_IMPL_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/threading/platform_thread.h" 15 #include "base/threading/platform_thread.h"
16 #include "dbus/bus.h" 16 #include "dbus/bus.h"
17 #include "dbus/exported_object.h" 17 #include "dbus/exported_object.h"
18 #include "dbus/message.h" 18 #include "dbus/message.h"
19 #include "dbus/object_path.h" 19 #include "dbus/object_path.h"
20 #include "device/bluetooth/dbus/bluetooth_gatt_attribute_value_delegate.h" 20 #include "device/bluetooth/dbus/bluetooth_gatt_attribute_value_delegate.h"
21 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h" 21 #include "device/bluetooth/dbus/bluetooth_gatt_descriptor_service_provider.h"
22 22
23 namespace bluez { 23 namespace bluez {
24 24
25 // The BluetoothGattDescriptorServiceProvider implementation used in production. 25 // The BluetoothGattDescriptorServiceProvider implementation used in production.
26 class DEVICE_BLUETOOTH_EXPORT BluetoothGattDescriptorServiceProviderImpl 26 class DEVICE_BLUETOOTH_EXPORT BluetoothGattDescriptorServiceProviderImpl
27 : public BluetoothGattDescriptorServiceProvider { 27 : public BluetoothGattDescriptorServiceProvider {
28 public: 28 public:
29 // Use nullptr for |bus| to create for testing.
29 BluetoothGattDescriptorServiceProviderImpl( 30 BluetoothGattDescriptorServiceProviderImpl(
30 dbus::Bus* bus, 31 dbus::Bus* bus,
31 const dbus::ObjectPath& object_path, 32 const dbus::ObjectPath& object_path,
32 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate, 33 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate,
33 const std::string& uuid, 34 const std::string& uuid,
34 const std::vector<std::string>& flags, 35 const std::vector<std::string>& flags,
35 const dbus::ObjectPath& characteristic_path); 36 const dbus::ObjectPath& characteristic_path);
36 ~BluetoothGattDescriptorServiceProviderImpl() override; 37 ~BluetoothGattDescriptorServiceProviderImpl() override;
37 38
38 // BluetoothGattDescriptorServiceProvider override. 39 // BluetoothGattDescriptorServiceProvider override.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // invalidate its weak pointers before any other members are destroyed. 129 // invalidate its weak pointers before any other members are destroyed.
129 base::WeakPtrFactory<BluetoothGattDescriptorServiceProviderImpl> 130 base::WeakPtrFactory<BluetoothGattDescriptorServiceProviderImpl>
130 weak_ptr_factory_; 131 weak_ptr_factory_;
131 132
132 DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorServiceProviderImpl); 133 DISALLOW_COPY_AND_ASSIGN(BluetoothGattDescriptorServiceProviderImpl);
133 }; 134 };
134 135
135 } // namespace bluez 136 } // namespace bluez
136 137
137 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_IMPL _H_ 138 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_IMPL _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698