From 8b308e9d2df871281eeca63ed8aafcac35b4cf34 Mon Sep 17 00:00:00 2001 From: Lasan Mahaliyana Date: Fri, 31 Jul 2026 17:18:19 +0530 Subject: [PATCH] added more stubs --- .../cpp/sharing/clients/cpp/common/BUILD | 10 +++++++ .../cpp/common/nearby_sharing_common.h | 30 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 location/nearby/cpp/sharing/clients/cpp/common/BUILD create mode 100644 location/nearby/cpp/sharing/clients/cpp/common/nearby_sharing_common.h diff --git a/location/nearby/cpp/sharing/clients/cpp/common/BUILD b/location/nearby/cpp/sharing/clients/cpp/common/BUILD new file mode 100644 index 00000000..9f4e0719 --- /dev/null +++ b/location/nearby/cpp/sharing/clients/cpp/common/BUILD @@ -0,0 +1,10 @@ +load("@rules_cc//cc:cc_library.bzl", "cc_library") + +licenses(["notice"]) + +cc_library( + name = "common", + hdrs = ["nearby_sharing_common.h"], + visibility = ["//visibility:public"], + deps = ["//proto:sharing_enums_cc_proto"], +) diff --git a/location/nearby/cpp/sharing/clients/cpp/common/nearby_sharing_common.h b/location/nearby/cpp/sharing/clients/cpp/common/nearby_sharing_common.h new file mode 100644 index 00000000..3e9f71c1 --- /dev/null +++ b/location/nearby/cpp/sharing/clients/cpp/common/nearby_sharing_common.h @@ -0,0 +1,30 @@ +// Copyright 2026 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 LOCATION_NEARBY_CPP_SHARING_CLIENTS_CPP_COMMON_NEARBY_SHARING_COMMON_H_ +#define LOCATION_NEARBY_CPP_SHARING_CLIENTS_CPP_COMMON_NEARBY_SHARING_COMMON_H_ + +#include "proto/sharing_enums.pb.h" + +namespace nearby::sharing::cpp::common { + +inline location::nearby::proto::sharing::PowerStatus GetPowerStatus() { + // This build does not currently expose a platform-independent way to + // distinguish battery power from AC power. + return location::nearby::proto::sharing::POWER_STATUS_UNKNOWN; +} + +} // namespace nearby::sharing::cpp::common + +#endif // LOCATION_NEARBY_CPP_SHARING_CLIENTS_CPP_COMMON_NEARBY_SHARING_COMMON_H_