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

Side by Side Diff: device/bluetooth/bluez/bluetooth_audio_sink_bluez.h

Issue 2317593002: dbus: No dbus::FileDescriptor in BluetoothMediaTransportClient (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | device/bluetooth/bluez/bluetooth_audio_sink_bluez.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BLUEZ_BLUETOOTH_AUDIO_SINK_BLUEZ_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_AUDIO_SINK_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_AUDIO_SINK_BLUEZ_H_ 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_AUDIO_SINK_BLUEZ_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/files/file.h" 14 #include "base/files/file.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/message_loop/message_loop.h" 17 #include "base/message_loop/message_loop.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "dbus/file_descriptor.h"
20 #include "dbus/object_path.h" 19 #include "dbus/object_path.h"
21 #include "device/bluetooth/bluetooth_adapter.h" 20 #include "device/bluetooth/bluetooth_adapter.h"
22 #include "device/bluetooth/bluetooth_audio_sink.h" 21 #include "device/bluetooth/bluetooth_audio_sink.h"
23 #include "device/bluetooth/bluetooth_export.h" 22 #include "device/bluetooth/bluetooth_export.h"
24 #include "device/bluetooth/dbus/bluetooth_media_client.h" 23 #include "device/bluetooth/dbus/bluetooth_media_client.h"
25 #include "device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h" 24 #include "device/bluetooth/dbus/bluetooth_media_endpoint_service_provider.h"
26 #include "device/bluetooth/dbus/bluetooth_media_transport_client.h" 25 #include "device/bluetooth/dbus/bluetooth_media_transport_client.h"
27 26
28 namespace bluez { 27 namespace bluez {
29 28
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void OnUnregisterSucceeded(const base::Closure& callback); 129 void OnUnregisterSucceeded(const base::Closure& callback);
131 130
132 // Called when the unregistration of Media Endpoint failed. 131 // Called when the unregistration of Media Endpoint failed.
133 void OnUnregisterFailed( 132 void OnUnregisterFailed(
134 const device::BluetoothAudioSink::ErrorCallback& error_callback, 133 const device::BluetoothAudioSink::ErrorCallback& error_callback,
135 const std::string& error_name, 134 const std::string& error_name,
136 const std::string& error_message); 135 const std::string& error_message);
137 136
138 // Called when the file descriptor, read MTU and write MTU are retrieved 137 // Called when the file descriptor, read MTU and write MTU are retrieved
139 // successfully using |transport_path_|. 138 // successfully using |transport_path_|.
140 void OnAcquireSucceeded(dbus::FileDescriptor* fd, 139 void OnAcquireSucceeded(base::ScopedFD fd,
141 const uint16_t read_mtu, 140 const uint16_t read_mtu,
142 const uint16_t write_mtu); 141 const uint16_t write_mtu);
143 142
144 // Called when acquiring the file descriptor, read MTU and write MTU failed. 143 // Called when acquiring the file descriptor, read MTU and write MTU failed.
145 void OnAcquireFailed(const std::string& error_name, 144 void OnAcquireFailed(const std::string& error_name,
146 const std::string& error_message); 145 const std::string& error_message);
147 146
148 // Called when the file descriptor is released successfully. 147 // Called when the file descriptor is released successfully.
149 void OnReleaseFDSucceeded(); 148 void OnReleaseFDSucceeded();
150 149
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Note: This should remain the last member so it'll be destroyed and 214 // Note: This should remain the last member so it'll be destroyed and
216 // invalidate its weak pointers before any other members are destroyed. 215 // invalidate its weak pointers before any other members are destroyed.
217 base::WeakPtrFactory<BluetoothAudioSinkBlueZ> weak_ptr_factory_; 216 base::WeakPtrFactory<BluetoothAudioSinkBlueZ> weak_ptr_factory_;
218 217
219 DISALLOW_COPY_AND_ASSIGN(BluetoothAudioSinkBlueZ); 218 DISALLOW_COPY_AND_ASSIGN(BluetoothAudioSinkBlueZ);
220 }; 219 };
221 220
222 } // namespace bluez 221 } // namespace bluez
223 222
224 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_AUDIO_SINK_BLUEZ_H_ 223 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_AUDIO_SINK_BLUEZ_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluez/bluetooth_audio_sink_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698