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 DEVICE_BLUETOOTH_DBUS_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_ |
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "dbus/bus.h" | 12 #include "dbus/bus.h" |
13 #include "dbus/object_path.h" | 13 #include "dbus/object_path.h" |
14 #include "device/bluetooth/bluetooth_export.h" | 14 #include "device/bluetooth/bluetooth_export.h" |
15 | 15 |
16 namespace bluez { | 16 namespace bluez { |
17 | 17 |
18 // BluetoothAgentServiceProvider is used to provide a D-Bus object that | 18 // BluetoothAgentServiceProvider is used to provide a D-Bus object that |
19 // the bluetooth daemon can communicate with during a remote device pairing | 19 // the bluetooth daemon can communicate with during a remote device pairing |
20 // request. | 20 // request. |
21 // | 21 // |
22 // Instantiate with a chosen D-Bus object path and delegate object, and pass | 22 // Instantiate with a chosen D-Bus object path and delegate object, and pass |
23 // the D-Bus object path as the |agent_path| argument to the | 23 // the D-Bus object path as the |agent_path| argument to the |
24 // chromeos::BluetoothAgentManagerClient::RegisterAgent() method. | 24 // bluez::BluetoothAgentManagerClient::RegisterAgent() method. |
25 // | 25 // |
26 // After initiating the pairing process with a device, using the | 26 // After initiating the pairing process with a device, using the |
27 // chromeos::BluetoothDeviceClient::Pair() method, the Bluetooth daemon will | 27 // bluez::BluetoothDeviceClient::Pair() method, the Bluetooth daemon will |
28 // make calls to this agent object and they will be passed on to your Delegate | 28 // make calls to this agent object and they will be passed on to your Delegate |
29 // object for handling. Responses should be returned using the callbacks | 29 // object for handling. Responses should be returned using the callbacks |
30 // supplied to those methods. | 30 // supplied to those methods. |
31 class DEVICE_BLUETOOTH_EXPORT BluetoothAgentServiceProvider { | 31 class DEVICE_BLUETOOTH_EXPORT BluetoothAgentServiceProvider { |
32 public: | 32 public: |
33 // Interface for reacting to agent requests. | 33 // Interface for reacting to agent requests. |
34 class Delegate { | 34 class Delegate { |
35 public: | 35 public: |
36 virtual ~Delegate() {} | 36 virtual ~Delegate() {} |
37 | 37 |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 protected: | 169 protected: |
170 BluetoothAgentServiceProvider(); | 170 BluetoothAgentServiceProvider(); |
171 | 171 |
172 private: | 172 private: |
173 DISALLOW_COPY_AND_ASSIGN(BluetoothAgentServiceProvider); | 173 DISALLOW_COPY_AND_ASSIGN(BluetoothAgentServiceProvider); |
174 }; | 174 }; |
175 | 175 |
176 } // namespace bluez | 176 } // namespace bluez |
177 | 177 |
178 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_ | 178 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_AGENT_SERVICE_PROVIDER_H_ |
OLD | NEW |