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

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

Issue 13224004: Bluetooth: remove private members from BluetoothAdapter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments 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 | 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 DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Adds and removes observers for events on this bluetooth adapter, 80 // Adds and removes observers for events on this bluetooth adapter,
81 // if monitoring multiple adapters check the |adapter| parameter of 81 // if monitoring multiple adapters check the |adapter| parameter of
82 // observer methods to determine which adapter is issuing the event. 82 // observer methods to determine which adapter is issuing the event.
83 virtual void AddObserver(BluetoothAdapter::Observer* observer) = 0; 83 virtual void AddObserver(BluetoothAdapter::Observer* observer) = 0;
84 virtual void RemoveObserver( 84 virtual void RemoveObserver(
85 BluetoothAdapter::Observer* observer) = 0; 85 BluetoothAdapter::Observer* observer) = 0;
86 86
87 // The address of this adapter. The address format is "XX:XX:XX:XX:XX:XX", 87 // The address of this adapter. The address format is "XX:XX:XX:XX:XX:XX",
88 // where each XX is a hexadecimal number. 88 // where each XX is a hexadecimal number.
89 virtual const std::string& address() const; 89 virtual std::string address() const = 0;
90 90
91 // The name of the adapter. 91 // The name of the adapter.
92 virtual const std::string& name() const; 92 virtual std::string name() const = 0;
93 93
94 // Indicates whether the adapter is initialized and ready to use. 94 // Indicates whether the adapter is initialized and ready to use.
95 virtual bool IsInitialized() const = 0; 95 virtual bool IsInitialized() const = 0;
96 96
97 // Indicates whether the adapter is actually present on the system, for 97 // Indicates whether the adapter is actually present on the system, for
98 // the default adapter this indicates whether any adapter is present. An 98 // the default adapter this indicates whether any adapter is present. An
99 // adapter is only considered present if the address has been obtained. 99 // adapter is only considered present if the address has been obtained.
100 virtual bool IsPresent() const = 0; 100 virtual bool IsPresent() const = 0;
101 101
102 // Indicates whether the adapter radio is powered. 102 // Indicates whether the adapter radio is powered.
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 // Requests the local Out Of Band pairing data. 150 // Requests the local Out Of Band pairing data.
151 virtual void ReadLocalOutOfBandPairingData( 151 virtual void ReadLocalOutOfBandPairingData(
152 const BluetoothOutOfBandPairingDataCallback& callback, 152 const BluetoothOutOfBandPairingDataCallback& callback,
153 const ErrorCallback& error_callback) = 0; 153 const ErrorCallback& error_callback) = 0;
154 154
155 protected: 155 protected:
156 friend class base::RefCounted<BluetoothAdapter>; 156 friend class base::RefCounted<BluetoothAdapter>;
157 BluetoothAdapter(); 157 BluetoothAdapter();
158 virtual ~BluetoothAdapter(); 158 virtual ~BluetoothAdapter();
159 159
160 // Address of the adapter.
161 std::string address_;
162
163 // Name of the adapter.
164 std::string name_;
165
166 // Devices paired with, connected to, discovered by, or visible to the 160 // Devices paired with, connected to, discovered by, or visible to the
167 // adapter. The key is the Bluetooth address of the device and the value 161 // adapter. The key is the Bluetooth address of the device and the value
168 // is the BluetoothDevice object whose lifetime is managed by the 162 // is the BluetoothDevice object whose lifetime is managed by the
169 // adapter instance. 163 // adapter instance.
170 typedef std::map<const std::string, BluetoothDevice*> DevicesMap; 164 typedef std::map<const std::string, BluetoothDevice*> DevicesMap;
171 DevicesMap devices_; 165 DevicesMap devices_;
172 }; 166 };
173 167
174 } // namespace device 168 } // namespace device
175 169
176 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 170 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/bluetooth/bluetooth_event_router_unittest.cc ('k') | device/bluetooth/bluetooth_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698