OLD | NEW |
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_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 // an instance of BluetoothLocalGattService::Delegate has been provided to | 39 // an instance of BluetoothLocalGattService::Delegate has been provided to |
40 // the | 40 // the |
41 // associated BluetoothLocalGattService instance, in which case the delegate | 41 // associated BluetoothLocalGattService instance, in which case the delegate |
42 // will | 42 // will |
43 // handle the read and write requests. | 43 // handle the read and write requests. |
44 // | 44 // |
45 // Currently, only custom UUIDs, |kCharacteristicDescriptionUuid|, and | 45 // Currently, only custom UUIDs, |kCharacteristicDescriptionUuid|, and |
46 // |kCharacteristicPresentationFormat| are supported for locally hosted | 46 // |kCharacteristicPresentationFormat| are supported for locally hosted |
47 // descriptors. This method will return NULL if |uuid| is any one of the | 47 // descriptors. This method will return NULL if |uuid| is any one of the |
48 // unsupported predefined descriptor UUIDs. | 48 // unsupported predefined descriptor UUIDs. |
49 static BluetoothLocalGattDescriptor* Create( | 49 static base::WeakPtr<BluetoothLocalGattDescriptor> Create( |
50 const BluetoothUUID& uuid, | 50 const BluetoothUUID& uuid, |
51 const std::vector<uint8_t>& value, | |
52 BluetoothGattCharacteristic::Permissions permissions, | 51 BluetoothGattCharacteristic::Permissions permissions, |
53 BluetoothLocalGattCharacteristic* characteristic); | 52 BluetoothLocalGattCharacteristic* characteristic); |
54 | 53 |
55 protected: | 54 protected: |
56 BluetoothLocalGattDescriptor(); | 55 BluetoothLocalGattDescriptor(); |
57 ~BluetoothLocalGattDescriptor() override; | 56 ~BluetoothLocalGattDescriptor() override; |
58 | 57 |
59 private: | 58 private: |
60 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattDescriptor); | 59 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattDescriptor); |
61 }; | 60 }; |
62 | 61 |
63 } // namespace device | 62 } // namespace device |
64 | 63 |
65 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_H_ | 64 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_H_ |
OLD | NEW |