OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_TEST_BLUETOOTH_ADAPTER_OBSERVER_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_TEST_BLUETOOTH_ADAPTER_OBSERVER_H_ |
6 #define DEVICE_BLUETOOTH_TEST_BLUETOOTH_ADAPTER_OBSERVER_H_ | 6 #define DEVICE_BLUETOOTH_TEST_TEST_BLUETOOTH_ADAPTER_OBSERVER_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 "device/bluetooth/bluetooth_adapter.h" | 13 #include "device/bluetooth/bluetooth_adapter.h" |
14 | 14 |
15 namespace device { | 15 namespace device { |
16 | 16 |
(...skipping 23 matching lines...) Expand all Loading... |
40 const std::string& old_address) override; | 40 const std::string& old_address) override; |
41 #if defined(OS_CHROMEOS) || defined(OS_LINUX) | 41 #if defined(OS_CHROMEOS) || defined(OS_LINUX) |
42 void DevicePairedChanged(device::BluetoothAdapter* adapter, | 42 void DevicePairedChanged(device::BluetoothAdapter* adapter, |
43 device::BluetoothDevice* device, | 43 device::BluetoothDevice* device, |
44 bool new_paired_status) override; | 44 bool new_paired_status) override; |
45 #endif | 45 #endif |
46 void DeviceRemoved(BluetoothAdapter* adapter, | 46 void DeviceRemoved(BluetoothAdapter* adapter, |
47 BluetoothDevice* device) override; | 47 BluetoothDevice* device) override; |
48 void GattServiceAdded(BluetoothAdapter* adapter, | 48 void GattServiceAdded(BluetoothAdapter* adapter, |
49 BluetoothDevice* device, | 49 BluetoothDevice* device, |
50 BluetoothGattService* service) override; | 50 BluetoothRemoteGattService* service) override; |
51 void GattServiceRemoved(BluetoothAdapter* adapter, | 51 void GattServiceRemoved(BluetoothAdapter* adapter, |
52 BluetoothDevice* device, | 52 BluetoothDevice* device, |
53 BluetoothGattService* service) override; | 53 BluetoothRemoteGattService* service) override; |
54 void GattServicesDiscovered(BluetoothAdapter* adapter, | 54 void GattServicesDiscovered(BluetoothAdapter* adapter, |
55 BluetoothDevice* device) override; | 55 BluetoothDevice* device) override; |
56 void GattDiscoveryCompleteForService(BluetoothAdapter* adapter, | 56 void GattDiscoveryCompleteForService( |
57 BluetoothGattService* service) override; | 57 BluetoothAdapter* adapter, |
| 58 BluetoothRemoteGattService* service) override; |
58 void GattServiceChanged(BluetoothAdapter* adapter, | 59 void GattServiceChanged(BluetoothAdapter* adapter, |
59 BluetoothGattService* service) override; | 60 BluetoothRemoteGattService* service) override; |
60 void GattCharacteristicAdded( | 61 void GattCharacteristicAdded( |
61 BluetoothAdapter* adapter, | 62 BluetoothAdapter* adapter, |
62 BluetoothGattCharacteristic* characteristic) override; | 63 BluetoothRemoteGattCharacteristic* characteristic) override; |
63 void GattCharacteristicRemoved( | 64 void GattCharacteristicRemoved( |
64 BluetoothAdapter* adapter, | 65 BluetoothAdapter* adapter, |
65 BluetoothGattCharacteristic* characteristic) override; | 66 BluetoothRemoteGattCharacteristic* characteristic) override; |
66 void GattDescriptorAdded(BluetoothAdapter* adapter, | 67 void GattDescriptorAdded(BluetoothAdapter* adapter, |
67 BluetoothGattDescriptor* descriptor) override; | 68 BluetoothRemoteGattDescriptor* descriptor) override; |
68 void GattDescriptorRemoved(BluetoothAdapter* adapter, | 69 void GattDescriptorRemoved( |
69 BluetoothGattDescriptor* descriptor) override; | 70 BluetoothAdapter* adapter, |
| 71 BluetoothRemoteGattDescriptor* descriptor) override; |
70 void GattCharacteristicValueChanged( | 72 void GattCharacteristicValueChanged( |
71 BluetoothAdapter* adapter, | 73 BluetoothAdapter* adapter, |
72 BluetoothGattCharacteristic* characteristic, | 74 BluetoothRemoteGattCharacteristic* characteristic, |
73 const std::vector<uint8_t>& value) override; | 75 const std::vector<uint8_t>& value) override; |
74 void GattDescriptorValueChanged(BluetoothAdapter* adapter, | 76 void GattDescriptorValueChanged(BluetoothAdapter* adapter, |
75 BluetoothGattDescriptor* descriptor, | 77 BluetoothRemoteGattDescriptor* descriptor, |
76 const std::vector<uint8_t>& value) override; | 78 const std::vector<uint8_t>& value) override; |
77 | 79 |
78 // Adapter related: | 80 // Adapter related: |
79 int present_changed_count() { return present_changed_count_; } | 81 int present_changed_count() { return present_changed_count_; } |
80 int powered_changed_count() { return powered_changed_count_; } | 82 int powered_changed_count() { return powered_changed_count_; } |
81 int discoverable_changed_count() { return discoverable_changed_count_; } | 83 int discoverable_changed_count() { return discoverable_changed_count_; } |
82 int discovering_changed_count() { return discovering_changed_count_; } | 84 int discovering_changed_count() { return discovering_changed_count_; } |
83 bool last_present() { return last_present_; } | 85 bool last_present() { return last_present_; } |
84 bool last_powered() { return last_powered_; } | 86 bool last_powered() { return last_powered_; } |
85 bool last_discovering() { return last_discovering_; } | 87 bool last_discovering() { return last_discovering_; } |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 std::vector<uint8_t> last_changed_characteristic_value_; | 186 std::vector<uint8_t> last_changed_characteristic_value_; |
185 std::string last_gatt_descriptor_id_; | 187 std::string last_gatt_descriptor_id_; |
186 BluetoothUUID last_gatt_descriptor_uuid_; | 188 BluetoothUUID last_gatt_descriptor_uuid_; |
187 std::vector<uint8_t> last_changed_descriptor_value_; | 189 std::vector<uint8_t> last_changed_descriptor_value_; |
188 | 190 |
189 DISALLOW_COPY_AND_ASSIGN(TestBluetoothAdapterObserver); | 191 DISALLOW_COPY_AND_ASSIGN(TestBluetoothAdapterObserver); |
190 }; | 192 }; |
191 | 193 |
192 } // namespace device | 194 } // namespace device |
193 | 195 |
194 #endif // DEVICE_BLUETOOTH_TEST_BLUETOOTH_ADAPTER_OBSERVER_H_ | 196 #endif // DEVICE_BLUETOOTH_TEST_TEST_BLUETOOTH_ADAPTER_OBSERVER_H_ |
OLD | NEW |