mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Merge branch 'google3' to master, roll forward up to cl/355302206.
This commit is contained in:
@@ -67,6 +67,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",
|
||||
|
||||
@@ -17,6 +17,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"
|
||||
|
||||
@@ -112,8 +113,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
|
||||
|
||||
@@ -19,6 +19,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"
|
||||
@@ -136,7 +137,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
|
||||
//
|
||||
|
||||
@@ -18,6 +18,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"
|
||||
@@ -113,7 +114,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;
|
||||
|
||||
Reference in New Issue
Block a user