OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GATT_MANAGER_CLIENT_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_MANAGER_CLIENT_H_ |
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_MANAGER_CLIENT_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 // D-Bus object path |service_path| with the remote GATT manager. The local | 38 // D-Bus object path |service_path| with the remote GATT manager. The local |
39 // service must implement the GattService1 interface. Characteristic objects | 39 // service must implement the GattService1 interface. Characteristic objects |
40 // must be hierarchical to their service and must use the interface | 40 // must be hierarchical to their service and must use the interface |
41 // GattCharacteristic1. Similarly, characteristic descriptor objects must | 41 // GattCharacteristic1. Similarly, characteristic descriptor objects must |
42 // implement the GattDescriptor1 interface and must be hierarchical to their | 42 // implement the GattDescriptor1 interface and must be hierarchical to their |
43 // characteristic. In a successful invocation of RegisterService, the | 43 // characteristic. In a successful invocation of RegisterService, the |
44 // Bluetooth daemon will discover all objects in the registered hierarchy by | 44 // Bluetooth daemon will discover all objects in the registered hierarchy by |
45 // using D-Bus Object Manager. Hence, the object paths and the interfaces in | 45 // using D-Bus Object Manager. Hence, the object paths and the interfaces in |
46 // the registered hierarchy must comply with the BlueZ GATT D-Bus | 46 // the registered hierarchy must comply with the BlueZ GATT D-Bus |
47 // specification. | 47 // specification. |
48 virtual void RegisterApplication(const dbus::ObjectPath& application_path, | 48 virtual void RegisterApplication(const dbus::ObjectPath& adapter_object_path, |
| 49 const dbus::ObjectPath& application_path, |
49 const Options& options, | 50 const Options& options, |
50 const base::Closure& callback, | 51 const base::Closure& callback, |
51 const ErrorCallback& error_callback) = 0; | 52 const ErrorCallback& error_callback) = 0; |
52 | 53 |
53 // Unregisters the GATT service with the D-Bus object path |service_path| from | 54 // Unregisters the GATT service with the D-Bus object path |service_path| from |
54 // the remote GATT manager. | 55 // the remote GATT manager. |
55 virtual void UnregisterApplication(const dbus::ObjectPath& application_path, | 56 virtual void UnregisterApplication( |
56 const base::Closure& callback, | 57 const dbus::ObjectPath& adapter_object_path, |
57 const ErrorCallback& error_callback) = 0; | 58 const dbus::ObjectPath& application_path, |
| 59 const base::Closure& callback, |
| 60 const ErrorCallback& error_callback) = 0; |
58 | 61 |
59 // Creates the instance. | 62 // Creates the instance. |
60 static BluetoothGattManagerClient* Create(); | 63 static BluetoothGattManagerClient* Create(); |
61 | 64 |
62 // Constants used to indicate exceptional error conditions. | 65 // Constants used to indicate exceptional error conditions. |
63 static const char kNoResponseError[]; | 66 static const char kNoResponseError[]; |
64 | 67 |
65 protected: | 68 protected: |
66 BluetoothGattManagerClient(); | 69 BluetoothGattManagerClient(); |
67 | 70 |
68 private: | 71 private: |
69 DISALLOW_COPY_AND_ASSIGN(BluetoothGattManagerClient); | 72 DISALLOW_COPY_AND_ASSIGN(BluetoothGattManagerClient); |
70 }; | 73 }; |
71 | 74 |
72 } // namespace bluez | 75 } // namespace bluez |
73 | 76 |
74 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_MANAGER_CLIENT_H_ | 77 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_MANAGER_CLIENT_H_ |
OLD | NEW |