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

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

Issue 655093002: [Clean up] Introduce a BLUETOOTH_EXPORT macro to control symbol visibility outside of //device/blue… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Export BluetoothUUID's PrintTo as well Created 6 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
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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/scoped_vector.h" 14 #include "base/memory/scoped_vector.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "device/bluetooth/bluetooth_export.h"
16 #include "device/bluetooth/bluetooth_uuid.h" 17 #include "device/bluetooth/bluetooth_uuid.h"
17 #include "net/base/net_log.h" 18 #include "net/base/net_log.h"
18 19
19 namespace device { 20 namespace device {
20 21
21 class BluetoothGattConnection; 22 class BluetoothGattConnection;
22 class BluetoothGattService; 23 class BluetoothGattService;
23 class BluetoothSocket; 24 class BluetoothSocket;
24 class BluetoothUUID; 25 class BluetoothUUID;
25 26
26 // BluetoothDevice represents a remote Bluetooth device, both its properties and 27 // BluetoothDevice represents a remote Bluetooth device, both its properties and
27 // capabilities as discovered by a local adapter and actions that may be 28 // capabilities as discovered by a local adapter and actions that may be
28 // performed on the remove device such as pairing, connection and disconnection. 29 // performed on the remove device such as pairing, connection and disconnection.
29 // 30 //
30 // The class is instantiated and managed by the BluetoothAdapter class 31 // The class is instantiated and managed by the BluetoothAdapter class
31 // and pointers should only be obtained from that class and not cached, 32 // and pointers should only be obtained from that class and not cached,
32 // instead use the GetAddress() method as a unique key for a device. 33 // instead use the GetAddress() method as a unique key for a device.
33 // 34 //
34 // Since the lifecycle of BluetoothDevice instances is managed by 35 // Since the lifecycle of BluetoothDevice instances is managed by
35 // BluetoothAdapter, that class rather than this provides observer methods 36 // BluetoothAdapter, that class rather than this provides observer methods
36 // for devices coming and going, as well as properties being updated. 37 // for devices coming and going, as well as properties being updated.
37 class BluetoothDevice { 38 class BLUETOOTH_EXPORT BluetoothDevice {
38 public: 39 public:
39 // Possible values that may be returned by GetVendorIDSource(), 40 // Possible values that may be returned by GetVendorIDSource(),
40 // indicating different organisations that allocate the identifiers returned 41 // indicating different organisations that allocate the identifiers returned
41 // by GetVendorID(). 42 // by GetVendorID().
42 enum VendorIDSource { 43 enum VendorIDSource {
43 VENDOR_ID_UNKNOWN, 44 VENDOR_ID_UNKNOWN,
44 VENDOR_ID_BLUETOOTH, 45 VENDOR_ID_BLUETOOTH,
45 VENDOR_ID_USB 46 VENDOR_ID_USB
46 }; 47 };
47 48
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 404
404 private: 405 private:
405 // Returns a localized string containing the device's bluetooth address and 406 // Returns a localized string containing the device's bluetooth address and
406 // a device type for display when |name_| is empty. 407 // a device type for display when |name_| is empty.
407 base::string16 GetAddressWithLocalizedDeviceTypeName() const; 408 base::string16 GetAddressWithLocalizedDeviceTypeName() const;
408 }; 409 };
409 410
410 } // namespace device 411 } // namespace device
411 412
412 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_ 413 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_factory.h ('k') | device/bluetooth/bluetooth_discovery_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698