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

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

Issue 1954643002: DBus support for attribute properties and permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@register_and_events
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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_
6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_ 6 #define DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 // FakeBluetoothGattDescriptorServiceProvider simulates behavior of a local 22 // FakeBluetoothGattDescriptorServiceProvider simulates behavior of a local
23 // GATT descriptor object and is used both in test cases in place of a mock 23 // GATT descriptor object and is used both in test cases in place of a mock
24 // and on the Linux desktop. 24 // and on the Linux desktop.
25 class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattDescriptorServiceProvider 25 class DEVICE_BLUETOOTH_EXPORT FakeBluetoothGattDescriptorServiceProvider
26 : public BluetoothGattDescriptorServiceProvider { 26 : public BluetoothGattDescriptorServiceProvider {
27 public: 27 public:
28 FakeBluetoothGattDescriptorServiceProvider( 28 FakeBluetoothGattDescriptorServiceProvider(
29 const dbus::ObjectPath& object_path, 29 const dbus::ObjectPath& object_path,
30 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate, 30 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate,
31 const std::string& uuid, 31 const std::string& uuid,
32 const std::vector<std::string>& permissions, 32 const std::vector<std::string>& flags,
33 const dbus::ObjectPath& characteristic_path); 33 const dbus::ObjectPath& characteristic_path);
34 ~FakeBluetoothGattDescriptorServiceProvider() override; 34 ~FakeBluetoothGattDescriptorServiceProvider() override;
35 35
36 // BluetoothGattDescriptorServiceProvider override. 36 // BluetoothGattDescriptorServiceProvider override.
37 void SendValueChanged(const std::vector<uint8_t>& value) override; 37 void SendValueChanged(const std::vector<uint8_t>& value) override;
38 38
39 // Methods to simulate value get/set requests issued from a remote device. The 39 // Methods to simulate value get/set requests issued from a remote device. The
40 // methods do nothing, if the associated service was not registered with the 40 // methods do nothing, if the associated service was not registered with the
41 // GATT manager. 41 // GATT manager.
42 void GetValue( 42 void GetValue(
(...skipping 25 matching lines...) Expand all
68 68
69 // The delegate that method calls are passed on to. 69 // The delegate that method calls are passed on to.
70 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate_; 70 std::unique_ptr<BluetoothGattAttributeValueDelegate> delegate_;
71 71
72 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattDescriptorServiceProvider); 72 DISALLOW_COPY_AND_ASSIGN(FakeBluetoothGattDescriptorServiceProvider);
73 }; 73 };
74 74
75 } // namespace bluez 75 } // namespace bluez
76 76
77 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER _H_ 77 #endif // DEVICE_BLUETOOTH_DBUS_FAKE_BLUETOOTH_GATT_DESCRIPTOR_SERVICE_PROVIDER _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698