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

Side by Side Diff: device/bluetooth/dbus/bluetooth_adapter_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, 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
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_ADAPTER_CLIENT_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
6 #define CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_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/observer_list.h" 12 #include "base/observer_list.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"
17 #include "dbus/property.h" 15 #include "dbus/property.h"
16 #include "device/bluetooth/bluetooth_export.h"
17 #include "device/bluetooth/dbus/bluez_dbus_client.h"
18 18
19 namespace chromeos { 19 namespace bluez {
20 20
21 // BluetoothAdapterClient is used to communicate with objects representing 21 // BluetoothAdapterClient is used to communicate with objects representing
22 // local Bluetooth Adapters. 22 // local Bluetooth Adapters.
23 class CHROMEOS_EXPORT BluetoothAdapterClient : public DBusClient { 23 class DEVICE_BLUETOOTH_EXPORT BluetoothAdapterClient : public BluezDBusClient {
24 public: 24 public:
25 // A DiscoveryFilter represents a filter passed to the SetDiscoveryFilter 25 // A DiscoveryFilter represents a filter passed to the SetDiscoveryFilter
26 // method. 26 // method.
27 struct DiscoveryFilter { 27 struct DiscoveryFilter {
28 DiscoveryFilter(); 28 DiscoveryFilter();
29 ~DiscoveryFilter(); 29 ~DiscoveryFilter();
30 30
31 // Copy content of |filter| into this filter 31 // Copy content of |filter| into this filter
32 void CopyFrom(const DiscoveryFilter& filter); 32 void CopyFrom(const DiscoveryFilter& filter);
33 33
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // other Bluetooth devices after |discoverable| is set to true. Zero 77 // other Bluetooth devices after |discoverable| is set to true. Zero
78 // means adapter remains discoverable forever. 78 // means adapter remains discoverable forever.
79 dbus::Property<uint32> discoverable_timeout; 79 dbus::Property<uint32> discoverable_timeout;
80 80
81 // Indicates that the adapter is discovering other Bluetooth Devices. 81 // Indicates that the adapter is discovering other Bluetooth Devices.
82 // Read-only. Use StartDiscovery() to begin discovery. 82 // Read-only. Use StartDiscovery() to begin discovery.
83 dbus::Property<bool> discovering; 83 dbus::Property<bool> discovering;
84 84
85 // List of 128-bit UUIDs that represent the available local services. 85 // List of 128-bit UUIDs that represent the available local services.
86 // Read-only. 86 // Read-only.
87 dbus::Property<std::vector<std::string> > uuids; 87 dbus::Property<std::vector<std::string>> uuids;
88 88
89 // Local Device ID information in Linux kernel modalias format. Read-only. 89 // Local Device ID information in Linux kernel modalias format. Read-only.
90 dbus::Property<std::string> modalias; 90 dbus::Property<std::string> modalias;
91 91
92 Properties(dbus::ObjectProxy* object_proxy, 92 Properties(dbus::ObjectProxy* object_proxy,
93 const std::string& interface_name, 93 const std::string& interface_name,
94 const PropertyChangedCallback& callback); 94 const PropertyChangedCallback& callback);
95 ~Properties() override; 95 ~Properties() override;
96 }; 96 };
97 97
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 static const char kNoResponseError[]; 172 static const char kNoResponseError[];
173 static const char kUnknownAdapterError[]; 173 static const char kUnknownAdapterError[];
174 174
175 protected: 175 protected:
176 BluetoothAdapterClient(); 176 BluetoothAdapterClient();
177 177
178 private: 178 private:
179 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClient); 179 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterClient);
180 }; 180 };
181 181
182 } // namespace chromeos 182 } // namespace bluez
183 183
184 #endif // CHROMEOS_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_ 184 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_ADAPTER_CLIENT_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_socket_chromeos_unittest.cc ('k') | device/bluetooth/dbus/bluetooth_adapter_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698