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

Side by Side Diff: device/bluetooth/dbus/bluetooth_profile_manager_client.h

Issue 1347193004: Refactor DBusThreadManager to split away BT clients. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
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" 14 #include "chromeos/chromeos_export.h"
15 #include "chromeos/dbus/dbus_client.h"
16 #include "dbus/object_path.h" 15 #include "dbus/object_path.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 CHROMEOS_EXPORT BluetoothProfileManagerClient : public BluezDBusClient {
23 public: 23 public:
24 // Species the role of the object within the profile. SYMMETRIC should be 24 // 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 25 // usually used unless the profile requires you specify as a CLIENT or as a
26 // SERVER. 26 // SERVER.
27 enum ProfileRole { 27 enum ProfileRole { SYMMETRIC, CLIENT, SERVER };
28 SYMMETRIC,
29 CLIENT,
30 SERVER
31 };
32 28
33 // Options used to register a Profile object. 29 // Options used to register a Profile object.
34 struct CHROMEOS_EXPORT Options { 30 struct CHROMEOS_EXPORT Options {
35 Options(); 31 Options();
36 ~Options(); 32 ~Options();
37 33
38 // Human readable name for the profile. 34 // Human readable name for the profile.
39 scoped_ptr<std::string> name; 35 scoped_ptr<std::string> name;
40 36
41 // Primary service class UUID (if different from the actual UUID) 37 // Primary service class UUID (if different from the actual UUID)
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const Options& options, 82 const Options& options,
87 const base::Closure& callback, 83 const base::Closure& callback,
88 const ErrorCallback& error_callback) = 0; 84 const ErrorCallback& error_callback) = 0;
89 85
90 // Unregisters the profile with the D-Bus object path |agent_path| from the 86 // Unregisters the profile with the D-Bus object path |agent_path| from the
91 // remote profile manager. 87 // remote profile manager.
92 virtual void UnregisterProfile(const dbus::ObjectPath& profile_path, 88 virtual void UnregisterProfile(const dbus::ObjectPath& profile_path,
93 const base::Closure& callback, 89 const base::Closure& callback,
94 const ErrorCallback& error_callback) = 0; 90 const ErrorCallback& error_callback) = 0;
95 91
96
97 // Creates the instance. 92 // Creates the instance.
98 static BluetoothProfileManagerClient* Create(); 93 static BluetoothProfileManagerClient* Create();
99 94
100 // Constants used to indicate exceptional error conditions. 95 // Constants used to indicate exceptional error conditions.
101 static const char kNoResponseError[]; 96 static const char kNoResponseError[];
102 97
103 protected: 98 protected:
104 BluetoothProfileManagerClient(); 99 BluetoothProfileManagerClient();
105 100
106 private: 101 private:
107 DISALLOW_COPY_AND_ASSIGN(BluetoothProfileManagerClient); 102 DISALLOW_COPY_AND_ASSIGN(BluetoothProfileManagerClient);
108 }; 103 };
109 104
110 } // namespace chromeos 105 } // namespace bluez
111 106
112 #endif // CHROMEOS_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_ 107 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698