OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_WIN_H_ | |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_WIN_H_ | |
7 | |
8 #include "base/files/file_path.h" | |
9 #include "base/memory/weak_ptr.h" | |
10 #include "device/bluetooth/bluetooth_gatt_descriptor.h" | |
11 #include "device/bluetooth/bluetooth_low_energy_defs_win.h" | |
12 | |
13 namespace device { | |
14 | |
15 class BluetoothAdapterWin; | |
16 class BluetoothRemoteGattCharacteristicWin; | |
17 class BluetoothTaskManagerWin; | |
18 | |
19 class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattDescriptorWin | |
20 : public BluetoothGattDescriptor { | |
21 public: | |
22 BluetoothRemoteGattDescriptorWin( | |
23 BluetoothRemoteGattCharacteristicWin* parent_characteristic, | |
24 BTH_LE_GATT_DESCRIPTOR* descriptor_info, | |
25 scoped_refptr<base::SequencedTaskRunner>& ui_task_runner); | |
26 ~BluetoothRemoteGattDescriptorWin(); | |
27 | |
28 // Override BluetoothGattDescriptor interfaces. | |
29 std::string GetIdentifier() const override; | |
30 BluetoothUUID GetUUID() const override; | |
31 bool IsLocal() const override; | |
32 std::vector<uint8_t>& GetValue() const override; | |
33 BluetoothGattCharacteristic* GetCharacteristic() const override; | |
34 BluetoothGattCharacteristic::Permissions GetPermissions() const override; | |
35 void ReadRemoteDescriptor(const ValueCallback& callback, | |
36 const ErrorCallback& error_callback) override; | |
37 void WriteRemoteDescriptor(const std::vector<uint8_t>& new_value, | |
38 const base::Closure& callback, | |
39 const ErrorCallback& error_callback) override; | |
40 | |
41 uint16_t GetAttributeHandle() const; | |
42 | |
43 private: | |
44 BluetoothRemoteGattCharacteristicWin* parent_characteristic_; | |
45 scoped_ptr<BTH_LE_GATT_DESCRIPTOR> descriptor_info_; | |
46 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | |
47 | |
48 BluetoothAdapterWin* adapter_; | |
scheib
2016/03/01 00:06:22
Do Characteristics and Descriptors need to access
gogerald1
2016/03/01 17:00:13
Done.
| |
49 base::FilePath service_path_; | |
50 scoped_refptr<BluetoothTaskManagerWin> task_manager_; | |
51 BluetoothGattCharacteristic::Permissions descriptor_permissions_; | |
52 BluetoothUUID descriptor_uuid_; | |
53 std::string descriptor_identifier_; | |
54 std::vector<uint8_t> descriptor_value_; | |
55 | |
56 base::WeakPtrFactory<BluetoothRemoteGattDescriptorWin> weak_ptr_factory_; | |
57 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorWin); | |
58 }; | |
59 | |
60 } // namespace device. | |
61 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_WIN_H_ | |
OLD | NEW |