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

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

Issue 13933012: Bluetooth: Don't attempt a pairing for devices not supporting it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: todo added Created 7 years, 8 months 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
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_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // be a synthesied string containing the address and localized type name 158 // be a synthesied string containing the address and localized type name
159 // if the device has no obtained name. 159 // if the device has no obtained name.
160 virtual string16 GetName() const; 160 virtual string16 GetName() const;
161 161
162 // Returns the type of the device, limited to those we support or are 162 // Returns the type of the device, limited to those we support or are
163 // aware of, by decoding the bluetooth class information. The returned 163 // aware of, by decoding the bluetooth class information. The returned
164 // values are unique, and do not overlap, so DEVICE_KEYBOARD is not also 164 // values are unique, and do not overlap, so DEVICE_KEYBOARD is not also
165 // DEVICE_PERIPHERAL. 165 // DEVICE_PERIPHERAL.
166 DeviceType GetDeviceType() const; 166 DeviceType GetDeviceType() const;
167 167
168 // Indicates whether the device is known to support pairing based on its
169 // device class and address.
170 bool IsPairable() const;
171
168 // Indicates whether the device is paired with the adapter. 172 // Indicates whether the device is paired with the adapter.
169 virtual bool IsPaired() const = 0; 173 virtual bool IsPaired() const = 0;
170 174
171 // Indicates whether the device is currently connected to the adapter. 175 // Indicates whether the device is currently connected to the adapter.
172 virtual bool IsConnected() const = 0; 176 virtual bool IsConnected() const = 0;
173 177
174 // Indicates whether the paired device accepts connections initiated from the 178 // Indicates whether the paired device accepts connections initiated from the
175 // adapter. This value is undefined for unpaired devices. 179 // adapter. This value is undefined for unpaired devices.
176 virtual bool IsConnectable() const = 0; 180 virtual bool IsConnectable() const = 0;
177 181
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 326
323 private: 327 private:
324 // Returns a localized string containing the device's bluetooth address and 328 // Returns a localized string containing the device's bluetooth address and
325 // a device type for display when |name_| is empty. 329 // a device type for display when |name_| is empty.
326 string16 GetAddressWithLocalizedDeviceTypeName() const; 330 string16 GetAddressWithLocalizedDeviceTypeName() const;
327 }; 331 };
328 332
329 } // namespace device 333 } // namespace device
330 334
331 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 335 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/bluetooth_options_handler.cc ('k') | device/bluetooth/bluetooth_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698