third_party.pigweed.src/pw_software_update/BUILD.bazel
Zihan Chen f463acd511 pw_software_update: add update_helper and update_service
No-Docs-Update-Reason: this module is far from stablized
Change-Id: I408d575308bcfeb69d6fcb23448472734c729e95
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/59544
Reviewed-by: David Rogers <davidrogers@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2021-09-14 21:45:43 +00:00

78 lines
1.9 KiB
Python

# Copyright 2021 The Pigweed Authors
#
# 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.
load("@rules_proto//proto:defs.bzl", "proto_library")
load(
"//pw_build:pigweed.bzl",
"pw_cc_library",
"pw_cc_test",
)
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
proto_library(
name = "update_bundle_proto",
srcs = [
"pw_software_update_protos/tuf.proto",
"pw_software_update_protos/update_bundle.proto",
],
strip_import_prefix = "//pw_software_update",
)
pw_cc_library(
name = "update_bundle",
hdrs = [
"public/pw_software_update/config.h",
"public/pw_software_update/update_bundle.h",
],
includes = ["public"],
deps = [
"//pw_blob_store",
"//pw_kvs",
"//pw_log",
],
)
pw_cc_library(
name = "update_backend",
hdrs = ["public/pw_software_update/update_backend.h"],
includes = ["public"],
deps = [
":update_bundle_proto",
"//pw_status",
],
)
pw_cc_library(
name = "update_service",
srcs = ["service.cc"],
hdrs = ["public/pw_software_update/service.h"],
includes = ["public"],
deps = [
":update_bundle_proto",
],
)
pw_cc_test(
name = "update_bundle_test",
srcs = ["update_bundle_test.cc"],
deps = [
":update_bundle",
"//pw_kvs:fake_flash_test_key_value_store",
"//pw_unit_test",
],
)