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_PROFILE_SERVICE_PROVIDER_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_SERVICE_PROVIDER_H_ |
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_SERVICE_PROVIDER_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_SERVICE_PROVIDER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/basictypes.h" | |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
13 #include "dbus/bus.h" | 15 #include "dbus/bus.h" |
14 #include "dbus/file_descriptor.h" | 16 #include "dbus/file_descriptor.h" |
15 #include "dbus/object_path.h" | 17 #include "dbus/object_path.h" |
16 #include "device/bluetooth/bluetooth_export.h" | 18 #include "device/bluetooth/bluetooth_export.h" |
17 | 19 |
18 namespace bluez { | 20 namespace bluez { |
19 | 21 |
20 // BluetoothProfileServiceProvider is used to provide a D-Bus object that the | 22 // BluetoothProfileServiceProvider is used to provide a D-Bus object that the |
21 // Bluetooth daemon can communicate with to connect application profiles. | 23 // Bluetooth daemon can communicate with to connect application profiles. |
(...skipping 19 matching lines...) Expand all Loading... |
41 // reject indicates the user rejected or denied the request; cancelled | 43 // reject indicates the user rejected or denied the request; cancelled |
42 // means the user cancelled the request without confirming either way. | 44 // means the user cancelled the request without confirming either way. |
43 enum Status { SUCCESS, REJECTED, CANCELLED }; | 45 enum Status { SUCCESS, REJECTED, CANCELLED }; |
44 | 46 |
45 // Connection-specific options. | 47 // Connection-specific options. |
46 struct DEVICE_BLUETOOTH_EXPORT Options { | 48 struct DEVICE_BLUETOOTH_EXPORT Options { |
47 Options() {} | 49 Options() {} |
48 ~Options() {} | 50 ~Options() {} |
49 | 51 |
50 // Profile version. | 52 // Profile version. |
51 uint16 version; | 53 uint16_t version; |
52 | 54 |
53 // Profile features. | 55 // Profile features. |
54 uint16 features; | 56 uint16_t features; |
55 }; | 57 }; |
56 | 58 |
57 // The ConfirmationCallback is used for methods which require confirmation; | 59 // The ConfirmationCallback is used for methods which require confirmation; |
58 // it should be called with one argument, the |status| of the request | 60 // it should be called with one argument, the |status| of the request |
59 // (success, rejected or cancelled). | 61 // (success, rejected or cancelled). |
60 typedef base::Callback<void(Status)> ConfirmationCallback; | 62 typedef base::Callback<void(Status)> ConfirmationCallback; |
61 | 63 |
62 // This method will be called when the profile is unregistered from the | 64 // This method will be called when the profile is unregistered from the |
63 // Bluetooth daemon, generally at shutdown or at the applications' request. | 65 // Bluetooth daemon, generally at shutdown or at the applications' request. |
64 // It may be used to perform cleanup tasks. This corresponds to the | 66 // It may be used to perform cleanup tasks. This corresponds to the |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 protected: | 113 protected: |
112 BluetoothProfileServiceProvider(); | 114 BluetoothProfileServiceProvider(); |
113 | 115 |
114 private: | 116 private: |
115 DISALLOW_COPY_AND_ASSIGN(BluetoothProfileServiceProvider); | 117 DISALLOW_COPY_AND_ASSIGN(BluetoothProfileServiceProvider); |
116 }; | 118 }; |
117 | 119 |
118 } // namespace bluez | 120 } // namespace bluez |
119 | 121 |
120 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_SERVICE_PROVIDER_H_ | 122 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_PROFILE_SERVICE_PROVIDER_H_ |
OLD | NEW |