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 CHROMEOS_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_ |
6 #define CHROMEOS_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_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 "chromeos/chromeos_export.h" | |
13 #include "dbus/bus.h" | 12 #include "dbus/bus.h" |
14 #include "dbus/message.h" | 13 #include "dbus/message.h" |
15 #include "dbus/object_path.h" | 14 #include "dbus/object_path.h" |
| 15 #include "device/bluetooth/bluetooth_export.h" |
16 | 16 |
17 namespace chromeos { | 17 namespace bluez { |
18 | 18 |
19 // BluetoothMediaEndpointServiceProvider is used to provide a D-Bus object that | 19 // BluetoothMediaEndpointServiceProvider is used to provide a D-Bus object that |
20 // the Bluetooth daemon can commuicate with to serve as a media source/sink. | 20 // the Bluetooth daemon can commuicate with to serve as a media source/sink. |
21 // | 21 // |
22 // Instantiate with a chosen D-Bus object path and a delegate object, and pass | 22 // Instantiate with a chosen D-Bus object path and a delegate object, and pass |
23 // the D-Bus object path as |endpoint_path| argument to the | 23 // the D-Bus object path as |endpoint_path| argument to the |
24 // chromeos::BluetoothMediaClient::RegisterEndoint() method. | 24 // chromeos::BluetoothMediaClient::RegisterEndoint() method. |
25 // | 25 // |
26 // After initiating a connection between an audio source and an audio sink, the | 26 // After initiating a connection between an audio source and an audio sink, the |
27 // Bluetooth daemon will make calls to this endpoint object and they will be | 27 // Bluetooth daemon will make calls to this endpoint object and they will be |
28 // passed to user's Delegate object for handling. For SelectConfiguration method | 28 // passed to user's Delegate object for handling. For SelectConfiguration method |
29 // the response is returned using the SelectConfiguration callback. | 29 // the response is returned using the SelectConfiguration callback. |
30 class CHROMEOS_EXPORT BluetoothMediaEndpointServiceProvider { | 30 class DEVICE_BLUETOOTH_EXPORT BluetoothMediaEndpointServiceProvider { |
31 public: | 31 public: |
32 // Delegate is the interface for reacting to endpoint requests. User | 32 // Delegate is the interface for reacting to endpoint requests. User |
33 // applications will implement this interface to handle either A2DP Sink or | 33 // applications will implement this interface to handle either A2DP Sink or |
34 // Source. | 34 // Source. |
35 class Delegate { | 35 class Delegate { |
36 public: | 36 public: |
37 // Transport-specific properties. | 37 // Transport-specific properties. |
38 struct CHROMEOS_EXPORT TransportProperties { | 38 struct DEVICE_BLUETOOTH_EXPORT TransportProperties { |
39 TransportProperties(); | 39 TransportProperties(); |
40 ~TransportProperties(); | 40 ~TransportProperties(); |
41 | 41 |
42 // The path to the device object which the transport is connected to. | 42 // The path to the device object which the transport is connected to. |
43 dbus::ObjectPath device; | 43 dbus::ObjectPath device; |
44 | 44 |
45 // The UUID of the profile which the transport is for. | 45 // The UUID of the profile which the transport is for. |
46 std::string uuid; | 46 std::string uuid; |
47 | 47 |
48 // The Codec value agreed by the remote device and used by the media | 48 // The Codec value agreed by the remote device and used by the media |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 const dbus::ObjectPath& object_path, | 121 const dbus::ObjectPath& object_path, |
122 Delegate* delegate); | 122 Delegate* delegate); |
123 | 123 |
124 protected: | 124 protected: |
125 BluetoothMediaEndpointServiceProvider(); | 125 BluetoothMediaEndpointServiceProvider(); |
126 | 126 |
127 private: | 127 private: |
128 DISALLOW_COPY_AND_ASSIGN(BluetoothMediaEndpointServiceProvider); | 128 DISALLOW_COPY_AND_ASSIGN(BluetoothMediaEndpointServiceProvider); |
129 }; | 129 }; |
130 | 130 |
131 } // namespace chromeos | 131 } // namespace bluez |
132 | 132 |
133 #endif // CHROMEOS_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_ | 133 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_ENDPOINT_SERVICE_PROVIDER_H_ |
OLD | NEW |