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

Side by Side Diff: device/bluetooth/dbus/bluetooth_media_transport_client.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
OLDNEW
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_MEDIA_TRANSPORT_CLIENT_H_ 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_
6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_ 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/files/scoped_file.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "dbus/file_descriptor.h"
16 #include "dbus/object_path.h" 16 #include "dbus/object_path.h"
17 #include "dbus/property.h" 17 #include "dbus/property.h"
18 #include "device/bluetooth/bluetooth_export.h" 18 #include "device/bluetooth/bluetooth_export.h"
19 #include "device/bluetooth/dbus/bluez_dbus_client.h" 19 #include "device/bluetooth/dbus/bluez_dbus_client.h"
20 20
21 namespace bluez { 21 namespace bluez {
22 22
23 class DEVICE_BLUETOOTH_EXPORT BluetoothMediaTransportClient 23 class DEVICE_BLUETOOTH_EXPORT BluetoothMediaTransportClient
24 : public BluezDBusClient { 24 : public BluezDBusClient {
25 public: 25 public:
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ~BluetoothMediaTransportClient() override; 95 ~BluetoothMediaTransportClient() override;
96 96
97 // The ErrorCallback is used by media transport API methods to indicate 97 // The ErrorCallback is used by media transport API methods to indicate
98 // failure. It receives two arguments: the name of the error in |error_name| 98 // failure. It receives two arguments: the name of the error in |error_name|
99 // and an optional message in |error_message|. 99 // and an optional message in |error_message|.
100 typedef base::Callback<void(const std::string& error_name, 100 typedef base::Callback<void(const std::string& error_name,
101 const std::string& error_message)> ErrorCallback; 101 const std::string& error_message)> ErrorCallback;
102 102
103 // The AcquireCallback is used by |Acquire| method of media tansport API tp 103 // The AcquireCallback is used by |Acquire| method of media tansport API tp
104 // indicate the success of the method. 104 // indicate the success of the method.
105 typedef base::Callback<void(dbus::FileDescriptor* fd, 105 typedef base::Callback<void(base::ScopedFD fd,
106 const uint16_t read_mtu, 106 const uint16_t read_mtu,
107 const uint16_t write_mtu)> AcquireCallback; 107 const uint16_t write_mtu)>
108 AcquireCallback;
108 109
109 // Adds and removes observers for events on all remote Media Transports. Check 110 // Adds and removes observers for events on all remote Media Transports. Check
110 // the |object_path| parameter of observer methods to determine which Media 111 // the |object_path| parameter of observer methods to determine which Media
111 // Transport is issuing the event. 112 // Transport is issuing the event.
112 virtual void AddObserver(Observer* observer) = 0; 113 virtual void AddObserver(Observer* observer) = 0;
113 virtual void RemoveObserver(Observer* observer) = 0; 114 virtual void RemoveObserver(Observer* observer) = 0;
114 115
115 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) = 0; 116 virtual Properties* GetProperties(const dbus::ObjectPath& object_path) = 0;
116 117
117 // Acquires transport file descriptor and the MTU for read and write. 118 // Acquires transport file descriptor and the MTU for read and write.
(...skipping 19 matching lines...) Expand all
137 protected: 138 protected:
138 BluetoothMediaTransportClient(); 139 BluetoothMediaTransportClient();
139 140
140 private: 141 private:
141 DISALLOW_COPY_AND_ASSIGN(BluetoothMediaTransportClient); 142 DISALLOW_COPY_AND_ASSIGN(BluetoothMediaTransportClient);
142 }; 143 };
143 144
144 } // namespace bluez 145 } // namespace bluez
145 146
146 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_ 147 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_MEDIA_TRANSPORT_CLIENT_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluez/bluetooth_audio_sink_bluez.cc ('k') | device/bluetooth/dbus/bluetooth_media_transport_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698