Create a new-installs-only uniformity trial.
[chromium-blink-merge.git] / device / bluetooth / bluetooth_adapter_factory.h
blob82e1e6f90eb4396d276fd2c7351183cd21ef0da7
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
3 // found in the LICENSE file.
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_
8 #include <string>
10 #include "base/memory/ref_counted.h"
12 namespace device {
14 class BluetoothAdapter;
16 // BluetoothAdapterFactory is a class that contains static methods, which
17 // instantiate either a specific bluetooth adapter, or the generic "default
18 // adapter" which may change depending on availability.
19 class BluetoothAdapterFactory {
20 public:
21 // Returns the shared instance for the default adapter, whichever that may
22 // be at the time. Check the returned scoped_refptr does not point to NULL and
23 // use IsPresent() and the AdapterPresentChanged() observer method to
24 // determine whether an adapter is actually available or not.
25 static scoped_refptr<BluetoothAdapter> DefaultAdapter();
27 // Creates an instance for a specific adapter at address |address|.
28 static BluetoothAdapter* Create(const std::string& address);
31 } // namespace device
33 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_FACTORY_H_