mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Fixed HC broken on MacOS
PiperOrigin-RevId: 603105834
This commit is contained in:
committed by
Copybara-Service
parent
80c0d0916e
commit
929a41b7f5
+3
-1
@@ -93,8 +93,8 @@ cc_library(
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:types",
|
||||
"//proto:connections_enums_cc_proto",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@com_google_absl//absl/strings:string_view",
|
||||
"@com_google_absl//absl/types:span",
|
||||
],
|
||||
)
|
||||
@@ -132,6 +132,8 @@ cc_library(
|
||||
":nc_types",
|
||||
"//connections:core",
|
||||
"//connections:core_types",
|
||||
"//connections/implementation/flags:connections_flags",
|
||||
"//internal/flags:nearby_flags",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:types",
|
||||
"//proto:connections_enums_cc_proto",
|
||||
|
||||
+18
-5
@@ -59,7 +59,10 @@ lexan.cc_windows_dll(
|
||||
"//internal/platform/implementation/windows",
|
||||
"//third_party/dart_lang/v2:dart_api_dl",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"@com_google_absl//absl/base:no_destructor",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:string_view",
|
||||
"@com_google_absl//absl/synchronization",
|
||||
],
|
||||
)
|
||||
@@ -67,20 +70,30 @@ lexan.cc_windows_dll(
|
||||
objc_library(
|
||||
name = "nearby_connections_objc",
|
||||
srcs = [
|
||||
"core_adapter_dart.cc",
|
||||
"nc_adapter_dart.cc",
|
||||
"nearby_connections_client_state.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"core_adapter_dart.h",
|
||||
"nc_adapter_dart.h",
|
||||
"nc_adapter_def.h",
|
||||
"nc_adapter_types.h",
|
||||
"nearby_connections_client_state.h",
|
||||
],
|
||||
deps = [
|
||||
"//connections:core",
|
||||
"//connections:core_types",
|
||||
"//connections/c",
|
||||
"//connections/c:nc",
|
||||
"//connections/c:nc_types",
|
||||
"//connections/implementation/flags:connections_flags",
|
||||
"//internal/flags:nearby_flags",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:types",
|
||||
"//internal/platform/implementation/apple", # buildcleaner: keep
|
||||
"//third_party/dart_lang/v2:dart_api_dl",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"@com_google_absl//absl/base:no_destructor",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:string_view",
|
||||
"@com_google_absl//absl/synchronization",
|
||||
],
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "absl/base/no_destructor.h"
|
||||
#include "absl/strings/escaping.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "third_party/dart_lang/v2/runtime/include/dart_api.h"
|
||||
#include "third_party/dart_lang/v2/runtime/include/dart_api_dl.h"
|
||||
@@ -171,7 +172,10 @@ void ListenerEndpointFoundCB(const char *endpoint_id,
|
||||
const char *service_id) {
|
||||
NEARBY_LOG(INFO, "Device discovered: id=%s", endpoint_id);
|
||||
NEARBY_LOG(INFO, "Device discovered: service_id=%s", service_id);
|
||||
NEARBY_LOG(INFO, "Device discovered: info=%s", endpoint_info);
|
||||
|
||||
std::string endpoint_info_str = absl::BytesToHexString(
|
||||
absl::string_view(endpoint_info.data, endpoint_info.size));
|
||||
NEARBY_LOG(INFO, "Device discovered: info=%s", endpoint_info_str.c_str());
|
||||
|
||||
Dart_CObject dart_object_endpoint_id;
|
||||
dart_object_endpoint_id.type = Dart_CObject_kString;
|
||||
@@ -724,7 +728,8 @@ void SendPayloadDart(NC_INSTANCE instance, const char *endpoint_id,
|
||||
break;
|
||||
}
|
||||
case PAYLOAD_TYPE_FILE:
|
||||
NEARBY_LOG(INFO, "File name: %s, size %d", payload_dart.data,
|
||||
NEARBY_LOG(INFO, "File name: %s, size %d",
|
||||
std::string(payload_dart.data, payload_dart.size).c_str(),
|
||||
payload_dart.size);
|
||||
std::string file_name_str(payload_dart.data);
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#ifndef THIRD_PARTY_NEARBY_CONNECTIONS_DART_NC_ADAPTER_TYPES_H_
|
||||
#define THIRD_PARTY_NEARBY_CONNECTIONS_DART_NC_ADAPTER_TYPES_H_
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user