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_REMOTE_GATT_SERVICE_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_WIN_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_WIN_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 const ErrorCallback& error_callback) override; | 53 const ErrorCallback& error_callback) override; |
54 | 54 |
55 // Notify |characteristic| discovery complete, |characteristic| is the | 55 // Notify |characteristic| discovery complete, |characteristic| is the |
56 // included characteritic of this service. | 56 // included characteritic of this service. |
57 void GattCharacteristicDiscoveryComplete( | 57 void GattCharacteristicDiscoveryComplete( |
58 BluetoothRemoteGattCharacteristicWin* characteristic); | 58 BluetoothRemoteGattCharacteristicWin* characteristic); |
59 | 59 |
60 // Update included services and characteristics. | 60 // Update included services and characteristics. |
61 void Update(); | 61 void Update(); |
62 uint16_t GetAttributeHandle() const { return service_attribute_handle_; } | 62 uint16_t GetAttributeHandle() const { return service_attribute_handle_; } |
| 63 base::FilePath GetServicePath() { return service_path_; } |
| 64 BluetoothAdapterWin* GetWinAdapter() { return adapter_; } |
63 | 65 |
64 private: | 66 private: |
65 void OnGetIncludedCharacteristics( | 67 void OnGetIncludedCharacteristics( |
66 scoped_ptr<BTH_LE_GATT_CHARACTERISTIC> characteristics, | 68 scoped_ptr<BTH_LE_GATT_CHARACTERISTIC> characteristics, |
67 uint16_t num, | 69 uint16_t num, |
68 HRESULT hr); | 70 HRESULT hr); |
69 void UpdateIncludedCharacteristics( | 71 void UpdateIncludedCharacteristics( |
70 PBTH_LE_GATT_CHARACTERISTIC characteristics, | 72 PBTH_LE_GATT_CHARACTERISTIC characteristics, |
71 uint16_t num); | 73 uint16_t num); |
72 | 74 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 // Flag indicates if asynchronous discovery of included characteristic has | 121 // Flag indicates if asynchronous discovery of included characteristic has |
120 // completed. | 122 // completed. |
121 bool included_characteristics_discovered_; | 123 bool included_characteristics_discovered_; |
122 | 124 |
123 base::WeakPtrFactory<BluetoothRemoteGattServiceWin> weak_ptr_factory_; | 125 base::WeakPtrFactory<BluetoothRemoteGattServiceWin> weak_ptr_factory_; |
124 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceWin); | 126 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattServiceWin); |
125 }; | 127 }; |
126 | 128 |
127 } // namespace device. | 129 } // namespace device. |
128 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_WIN_H_ | 130 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_SERVICE_WIN_H_ |
OLD | NEW |