OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROMEOS_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_ |
6 #define CHROMEOS_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chromeos/chromeos_export.h" | |
15 #include "chromeos/dbus/dbus_client.h" | |
16 #include "dbus/object_path.h" | 14 #include "dbus/object_path.h" |
| 15 #include "device/bluetooth/bluetooth_export.h" |
| 16 #include "device/bluetooth/dbus/bluez_dbus_client.h" |
17 | 17 |
18 namespace chromeos { | 18 namespace bluez { |
19 | 19 |
20 // BluetoothProfileManagerClient is used to communicate with the profile | 20 // BluetoothProfileManagerClient is used to communicate with the profile |
21 // manager object of the Bluetooth daemon. | 21 // manager object of the Bluetooth daemon. |
22 class CHROMEOS_EXPORT BluetoothProfileManagerClient : public DBusClient { | 22 class DEVICE_BLUETOOTH_EXPORT BluetoothProfileManagerClient |
| 23 : public BluezDBusClient { |
23 public: | 24 public: |
24 // Species the role of the object within the profile. SYMMETRIC should be | 25 // Species the role of the object within the profile. SYMMETRIC should be |
25 // usually used unless the profile requires you specify as a CLIENT or as a | 26 // usually used unless the profile requires you specify as a CLIENT or as a |
26 // SERVER. | 27 // SERVER. |
27 enum ProfileRole { | 28 enum ProfileRole { SYMMETRIC, CLIENT, SERVER }; |
28 SYMMETRIC, | |
29 CLIENT, | |
30 SERVER | |
31 }; | |
32 | 29 |
33 // Options used to register a Profile object. | 30 // Options used to register a Profile object. |
34 struct CHROMEOS_EXPORT Options { | 31 struct DEVICE_BLUETOOTH_EXPORT Options { |
35 Options(); | 32 Options(); |
36 ~Options(); | 33 ~Options(); |
37 | 34 |
38 // Human readable name for the profile. | 35 // Human readable name for the profile. |
39 scoped_ptr<std::string> name; | 36 scoped_ptr<std::string> name; |
40 | 37 |
41 // Primary service class UUID (if different from the actual UUID) | 38 // Primary service class UUID (if different from the actual UUID) |
42 scoped_ptr<std::string> service; | 39 scoped_ptr<std::string> service; |
43 | 40 |
44 // Role. | 41 // Role. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 const Options& options, | 83 const Options& options, |
87 const base::Closure& callback, | 84 const base::Closure& callback, |
88 const ErrorCallback& error_callback) = 0; | 85 const ErrorCallback& error_callback) = 0; |
89 | 86 |
90 // Unregisters the profile with the D-Bus object path |agent_path| from the | 87 // Unregisters the profile with the D-Bus object path |agent_path| from the |
91 // remote profile manager. | 88 // remote profile manager. |
92 virtual void UnregisterProfile(const dbus::ObjectPath& profile_path, | 89 virtual void UnregisterProfile(const dbus::ObjectPath& profile_path, |
93 const base::Closure& callback, | 90 const base::Closure& callback, |
94 const ErrorCallback& error_callback) = 0; | 91 const ErrorCallback& error_callback) = 0; |
95 | 92 |
96 | |
97 // Creates the instance. | 93 // Creates the instance. |
98 static BluetoothProfileManagerClient* Create(); | 94 static BluetoothProfileManagerClient* Create(); |
99 | 95 |
100 // Constants used to indicate exceptional error conditions. | 96 // Constants used to indicate exceptional error conditions. |
101 static const char kNoResponseError[]; | 97 static const char kNoResponseError[]; |
102 | 98 |
103 protected: | 99 protected: |
104 BluetoothProfileManagerClient(); | 100 BluetoothProfileManagerClient(); |
105 | 101 |
106 private: | 102 private: |
107 DISALLOW_COPY_AND_ASSIGN(BluetoothProfileManagerClient); | 103 DISALLOW_COPY_AND_ASSIGN(BluetoothProfileManagerClient); |
108 }; | 104 }; |
109 | 105 |
110 } // namespace chromeos | 106 } // namespace bluez |
111 | 107 |
112 #endif // CHROMEOS_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_ | 108 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_ |
OLD | NEW |