mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Reshuffle device.h to internal as both Connections and Presence will be utilizing it.
PiperOrigin-RevId: 472745171
This commit is contained in:
committed by
Copybara-Service
parent
d10a04df5f
commit
92bf3356ee
@@ -399,6 +399,7 @@ let package = Package(
|
||||
"connections/implementation/BUILD",
|
||||
"connections/implementation/fuzzers",
|
||||
"connections/BUILD",
|
||||
"internal/BUILD",
|
||||
"internal/crypto/BUILD",
|
||||
"internal/crypto/BUILD.gn",
|
||||
"internal/platform/implementation/shared/BUILD",
|
||||
|
||||
+2
-1
@@ -31,6 +31,7 @@ cc_library(
|
||||
deps = [
|
||||
":core_types",
|
||||
"//connections/implementation:internal",
|
||||
"//internal:device",
|
||||
"//internal/analytics:event_logger",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:logging",
|
||||
@@ -54,7 +55,6 @@ cc_library(
|
||||
hdrs = [
|
||||
"advertising_options.h",
|
||||
"connection_options.h",
|
||||
"device.h",
|
||||
"discovery_options.h",
|
||||
"listeners.h",
|
||||
"medium_selector.h",
|
||||
@@ -75,6 +75,7 @@ cc_library(
|
||||
"//internal/platform/implementation/ios:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
"//internal:device",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:types",
|
||||
"//internal/platform:util",
|
||||
|
||||
+1
-1
@@ -20,13 +20,13 @@
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/types/span.h"
|
||||
#include "connections/device.h"
|
||||
#include "connections/implementation/client_proxy.h"
|
||||
#include "connections/implementation/service_controller.h"
|
||||
#include "connections/implementation/service_controller_router.h"
|
||||
#include "connections/listeners.h"
|
||||
#include "connections/params.h"
|
||||
#include "internal/analytics/event_logger.h"
|
||||
#include "internal/device.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
|
||||
@@ -129,6 +129,7 @@ cc_library(
|
||||
"//connections/implementation/mediums",
|
||||
"//connections/implementation/mediums:utils",
|
||||
"//connections/implementation/proto:offline_wire_formats_cc_proto",
|
||||
"//internal:device",
|
||||
"//internal/analytics:event_logger",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:cancellation_flag",
|
||||
|
||||
@@ -21,13 +21,13 @@
|
||||
#include <vector>
|
||||
|
||||
#include "connections/advertising_options.h"
|
||||
#include "connections/device.h"
|
||||
#include "connections/discovery_options.h"
|
||||
#include "connections/implementation/analytics/analytics_recorder.h"
|
||||
#include "connections/listeners.h"
|
||||
#include "connections/status.h"
|
||||
#include "connections/strategy.h"
|
||||
#include "internal/analytics/event_logger.h"
|
||||
#include "internal/device.h"
|
||||
#include "internal/platform/byte_array.h"
|
||||
#include "internal/platform/cancelable_alarm.h"
|
||||
#include "internal/platform/cancellation_flag.h"
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
cc_library(
|
||||
name = "device",
|
||||
hdrs = [
|
||||
"device.h",
|
||||
],
|
||||
visibility = [
|
||||
"//connections:__subpackages__",
|
||||
"//presence:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
"@com_google_absl//absl/status",
|
||||
"@com_google_absl//absl/status:statusor",
|
||||
],
|
||||
)
|
||||
@@ -17,11 +17,10 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "internal/platform/byte_array.h"
|
||||
#include "absl/status/statusor.h"
|
||||
|
||||
namespace location {
|
||||
namespace nearby {
|
||||
namespace connections {
|
||||
|
||||
class NearbyDevice {
|
||||
public:
|
||||
@@ -35,12 +34,11 @@ class NearbyDevice {
|
||||
NearbyDevice& operator=(NearbyDevice&&) = default;
|
||||
NearbyDevice(const NearbyDevice&) = delete;
|
||||
NearbyDevice& operator=(const NearbyDevice&) = delete;
|
||||
virtual std::string GetEndpointId() const = 0;
|
||||
virtual ByteArray GetEndpointInfo() const = 0;
|
||||
virtual absl::StatusOr<std::string> GetEndpointId() const = 0;
|
||||
virtual std::string GetEndpointInfo() const = 0;
|
||||
virtual Type GetType() const { return Type::kUnknownDevice; }
|
||||
};
|
||||
|
||||
} // namespace connections
|
||||
} // namespace nearby
|
||||
} // namespace location
|
||||
|
||||
Reference in New Issue
Block a user