Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: device/bluetooth/bluetooth_device_win.h

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/bluetooth_device_unittest.cc ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_DEVICE_WIN_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
7 7
8 #include <stdint.h>
9
8 #include <string> 10 #include <string>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/basictypes.h" 13 #include "base/macros.h"
12 #include "base/observer_list.h" 14 #include "base/observer_list.h"
13 #include "device/bluetooth/bluetooth_device.h" 15 #include "device/bluetooth/bluetooth_device.h"
14 #include "device/bluetooth/bluetooth_export.h" 16 #include "device/bluetooth/bluetooth_export.h"
15 #include "device/bluetooth/bluetooth_task_manager_win.h" 17 #include "device/bluetooth/bluetooth_task_manager_win.h"
16 18
17 namespace device { 19 namespace device {
18 20
19 class BluetoothAdapterWin; 21 class BluetoothAdapterWin;
20 class BluetoothServiceRecordWin; 22 class BluetoothServiceRecordWin;
21 class BluetoothSocketThread; 23 class BluetoothSocketThread;
22 24
23 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceWin : public BluetoothDevice { 25 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceWin : public BluetoothDevice {
24 public: 26 public:
25 explicit BluetoothDeviceWin( 27 explicit BluetoothDeviceWin(
26 BluetoothAdapterWin* adapter, 28 BluetoothAdapterWin* adapter,
27 const BluetoothTaskManagerWin::DeviceState& device_state, 29 const BluetoothTaskManagerWin::DeviceState& device_state,
28 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner, 30 const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
29 const scoped_refptr<BluetoothSocketThread>& socket_thread, 31 const scoped_refptr<BluetoothSocketThread>& socket_thread,
30 net::NetLog* net_log, 32 net::NetLog* net_log,
31 const net::NetLog::Source& net_log_source); 33 const net::NetLog::Source& net_log_source);
32 ~BluetoothDeviceWin() override; 34 ~BluetoothDeviceWin() override;
33 35
34 // BluetoothDevice override 36 // BluetoothDevice override
35 uint32 GetBluetoothClass() const override; 37 uint32_t GetBluetoothClass() const override;
36 std::string GetAddress() const override; 38 std::string GetAddress() const override;
37 VendorIDSource GetVendorIDSource() const override; 39 VendorIDSource GetVendorIDSource() const override;
38 uint16 GetVendorID() const override; 40 uint16_t GetVendorID() const override;
39 uint16 GetProductID() const override; 41 uint16_t GetProductID() const override;
40 uint16 GetDeviceID() const override; 42 uint16_t GetDeviceID() const override;
41 bool IsPaired() const override; 43 bool IsPaired() const override;
42 bool IsConnected() const override; 44 bool IsConnected() const override;
43 bool IsGattConnected() const override; 45 bool IsGattConnected() const override;
44 bool IsConnectable() const override; 46 bool IsConnectable() const override;
45 bool IsConnecting() const override; 47 bool IsConnecting() const override;
46 UUIDList GetUUIDs() const override; 48 UUIDList GetUUIDs() const override;
47 int16 GetInquiryRSSI() const override; 49 int16_t GetInquiryRSSI() const override;
48 int16 GetInquiryTxPower() const override; 50 int16_t GetInquiryTxPower() const override;
49 bool ExpectingPinCode() const override; 51 bool ExpectingPinCode() const override;
50 bool ExpectingPasskey() const override; 52 bool ExpectingPasskey() const override;
51 bool ExpectingConfirmation() const override; 53 bool ExpectingConfirmation() const override;
52 void GetConnectionInfo(const ConnectionInfoCallback& callback) override; 54 void GetConnectionInfo(const ConnectionInfoCallback& callback) override;
53 void Connect(PairingDelegate* pairing_delegate, 55 void Connect(PairingDelegate* pairing_delegate,
54 const base::Closure& callback, 56 const base::Closure& callback,
55 const ConnectErrorCallback& error_callback) override; 57 const ConnectErrorCallback& error_callback) override;
56 void SetPinCode(const std::string& pincode) override; 58 void SetPinCode(const std::string& pincode) override;
57 void SetPasskey(uint32 passkey) override; 59 void SetPasskey(uint32_t passkey) override;
58 void ConfirmPairing() override; 60 void ConfirmPairing() override;
59 void RejectPairing() override; 61 void RejectPairing() override;
60 void CancelPairing() override; 62 void CancelPairing() override;
61 void Disconnect(const base::Closure& callback, 63 void Disconnect(const base::Closure& callback,
62 const ErrorCallback& error_callback) override; 64 const ErrorCallback& error_callback) override;
63 void Forget(const base::Closure& callback, 65 void Forget(const base::Closure& callback,
64 const ErrorCallback& error_callback) override; 66 const ErrorCallback& error_callback) override;
65 void ConnectToService( 67 void ConnectToService(
66 const BluetoothUUID& uuid, 68 const BluetoothUUID& uuid,
67 const ConnectToServiceCallback& callback, 69 const ConnectToServiceCallback& callback,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Updates the services with services stored in |device_state|. 107 // Updates the services with services stored in |device_state|.
106 void UpdateServices(const BluetoothTaskManagerWin::DeviceState& device_state); 108 void UpdateServices(const BluetoothTaskManagerWin::DeviceState& device_state);
107 109
108 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; 110 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
109 scoped_refptr<BluetoothSocketThread> socket_thread_; 111 scoped_refptr<BluetoothSocketThread> socket_thread_;
110 net::NetLog* net_log_; 112 net::NetLog* net_log_;
111 net::NetLog::Source net_log_source_; 113 net::NetLog::Source net_log_source_;
112 114
113 // The Bluetooth class of the device, a bitmask that may be decoded using 115 // The Bluetooth class of the device, a bitmask that may be decoded using
114 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm 116 // https://www.bluetooth.org/Technical/AssignedNumbers/baseband.htm
115 uint32 bluetooth_class_; 117 uint32_t bluetooth_class_;
116 118
117 // The name of the device, as supplied by the remote device. 119 // The name of the device, as supplied by the remote device.
118 std::string name_; 120 std::string name_;
119 121
120 // The Bluetooth address of the device. 122 // The Bluetooth address of the device.
121 std::string address_; 123 std::string address_;
122 124
123 // Tracked device state, updated by the adapter managing the lifecycle of 125 // Tracked device state, updated by the adapter managing the lifecycle of
124 // the device. 126 // the device.
125 bool paired_; 127 bool paired_;
126 bool connected_; 128 bool connected_;
127 129
128 // Used to send change notifications when a device disappears during 130 // Used to send change notifications when a device disappears during
129 // discovery. 131 // discovery.
130 bool visible_; 132 bool visible_;
131 133
132 // The services (identified by UUIDs) that this device provides. 134 // The services (identified by UUIDs) that this device provides.
133 UUIDList uuids_; 135 UUIDList uuids_;
134 136
135 // The service records retrieved from SDP. 137 // The service records retrieved from SDP.
136 ServiceRecordList service_record_list_; 138 ServiceRecordList service_record_list_;
137 139
138 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin); 140 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceWin);
139 }; 141 };
140 142
141 } // namespace device 143 } // namespace device
142 144
143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_ 145 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_WIN_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device_unittest.cc ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698