Roll forward up to cl/355302206.

This commit is contained in:
hai007
2021-02-04 13:32:13 -08:00
parent cd992ba413
commit 48e1c47a93
41 changed files with 1194 additions and 472 deletions
+1
View File
@@ -53,6 +53,7 @@ cc_library(
deps = [
"//proto/connections:offline_wire_formats_portable_proto",
"//platform/base",
"//platform/base:cancellation_flag",
"//absl/strings",
"//absl/types:optional",
"//webrtc/api:libjingle_peerconnection_api",
+4 -2
View File
@@ -3,6 +3,7 @@
#include "platform/api/bluetooth_classic.h"
#include "platform/base/byte_array.h"
#include "platform/base/cancellation_flag.h"
#include "platform/base/input_stream.h"
#include "platform/base/output_stream.h"
@@ -98,8 +99,9 @@ class BleMedium {
// Connects to a BLE peripheral.
// On success, returns a new BleSocket.
// On error, returns nullptr.
virtual std::unique_ptr<BleSocket> Connect(BlePeripheral& peripheral,
const std::string& service_id) = 0;
virtual std::unique_ptr<BleSocket> Connect(
BlePeripheral& peripheral, const std::string& service_id,
CancellationFlag* cancellation_flag) = 0;
};
} // namespace api
+3 -1
View File
@@ -5,6 +5,7 @@
#include <string>
#include "platform/base/byte_array.h"
#include "platform/base/cancellation_flag.h"
#include "platform/base/exception.h"
#include "platform/base/input_stream.h"
#include "platform/base/listeners.h"
@@ -122,7 +123,8 @@ class BluetoothClassicMedium {
// On success, returns a new BluetoothSocket.
// On error, returns nullptr.
virtual std::unique_ptr<BluetoothSocket> ConnectToService(
BluetoothDevice& remote_device, const std::string& service_uuid) = 0;
BluetoothDevice& remote_device, const std::string& service_uuid,
CancellationFlag* cancellation_flag) = 0;
// https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#listenUsingInsecureRfcommWithServiceRecord
//
+3 -1
View File
@@ -4,6 +4,7 @@
#include <string>
#include "platform/base/byte_array.h"
#include "platform/base/cancellation_flag.h"
#include "platform/base/input_stream.h"
#include "platform/base/listeners.h"
#include "platform/base/nsd_service_info.h"
@@ -99,7 +100,8 @@ class WifiLanMedium {
// On success, returns a new WifiLanSocket.
// On error, returns nullptr.
virtual std::unique_ptr<WifiLanSocket> Connect(
WifiLanService& wifi_lan_service, const std::string& service_id) = 0;
WifiLanService& wifi_lan_service, const std::string& service_id,
CancellationFlag* cancellation_flag) = 0;
virtual WifiLanService* GetRemoteService(const std::string& ip_address,
int port) = 0;