mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
internal refactor
PiperOrigin-RevId: 676552917
This commit is contained in:
committed by
Copybara-Service
parent
a9adb87b53
commit
6707efeed8
+1
-1
@@ -527,7 +527,6 @@ let package = Package(
|
||||
"internal/platform/wifi_hotspot_test.cc",
|
||||
"internal/platform/wifi_lan_test.cc",
|
||||
"internal/platform/wifi_test.cc",
|
||||
"internal/platform/wifi_utils_test.cc",
|
||||
"internal/platform/connection_info_test.cc",
|
||||
"internal/platform/condition_variable_test.cc",
|
||||
"internal/platform/thread_check_nocompile_test.py",
|
||||
@@ -546,6 +545,7 @@ let package = Package(
|
||||
"internal/platform/implementation/apple/atomic_boolean_test.cc",
|
||||
"internal/platform/implementation/apple/atomic_uint32_test.cc",
|
||||
"internal/platform/implementation/shared/file_test.cc",
|
||||
"internal/platform/implementation/wifi_utils_test.cc",
|
||||
"internal/platform/atomic_boolean_test.cc",
|
||||
"internal/platform/exception_test.cc",
|
||||
"internal/platform/error_code_recorder_test.cc",
|
||||
|
||||
@@ -135,6 +135,7 @@ cc_library(
|
||||
"//internal/platform/implementation:comm",
|
||||
"//internal/platform/implementation:platform",
|
||||
"//internal/platform/implementation:types",
|
||||
"//internal/platform/implementation:wifi_utils",
|
||||
"//internal/proto/analytics:connections_log_cc_proto",
|
||||
"//proto:connections_enums_cc_proto",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
#include "connections/implementation/client_proxy.h"
|
||||
#include "connections/implementation/offline_frames.h"
|
||||
#include "connections/implementation/wifi_lan_endpoint_channel.h"
|
||||
#include "internal/platform/implementation/wifi_utils.h"
|
||||
#include "internal/platform/logging.h"
|
||||
#include "internal/platform/wifi_lan.h"
|
||||
#include "internal/platform/wifi_utils.h"
|
||||
|
||||
namespace nearby {
|
||||
namespace connections {
|
||||
|
||||
@@ -299,7 +299,6 @@ cc_library(
|
||||
"wifi_direct.cc",
|
||||
"wifi_hotspot.cc",
|
||||
"wifi_lan.cc",
|
||||
"wifi_utils.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"ble.h",
|
||||
@@ -312,7 +311,6 @@ cc_library(
|
||||
"wifi_direct.h",
|
||||
"wifi_hotspot.h",
|
||||
"wifi_lan.h",
|
||||
"wifi_utils.h",
|
||||
],
|
||||
copts = [
|
||||
"-DCORE_ADAPTER_DLL",
|
||||
@@ -333,6 +331,7 @@ cc_library(
|
||||
"//internal/base",
|
||||
"//internal/platform/implementation:comm",
|
||||
"//internal/platform/implementation:platform",
|
||||
"//internal/platform/implementation:wifi_utils",
|
||||
# TODO: Support WebRTC
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/container:flat_hash_set",
|
||||
@@ -456,7 +455,6 @@ cc_test(
|
||||
"wifi_lan_connection_info_test.cc",
|
||||
"wifi_lan_test.cc",
|
||||
"wifi_test.cc",
|
||||
"wifi_utils_test.cc",
|
||||
],
|
||||
deps = [
|
||||
":base",
|
||||
|
||||
@@ -84,6 +84,24 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "wifi_utils",
|
||||
srcs = [
|
||||
"wifi_utils.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"wifi.h",
|
||||
"wifi_utils.h",
|
||||
],
|
||||
visibility = [
|
||||
"//:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "comm",
|
||||
hdrs = [
|
||||
@@ -153,3 +171,17 @@ cc_library(
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
cc_test(
|
||||
name = "wifi_utils_test",
|
||||
size = "small",
|
||||
timeout = "moderate",
|
||||
srcs = ["wifi_utils_test.cc"],
|
||||
shard_count = 8,
|
||||
deps = [
|
||||
":wifi_utils",
|
||||
"@com_github_protobuf_matchers//protobuf-matchers",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_googletest//:gtest_main",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/wifi_utils.h"
|
||||
#include "internal/platform/implementation/wifi_utils.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/str_join.h"
|
||||
#include "absl/strings/str_split.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
|
||||
namespace nearby {
|
||||
|
||||
@@ -12,11 +12,12 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef PLATFORM_BASE_WIFI_UTILS_H_
|
||||
#define PLATFORM_BASE_WIFI_UTILS_H_
|
||||
#ifndef PLATFORM_PUBLIC_WIFI_UTILS_H_
|
||||
#define PLATFORM_PUBLIC_WIFI_UTILS_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "internal/platform/implementation/wifi.h"
|
||||
|
||||
namespace nearby {
|
||||
@@ -57,4 +58,4 @@ class WifiUtils {
|
||||
|
||||
} // namespace nearby
|
||||
|
||||
#endif // PLATFORM_BASE_WIFI_UTILS_H_
|
||||
#endif // PLATFORM_PUBLIC_WIFI_UTILS_H_
|
||||
+1
-1
@@ -12,7 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "internal/platform/wifi_utils.h"
|
||||
#include "internal/platform/implementation/wifi_utils.h"
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "protobuf-matchers/protocol-buffer-matchers.h"
|
||||
@@ -48,6 +48,7 @@ cc_library(
|
||||
"//internal/base:files",
|
||||
"//internal/flags:nearby_flags",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:logging",
|
||||
"//internal/platform:uuid",
|
||||
"//internal/platform/implementation:types",
|
||||
"//internal/platform/implementation/windows/generated:types",
|
||||
@@ -107,11 +108,11 @@ cc_library(
|
||||
"//connections/implementation/flags:connections_flags",
|
||||
"//internal/flags:nearby_flags",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:comm",
|
||||
"//internal/platform:uuid",
|
||||
"//internal/platform/flags:platform_flags",
|
||||
"//internal/platform/implementation:account_manager",
|
||||
"//internal/platform/implementation:comm",
|
||||
"//internal/platform/implementation:wifi_utils",
|
||||
"//internal/platform/implementation/shared:count_down_latch",
|
||||
"//internal/platform/implementation/windows/generated:types",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
@@ -221,6 +222,7 @@ cc_library(
|
||||
"//internal/platform/implementation:comm",
|
||||
"//internal/platform/implementation:platform",
|
||||
"//internal/platform/implementation:types",
|
||||
"//internal/platform/implementation:wifi_utils",
|
||||
"//internal/platform/implementation/shared:count_down_latch",
|
||||
"//internal/platform/implementation/shared:file",
|
||||
"//internal/platform/implementation/windows/generated:types",
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
#ifndef PLATFORM_IMPL_WINDOWS_WIFI_H_
|
||||
#define PLATFORM_IMPL_WINDOWS_WIFI_H_
|
||||
|
||||
#include <windows.h>
|
||||
#include <objbase.h>
|
||||
#include <windows.h>
|
||||
#include <wlanapi.h>
|
||||
#include <wtypes.h>
|
||||
|
||||
// Nearby connections headers
|
||||
#include "internal/platform/implementation/wifi.h"
|
||||
#include "internal/platform/wifi_utils.h"
|
||||
#include "internal/platform/implementation/wifi_utils.h"
|
||||
|
||||
// WinRT headers
|
||||
#include "internal/platform/implementation/windows/generated/winrt/Windows.Foundation.Collections.h"
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#include "absl/time/time.h"
|
||||
#include "internal/platform/cancellation_flag.h"
|
||||
#include "internal/platform/implementation/wifi_direct.h"
|
||||
#include "internal/platform/implementation/wifi_utils.h"
|
||||
#include "internal/platform/implementation/windows/wifi_direct.h"
|
||||
#include "internal/platform/wifi_utils.h"
|
||||
|
||||
// Nearby connections headers
|
||||
#include "internal/platform/cancellation_flag_listener.h"
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
#include "internal/platform/feature_flags.h"
|
||||
#include "internal/platform/flags/nearby_platform_feature_flags.h"
|
||||
#include "internal/platform/implementation/wifi_hotspot.h"
|
||||
#include "internal/platform/implementation/wifi_utils.h"
|
||||
#include "internal/platform/implementation/windows/utils.h"
|
||||
#include "internal/platform/implementation/windows/wifi_hotspot.h"
|
||||
#include "internal/platform/implementation/windows/wifi_intel.h"
|
||||
#include "internal/platform/logging.h"
|
||||
#include "internal/platform/prng.h"
|
||||
#include "internal/platform/wifi_credential.h"
|
||||
#include "internal/platform/wifi_utils.h"
|
||||
|
||||
namespace nearby {
|
||||
namespace windows {
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
// #include <cstddef>
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "internal/platform/implementation/wifi.h"
|
||||
#include "internal/platform/implementation/wifi_utils.h"
|
||||
#include "internal/platform/implementation/windows/utils.h"
|
||||
#include "internal/platform/implementation/windows/wifi.h"
|
||||
#include "internal/platform/logging.h"
|
||||
#include "internal/platform/wifi_utils.h"
|
||||
|
||||
namespace nearby {
|
||||
namespace windows {
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "internal/platform/implementation/wifi_utils.h"
|
||||
#include "internal/platform/mutex_lock.h"
|
||||
#include "internal/platform/wifi_utils.h"
|
||||
|
||||
namespace nearby {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user