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

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

Issue 11075006: Moved bluetooth adapter files to device/bluetooth/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: renamed 'bluetooth' target to 'device_bluetooth'. Created 8 years, 2 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 | Annotate | Revision Log
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 CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/string16.h" 12 #include "base/string16.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 14
15 namespace chromeos { 15 namespace device {
16 16
17 class BluetoothServiceRecord; 17 class BluetoothServiceRecord;
18 class BluetoothSocket; 18 class BluetoothSocket;
19 19
20 struct BluetoothOutOfBandPairingData; 20 struct BluetoothOutOfBandPairingData;
21 21
22 // BluetoothDevice represents a remote Bluetooth device, both its properties and 22 // BluetoothDevice represents a remote Bluetooth device, both its properties and
23 // capabilities as discovered by a local adapter and actions that may be 23 // capabilities as discovered by a local adapter and actions that may be
24 // performed on the remove device such as pairing, connection and disconnection. 24 // performed on the remove device such as pairing, connection and disconnection.
25 // 25 //
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 typedef base::Callback<void()> ErrorCallback; 174 typedef base::Callback<void()> ErrorCallback;
175 175
176 // Returns the services (as BluetoothServiceRecord objects) that this device 176 // Returns the services (as BluetoothServiceRecord objects) that this device
177 // provides. 177 // provides.
178 typedef ScopedVector<BluetoothServiceRecord> ServiceRecordList; 178 typedef ScopedVector<BluetoothServiceRecord> ServiceRecordList;
179 typedef base::Callback<void(const ServiceRecordList&)> ServiceRecordsCallback; 179 typedef base::Callback<void(const ServiceRecordList&)> ServiceRecordsCallback;
180 virtual void GetServiceRecords(const ServiceRecordsCallback& callback, 180 virtual void GetServiceRecords(const ServiceRecordsCallback& callback,
181 const ErrorCallback& error_callback) = 0; 181 const ErrorCallback& error_callback) = 0;
182 182
183 // Indicates whether this device provides the given service. |uuid| should 183 // Indicates whether this device provides the given service. |uuid| should
184 // be in canonical form (see bluetooth_utils::CanonicalUuid). 184 // be in canonical form (see utils::CanonicalUuid).
185 virtual bool ProvidesServiceWithUUID(const std::string& uuid) const = 0; 185 virtual bool ProvidesServiceWithUUID(const std::string& uuid) const = 0;
186 186
187 // The ProvidesServiceCallback is used by ProvidesServiceWithName to indicate 187 // The ProvidesServiceCallback is used by ProvidesServiceWithName to indicate
188 // whether or not a matching service was found. 188 // whether or not a matching service was found.
189 typedef base::Callback<void(bool)> ProvidesServiceCallback; 189 typedef base::Callback<void(bool)> ProvidesServiceCallback;
190 190
191 // Indicates whether this device provides the given service. 191 // Indicates whether this device provides the given service.
192 virtual void ProvidesServiceWithName( 192 virtual void ProvidesServiceWithName(
193 const std::string& name, 193 const std::string& name,
194 const ProvidesServiceCallback& callback) = 0; 194 const ProvidesServiceCallback& callback) = 0;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 bool visible_; 306 bool visible_;
307 bool bonded_; 307 bool bonded_;
308 bool connected_; 308 bool connected_;
309 309
310 private: 310 private:
311 // Returns a localized string containing the device's bluetooth address and 311 // Returns a localized string containing the device's bluetooth address and
312 // a device type for display when |name_| is empty. 312 // a device type for display when |name_| is empty.
313 string16 GetAddressWithLocalizedDeviceTypeName() const; 313 string16 GetAddressWithLocalizedDeviceTypeName() const;
314 }; 314 };
315 315
316 } // namespace chromeos 316 } // namespace device
317 317
318 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_DEVICE_H_ 318 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698