OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TASK_MANAGER_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ |
6 #define DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 // bluetooth adapter state changes and any other bluetooth device inquiry | 28 // bluetooth adapter state changes and any other bluetooth device inquiry |
29 // result. | 29 // result. |
30 // | 30 // |
31 // It delegates the blocking Windows API calls to |bluetooth_task_runner_|'s | 31 // It delegates the blocking Windows API calls to |bluetooth_task_runner_|'s |
32 // message loop, and receives responses via methods like OnAdapterStateChanged | 32 // message loop, and receives responses via methods like OnAdapterStateChanged |
33 // posted to UI thread. | 33 // posted to UI thread. |
34 class BluetoothTaskManagerWin | 34 class BluetoothTaskManagerWin |
35 : public base::RefCountedThreadSafe<BluetoothTaskManagerWin> { | 35 : public base::RefCountedThreadSafe<BluetoothTaskManagerWin> { |
36 public: | 36 public: |
37 struct AdapterState { | 37 struct AdapterState { |
| 38 AdapterState(); |
| 39 ~AdapterState(); |
38 std::string name; | 40 std::string name; |
39 std::string address; | 41 std::string address; |
40 bool powered; | 42 bool powered; |
41 }; | 43 }; |
42 | 44 |
43 struct ServiceRecordState { | 45 struct ServiceRecordState { |
| 46 ServiceRecordState(); |
| 47 ~ServiceRecordState(); |
44 std::string name; | 48 std::string name; |
45 std::string address; | 49 std::string address; |
46 std::vector<uint8> sdp_bytes; | 50 std::vector<uint8> sdp_bytes; |
47 }; | 51 }; |
48 | 52 |
49 struct DeviceState { | 53 struct DeviceState { |
| 54 DeviceState(); |
| 55 ~DeviceState(); |
50 std::string name; | 56 std::string name; |
51 std::string address; | 57 std::string address; |
52 uint32 bluetooth_class; | 58 uint32 bluetooth_class; |
53 bool visible; | 59 bool visible; |
54 bool connected; | 60 bool connected; |
55 bool authenticated; | 61 bool authenticated; |
56 ScopedVector<ServiceRecordState> service_record_states; | 62 ScopedVector<ServiceRecordState> service_record_states; |
57 }; | 63 }; |
58 | 64 |
59 class Observer { | 65 class Observer { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 154 |
149 // indicates whether the adapter is in discovery mode or not. | 155 // indicates whether the adapter is in discovery mode or not. |
150 bool discovering_; | 156 bool discovering_; |
151 | 157 |
152 DISALLOW_COPY_AND_ASSIGN(BluetoothTaskManagerWin); | 158 DISALLOW_COPY_AND_ASSIGN(BluetoothTaskManagerWin); |
153 }; | 159 }; |
154 | 160 |
155 } // namespace device | 161 } // namespace device |
156 | 162 |
157 #endif // DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ | 163 #endif // DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ |
OLD | NEW |