OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 virtual ~BluetoothManagerClient(); | 39 virtual ~BluetoothManagerClient(); |
40 | 40 |
41 // Adds and removes the observer. | 41 // Adds and removes the observer. |
42 virtual void AddObserver(Observer* observer) = 0; | 42 virtual void AddObserver(Observer* observer) = 0; |
43 virtual void RemoveObserver(Observer* observer) = 0; | 43 virtual void RemoveObserver(Observer* observer) = 0; |
44 | 44 |
45 // The DefaultAdapterCallback receives two arguments: | 45 // The DefaultAdapterCallback receives two arguments: |
46 // std::string adapter - the unique identifier of the default adapter | 46 // std::string adapter - the unique identifier of the default adapter |
47 // bool success - whether or not the request succeeded | 47 // bool success - whether or not the request succeeded |
48 typedef base::Callback<void(std::string, bool)> DefaultAdapterCallback; | 48 typedef base::Callback<void(const std::string&, bool)> |
| 49 DefaultAdapterCallback; |
49 | 50 |
50 // Retrieves the dbus object path for the default adapter. | 51 // Retrieves the dbus object path for the default adapter. |
51 // The default adapter is the preferred local bluetooth interface when a | 52 // The default adapter is the preferred local bluetooth interface when a |
52 // client does not specify a particular interface. | 53 // client does not specify a particular interface. |
53 virtual void DefaultAdapter(const DefaultAdapterCallback& callback) = 0; | 54 virtual void DefaultAdapter(const DefaultAdapterCallback& callback) = 0; |
54 | 55 |
55 // Creates the instance. | 56 // Creates the instance. |
56 static BluetoothManagerClient* Create(dbus::Bus* bus); | 57 static BluetoothManagerClient* Create(dbus::Bus* bus); |
57 | 58 |
58 protected: | 59 protected: |
59 BluetoothManagerClient(); | 60 BluetoothManagerClient(); |
60 | 61 |
61 private: | 62 private: |
62 DISALLOW_COPY_AND_ASSIGN(BluetoothManagerClient); | 63 DISALLOW_COPY_AND_ASSIGN(BluetoothManagerClient); |
63 }; | 64 }; |
64 | 65 |
65 } // namespace chromeos | 66 } // namespace chromeos |
66 | 67 |
67 #endif // CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_ | 68 #endif // CHROME_BROWSER_CHROMEOS_DBUS_BLUETOOTH_MANAGER_CLIENT_H_ |
OLD | NEW |