Remove WebrtcPeerId stub implementation.

PiperOrigin-RevId: 915097446
This commit is contained in:
Nick Bourdakos
2026-05-13 15:42:45 -07:00
committed by Copybara-Service
parent f3a18121a9
commit 5a846d9155
8 changed files with 4 additions and 108 deletions
-1
View File
@@ -523,7 +523,6 @@ let package = Package(
"connections/implementation/webrtc_bwu_handler.cc",
"connections/implementation/webrtc_endpoint_channel.cc",
"connections/implementation/mediums/webrtc.cc",
"connections/implementation/mediums/webrtc_peer_id.cc",
"connections/implementation/mediums/webrtc",
"internal/platform/tachyon_express_signaling_messenger.cc",
"internal/platform/tachyon_express_signaling_messenger.h",
-2
View File
@@ -93,11 +93,9 @@ cc_library(
name = "webrtc_utils",
srcs = [
"webrtc_peer_id.cc",
"webrtc_peer_id_stub.cc",
],
hdrs = [
"webrtc_peer_id.h",
"webrtc_peer_id_stub.h",
"webrtc_socket.h",
"webrtc_socket_stub.h",
],
@@ -12,15 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef NO_WEBRTC
#include "connections/implementation/mediums/webrtc_peer_id.h"
#include <sstream>
#include <string>
#include "absl/strings/ascii.h"
#include "absl/strings/escaping.h"
#include "connections/implementation/mediums/utils.h"
#include "internal/platform/byte_array.h"
namespace nearby {
namespace connections {
@@ -52,5 +51,3 @@ bool WebrtcPeerId::IsValid() const { return !id_.empty(); }
} // namespace mediums
} // namespace connections
} // namespace nearby
#endif
@@ -15,9 +15,6 @@
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_PEER_ID_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_PEER_ID_H_
#ifndef NO_WEBRTC
#include <memory>
#include <string>
#include "internal/platform/byte_array.h"
@@ -49,6 +46,4 @@ class WebrtcPeerId {
} // namespace connections
} // namespace nearby
#endif
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_PEER_ID_H_
@@ -1,39 +0,0 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifdef NO_WEBRTC
#include "connections/implementation/mediums/webrtc_peer_id_stub.h"
#include <sstream>
#include "absl/strings/ascii.h"
#include "absl/strings/escaping.h"
#include "connections/implementation/mediums/utils.h"
namespace nearby {
namespace connections {
namespace mediums {
WebrtcPeerId WebrtcPeerId::FromRandom() { return {}; }
WebrtcPeerId WebrtcPeerId::FromSeed(const ByteArray& seed) { return {}; }
bool WebrtcPeerId::IsValid() const { return false; }
} // namespace mediums
} // namespace connections
} // namespace nearby
#endif
@@ -1,54 +0,0 @@
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CORE_INTERNAL_MEDIUMS_WEBRTC_PEER_ID_STUB_H_
#define CORE_INTERNAL_MEDIUMS_WEBRTC_PEER_ID_STUB_H_
#ifdef NO_WEBRTC
#include <memory>
#include <string>
#include "internal/platform/byte_array.h"
namespace nearby {
namespace connections {
namespace mediums {
// WebrtcPeerId is used as an identifier to exchange SDP messages to establish
// WebRTC p2p connection. An empty WebrtcPeerId is considered to be invalid.
class WebrtcPeerId {
public:
WebrtcPeerId() = default;
explicit WebrtcPeerId(const std::string& id) : id_(id) {}
~WebrtcPeerId() = default;
static WebrtcPeerId FromRandom();
static WebrtcPeerId FromSeed(const ByteArray& seed);
bool IsValid() const;
const std::string& GetId() const { return id_; }
private:
std::string id_;
};
} // namespace mediums
} // namespace connections
} // namespace nearby
#endif
#endif // CORE_INTERNAL_MEDIUMS_WEBRTC_PEER_ID_STUB_H_
@@ -22,7 +22,7 @@
#include <memory>
#include <string>
#include "connections/implementation/mediums/webrtc_peer_id_stub.h"
#include "connections/implementation/mediums/webrtc_peer_id.h"
#include "connections/implementation/mediums/webrtc_socket_stub.h"
#include "connections/implementation/proto/offline_wire_formats.pb.h"
#include "internal/platform/cancellation_flag.h"
@@ -22,7 +22,7 @@
#include "absl/functional/bind_front.h"
#include "connections/implementation/client_proxy.h"
#include "connections/implementation/mediums/utils.h"
#include "connections/implementation/mediums/webrtc_peer_id_stub.h"
#include "connections/implementation/mediums/webrtc_peer_id.h"
#include "connections/implementation/offline_frames.h"
#include "connections/implementation/webrtc_endpoint_channel.h"
#include "internal/platform/expected.h"