Chromium Code Reviews| Index: chrome/browser/chromeos/bluetooth/bluetooth_manager.h |
| diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_manager.h b/chrome/browser/chromeos/bluetooth/bluetooth_manager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bea6491b746b4859343a14af51c8298c37fc22c0 |
| --- /dev/null |
| +++ b/chrome/browser/chromeos/bluetooth/bluetooth_manager.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_MANAGER_H_ |
| +#define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_MANAGER_H_ |
| +#pragma once |
| + |
| +#include <string> |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| + |
| +namespace chromeos { |
| + |
| +class BluetoothAdapter; |
| + |
| +// BluetoothManager provides the Chrome OS bluetooth API. |
| +// This API is simplified relative to what's available via D-Bus. |
| +// We'll export additional functionality as needed. |
| +class BluetoothManager { |
| + public: |
| + // Interface for observing changes from the bluetooth manager. |
| + class Observer { |
| + public: |
| + // Notification that the default adapter has changed. If |adapter| is NULL, |
| + // it means that there are no longer any adapters. |
| + // Clients should not cache this pointer. |
| + virtual void DefaultAdapterChanged(BluetoothAdapter* adapter) {} |
| + virtual ~Observer() {} |
| + }; |
| + |
| + // Adds and removes the observer. |
| + virtual void AddObserver(Observer* observer) = 0; |
| + virtual void RemoveObserver(Observer* observer) = 0; |
| + |
| + // Returns the default local bluetooth adapter or NULL if there is none. |
| + // Clients should not cache this pointer. |
| + virtual BluetoothAdapter* DefaultAdapter() = 0; |
| + |
| + static void Initialize(); |
| + static void Shutdown(); |
| + static BluetoothManager* GetInstance(); |
|
satorux1
2011/10/26 19:26:55
Please add function comments to them.
Vince Laviano
2011/10/26 21:41:55
Done.
|
| + |
| + protected: |
| + BluetoothManager(); |
| + virtual ~BluetoothManager(); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(BluetoothManager); |
| +}; |
| + |
| +} // namespace chromeos |
| + |
| +#endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_MANAGER_H_ |