OLD | NEW |
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_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_CHROMEOS_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_CHROMEOS_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_CHROMEOS_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 class BluetoothRemoteGattCharacteristicChromeOS; | 24 class BluetoothRemoteGattCharacteristicChromeOS; |
25 | 25 |
26 // The BluetoothRemoteGattDescriptorChromeOS class implements | 26 // The BluetoothRemoteGattDescriptorChromeOS class implements |
27 // BluetoothGattDescriptor for remote GATT characteristic descriptors on the | 27 // BluetoothGattDescriptor for remote GATT characteristic descriptors on the |
28 // Chrome OS platform. | 28 // Chrome OS platform. |
29 class BluetoothRemoteGattDescriptorChromeOS | 29 class BluetoothRemoteGattDescriptorChromeOS |
30 : public device::BluetoothGattDescriptor { | 30 : public device::BluetoothGattDescriptor { |
31 public: | 31 public: |
32 // device::BluetoothGattDescriptor overrides. | 32 // device::BluetoothGattDescriptor overrides. |
33 virtual std::string GetIdentifier() const OVERRIDE; | 33 virtual std::string GetIdentifier() const override; |
34 virtual device::BluetoothUUID GetUUID() const OVERRIDE; | 34 virtual device::BluetoothUUID GetUUID() const override; |
35 virtual bool IsLocal() const OVERRIDE; | 35 virtual bool IsLocal() const override; |
36 virtual const std::vector<uint8>& GetValue() const OVERRIDE; | 36 virtual const std::vector<uint8>& GetValue() const override; |
37 virtual device::BluetoothGattCharacteristic* | 37 virtual device::BluetoothGattCharacteristic* |
38 GetCharacteristic() const OVERRIDE; | 38 GetCharacteristic() const override; |
39 virtual device::BluetoothGattCharacteristic::Permissions | 39 virtual device::BluetoothGattCharacteristic::Permissions |
40 GetPermissions() const OVERRIDE; | 40 GetPermissions() const override; |
41 virtual void ReadRemoteDescriptor( | 41 virtual void ReadRemoteDescriptor( |
42 const ValueCallback& callback, | 42 const ValueCallback& callback, |
43 const ErrorCallback& error_callback) OVERRIDE; | 43 const ErrorCallback& error_callback) override; |
44 virtual void WriteRemoteDescriptor( | 44 virtual void WriteRemoteDescriptor( |
45 const std::vector<uint8>& new_value, | 45 const std::vector<uint8>& new_value, |
46 const base::Closure& callback, | 46 const base::Closure& callback, |
47 const ErrorCallback& error_callback) OVERRIDE; | 47 const ErrorCallback& error_callback) override; |
48 | 48 |
49 // Object path of the underlying D-Bus characteristic. | 49 // Object path of the underlying D-Bus characteristic. |
50 const dbus::ObjectPath& object_path() const { return object_path_; } | 50 const dbus::ObjectPath& object_path() const { return object_path_; } |
51 | 51 |
52 private: | 52 private: |
53 friend class BluetoothRemoteGattCharacteristicChromeOS; | 53 friend class BluetoothRemoteGattCharacteristicChromeOS; |
54 | 54 |
55 BluetoothRemoteGattDescriptorChromeOS( | 55 BluetoothRemoteGattDescriptorChromeOS( |
56 BluetoothRemoteGattCharacteristicChromeOS* characteristic, | 56 BluetoothRemoteGattCharacteristicChromeOS* characteristic, |
57 const dbus::ObjectPath& object_path); | 57 const dbus::ObjectPath& object_path); |
(...skipping 22 matching lines...) Expand all Loading... |
80 // Note: This should remain the last member so it'll be destroyed and | 80 // Note: This should remain the last member so it'll be destroyed and |
81 // invalidate its weak pointers before any other members are destroyed. | 81 // invalidate its weak pointers before any other members are destroyed. |
82 base::WeakPtrFactory<BluetoothRemoteGattDescriptorChromeOS> weak_ptr_factory_; | 82 base::WeakPtrFactory<BluetoothRemoteGattDescriptorChromeOS> weak_ptr_factory_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorChromeOS); | 84 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorChromeOS); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace chromeos | 87 } // namespace chromeos |
88 | 88 |
89 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_CHROMEOS_H_ | 89 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_CHROMEOS_H_ |
OLD | NEW |