From dfc61a8f05199169950fd67dc7f64d2064980506 Mon Sep 17 00:00:00 2001 From: jsobczak Date: Tue, 3 Aug 2021 17:10:12 -0700 Subject: [PATCH] Move license text to BUILD files top PiperOrigin-RevId: 388579579 --- cpp/core/BUILD | 4 +- cpp/core/internal/BUILD | 10 +- cpp/core/internal/base_endpoint_channel.cc | 2 +- .../internal/base_endpoint_channel_test.cc | 2 +- cpp/core/internal/base_pcp_handler_test.cc | 4 +- cpp/core/internal/bwu_manager.cc | 2 +- cpp/core/internal/client_proxy.cc | 2 +- cpp/core/internal/encryption_runner_test.cc | 2 +- cpp/core/internal/endpoint_channel.h | 2 +- cpp/core/internal/endpoint_channel_manager.cc | 2 +- cpp/core/internal/endpoint_manager.cc | 2 +- cpp/core/internal/endpoint_manager_test.cc | 2 +- cpp/core/internal/fuzzers/BUILD | 6 +- .../internal/internal_payload_factory_test.cc | 2 +- cpp/core/internal/mediums/BUILD | 8 +- cpp/core/internal/mediums/ble_v2/BUILD | 2 +- cpp/core/internal/mediums/utils.h | 2 +- cpp/core/internal/mediums/webrtc.cc | 2 +- cpp/core/internal/mediums/webrtc.h | 4 +- cpp/core/internal/mediums/webrtc/BUILD | 4 +- .../mediums/webrtc/signaling_frames.h | 2 +- cpp/core/internal/offline_frames.h | 2 +- cpp/core/internal/offline_frames_test.cc | 2 +- cpp/core/internal/offline_frames_validator.cc | 2 +- cpp/core/internal/offline_frames_validator.h | 2 +- .../internal/offline_frames_validator_test.cc | 2 +- cpp/core/internal/p2p_cluster_pcp_handler.cc | 2 +- cpp/core/options.h | 2 +- cpp/platform/api/BUILD | 4 +- cpp/platform/api/webrtc.h | 2 +- cpp/platform/base/BUILD | 6 +- cpp/platform/impl/g3/BUILD | 2 +- cpp/platform/impl/shared/BUILD | 2 +- cpp/platform/impl/windows/BUILD | 2 +- cpp/platform/impl/windows/generated/BUILD | 2 +- cpp/platform/public/BUILD | 8 +- proto/BUILD | 146 +---- proto/bootstrap_enums.proto | 98 ---- proto/connections/BUILD | 4 +- proto/connections/offline_wire_formats.proto | 2 +- proto/connections_enums.proto | 4 +- proto/discovery_enums.proto | 544 ------------------ proto/magic_pair_enums.proto | 105 ---- proto/mediums/BUILD | 4 +- proto/nearby_client_enums.proto | 43 -- proto/nearby_event_codes.proto | 81 --- proto/setup_enums.proto | 40 -- proto/sharing_enums.proto | 10 +- proto/uwb_enums.proto | 43 -- 49 files changed, 76 insertions(+), 1158 deletions(-) delete mode 100644 proto/bootstrap_enums.proto delete mode 100644 proto/discovery_enums.proto delete mode 100644 proto/magic_pair_enums.proto delete mode 100644 proto/nearby_client_enums.proto delete mode 100644 proto/nearby_event_codes.proto delete mode 100644 proto/setup_enums.proto delete mode 100644 proto/uwb_enums.proto diff --git a/cpp/core/BUILD b/cpp/core/BUILD index d0fbde00..4c4bf890 100644 --- a/cpp/core/BUILD +++ b/cpp/core/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "core", @@ -55,12 +55,12 @@ cc_library( "//core:__subpackages__", ], deps = [ - "//proto:connections_enums_portable_proto", "//absl/strings", "//absl/types:variant", "//platform/base", "//platform/base:util", "//platform/public:types", + "//proto:connections_enums_portable_proto", ], ) diff --git a/cpp/core/internal/BUILD b/cpp/core/internal/BUILD index 57093485..e123768f 100644 --- a/cpp/core/internal/BUILD +++ b/cpp/core/internal/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "internal", @@ -89,8 +89,6 @@ cc_library( ], deps = [ ":message_lite", - "//proto/connections:offline_wire_formats_portable_proto", - "//proto:connections_enums_portable_proto", "//absl/base:core_headers", "//absl/container:btree", "//absl/container:flat_hash_map", @@ -111,6 +109,8 @@ cc_library( "//platform/public:comm", "//platform/public:logging", "//platform/public:types", + "//proto:connections_enums_portable_proto", + "//proto/connections:offline_wire_formats_portable_proto", "//securegcm:ukey2", ], ) @@ -184,8 +184,6 @@ cc_test( deps = [ ":internal", ":internal_test", - "//proto/connections:offline_wire_formats_portable_proto", - "//proto:connections_enums_portable_proto", "//testing/base/public:gunit", "//testing/base/public:gunit_main", "//absl/container:flat_hash_set", @@ -202,6 +200,8 @@ cc_test( "//platform/public:comm", "//platform/public:logging", "//platform/public:types", + "//proto:connections_enums_portable_proto", + "//proto/connections:offline_wire_formats_portable_proto", "//securegcm:ukey2", ], ) diff --git a/cpp/core/internal/base_endpoint_channel.cc b/cpp/core/internal/base_endpoint_channel.cc index 05b01eeb..a6b276be 100644 --- a/cpp/core/internal/base_endpoint_channel.cc +++ b/cpp/core/internal/base_endpoint_channel.cc @@ -16,7 +16,6 @@ #include -#include "proto/connections_enums.pb.h" #include "absl/strings/escaping.h" #include "absl/strings/str_cat.h" #include "core/internal/offline_frames.h" @@ -25,6 +24,7 @@ #include "platform/public/logging.h" #include "platform/public/mutex.h" #include "platform/public/mutex_lock.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/base_endpoint_channel_test.cc b/cpp/core/internal/base_endpoint_channel_test.cc index 56039062..9f0b75a1 100644 --- a/cpp/core/internal/base_endpoint_channel_test.cc +++ b/cpp/core/internal/base_endpoint_channel_test.cc @@ -18,7 +18,6 @@ #include #include -#include "proto/connections_enums.pb.h" #include "securegcm/d2d_connection_context_v1.h" #include "securegcm/ukey2_handshake.h" #include "gmock/gmock.h" @@ -36,6 +35,7 @@ #include "platform/public/multi_thread_executor.h" #include "platform/public/pipe.h" #include "platform/public/single_thread_executor.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/base_pcp_handler_test.cc b/cpp/core/internal/base_pcp_handler_test.cc index f0a2bfd0..b916cbf3 100644 --- a/cpp/core/internal/base_pcp_handler_test.cc +++ b/cpp/core/internal/base_pcp_handler_test.cc @@ -18,8 +18,6 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" -#include "proto/connections_enums.pb.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/time/time.h" @@ -36,6 +34,8 @@ #include "platform/base/medium_environment.h" #include "platform/public/count_down_latch.h" #include "platform/public/pipe.h" +#include "proto/connections/offline_wire_formats.pb.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/bwu_manager.cc b/cpp/core/internal/bwu_manager.cc index 279d4948..85196a06 100644 --- a/cpp/core/internal/bwu_manager.cc +++ b/cpp/core/internal/bwu_manager.cc @@ -17,7 +17,6 @@ #include #include -#include "proto/connections_enums.pb.h" #include "absl/functional/bind_front.h" #include "absl/time/time.h" #include "core/internal/bluetooth_bwu_handler.h" @@ -28,6 +27,7 @@ #include "platform/base/byte_array.h" #include "platform/base/feature_flags.h" #include "platform/public/count_down_latch.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/client_proxy.cc b/cpp/core/internal/client_proxy.cc index 08c27003..861b5361 100644 --- a/cpp/core/internal/client_proxy.cc +++ b/cpp/core/internal/client_proxy.cc @@ -18,7 +18,6 @@ #include #include -#include "proto/connections_enums.pb.h" #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" #include "absl/strings/escaping.h" @@ -27,6 +26,7 @@ #include "platform/base/prng.h" #include "platform/public/logging.h" #include "platform/public/mutex_lock.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/encryption_runner_test.cc b/cpp/core/internal/encryption_runner_test.cc index 94cda03c..fe7215a7 100644 --- a/cpp/core/internal/encryption_runner_test.cc +++ b/cpp/core/internal/encryption_runner_test.cc @@ -14,7 +14,6 @@ #include "core/internal/encryption_runner.h" -#include "proto/connections_enums.pb.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/time/clock.h" @@ -24,6 +23,7 @@ #include "platform/public/count_down_latch.h" #include "platform/public/pipe.h" #include "platform/public/system_clock.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/endpoint_channel.h b/cpp/core/internal/endpoint_channel.h index 523c5875..108fcab7 100644 --- a/cpp/core/internal/endpoint_channel.h +++ b/cpp/core/internal/endpoint_channel.h @@ -18,12 +18,12 @@ #include #include -#include "proto/connections_enums.pb.h" #include "securegcm/d2d_connection_context_v1.h" #include "absl/time/clock.h" #include "platform/base/byte_array.h" #include "platform/base/exception.h" #include "platform/public/mutex.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/endpoint_channel_manager.cc b/cpp/core/internal/endpoint_channel_manager.cc index 3847e745..9ea41dc5 100644 --- a/cpp/core/internal/endpoint_channel_manager.cc +++ b/cpp/core/internal/endpoint_channel_manager.cc @@ -18,7 +18,6 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" #include "absl/time/time.h" #include "core/internal/offline_frames.h" #include "platform/base/feature_flags.h" @@ -26,6 +25,7 @@ #include "platform/public/mutex.h" #include "platform/public/mutex_lock.h" #include "platform/public/system_clock.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/endpoint_manager.cc b/cpp/core/internal/endpoint_manager.cc index 6d76e6c0..2bb966cc 100644 --- a/cpp/core/internal/endpoint_manager.cc +++ b/cpp/core/internal/endpoint_manager.cc @@ -17,13 +17,13 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" #include "core/internal/endpoint_channel.h" #include "core/internal/offline_frames.h" #include "platform/base/exception.h" #include "platform/public/count_down_latch.h" #include "platform/public/logging.h" #include "platform/public/mutex_lock.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/endpoint_manager_test.cc b/cpp/core/internal/endpoint_manager_test.cc index 2f61ec1f..43094824 100644 --- a/cpp/core/internal/endpoint_manager_test.cc +++ b/cpp/core/internal/endpoint_manager_test.cc @@ -19,7 +19,6 @@ #include #include -#include "proto/connections_enums.pb.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "absl/synchronization/mutex.h" @@ -34,6 +33,7 @@ #include "platform/public/count_down_latch.h" #include "platform/public/logging.h" #include "platform/public/pipe.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/fuzzers/BUILD b/cpp/core/internal/fuzzers/BUILD index 8fe3d03b..56175c5b 100644 --- a/cpp/core/internal/fuzzers/BUILD +++ b/cpp/core/internal/fuzzers/BUILD @@ -1,6 +1,3 @@ -load("//security/fuzzing/blaze:cc_fuzz_target.bzl", "cc_fuzz_target") - -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,6 +11,9 @@ licenses(["notice"]) # 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("//security/fuzzing/blaze:cc_fuzz_target.bzl", "cc_fuzz_target") + +licenses(["notice"]) cc_fuzz_target( name = "offline_frames_fuzzer", diff --git a/cpp/core/internal/internal_payload_factory_test.cc b/cpp/core/internal/internal_payload_factory_test.cc index 3b171723..adfbe9b2 100644 --- a/cpp/core/internal/internal_payload_factory_test.cc +++ b/cpp/core/internal/internal_payload_factory_test.cc @@ -17,12 +17,12 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "core/internal/offline_frames.h" #include "platform/base/byte_array.h" #include "platform/public/pipe.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/mediums/BUILD b/cpp/core/internal/mediums/BUILD index 0b5ab16b..28f9e427 100644 --- a/cpp/core/internal/mediums/BUILD +++ b/cpp/core/internal/mediums/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "mediums", @@ -41,8 +41,6 @@ cc_library( ], deps = [ ":utils", - "//proto/connections:offline_wire_formats_portable_proto", - "//location/nearby/mediums/proto:web_rtc_signaling_frames_cc_proto", "//absl/container:flat_hash_map", "//absl/container:flat_hash_set", "//absl/functional:bind_front", @@ -57,6 +55,8 @@ cc_library( "//platform/public:comm", "//platform/public:logging", "//platform/public:types", + "//proto/connections:offline_wire_formats_portable_proto", + "//proto/mediums:web_rtc_signaling_frames_cc_proto", "//smhasher:libmurmur3", "//webrtc/api:libjingle_peerconnection_api", "//webrtc/api:scoped_refptr", @@ -73,9 +73,9 @@ cc_library( "//core/internal/mediums/webrtc:__pkg__", ], deps = [ - "//proto/connections:offline_wire_formats_portable_proto", "//platform/base", "//platform/public:types", + "//proto/connections:offline_wire_formats_portable_proto", ], ) diff --git a/cpp/core/internal/mediums/ble_v2/BUILD b/cpp/core/internal/mediums/ble_v2/BUILD index d4dbbc31..30faec9d 100644 --- a/cpp/core/internal/mediums/ble_v2/BUILD +++ b/cpp/core/internal/mediums/ble_v2/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "ble_v2", diff --git a/cpp/core/internal/mediums/utils.h b/cpp/core/internal/mediums/utils.h index 6f12c14e..4a26c4e8 100644 --- a/cpp/core/internal/mediums/utils.h +++ b/cpp/core/internal/mediums/utils.h @@ -18,8 +18,8 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" #include "platform/base/byte_array.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/mediums/webrtc.cc b/cpp/core/internal/mediums/webrtc.cc index defcea51..0eba6799 100644 --- a/cpp/core/internal/mediums/webrtc.cc +++ b/cpp/core/internal/mediums/webrtc.cc @@ -17,7 +17,6 @@ #include #include -#include "location/nearby/mediums/proto/web_rtc_signaling_frames.pb.h" #include "absl/functional/bind_front.h" #include "absl/strings/str_cat.h" #include "absl/time/time.h" @@ -30,6 +29,7 @@ #include "platform/public/future.h" #include "platform/public/logging.h" #include "platform/public/mutex_lock.h" +#include "proto/mediums/web_rtc_signaling_frames.pb.h" #include "webrtc/api/jsep.h" namespace location { diff --git a/cpp/core/internal/mediums/webrtc.h b/cpp/core/internal/mediums/webrtc.h index 070c4c82..3de27ffc 100644 --- a/cpp/core/internal/mediums/webrtc.h +++ b/cpp/core/internal/mediums/webrtc.h @@ -20,8 +20,6 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" -#include "location/nearby/mediums/proto/web_rtc_signaling_frames.pb.h" #include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_set.h" #include "core/internal/mediums/webrtc/connection_flow.h" @@ -41,6 +39,8 @@ #include "platform/public/scheduled_executor.h" #include "platform/public/single_thread_executor.h" #include "platform/public/webrtc.h" +#include "proto/connections/offline_wire_formats.pb.h" +#include "proto/mediums/web_rtc_signaling_frames.pb.h" #include "webrtc/api/data_channel_interface.h" #include "webrtc/api/jsep.h" #include "webrtc/api/scoped_refptr.h" diff --git a/cpp/core/internal/mediums/webrtc/BUILD b/cpp/core/internal/mediums/webrtc/BUILD index d93ca14c..7ae2868f 100644 --- a/cpp/core/internal/mediums/webrtc/BUILD +++ b/cpp/core/internal/mediums/webrtc/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "webrtc", @@ -35,7 +35,6 @@ cc_library( "//core/internal:__subpackages__", ], deps = [ - "//location/nearby/mediums/proto:web_rtc_signaling_frames_cc_proto", "//absl/memory", "//absl/strings", "//absl/time", @@ -45,6 +44,7 @@ cc_library( "//platform/public:comm", "//platform/public:logging", "//platform/public:types", + "//proto/mediums:web_rtc_signaling_frames_cc_proto", "//webrtc/api:libjingle_peerconnection_api", "//third_party/webrtc/files/stable/webrtc/pc:peerconnection", ], diff --git a/cpp/core/internal/mediums/webrtc/signaling_frames.h b/cpp/core/internal/mediums/webrtc/signaling_frames.h index c3a1246d..ce57ccd1 100644 --- a/cpp/core/internal/mediums/webrtc/signaling_frames.h +++ b/cpp/core/internal/mediums/webrtc/signaling_frames.h @@ -17,9 +17,9 @@ #include -#include "location/nearby/mediums/proto/web_rtc_signaling_frames.pb.h" #include "core/internal/mediums/webrtc/peer_id.h" #include "platform/base/byte_array.h" +#include "proto/mediums/web_rtc_signaling_frames.pb.h" #include "webrtc/api/peer_connection_interface.h" namespace location { diff --git a/cpp/core/internal/offline_frames.h b/cpp/core/internal/offline_frames.h index f325e8af..74db1071 100644 --- a/cpp/core/internal/offline_frames.h +++ b/cpp/core/internal/offline_frames.h @@ -18,10 +18,10 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" #include "core/options.h" #include "platform/base/byte_array.h" #include "platform/base/exception.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/offline_frames_test.cc b/cpp/core/internal/offline_frames_test.cc index 5cf9b823..1dc67444 100644 --- a/cpp/core/internal/offline_frames_test.cc +++ b/cpp/core/internal/offline_frames_test.cc @@ -19,10 +19,10 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "platform/base/byte_array.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/offline_frames_validator.cc b/cpp/core/internal/offline_frames_validator.cc index 273dddef..614c65f8 100644 --- a/cpp/core/internal/offline_frames_validator.cc +++ b/cpp/core/internal/offline_frames_validator.cc @@ -16,9 +16,9 @@ #include //NOLINT -#include "proto/connections/offline_wire_formats.pb.h" #include "core/internal/internal_payload.h" #include "core/internal/offline_frames.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/offline_frames_validator.h b/cpp/core/internal/offline_frames_validator.h index a673c913..f64c32c3 100644 --- a/cpp/core/internal/offline_frames_validator.h +++ b/cpp/core/internal/offline_frames_validator.h @@ -15,8 +15,8 @@ #ifndef CORE_INTERNAL_OFFLINE_FRAMES_VALIDATOR_H_ #define CORE_INTERNAL_OFFLINE_FRAMES_VALIDATOR_H_ -#include "proto/connections/offline_wire_formats.pb.h" #include "platform/base/exception.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/offline_frames_validator_test.cc b/cpp/core/internal/offline_frames_validator_test.cc index ff171657..9b926e84 100644 --- a/cpp/core/internal/offline_frames_validator_test.cc +++ b/cpp/core/internal/offline_frames_validator_test.cc @@ -16,11 +16,11 @@ #include -#include "proto/connections/offline_wire_formats.pb.h" #include "gmock/gmock.h" #include "gtest/gtest.h" #include "core/internal/offline_frames.h" #include "platform/base/byte_array.h" +#include "proto/connections/offline_wire_formats.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/internal/p2p_cluster_pcp_handler.cc b/cpp/core/internal/p2p_cluster_pcp_handler.cc index 8073d380..10823b06 100644 --- a/cpp/core/internal/p2p_cluster_pcp_handler.cc +++ b/cpp/core/internal/p2p_cluster_pcp_handler.cc @@ -14,7 +14,6 @@ #include "core/internal/p2p_cluster_pcp_handler.h" -#include "proto/connections_enums.pb.h" #include "absl/functional/bind_front.h" #include "absl/strings/escaping.h" #include "core/internal/base_pcp_handler.h" @@ -29,6 +28,7 @@ #include "platform/base/nsd_service_info.h" #include "platform/base/types.h" #include "platform/public/crypto.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/core/options.h b/cpp/core/options.h index a6b65289..fad5ecf1 100644 --- a/cpp/core/options.h +++ b/cpp/core/options.h @@ -17,9 +17,9 @@ #include -#include "proto/connections_enums.pb.h" #include "core/strategy.h" #include "platform/base/byte_array.h" +#include "proto/connections_enums.pb.h" namespace location { namespace nearby { diff --git a/cpp/platform/api/BUILD b/cpp/platform/api/BUILD index 4937a80f..a7a2ca10 100644 --- a/cpp/platform/api/BUILD +++ b/cpp/platform/api/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "types", @@ -67,11 +67,11 @@ cc_library( "//platform/public:__pkg__", ], deps = [ - "//proto/connections:offline_wire_formats_portable_proto", "//absl/strings", "//absl/types:optional", "//platform/base", "//platform/base:cancellation_flag", + "//proto/connections:offline_wire_formats_portable_proto", "//webrtc/api:libjingle_peerconnection_api", ], ) diff --git a/cpp/platform/api/webrtc.h b/cpp/platform/api/webrtc.h index 87f1afd3..ede07072 100644 --- a/cpp/platform/api/webrtc.h +++ b/cpp/platform/api/webrtc.h @@ -19,9 +19,9 @@ #include #include -#include "proto/connections/offline_wire_formats.pb.h" #include "absl/strings/string_view.h" #include "platform/base/byte_array.h" +#include "proto/connections/offline_wire_formats.pb.h" #include "webrtc/api/peer_connection_interface.h" namespace location { diff --git a/cpp/platform/base/BUILD b/cpp/platform/base/BUILD index db3af64c..b130fff2 100644 --- a/cpp/platform/base/BUILD +++ b/cpp/platform/base/BUILD @@ -1,6 +1,3 @@ -load("//ads/util/non_compile:non_compile.bzl", "cc_with_non_compile_test") - -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,6 +11,9 @@ licenses(["notice"]) # 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("//ads/util/non_compile:non_compile.bzl", "cc_with_non_compile_test") + +licenses(["notice"]) cc_library( name = "base", diff --git a/cpp/platform/impl/g3/BUILD b/cpp/platform/impl/g3/BUILD index a8c60da8..b6d98452 100644 --- a/cpp/platform/impl/g3/BUILD +++ b/cpp/platform/impl/g3/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "types", diff --git a/cpp/platform/impl/shared/BUILD b/cpp/platform/impl/shared/BUILD index 4d06d4df..f7ba9d89 100644 --- a/cpp/platform/impl/shared/BUILD +++ b/cpp/platform/impl/shared/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "posix_mutex", diff --git a/cpp/platform/impl/windows/BUILD b/cpp/platform/impl/windows/BUILD index a4e9bdaf..34b9d8d4 100644 --- a/cpp/platform/impl/windows/BUILD +++ b/cpp/platform/impl/windows/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "types", diff --git a/cpp/platform/impl/windows/generated/BUILD b/cpp/platform/impl/windows/generated/BUILD index 544ecb4e..c9507ec5 100644 --- a/cpp/platform/impl/windows/generated/BUILD +++ b/cpp/platform/impl/windows/generated/BUILD @@ -1,4 +1,3 @@ -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +11,7 @@ licenses(["notice"]) # 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. +licenses(["notice"]) cc_library( name = "types", diff --git a/cpp/platform/public/BUILD b/cpp/platform/public/BUILD index eea76700..704eafba 100644 --- a/cpp/platform/public/BUILD +++ b/cpp/platform/public/BUILD @@ -1,6 +1,3 @@ -load("//tools/build_defs/cc:cc_fake_binary.bzl", "cc_fake_binary") - -licenses(["notice"]) # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -14,6 +11,9 @@ licenses(["notice"]) # 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("//tools/build_defs/cc:cc_fake_binary.bzl", "cc_fake_binary") + +licenses(["notice"]) cc_library( name = "types", @@ -89,13 +89,13 @@ cc_library( deps = [ ":logging", ":types", - "//proto/connections:offline_wire_formats_portable_proto", "//absl/container:flat_hash_map", "//absl/strings", "//platform/api:comm", "//platform/api:platform", "//platform/base", "//platform/base:cancellation_flag", + "//proto/connections:offline_wire_formats_portable_proto", "//webrtc/api:libjingle_peerconnection_api", ], ) diff --git a/proto/BUILD b/proto/BUILD index bb92fb52..5f44402a 100644 --- a/proto/BUILD +++ b/proto/BUILD @@ -15,45 +15,11 @@ # Proto for Nearby products load("//net/proto2/contrib/portable/cc:portable_proto_build_defs.bzl", "portable_proto_library") -load("//tools/build_defs/proto/cpp:cc_proto_library.bzl", "cc_proto_library") + +licenses(["notice"]) package(default_visibility = ["//visibility:public"]) -proto_library( - name = "bootstrap_enums_proto", - srcs = ["bootstrap_enums.proto"], - cc_api_version = 2, - compatible_with = ["//buildenv/target:appengine"], - deps = ["//logs/proto/logs_annotations"], -) - -java_lite_proto_library( - name = "bootstrap_enums_java_proto_lite", - visibility = [ - "//java/com/google/android/gmscore/integ/modules/nearby:nearby_packages", - ], - deps = [":bootstrap_enums_proto"], -) - -proto_library( - name = "discovery_enums_proto", - srcs = ["discovery_enums.proto"], - cc_api_version = 2, - compatible_with = ["//buildenv/target:appengine"], - deps = ["//logs/proto/logs_annotations"], -) - -java_lite_proto_library( - name = "discovery_enums_java_proto_lite", - deps = [":discovery_enums_proto"], -) - -java_proto_library( - name = "discovery_enums_java_proto", - compatible_with = ["//buildenv/target:appengine"], - deps = [":discovery_enums_proto"], -) - proto_library( name = "connections_enums_proto", srcs = ["connections_enums.proto"], @@ -93,7 +59,7 @@ portable_proto_library( ], visibility = [ "//location/nearby/connections:__subpackages__", - "//nearby_connections:__subpackages__", + "//third_party/nearby_connections:__subpackages__", ], ) @@ -102,72 +68,6 @@ filegroup( srcs = ["connections_enums_proto_config.asciipb"], ) -proto_library( - name = "setup_enums_proto", - srcs = ["setup_enums.proto"], - cc_api_version = 2, - compatible_with = ["//buildenv/target:appengine"], - deps = [ - "//logs/proto/logs_annotations", - ], -) - -java_lite_proto_library( - name = "setup_enums_java_proto_lite", - deps = [":setup_enums_proto"], -) - -proto_library( - name = "nearby_client_enums_proto", - srcs = ["nearby_client_enums.proto"], - cc_api_version = 2, - compatible_with = ["//buildenv/target:appengine"], - deps = [ - "//logs/proto/logs_annotations", - ], -) - -java_proto_library( - name = "nearby_client_enums_java_proto", - deps = [":nearby_client_enums_proto"], -) - -java_lite_proto_library( - name = "nearby_client_enums_java_proto_lite", - deps = [":nearby_client_enums_proto"], -) - -go_proto_library( - name = "nearby_client_enums_go_proto", - deps = [":nearby_client_enums_proto"], -) - -proto_library( - name = "magic_pair_enums_proto", - srcs = ["magic_pair_enums.proto"], - cc_api_version = 2, - compatible_with = ["//buildenv/target:appengine"], - deps = [ - "//logs/proto/logs_annotations", - ], -) - -cc_proto_library( - name = "magic_pair_enums_cc_proto", - compatible_with = ["//buildenv/target:appengine"], - deps = [":magic_pair_enums_proto"], -) - -java_lite_proto_library( - name = "magic_pair_enums_java_proto_lite", - deps = [":magic_pair_enums_proto"], -) - -go_proto_library( - name = "magic_pair_enums_go_proto", - deps = [":magic_pair_enums_proto"], -) - proto_library( name = "sharing_enums_proto", srcs = ["sharing_enums.proto"], @@ -187,43 +87,3 @@ java_proto_library( name = "sharing_enums_java_proto", deps = [":sharing_enums_proto"], ) - -proto_library( - name = "nearby_event_codes_proto", - srcs = ["nearby_event_codes.proto"], - cc_api_version = 2, - compatible_with = ["//buildenv/target:appengine"], - deps = [ - "//logs/proto/logs_annotations", - ], -) - -java_lite_proto_library( - name = "nearby_event_codes_java_proto_lite", - deps = [":nearby_event_codes_proto"], -) - -go_proto_library( - name = "nearby_event_codes_go_proto", - deps = [":nearby_event_codes_proto"], -) - -proto_library( - name = "uwb_enums_proto", - srcs = ["uwb_enums.proto"], - cc_api_version = 2, - compatible_with = ["//buildenv/target:appengine"], - deps = [ - "//logs/proto/logs_annotations", - ], -) - -java_lite_proto_library( - name = "uwb_enums_java_proto_lite", - deps = [":uwb_enums_proto"], -) - -java_proto_library( - name = "uwb_enums_java_proto", - deps = [":uwb_enums_proto"], -) diff --git a/proto/bootstrap_enums.proto b/proto/bootstrap_enums.proto deleted file mode 100644 index 01eb2969..00000000 --- a/proto/bootstrap_enums.proto +++ /dev/null @@ -1,98 +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. - -syntax = "proto2"; - -package location.nearby.proto; - - -option optimize_for = LITE_RUNTIME; -option java_package = "com.google.location.nearby.proto"; -option java_outer_classname = "BootstrapEnums"; - -// Medium used for offline socket. -enum SocketMedium { - SOCKET_MEDIUM_UNKNOWN = 0; - - // Bluetooth rfcomm socket. - SOCKET_BLUETOOTH_RFCOMM = 1; - - // BLE gatt socket. - SOCKET_BLE_GATT = 2; -} - -enum NearbyBootstrapEvent { - EVENT_UNKNOWN = 0; - - // Enable target mode. - EVENT_ENABLE_TARGET = 1; - - // Disable target mode. - EVENT_DISABLE_TARGET = 2; - - // Start scan devices. - EVENT_START_SCAN = 3; - - // Stop scan devices. - EVENT_STOP_SCAN = 4; - - // Find one or more scan results. - EVENT_HAS_SCAN_RESULT = 5; - - // Start connect in SPAKE. - EVENT_START_CONNECT_SPAKE = 6; - - // Start connect in ECDH. - EVENT_START_CONNECT_ECDH = 7; - - // Input token for SPAKE connection if previous one is incorrect. - EVENT_INPUT_TOKEN = 8; - - // Confirm connection for ECDH connection. - EVENT_CONFIRM = 9; - - // Disconnect. - EVENT_DISCONNECT = 10; - - // Connection is established. - EVENT_CONNECTED = 11; - - // Connection is disconnected. - EVENT_DISCONNECTED = 12; - - // Connect is timeout. - EVENT_CONNECT_TIMEOUT = 13; -} - -enum NearbyBootstrapDeviceType { - DEVICE_TYPE_UNKNOWN = 0; - - DEVICE_TYPE_ANDROID_PHONE = 1; - - DEVICE_TYPE_ANDROID_TABLET = 2; - - DEVICE_TYPE_ANDROID_TV = 3; - - DEVICE_TYPE_ANDROID_WEAR = 4; -} - -enum NearbyBootstrapDeviceRole { - DEVICE_ROLE_UNKNOWN = 0; - - // Device to be bootstrapped. - DEVICE_ROLE_TARGET = 1; - - // Device that initiate the bootstrap. - DEVICE_ROLE_SOURCE = 2; -} diff --git a/proto/connections/BUILD b/proto/connections/BUILD index d9814b6d..6d7e5fcc 100644 --- a/proto/connections/BUILD +++ b/proto/connections/BUILD @@ -14,6 +14,8 @@ load("//net/proto2/contrib/portable/cc:portable_proto_build_defs.bzl", "portable_proto_library") +licenses(["notice"]) + proto_library( name = "offline_wire_formats_proto", srcs = [ @@ -48,8 +50,8 @@ portable_proto_library( ], visibility = [ "//location/nearby/connections:__subpackages__", - "//platform:__subpackages__", "//nearby_connections:__subpackages__", + "//third_party/nearby_connections:__subpackages__", ], ) diff --git a/proto/connections/offline_wire_formats.proto b/proto/connections/offline_wire_formats.proto index 37d27d22..4ad85222 100644 --- a/proto/connections/offline_wire_formats.proto +++ b/proto/connections/offline_wire_formats.proto @@ -72,7 +72,7 @@ message ConnectionRequestFrame { WEB_RTC = 9; BLE_L2CAP = 10; } - // LINT.ThenChange(//depot/google3/proto/connections_enums.proto) + // LINT.ThenChange(//depot/google3/third_party/nearby_connections/proto/connections_enums.proto) optional string endpoint_id = 1; optional string endpoint_name = 2; diff --git a/proto/connections_enums.proto b/proto/connections_enums.proto index 4d4ad88e..e114119b 100644 --- a/proto/connections_enums.proto +++ b/proto/connections_enums.proto @@ -17,6 +17,8 @@ syntax = "proto2"; package location.nearby.proto.connections; + + option optimize_for = LITE_RUNTIME; option java_package = "com.google.location.nearby.proto"; option java_outer_classname = "ConnectionsEnums"; @@ -84,7 +86,7 @@ enum Medium { // LINT.ThenChange( // //depot/google3/java/com/google/android/gmscore/integ/client/nearby/src/com/google/android/gms/nearby/connection/Medium.java, // //depot/google3/java/com/google/android/gms/nearby/internal/connection/api.proto, -// //depot/google3/proto/connections/offline_wire_formats.proto +// //depot/google3/third_party/nearby_connections/proto/connections/offline_wire_formats.proto // ) // The result of a ConnectionRequest. diff --git a/proto/discovery_enums.proto b/proto/discovery_enums.proto deleted file mode 100644 index 763acc9b..00000000 --- a/proto/discovery_enums.proto +++ /dev/null @@ -1,544 +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. - -syntax = "proto2"; - -package location.nearby.proto; - - -option optimize_for = LITE_RUNTIME; -option java_package = "com.google.location.nearby.proto"; -option java_outer_classname = "DiscoveryEnums"; - -// NEXT ID: 150 -enum DiscoveryEvent { - UNKNOWN_DISCOVERY_EVENT = 0; - - // Discoverer created the beacon opt-in notification - BEACON_OPT_IN_NOTIFICATION_TRIGGERED = 1; - // User clicked on the beacon opt-in notification - BEACON_OPT_IN_NOTIFICATION_CLICKED = 2; - - // Discoverer created an item notification. - NOTIFICATION_TRIGGERED = 3; - // Discoverer' notification timed out without user action. - NOTIFICATION_TIMED_OUT = 4; - // User clicked on the "Manage Settings" button in notification. - // Deprecated. "Manage Settings" button replaced with "mute" for individual - // items and not present for grouped notifications. - NOTIFICATION_MANAGE_SETTINGS_CLICKED = 5 [deprecated = true]; - // Notification dismiss back off policy maxed out. - NOTIFICATION_DISMISS_BACKOFF_MAXED = 6; - - // User clicked on group notification. - NOTIFICATION_GROUP_CLICKED = 7; - // User specifically dismissed group notification. - NOTIFICATION_GROUP_DISMISSED = 8; - // User clicked on a one item notification. - NOTIFICATION_ITEM_CLICKED = 9; - // User specifically dismissed a one item notification. - NOTIFICATION_ITEM_DISMISSED = 10; - - // User clicked on a list item. - LIST_ITEM_CLICKED = 11; - // User disabled individual list items. - LIST_ITEMS_DISABLED = 12; - // User enabled individual list items. - LIST_ITEMS_ENABLED = 13; - - // The list view was launched (from Notificaion, Google Settings, etc.) - LIST_VIEW_LAUNCHED = 14; - // User clicked the positive button in notification settings opt-in - // dialog in ListView. - // Deprecated. Removed in v8. Use NOTIFICATION_MASTER_SWITCH_ENABLED - LIST_VIEW_OPT_IN_DIALOG_POSITIVE = 15 [deprecated = true]; - // User clicked the "got it" button to confirm turning off Nearby - // notification through master switch in education module. - LIST_VIEW_OPT_IN_DIALOG_NEGATIVE = 16; - // User clicked the refresh button in ListView - LIST_VIEW_REFRESHED = 17; - // User clicked the Help link in action bar menu. - LIST_VIEW_HELP_LINK_CLICKED = 18; - - // The notification settings Activity was launched. - NOTIFICATION_SETTINGS_LAUNCHED = 19; - // User enabled notification(device or link) in settings page. - NOTIFICATION_SETTINGS_ENABLED = 20; - // User disabled notification(device or link) in settings page. - NOTIFICATION_SETTINGS_DISABLED = 21; - - // App was installed after user being redirected to Play Store. - APP_INSTALLED = 22; - - // User clicked the notification settings entry in list view. - LIST_VIEW_NOTIFICATION_SETTINGS_CLICKED = 23; - - // The permission dialog for BT & Location was shown. - PERMISSION_DIALOG_TRIGGERED = 24; - // User clicked "yes" to enable BT & Location permission. - PERMISSION_DIALOG_POSITIVE = 25; - // User clicked "cancel" on permission dialog. - PERMISSION_DIALOG_NEGATIVE = 26; - - // The user was redirected to play store. - REDIRECTED_TO_PLAYSTORE = 27; - - // Data was cleared in debug mode. - // Deprecated. Removed in v11. - DATA_CLEARED = 28 [deprecated = true]; - - // Discoverer was launched by user clicking nearby in Google settings. - GOOGLE_SETTING_CLICKED = 29; - - // The "network is disabled" message is shown - // Deprecated. Use NetworkState instead. - NETWORK_UNAVAILABLE = 30 [deprecated = true]; - - // The QuickSettings Nearby tile was added - TILE_ADDED = 31; - // The QuickSettings Nearby tile was removed - TILE_REMOVED = 32; - // The QuickSettings Nearby tile was clicked - TILE_CLICKED = 33; - - // User disabled item from notification. - NOTIFICATION_DISABLED = 34; - - // User leaves the list view. - LIST_VIEW_EXIT = 35; - - // TODO(haoxiangl): distinguish whether it is launched from home screen or - // launched after Chrome Custom Tab is dismissed - // Discoverer was launched by user clicking home screen shortcut icon. - LIST_VIEW_LAUNCHED_FROM_HOME_SCREEN = 36; - - // Discoverer was launched by user clicking group/opt-in notification. - LIST_VIEW_LAUNCHED_FROM_NOTIFICATION = 37; - - // Discoverer was launched by user clicking QS tile - LIST_VIEW_LAUNCHED_FROM_QS_TILE = 38; - - // The list view refresh was triggered automatically by empty list or - // device permission turned on. - LIST_VIEW_AUTO_REFRESHED = 39; - - // When the home screen icon was successfully added. - HOME_SCREEN_ICON_ADDED = 40; - - // When user choose to add the home screen icon in overflow menu. - HOME_SCREEN_ICON_OVERFLOW_ADDED = 41; - - // When user choose to add the home screen icon in warm welcome flow. - HOME_SCREEN_ICON_WW_ACCEPTED = 42; - - // When user choose not to add the home screen icon in warm welcome flow. - HOME_SCREEN_ICON_WW_REJECTED = 43; - - // Beacon opt-in notification (education) was timed out. - BEACON_OPT_IN_NOTIFICATION_TIMED_OUT = 44; - - // Beacon opt-in notification (education) was dismissed by user. - BEACON_OPT_IN_NOTIFICATION_DISMISSED = 45; - - // User enabled all notifications using list view master switch. - NOTIFICATION_MASTER_SWITCH_ENABLED = 46; - // User disabled all notifications using list view master switch. - NOTIFICATION_MASTER_SWITCH_DISABLED = 47; - - // A new ChromeCustomTab session is started - CHROME_CUSTOM_TAB_START = 48; - // A ChromeCustomTab session is finished - CHROME_CUSTOM_TAB_FINISH = 49; - - // The user swiped away the "Pairing..." notification. - MAGIC_PAIR_PAIRING_NOTIFICATION_DISMISSED = 50; - - // The user has started pairing with a device associated with a FastPair - // item. The user may have started pairing via Bluetooth Settings rather than - // via the notification. (We may not have even shown the notification, i.e. - // if it's not within the distance threshold.) - BLUETOOTH_BONDING = 57; - - // An item was launched automatically (e.g. because it passed a very high - // relevance threshold), without the user clicking it. - ITEM_AUTO_LAUNCHED = 51; - - // A Listview item is viewed by the users. - LIST_ITEM_VIEWED = 52; - - // Web url was launched in a browser other than in Chrome Custom Tab. - WEB_URL_LAUNCHED_IN_BROWSER = 53; - - // "Do not show again" was clicked in the notification - NOTIFICATION_DO_NOT_SHOW_AGAIN_CLICKED = 54; - - // "Report" was clicked in the Chrome Custom Tab - CHROME_CUSTOM_TAB_REPORT_CLICKED = 55; - - // The user clicked the notification displayed after pairing has finished. - MAGIC_PAIR_POST_COMPLETION_INTENT_LAUNCHED = 56; - - // Abuse Report was submitted - REPORT_ABUSE_SUBMITTED = 58; - - // "Report" was clicked in the Discovery Report Snackbar - SNACKBAR_REPORT_CLICKED = 59; - - // Devices activity was launched by user clicking settings button. - DEVICES_LIST_VIEW_LAUNCHED_FROM_SETTINGS = 60; - - // Devices activity was launched by user clicking a notification. - DEVICES_LIST_VIEW_LAUNCHED_FROM_NOTIFICATION = 61; - - // User left the devices activity. - DEVICES_LIST_VIEW_EXIT = 62; - - // A list item was viewed by the user in the devices activity. - DEVICES_LIST_ITEM_VIEWED = 63; - - // A list item in the devices activity is clicked by the user. - DEVICES_LIST_ITEM_CLICKED = 64; - - // User clicked the Help link in the action bar menu. - DEVICES_LIST_VIEW_ACTION_BAR_HELP_LINK_CLICKED = 66; - - // User toggled the 'Notifications' item in the devices list view. - DEVICES_LIST_VIEW_NOTIFICATIONS_TOGGLED = 73; - - // User clicked the help link in Fast Pair account settings. - FAST_PAIR_ACCOUNT_SETTINGS_ACTION_BAR_HELP_LINK_CLICKED = 74; - - // User enables device notifications - DEVICE_NOTIFICATION_SETTINGS_ENABLED = 75; - - // User disables device notifications - DEVICE_NOTIFICATION_SETTINGS_DISABLED = 76; - - // User connected to a bluetooth device with a battery level and we showed a - // toast to let them know the current level. - BLUETOOTH_BATTERY_LEVEL_TOAST_SHOWN = 77; - - // User connected to a Fast Pair 2 device and the connected/disconnected - // status was uploaded to Find My Accessories. - FIND_MY_ACCESSORY_UPLOADED = 78; - - // User went to the Fast Pair account page. - FAST_PAIR_ACCOUNT_SETTINGS_LAUNCHED = 79; - - // User switched the account being shown on the Fast Pair account page. - FAST_PAIR_ACCOUNT_SETTINGS_SWITCHED = 80; - - // User disabled saving Fast Pair devices to their account. - FAST_PAIR_ACCOUNT_SETTINGS_SAVE_DISABLED = 81; - - // User enabled saving Fast Pair devices to their account. - FAST_PAIR_ACCOUNT_SETTINGS_SAVE_ENABLED = 82; - - // User clicked a device item on the account settings page. - FAST_PAIR_ACCOUNT_SETTINGS_DEVICE_ITEM_LAUNCHED = 83; - - // User renamed a Fast Pair device from Fast Pair's device settings page. - FAST_PAIR_DEVICE_RENAMED = 84; - - // User forgot a Fast Pair device from Fast Pair's device settings page. - FAST_PAIR_DEVICE_FORGOTTEN = 85; - - // User clicked the Find My Device item from device settings. - FAST_PAIR_DEVICE_FIND_DEVICE_CLICKED = 86; - - // User clicked the install companion app item from device settings. - FAST_PAIR_DEVICE_INSTALL_COMPANION_APP_CLICKED = 87; - - // User clicked the open companion app item from device settings. - FAST_PAIR_DEVICE_OPEN_COMPANION_APP_CLICKED = 88; - - // User clicked a slice item from the companion app on the device settings - // page. - FAST_PAIR_DEVICE_SLICE_ITEM_CLICKED = 89; - - // User launched the find device activity for ringing their device. - FAST_PAIR_FIND_DEVICE_LAUNCHED = 90; - - // User clicked the find device ring button. - FAST_PAIR_FIND_DEVICE_RING_CLICKED = 91; - - // User clicked the find device mute button. - FAST_PAIR_FIND_DEVICE_MUTE_CLICKED = 92; - - // User clicked the find device ring left button. - FAST_PAIR_FIND_DEVICE_RING_LEFT_CLICKED = 93; - - // User clicked the find device ring right button. - FAST_PAIR_FIND_DEVICE_RING_RIGHT_CLICKED = 94; - - // User clicked the find device mute left button. - FAST_PAIR_FIND_DEVICE_MUTE_LEFT_CLICKED = 95; - - // User clicked the find device mute right button. - FAST_PAIR_FIND_DEVICE_MUTE_RIGHT_CLICKED = 96; - - // User clicked the show device location history button. - FAST_PAIR_FIND_DEVICE_HISTORY_CLICKED = 97; - - // User queried the connected device settings slices. - FAST_PAIR_CONNECTED_DEVICE_SLICE_QUERIED = 98; - - // User requested to download the optional module. - FAST_PAIR_OPTIONAL_MODULE_REQUEST_SUCCEEDED = 99; - - // User requested to download the optional module, but it failed. - FAST_PAIR_OPTIONAL_MODULE_REQUEST_FAILED = 100; - - // User finished installing the optional module and it is enabled. - FAST_PAIR_OPTIONAL_MODULE_ENABLED = 101; - - // Android first discovers a device broadcasting a Fast Pair advertisement - // containing a model id - FAST_PAIR_DEVICE_DETECTED_WITH_MODEL_ID = 102; - - // Android first discovers a device broadcasting a Fast Pair advertisement - // containing a bloom filter - FAST_PAIR_DEVICE_DETECTED_WITH_BLOOM_FILTER = 103; - - // Detected model id was found in the local Fast Pair device database which is - // not populated by the offline service (130 is offline populated). - FAST_PAIR_LOCAL_DB_CACHE_HIT = 104; - - // Detected model id was not found in the local Fast Pair device database, - // and a request was sent to the GetObservedDevices for device info. - FAST_PAIR_DEVICE_INFO_SERVER_REQUEST_SENT = 105; - - // Failed to receive a valid response from the Device info request. - FAST_PAIR_DEVICE_INFO_SERVER_ERROR_RESPONSE = 106; - - // Received response for previous Fast Pair Device info request. - FAST_PAIR_DEVICE_INFO_SERVER_RESPONSE_RECEIVED = 107; - - // User was shown notification for the first time using the internal Fast Pair - // scanning stack. - FAST_PAIR_NOTIFICATION_SHOWN = 108; - - // User dismissed notification generated from the internal Fast Pair scan - // stack. - FAST_PAIR_NOTIFICATION_DISMISSED = 109; - - // User triggered notification's "Do not show" action. - FAST_PAIR_NOTIFICATION_DO_NOT_SHOW_CLICKED = 110; - - // Notification generated from the internal Fast Pair scan stack has - // timed-out. - FAST_PAIR_NOTIFICATION_TIMEOUT = 111; - - // Internal Fast Pair scanner detected a device that has triggered an - // auto launch interaction type for the first time. - FAST_PAIR_AUTO_LAUNCH_TRIGGERED = 112; - - // User tapped the pairing notification generated from the internal Fast Pair - // scan stack. - FAST_PAIR_NOTIFICATION_CLICKED = 113; - - // User has seen a battery notification (131 for low battery). - FAST_PAIR_BATTERY_NOTIFICATION_SHOWN = 114; - - // User has dismissed the battery notification. - FAST_PAIR_BATTERY_NOTIFICATION_DISMISSED = 115; - - // User has clicked the battery notification. - FAST_PAIR_BATTERY_NOTIFICATION_CLICKED = 116; - - // A "smart" battery remaining number was displayed to the user. - FAST_PAIR_BATTERY_NOTIFICATION_DISPLAYED_SMART_BATTERY = 117; - - // User has clicked the assistant settings slice. - FAST_PAIR_DEVICE_ASSISTANT_SETTINGS_CLICKED = 118; - - // A post action notification of installing or launching companion apps was - // shown. - FAST_PAIR_POST_ACTION_NOTIFICATION_SHOWN = 119; - - // A user clicked event of installing a companion app. - FAST_PAIR_POST_ACTION_INSTALL_COMPANION_APP = 120; - - // A user clicked event of launching a companion app. - FAST_PAIR_POST_ACTION_LAUNCH_COMPANION_APP = 121; - - // User has clicked the companion oobe slice from device settings. - FAST_PAIR_DEVICE_COMPANION_OOBE_CLICKED = 122; - - // User has clicked the companion settings slice from device settings. - FAST_PAIR_DEVICE_COMPANION_SETTINGS_CLICKED = 123; - - // User was shown notification for the first time secondary device available. - FAST_PAIR_SECONDARY_DEVICE_NOTIFICATION_SHOWN = 124; - - // User dismissed notification for the secondary device available. - FAST_PAIR_SECONDARY_DEVICE_NOTIFICATION_DISMISSED = 125; - - // User triggered notification's "Do not show again" action for the secondary - // device available. - FAST_PAIR_SECONDARY_DEVICE_NOTIFICATION_DO_NOT_SHOW_CLICKED = 126; - - // The notification has timed-out for the secondary device available. - FAST_PAIR_SECONDARY_DEVICE_NOTIFICATION_TIMEOUT = 127; - - // User tapped the pairing notification for the secondary device available. - FAST_PAIR_SECONDARY_DEVICE_NOTIFICATION_CLICKED = 128; - - // A user dismissed event of launching a companion app. - FAST_PAIR_POST_ACTION_DISMISS_COMPANION_APP = 129; - - // Detected model id was found in the cache which is populated by the offline - // service (104 is the local db cache). - FAST_PAIR_OFFLINE_SERVICE_CACHE_HIT = 130; - - // User has seen a low battery notification. - FAST_PAIR_LOW_BATTERY_NOTIFICATION_SHOWN = 131; - - // Half sheet is shown for initial Fast Pair. - HALF_SHEET_PAIR_SHOWN = 133; - - // Half sheet is clicked by users. - HALF_SHEET_PAIR_CLICKED = 134; - - // Half sheet is gone without user interactions. - HALF_SHEET_PAIR_AUTO_DISMISSED = 135; - - // Half sheet is dismissed by users. - HALF_SHEET_PAIR_DISMISSED = 136; - - // Half sheet is banned by users. - HALF_SHEET_PAIR_BANNED = 137; - - // Half sheet is shown for available secondary Fast Pair device. - HALF_SHEET_PAIR_SECONDARY_SHOWN = 138; - - // Half sheet is clicked by users. - HALF_SHEET_PAIR_SECONDARY_CLICKED = 139; - - // Half sheet is gone without user interactions. - HALF_SHEET_PAIR_SECONDARY_AUTO_DISMISSED = 140; - - // Half sheet is dismissed by users. - HALF_SHEET_PAIR_SECONDARY_DISMISSED = 141; - - // Half sheet is banned by users. - HALF_SHEET_PAIR_SECONDARY_BANNED = 142; - - // Half sheet is shown for retroactive pairing of a Fast Pair device. - HALF_SHEET_PAIR_RETROACTIVE_SHOWN = 143; - - // Half sheet is clicked by users. - HALF_SHEET_PAIR_RETROACTIVE_CLICKED = 144; - - // Half sheet is dismissed by users. - HALF_SHEET_PAIR_RETROACTIVE_DISMISSED = 145; - - // User dismiss halfsheet but device get bluetooth connection event after - // certain time - HALF_SHEET_CONNECTION_AFTER_DISMISS = 146; - - // User ban halfsheet but device get bluetooth connection event after certain - // time - HALF_SHEET_CONNECTION_AFTER_BAN = 147; - - // User has clicked the companion header slice from device settings. - FAST_PAIR_DEVICE_COMPANION_HEADER_CLICKED = 148; - - // The Fast Pair seeker feature is triggered in Wear OS. - WEAR_OS_FAST_PAIR_SEEKER_ACTION = 149; - - // Deprecated. - reserved 65, 67 to 72, 132; -} - -// Deprecated: use NearbyType or different events for different types instead. -enum DiscoveryType { - option deprecated = true; - - UNKNOWN_TYPE = 0; - // The action is related to a device setup item. e.g. Chromecast - DEVICE = 1; - // The action is related to a beacon item. e.g. PWS or PBS. - BEACON = 2; - // The action is related to a popular here item. e.g. popular here url/apps. - POPULAR_HERE = 3; -} - -enum ActionIntentType { - UNKNOWN_ACTION_INTENT_TYPE = 0; - // Open a web url directly. - INTENT_WEB_URL = 1; - // Launch an installed app. - INTENT_APP = 2; - // Open the fallback web url due to app not installed. - INTENT_FALLBACK_URL = 3; - // Redirect user to play store due to app not installed. - INTENT_PLAY_STORE = 4; -} - -enum BlockType { - UNKNOWN_BLOCK_TYPE = 0; - // The item is enabled by user - ITEM_ENABLED = 1; - // The item is disabled by user - ITEM_DISABLED = 2; -} - -enum SettingState { - UNKNOWN_STATE_TYPE = 0; - // The setting entry is not set. (before opt-in) - NOT_SET = 1; - // The setting is enabled by user - ENABLED = 2; - // The setting is disabled by user - DISABLED = 3; -} - -enum TileState { - UNKNOWN_TILE_STATE_TYPE = 0; - // The quick settings tile is not available for this device - NOT_AVAILABLE = 1; - // The quick settings tile is enabled - TILE_ENABLED = 2; - // The quick settings tile is disabled - TILE_DISABLED = 3; -} - -enum NetworkState { - UNKNOWN_NETWORK_STATE_TYPE = 0; - // Device has no network connection - DISCONNECTED = 1; - // Device is connected on Wifi - ON_WIFI = 2; - // Device is connected on cellular - ON_CELLULAR = 3; -} - -enum EducationState { - UNKNOWN_EDUCATION_STATE = 0; - // User has finished the education workflow - EDUCATION_COMPLETE = 1; - // User has not finished the education workflow - EDUCATION_NOT_COMPLETE = 2; -} - -// LINT.IfChange -enum ScreenState { - UNKNOWN_SCREEN_STATE = 0; - // Device's screen is interactive - SCREEN_INTERACTIVE = 1; - // Device's screen is non-interactive - SCREEN_NOT_INTERACTIVE = 2; -} -// LINT.ThenChange(//depot/google3/location/nearby/discovery_signal_store/proto/discovery_signal_store.proto) diff --git a/proto/magic_pair_enums.proto b/proto/magic_pair_enums.proto deleted file mode 100644 index 96a37388..00000000 --- a/proto/magic_pair_enums.proto +++ /dev/null @@ -1,105 +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. - -syntax = "proto2"; - -package location.nearby.proto; - - -option optimize_for = LITE_RUNTIME; -option java_package = "com.google.location.nearby.proto"; -option java_outer_classname = "MagicPairEnums"; -option objc_class_prefix = "GNCP"; - -// Enums related to logged events. For event codes, see NearbyEventCodes. -message MagicPairEvent { - // These numbers match BluetoothDevice on Android: - // http://cs/android/frameworks/base/core/java/android/bluetooth/BluetoothDevice.java?l=283&rcl=0d05da79fb6c0fb04f6ebd3cc16265c5ff9e6764 - enum BondState { - UNKNOWN_BOND_STATE = 0; - NONE = 10; - BONDING = 11; - BONDED = 12; - } - - // Generally applicable error codes. - enum ErrorCode { - UNKNOWN_ERROR_CODE = 0; - - // Check the other fields for a more specific error code. - OTHER_ERROR = 1; - - // The operation timed out. - TIMEOUT = 2; - - // The thread was interrupted. - INTERRUPTED = 3; - - // Some reflective call failed (should never happen). - REFLECTIVE_OPERATION_EXCEPTION = 4; - - // A Future threw an exception (should never happen). - EXECUTION_EXCEPTION = 5; - - // Parsing something (e.g. BR/EDR Handover data) failed. - PARSE_EXCEPTION = 6; - - // A failure at MDH. - MDH_REMOTE_EXCEPTION = 7; - - // For errors on GATT connection and retry success - SUCCESS_RETRY_GATT_ERROR = 8; - - // For timeout on GATT connection and retry success - SUCCESS_RETRY_GATT_TIMEOUT = 9; - - // For errors on secret handshake and retry success - SUCCESS_RETRY_SECRET_HANDSHAKE_ERROR = 10; - - // For timeout on secret handshake and retry success - SUCCESS_RETRY_SECRET_HANDSHAKE_TIMEOUT = 11; - - // For secret handshake fail and restart GATT connection success - SUCCESS_SECRET_HANDSHAKE_RECONNECT = 12; - - // For address rotate and retry with new address success - SUCCESS_ADDRESS_ROTATE = 13; - - // For signal lost and retry with old address still success - SUCCESS_SIGNAL_LOST = 14; - } - - enum BrEdrHandoverErrorCode { - UNKNOWN_BR_EDR_HANDOVER_ERROR_CODE = 0; - CONTROL_POINT_RESULT_CODE_NOT_SUCCESS = 1; - BLUETOOTH_MAC_INVALID = 2; - TRANSPORT_BLOCK_INVALID = 3; - } - - enum CreateBondErrorCode { - UNKNOWN_BOND_ERROR_CODE = 0; - BOND_BROKEN = 1; - POSSIBLE_MITM = 2; - NO_PERMISSION = 3; - INCORRECT_VARIANT = 4; - FAILED_BUT_ALREADY_RECEIVE_PASS_KEY = 5; - } - - enum ConnectErrorCode { - UNKNOWN_CONNECT_ERROR_CODE = 0; - UNSUPPORTED_PROFILE = 1; - GET_PROFILE_PROXY_FAILED = 2; - DISCONNECTED = 3; - } -} diff --git a/proto/mediums/BUILD b/proto/mediums/BUILD index f6756f49..73695c21 100644 --- a/proto/mediums/BUILD +++ b/proto/mediums/BUILD @@ -15,6 +15,8 @@ load("//net/proto2/contrib/portable/cc:portable_proto_build_defs.bzl", "portable_proto_library") load("//tools/build_defs/proto/cpp:cc_proto_library.bzl", "cc_proto_library") +licenses(["notice"]) + package(default_visibility = ["//visibility:public"]) proto_library( @@ -77,7 +79,7 @@ cc_proto_library( name = "web_rtc_signaling_frames_cc_proto", visibility = [ "//location/nearby/connections:__subpackages__", - "//nearby_connections:__subpackages__", + "//third_party/nearby_connections:__subpackages__", ], deps = [":web_rtc_signaling_frames_proto"], ) diff --git a/proto/nearby_client_enums.proto b/proto/nearby_client_enums.proto deleted file mode 100644 index 72a547f5..00000000 --- a/proto/nearby_client_enums.proto +++ /dev/null @@ -1,43 +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. - -syntax = "proto2"; - -package location.nearby.proto; - - -option optimize_for = LITE_RUNTIME; -option java_package = "com.google.location.nearby.proto"; -option java_outer_classname = "NearbyClientEnums"; -option objc_class_prefix = "GNCP"; - -// The user type that is logging. -enum UserType { - UNKNOWN_USER_TYPE = 0; - PRODUCTION = 1; - MODULEFOOD = 2; - TEST = 3; - PRESTO_DOGFOOD = 4; - AUTO_TEST = 5; -} - -// The client that is logging. -enum ClientType { - UNKNOWN_CLIENT_TYPE = 0; - CONNECTIONS = 1; - MAGIC_PAIR = 2; - SETUP = 3; - SHARING = 4; - TRIANGLE = 5; -} diff --git a/proto/nearby_event_codes.proto b/proto/nearby_event_codes.proto deleted file mode 100644 index 10e96822..00000000 --- a/proto/nearby_event_codes.proto +++ /dev/null @@ -1,81 +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. - -syntax = "proto2"; - -package location.nearby.proto; - - -option optimize_for = LITE_RUNTIME; -option java_package = "com.google.location.nearby.proto"; -option java_outer_classname = "NearbyEventCodes"; - -// Event codes for the NEARBY log source. See: -// http://google3/wireless/android/play/playlog/proto/event_code_enums.proto -message NearbyEvent { - enum EventCode { - UNKNOWN_EVENT_TYPE = 0; - - // Codes for Magic Pair. - // Starting at 1000 to not conflict with other existing codes (e.g. - // DiscoveryEvent) that may be migrated to become official Event Codes. - MAGIC_PAIR_START = 1010; - WAIT_FOR_SCREEN_UNLOCK = 1020; - GATT_CONNECT = 1030; - BR_EDR_HANDOVER_WRITE_CONTROL_POINT_REQUEST = 1040; - BR_EDR_HANDOVER_READ_BLUETOOTH_MAC = 1050; - BR_EDR_HANDOVER_READ_TRANSPORT_BLOCK = 1060; - GET_PROFILES_VIA_SDP = 1070; - DISCOVER_DEVICE = 1080; - CANCEL_DISCOVERY = 1090; - REMOVE_BOND = 1100; - CANCEL_BOND = 1110; - CREATE_BOND = 1120; - CONNECT_PROFILE = 1130; - DISABLE_BLUETOOTH = 1140; - ENABLE_BLUETOOTH = 1150; - MAGIC_PAIR_END = 1160; - SECRET_HANDSHAKE = 1170; - WRITE_ACCOUNT_KEY = 1180; - WRITE_TO_FOOTPRINTS = 1190; - PASSKEY_EXCHANGE = 1200; - DEVICE_RECOGNIZED = 1210; - GET_LOCAL_PUBLIC_ADDRESS = 1220; - DIRECTLY_CONNECTED_TO_PROFILE = 1230; - DEVICE_ALIAS_CHANGED = 1240; - WRITE_DEVICE_NAME = 1250; - UPDATE_PROVIDER_NAME_START = 1260; - UPDATE_PROVIDER_NAME_END = 1270; - READ_FIRMWARE_VERSION = 1280; - RETROACTIVE_PAIR_START = 1290; - RETROACTIVE_PAIR_END = 1300; - SUBSEQUENT_PAIR_START = 1310; - SUBSEQUENT_PAIR_END = 1320; - BISTO_PAIR_START = 1330; - BISTO_PAIR_END = 1340; - REMOTE_PAIR_START = 1350; - REMOTE_PAIR_END = 1360; - BEFORE_CREATE_BOND = 1370; - BEFORE_CREATE_BOND_BONDING = 1380; - BEFORE_CREATE_BOND_BONDED = 1390; - BEFORE_CONNECT_PROFILE = 1400; - HANDLE_PAIRING_REQUEST = 1410; - SECRET_HANDSHAKE_GATT_COMMUNICATION = 1420; - GATT_CONNECTION_AND_SECRET_HANDSHAKE = 1430; - CHECK_SIGNAL_AFTER_HANDSHAKE = 1440; - RECOVER_BY_RETRY_GATT = 1450; - RECOVER_BY_RETRY_HANDSHAKE = 1460; - RECOVER_BY_RETRY_HANDSHAKE_RECONNECT = 1470; - } -} diff --git a/proto/setup_enums.proto b/proto/setup_enums.proto deleted file mode 100644 index 3906798b..00000000 --- a/proto/setup_enums.proto +++ /dev/null @@ -1,40 +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. - -syntax = "proto2"; - -package location.nearby.proto.setup; - - -option optimize_for = LITE_RUNTIME; -option java_package = "com.google.location.nearby.proto"; -option java_outer_classname = "SetupEnums"; -option objc_class_prefix = "GNSP"; - -// The type of event being logged. -// Lightweight START_* and STOP_* events track instances of potential crashes -// that would result in a ClientSession not being logged. -enum EventType { - UNKNOWN_EVENT_TYPE = 0; - - // A completed ClientSession, logged after a client disconnects. - CLIENT_SESSION = 1; - - // Corresponds to googleApiClient.connect() and the beginning of a - // ClientSession. - START_CLIENT_SESSION = 2; - - // Corresponds to googleApiClient.disconnect() and the end of a ClientSession. - STOP_CLIENT_SESSION = 3; -} diff --git a/proto/sharing_enums.proto b/proto/sharing_enums.proto index 5d9a2df8..85a285f3 100644 --- a/proto/sharing_enums.proto +++ b/proto/sharing_enums.proto @@ -17,6 +17,8 @@ syntax = "proto2"; package location.nearby.proto.sharing; + + option optimize_for = LITE_RUNTIME; option java_package = "com.google.location.nearby.proto"; option java_outer_classname = "SharingEnums"; @@ -128,7 +130,7 @@ enum EventType { CANCEL_CONNECTION = 30; // User starts a chimera activity (e.g. ConsentsChimeraActivity, - // ContactSelectChimeraActivity...) + // DeviceVisibilityChimeraActivity...) LAUNCH_ACTIVITY = 31; // Receiver dismisses a privacy notification. @@ -171,6 +173,9 @@ enum EventType { // Toggle Show Notification setting item in Nearby Share setting. TOGGLE_SHOW_NOTIFICATION = 44; + + // Set device name + SET_DEVICE_NAME = 45; } // Event category to differentiate whether this comes from sender or receiver, @@ -277,6 +282,7 @@ enum OSType { ANDROID = 1; CHROME_OS = 2; + IOS = 3; } // Relationship of remote device to sender device. @@ -359,7 +365,7 @@ enum ActivityName { SETTINGS_ACTIVITY = 2; RECEIVE_SURFACE_ACTIVITY = 3; SETUP_ACTIVITY = 4; - CONTACT_SELECT_ACTIVITY = 5; + DEVICE_VISIBILITY_ACTIVITY = 5; CONSENTS_ACTIVITY = 6; } diff --git a/proto/uwb_enums.proto b/proto/uwb_enums.proto deleted file mode 100644 index e8f6375f..00000000 --- a/proto/uwb_enums.proto +++ /dev/null @@ -1,43 +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. - -syntax = "proto2"; - -package location.nearby.proto.uwb; - - -option optimize_for = LITE_RUNTIME; -option java_package = "com.google.location.nearby.proto"; -option java_outer_classname = "UwbEnums"; -option objc_class_prefix = "GNUP"; - -// The device type which the device takes during UWB ranging. -// LINT.IfChange() -enum DeviceType { - TYPE_UNKNOWN = 0; - TYPE_CONTROLLER = 1; - TYPE_CONTROLEE = 2; -} -// LINT.ThenChange(//depot/google3/java/com/google/android/gmscore/integ/client/nearby/src/com/google/android/gms/nearby/uwb/UwbOptions.java) - -// The profile which the UWB session should use. -// LINT.IfChange() -enum Profile { - PROFILE_UNKNOWN = 0; - PROFILE_DEVICE_TRACKER = 1; - PROFILE_NEARBY_SHARE = 2; - PROFILE_DEVICE_TRACKER_TESTING = 3; - PROFILE_NEARBY_SHARE_TESTING = 4; -} -// LINT.ThenChange(//depot/google3/java/com/google/android/gmscore/integ/client/nearby/src/com/google/android/gms/nearby/uwb/UwbOptions.java)