mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 07:36:10 -04:00
Roll forward up to cl/355302206.
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
//
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user