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

Side by Side Diff: device/bluetooth/dbus/bluetooth_device_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_DEVICE_CLIENT_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_DEVICE_CLIENT_H_
6 #define CHROMEOS_DBUS_BLUETOOTH_DEVICE_CLIENT_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_DEVICE_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 // BluetoothDeviceClient is used to communicate with objects representing 21 // BluetoothDeviceClient is used to communicate with objects representing
22 // remote Bluetooth Devices. 22 // remote Bluetooth Devices.
23 class CHROMEOS_EXPORT BluetoothDeviceClient : public DBusClient { 23 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceClient : public BluezDBusClient {
24 public: 24 public:
25 // Structure of properties associated with bluetooth devices. 25 // Structure of properties associated with bluetooth devices.
26 struct Properties : public dbus::PropertySet { 26 struct Properties : public dbus::PropertySet {
27 // The Bluetooth device address of the device. Read-only. 27 // The Bluetooth device address of the device. Read-only.
28 dbus::Property<std::string> address; 28 dbus::Property<std::string> address;
29 29
30 // The Bluetooth friendly name of the device. Read-only, to give a 30 // The Bluetooth friendly name of the device. Read-only, to give a
31 // different local name, use the |alias| property. 31 // different local name, use the |alias| property.
32 dbus::Property<std::string> name; 32 dbus::Property<std::string> name;
33 33
34 // Proposed icon name for the device according to the freedesktop.org 34 // Proposed icon name for the device according to the freedesktop.org
35 // icon naming specification. Read-only. 35 // icon naming specification. Read-only.
36 dbus::Property<std::string> icon; 36 dbus::Property<std::string> icon;
37 37
38 // The Bluetooth class of the device. Read-only. 38 // The Bluetooth class of the device. Read-only.
39 dbus::Property<uint32> bluetooth_class; 39 dbus::Property<uint32> bluetooth_class;
40 40
41 // The GAP external appearance of the device. Read-only. 41 // The GAP external appearance of the device. Read-only.
42 dbus::Property<uint16> appearance; 42 dbus::Property<uint16> appearance;
43 43
44 // Unique numeric identifier for the vendor of the device. Read-only. 44 // Unique numeric identifier for the vendor of the device. Read-only.
45 dbus::Property<uint16> vendor; 45 dbus::Property<uint16> vendor;
46 46
47 // List of 128-bit UUIDs that represent the available remote services. 47 // List of 128-bit UUIDs that represent the available remote services.
48 // Read-only. 48 // Read-only.
49 dbus::Property<std::vector<std::string> > uuids; 49 dbus::Property<std::vector<std::string>> uuids;
50 50
51 // Transmitted power level. This field is avaliable only for LE devices 51 // Transmitted power level. This field is avaliable only for LE devices
52 // that include this field in AD. Read-only. 52 // that include this field in AD. Read-only.
53 dbus::Property<int16> tx_power; 53 dbus::Property<int16> tx_power;
54 54
55 // Indicates that the device is currently paired. Read-only. 55 // Indicates that the device is currently paired. Read-only.
56 dbus::Property<bool> paired; 56 dbus::Property<bool> paired;
57 57
58 // Indicates that the device is currently connected. Read-only. 58 // Indicates that the device is currently connected. Read-only.
59 dbus::Property<bool> connected; 59 dbus::Property<bool> connected;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 static const char kNoResponseError[]; 194 static const char kNoResponseError[];
195 static const char kUnknownDeviceError[]; 195 static const char kUnknownDeviceError[];
196 196
197 protected: 197 protected:
198 BluetoothDeviceClient(); 198 BluetoothDeviceClient();
199 199
200 private: 200 private:
201 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceClient); 201 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceClient);
202 }; 202 };
203 203
204 } // namespace chromeos 204 } // namespace bluez
205 205
206 #endif // CHROMEOS_DBUS_BLUETOOTH_DEVICE_CLIENT_H_ 206 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_DEVICE_CLIENT_H_
OLDNEW
« no previous file with comments | « device/bluetooth/dbus/bluetooth_dbus_client_bundle.cc ('k') | device/bluetooth/dbus/bluetooth_device_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698