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

Side by Side Diff: chrome/browser/chromeos/dbus/bluetooth_manager_client.h

Issue 8233042: Chrome OS: Attach bluetooth UI to device discovery API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: replace empty device names with mac address Created 9 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
(Empty)
1 // Copyright (c) 2011 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.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_
6 #define CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_
7
8 #include <string>
9
10 #include "base/callback.h"
11 #include "base/observer_list.h"
12
13 namespace dbus {
14 class Bus;
15 } // namespace dbus
16
17 namespace chromeos {
18
19 // BluetoothManagerClient is used to communicate with the bluetooth
20 // daemon's Manager interface.
21 class BluetoothManagerClient {
22 public:
23 // Interface for observing changes from the bluetooth manager.
24 class Observer {
25 public:
26 virtual ~Observer() {}
27
28 // Called when a local bluetooth adapter is removed.
29 // |adapter| is the dbus object path of the adapter.
30 virtual void AdapterRemoved(const std::string& adapter) = 0;
31
32 // Called when the default local bluetooth adapter changes.
33 // |adapter| is the dbus object path of the new default adapter.
34 // Not called if all adapters are removed.
35 virtual void DefaultAdapterChanged(const std::string& adapter) = 0;
36 };
37
38 virtual ~BluetoothManagerClient();
39
40 // Adds and removes the observer.
41 virtual void AddObserver(Observer* observer) = 0;
42 virtual void RemoveObserver(Observer* observer) = 0;
43
44 typedef base::Callback<void(std::string, bool)> DefaultAdapterCallback;
45
46 // Retrieves the dbus object path for the default adapter.
47 virtual void DefaultAdapter(const DefaultAdapterCallback& callback) = 0;
48
49 // Creates the instance.
50 static BluetoothManagerClient* Create(dbus::Bus* bus);
51
52 protected:
53 BluetoothManagerClient();
54
55 private:
56 DISALLOW_COPY_AND_ASSIGN(BluetoothManagerClient);
57 };
58
59 } // namespace chromeos
60
61 #endif // CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698