mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
Added low power property for discovery
PiperOrigin-RevId: 665477515
This commit is contained in:
committed by
Copybara-Service
parent
a81ce57879
commit
050e009bc3
@@ -307,6 +307,7 @@ void NcStartDiscovery(NC_INSTANCE instance, const NC_DATA* service_id,
|
||||
std::string(discovery_options->fast_advertisement_service_uuid.data,
|
||||
discovery_options->fast_advertisement_service_uuid.size);
|
||||
}
|
||||
cpp_discovery_options.low_power = discovery_options->low_power;
|
||||
cpp_discovery_options.allowed.bluetooth =
|
||||
discovery_options->common_options.allowed_mediums[NC_MEDIUM_BLUETOOTH];
|
||||
cpp_discovery_options.allowed.ble =
|
||||
|
||||
@@ -167,6 +167,7 @@ typedef struct NC_DISCOVERY_OPTIONS {
|
||||
// Whether this is intended to be used in conjunction with InjectEndpoint().
|
||||
bool is_out_of_band_connection;
|
||||
NC_DATA fast_advertisement_service_uuid;
|
||||
bool low_power;
|
||||
} NC_DISCOVERY_OPTIONS, *PNC_DISCOVERY_OPTIONS;
|
||||
|
||||
typedef struct NC_CONNECTION_RESPONSE_INFO {
|
||||
|
||||
@@ -563,6 +563,7 @@ void StartDiscoveryDart(NC_INSTANCE instance, DataDart service_id,
|
||||
options_dart.mediums.wifi_hotspot;
|
||||
discovery_options.common_options.allowed_mediums[NC_MEDIUM_WEB_RTC] =
|
||||
options_dart.mediums.web_rtc;
|
||||
discovery_options.low_power = options_dart.low_power;
|
||||
|
||||
NC_DISCOVERY_LISTENER listener{};
|
||||
listener.endpoint_distance_changed_callback =
|
||||
|
||||
@@ -106,7 +106,7 @@ struct DiscoveryOptionsDart {
|
||||
int64_t is_out_of_band_connection = false;
|
||||
DataDart fast_advertisement_service_uuid;
|
||||
DataDart remote_bluetooth_mac_address;
|
||||
|
||||
int64_t low_power;
|
||||
MediumsDart mediums;
|
||||
// LINT.ThenChange(//depot/google3/location/nearby/apps/helloconnections/plugins/nearby_connections/platform/lib/types/discovery_options.dart)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user