mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
switched from using custom linux fork of nearby_connections_service_linux and nearby_sharing_service_linux, switched to google's implementation of nearby sharing service. with appropriate stubs for missing parts
This commit is contained in:
@@ -43,9 +43,9 @@ cc_library(
|
||||
":contacts_interface",
|
||||
"//internal/platform:types",
|
||||
"//internal/platform/implementation:account_manager",
|
||||
"//location/nearby/sharing/lib/rpc:sharing_rpc_client",
|
||||
"//sharing/internal/public:logging",
|
||||
"//sharing/internal/public:types",
|
||||
"//sharing/linux/stubs:rpc",
|
||||
"//sharing/proto:share_cc_proto",
|
||||
"@com_google_absl//absl/base:nullability",
|
||||
"@com_google_absl//absl/status:statusor",
|
||||
@@ -73,7 +73,7 @@ cc_test(
|
||||
"//internal/platform/implementation:account_manager",
|
||||
"//internal/platform/implementation:platform_impl",
|
||||
"//internal/test",
|
||||
"//location/nearby/sharing/lib/rpc:fake_nearby_share_client",
|
||||
"//sharing/linux/stubs:rpc",
|
||||
"//sharing/internal/test:nearby_test",
|
||||
"//sharing/local_device_data:test_support",
|
||||
"//sharing/proto:share_cc_proto",
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "location/nearby/sharing/lib/rpc/sharing_rpc_client.h"
|
||||
#include "absl/base/nullability.h"
|
||||
#include "absl/status/statusor.h"
|
||||
#include "absl/synchronization/notification.h"
|
||||
@@ -31,6 +30,11 @@
|
||||
#include "sharing/contacts/nearby_share_contact_manager.h"
|
||||
#include "sharing/internal/public/context.h"
|
||||
#include "sharing/internal/public/logging.h"
|
||||
#if defined(__linux__)
|
||||
#include "sharing/linux/stubs/sharing_rpc_client.h"
|
||||
#else
|
||||
#include "location/nearby/sharing/lib/rpc/sharing_rpc_client.h"
|
||||
#endif
|
||||
#include "sharing/proto/contact_rpc.pb.h"
|
||||
#include "sharing/proto/rpc_resources.pb.h"
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "location/nearby/sharing/lib/rpc/sharing_rpc_client.h"
|
||||
#include "absl/base/nullability.h"
|
||||
#include "internal/platform/implementation/account_manager.h"
|
||||
#include "internal/platform/task_runner.h"
|
||||
@@ -26,12 +25,15 @@
|
||||
|
||||
namespace nearby {
|
||||
namespace sharing {
|
||||
namespace api {
|
||||
class SharingRpcClient;
|
||||
} // namespace api
|
||||
|
||||
class NearbyShareContactManagerImpl : public NearbyShareContactManager {
|
||||
public:
|
||||
NearbyShareContactManagerImpl(
|
||||
Context* absl_nonnull context, AccountManager& account_manager,
|
||||
nearby::sharing::api::SharingRpcClient* absl_nonnull nearby_client);
|
||||
api::SharingRpcClient* absl_nonnull nearby_client);
|
||||
|
||||
~NearbyShareContactManagerImpl() override = default;
|
||||
|
||||
@@ -40,7 +42,7 @@ class NearbyShareContactManagerImpl : public NearbyShareContactManager {
|
||||
void GetContacts(ContactsCallback callback) override;
|
||||
|
||||
AccountManager& account_manager_;
|
||||
nearby::sharing::api::SharingRpcClient& nearby_share_client_;
|
||||
api::SharingRpcClient& nearby_share_client_;
|
||||
|
||||
std::unique_ptr<TaskRunner> executor_ = nullptr;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user