Remove unused legacy rpc client.

PiperOrigin-RevId: 785510820
This commit is contained in:
Francis Tsui
2025-07-21 11:28:35 -07:00
committed by Copybara-Service
parent aa5fcabe07
commit 594f7fc0e1
9 changed files with 0 additions and 87 deletions
-7
View File
@@ -22,7 +22,6 @@
#include "internal/base/observer_list.h"
#include "sharing/advertisement.h"
#include "sharing/attachment_container.h"
#include "sharing/internal/api/sharing_rpc_notifier.h"
#include "sharing/local_device_data/nearby_share_local_device_data_manager.h"
#include "sharing/nearby_sharing_service.h"
#include "sharing/nearby_sharing_settings.h"
@@ -35,8 +34,6 @@
namespace nearby {
namespace sharing {
using ::nearby::sharing::api::SharingRpcNotifier;
void FakeNearbySharingService::AddObserver(Observer* observer) {
observers_.AddObserver(observer);
}
@@ -154,10 +151,6 @@ std::string FakeNearbySharingService::Dump() const { return ""; }
NearbyShareSettings* FakeNearbySharingService::GetSettings() { return nullptr; }
SharingRpcNotifier* FakeNearbySharingService::GetRpcNotifier() {
return nullptr;
}
NearbyShareLocalDeviceDataManager*
FakeNearbySharingService::GetLocalDeviceDataManager() {
return nullptr;
-2
View File
@@ -24,7 +24,6 @@
#include "internal/base/observer_list.h"
#include "sharing/advertisement.h"
#include "sharing/attachment_container.h"
#include "sharing/internal/api/sharing_rpc_notifier.h"
#include "sharing/local_device_data/nearby_share_local_device_data_manager.h"
#include "sharing/nearby_sharing_service.h"
#include "sharing/nearby_sharing_settings.h"
@@ -108,7 +107,6 @@ class FakeNearbySharingService : public NearbySharingService {
std::string Dump() const override;
NearbyShareSettings* GetSettings() override;
nearby::sharing::api::SharingRpcNotifier* GetRpcNotifier() override;
NearbyShareLocalDeviceDataManager* GetLocalDeviceDataManager() override;
NearbyShareContactManager* GetContactManager() override;
NearbyShareCertificateManager* GetCertificateManager() override;
-1
View File
@@ -27,7 +27,6 @@ cc_library(
"public_certificate_database.h",
"sharing_platform.h",
"sharing_rpc_client.h",
"sharing_rpc_notifier.h",
"system_info.h",
"wifi_adapter.h",
],
@@ -21,7 +21,6 @@
#include "absl/functional/any_invocable.h"
#include "absl/status/statusor.h"
#include "sharing/internal/api/sharing_rpc_client.h"
#include "sharing/internal/api/sharing_rpc_notifier.h"
#include "sharing/proto/certificate_rpc.pb.h"
#include "sharing/proto/contact_rpc.pb.h"
#include "sharing/proto/device_rpc.pb.h"
@@ -191,9 +190,6 @@ class FakeNearbyShareClientFactory
std::vector<FakeNearbyIdentityClient*>& identity_instances() {
return identity_instances_;
}
nearby::sharing::api::SharingRpcNotifier* GetRpcNotifier() const override {
return nullptr;
}
private:
// SharingRpcClientFactory:
@@ -20,7 +20,6 @@
#include "absl/functional/any_invocable.h"
#include "absl/status/statusor.h"
#include "proto/identity/v1/rpcs.pb.h"
#include "sharing/internal/api/sharing_rpc_notifier.h"
#include "sharing/proto/certificate_rpc.pb.h"
#include "sharing/proto/contact_rpc.pb.h"
#include "sharing/proto/device_rpc.pb.h"
@@ -97,7 +96,6 @@ class SharingRpcClientFactory {
virtual std::unique_ptr<SharingRpcClient> CreateInstance() = 0;
virtual std::unique_ptr<IdentityRpcClient> CreateIdentityInstance() = 0;
virtual api::SharingRpcNotifier* GetRpcNotifier() const = 0;
};
} // namespace nearby::sharing::api
@@ -1,60 +0,0 @@
// Copyright 2021 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 THIRD_PARTY_NEARBY_SHARING_INTERNAL_API_SHARING_RPC_NOTIFIER_H_
#define THIRD_PARTY_NEARBY_SHARING_INTERNAL_API_SHARING_RPC_NOTIFIER_H_
#include "sharing/proto/certificate_rpc.pb.h"
#include "sharing/proto/contact_rpc.pb.h"
#include "sharing/proto/device_rpc.pb.h"
namespace nearby::sharing::api {
// Interface for passing RPC Responses/Requests to observers, by passing
// instances of this class to each RPC Client.
class SharingRpcNotifier {
public:
class Observer {
public:
virtual ~Observer() = default;
// Called when HTTP RPC is made for request and responses.
virtual void OnUpdateDeviceRequest(
const nearby::sharing::proto::UpdateDeviceRequest& request) = 0;
virtual void OnUpdateDeviceResponse(
const nearby::sharing::proto::UpdateDeviceResponse& response) = 0;
virtual void OnListContactPeopleRequest(
const nearby::sharing::proto::ListContactPeopleRequest& request) = 0;
virtual void OnListContactPeopleResponse(
const nearby::sharing::proto::ListContactPeopleResponse& response) = 0;
virtual void OnListPublicCertificatesRequest(
const nearby::sharing::proto::ListPublicCertificatesRequest&
request) = 0;
virtual void OnListPublicCertificatesResponse(
const nearby::sharing::proto::ListPublicCertificatesResponse&
response) = 0;
};
virtual ~SharingRpcNotifier() = default;
virtual void AddObserver(Observer* observer) = 0;
virtual void RemoveObserver(Observer* observer) = 0;
protected:
SharingRpcNotifier() = default;
};
} // namespace nearby::sharing::api
#endif // THIRD_PARTY_NEARBY_SHARING_INTERNAL_API_SHARING_RPC_NOTIFIER_H_
-3
View File
@@ -26,7 +26,6 @@
#include "sharing/advertisement.h"
#include "sharing/attachment_container.h"
#include "sharing/certificates/nearby_share_certificate_manager.h"
#include "sharing/internal/api/sharing_rpc_notifier.h"
#include "sharing/local_device_data/nearby_share_local_device_data_manager.h"
#include "sharing/nearby_sharing_settings.h"
#include "sharing/share_target_discovered_callback.h"
@@ -40,7 +39,6 @@ namespace sharing {
class NearbyNotificationDelegate;
class NearbyShareContactManager;
class NearbyShareHttpNotifier;
// This service implements Nearby Sharing on top of the Nearby Connections mojo.
// Currently, only single profile will be allowed to be bound at a time and only
@@ -236,7 +234,6 @@ class NearbySharingService {
virtual void UpdateFilePathsInProgress(bool update_file_paths) = 0;
virtual NearbyShareSettings* GetSettings() = 0;
virtual nearby::sharing::api::SharingRpcNotifier* GetRpcNotifier() = 0;
virtual NearbyShareLocalDeviceDataManager* GetLocalDeviceDataManager() = 0;
virtual NearbyShareContactManager* GetContactManager() = 0;
virtual NearbyShareCertificateManager* GetCertificateManager() = 0;
-6
View File
@@ -74,7 +74,6 @@
#include "sharing/incoming_share_session.h"
#include "sharing/internal/api/bluetooth_adapter.h"
#include "sharing/internal/api/sharing_platform.h"
#include "sharing/internal/api/sharing_rpc_notifier.h"
#include "sharing/internal/api/wifi_adapter.h"
#include "sharing/internal/base/encode.h"
#include "sharing/internal/public/connectivity_manager.h"
@@ -1008,11 +1007,6 @@ NearbyShareSettings* NearbySharingServiceImpl::GetSettings() {
return settings_.get();
}
nearby::sharing::api::SharingRpcNotifier*
NearbySharingServiceImpl::GetRpcNotifier() {
return nearby_share_client_factory_->GetRpcNotifier();
}
NearbyShareLocalDeviceDataManager*
NearbySharingServiceImpl::GetLocalDeviceDataManager() {
return local_device_data_manager_.get();
-2
View File
@@ -54,7 +54,6 @@
#include "sharing/internal/api/preference_manager.h"
#include "sharing/internal/api/sharing_platform.h"
#include "sharing/internal/api/sharing_rpc_client.h"
#include "sharing/internal/api/sharing_rpc_notifier.h"
#include "sharing/internal/api/wifi_adapter.h"
#include "sharing/internal/public/connectivity_manager.h"
#include "sharing/internal/public/context.h"
@@ -161,7 +160,6 @@ class NearbySharingServiceImpl
proto::DeviceVisibility visibility, absl::Duration expiration,
absl::AnyInvocable<void(StatusCodes status_code) &&> callback) override;
NearbyShareSettings* GetSettings() override;
nearby::sharing::api::SharingRpcNotifier* GetRpcNotifier() override;
NearbyShareLocalDeviceDataManager* GetLocalDeviceDataManager() override;
NearbyShareContactManager* GetContactManager() override;
NearbyShareCertificateManager* GetCertificateManager() override;