From 39f5a81238c1007375fca36d44b0318aa178c555 Mon Sep 17 00:00:00 2001 From: Philippe G Date: Tue, 4 Jan 2022 11:01:14 -0800 Subject: [PATCH] add nanopb (manual) --- .../spotify/cspot/bell/nanopb/.gitignore | 31 + .../spotify/cspot/bell/nanopb/.travis.yml | 32 + .../spotify/cspot/bell/nanopb/AUTHORS.txt | 100 + .../spotify/cspot/bell/nanopb/BUILD.bazel | 21 + .../spotify/cspot/bell/nanopb/CHANGELOG.txt | 522 +++ .../spotify/cspot/bell/nanopb/CMakeLists.txt | 143 + .../spotify/cspot/bell/nanopb/CONTRIBUTING.md | 32 + .../spotify/cspot/bell/nanopb/LICENSE.txt | 20 + .../spotify/cspot/bell/nanopb/Package.swift | 63 + .../spotify/cspot/bell/nanopb/README.md | 108 + .../spotify/cspot/bell/nanopb/WORKSPACE | 1 + components/spotify/cspot/bell/nanopb/build.py | 6 + .../bell/nanopb/conan-wrapper/CMakeLists.txt | 7 + .../spotify/cspot/bell/nanopb/conanfile.py | 33 + .../spotify/cspot/bell/nanopb/docs/Makefile | 23 + .../cspot/bell/nanopb/docs/concepts.md | 579 ++++ .../cspot/bell/nanopb/docs/generator_flow.svg | 2869 +++++++++++++++++ .../spotify/cspot/bell/nanopb/docs/index.md | 158 + .../cspot/bell/nanopb/docs/logo/logo.png | Bin 0 -> 14973 bytes .../cspot/bell/nanopb/docs/logo/logo.svg | 1470 +++++++++ .../cspot/bell/nanopb/docs/logo/logo16px.png | Bin 0 -> 854 bytes .../cspot/bell/nanopb/docs/logo/logo48px.png | Bin 0 -> 2577 bytes .../spotify/cspot/bell/nanopb/docs/lsr.css | 233 ++ .../cspot/bell/nanopb/docs/migration.md | 618 ++++ .../cspot/bell/nanopb/docs/reference.md | 1034 ++++++ .../cspot/bell/nanopb/docs/security.md | 92 + .../cspot/bell/nanopb/docs/whats_new.md | 173 + .../examples/cmake_relpath/CMakeLists.txt | 18 + .../nanopb/examples/cmake_relpath/README.txt | 18 + .../examples/cmake_relpath/proto/simple.proto | 11 + .../cmake_relpath/proto/sub/unlucky.proto | 5 + .../nanopb/examples/cmake_relpath/simple.c | 73 + .../examples/cmake_simple/CMakeLists.txt | 16 + .../nanopb/examples/cmake_simple/README.txt | 18 + .../nanopb/examples/cmake_simple/simple.c | 71 + .../nanopb/examples/cmake_simple/simple.proto | 9 + .../nanopb/examples/network_server/Makefile | 17 + .../nanopb/examples/network_server/README.txt | 60 + .../nanopb/examples/network_server/client.c | 138 + .../nanopb/examples/network_server/common.c | 43 + .../nanopb/examples/network_server/common.h | 9 + .../examples/network_server/fileproto.options | 16 + .../examples/network_server/fileproto.proto | 20 + .../nanopb/examples/network_server/server.c | 164 + .../nanopb/examples/platformio/.gitignore | 5 + .../nanopb/examples/platformio/platformio.ini | 35 + .../platformio/proto/pio_with_options.options | 1 + .../platformio/proto/pio_with_options.proto | 5 + .../proto/pio_without_options.proto | 5 + .../platformio/src/pio_with_options.c | 35 + .../platformio/src/pio_without_options.c | 35 + .../nanopb/examples/platformio/src/test.h | 9 + .../bell/nanopb/examples/simple/Makefile | 22 + .../bell/nanopb/examples/simple/README.txt | 29 + .../bell/nanopb/examples/simple/simple.c | 71 + .../bell/nanopb/examples/simple/simple.proto | 9 + .../examples/using_union_messages/Makefile | 20 + .../examples/using_union_messages/README.txt | 55 + .../examples/using_union_messages/decode.c | 95 + .../examples/using_union_messages/encode.c | 90 + .../using_union_messages/unionproto.proto | 32 + .../cspot/bell/nanopb/extra/FindNanopb.cmake | 371 +++ .../extra/nanopb-config-version.cmake.in | 11 + .../bell/nanopb/extra/nanopb-config.cmake | 1 + .../spotify/cspot/bell/nanopb/extra/nanopb.mk | 37 + .../cspot/bell/nanopb/extra/pb_syshdr.h | 120 + .../bell/nanopb/extra/poetry/poetry_build.sh | 20 + .../bell/nanopb/extra/poetry/pyproject.toml | 31 + .../bell/nanopb/generator/nanopb_generator.py | 2361 ++++++++++++++ .../nanopb/generator/nanopb_generator.py2 | 13 + .../nanopb/generator/platformio_generator.py | 148 + .../bell/nanopb/generator/proto/Makefile | 10 + .../bell/nanopb/generator/proto/__init__.py | 36 + .../bell/nanopb/generator/proto/_utils.py | 43 + .../proto/google/protobuf/descriptor.proto | 872 +++++ .../bell/nanopb/generator/proto/nanopb.proto | 179 + .../cspot/bell/nanopb/generator/protoc | 28 + .../bell/nanopb/generator/protoc-gen-nanopb | 13 + .../nanopb/generator/protoc-gen-nanopb-py2 | 16 + .../nanopb/generator/protoc-gen-nanopb.bat | 12 + .../cspot/bell/nanopb/generator/protoc.bat | 9 + .../spotify/cspot/bell/nanopb/library.json | 42 + components/spotify/cspot/bell/nanopb/pb.h | 895 +++++ .../spotify/cspot/bell/nanopb/pb_common.c | 388 +++ .../spotify/cspot/bell/nanopb/pb_common.h | 49 + .../spotify/cspot/bell/nanopb/pb_decode.c | 1713 ++++++++++ .../spotify/cspot/bell/nanopb/pb_decode.h | 199 ++ .../spotify/cspot/bell/nanopb/pb_encode.c | 1001 ++++++ .../spotify/cspot/bell/nanopb/pb_encode.h | 185 ++ .../bell/nanopb/spm-test/objc/c-header.c | 3 + .../bell/nanopb/spm-test/objc/objc-header.m | 3 + .../bell/nanopb/spm-test/objc/objc-module.m | 1 + .../nanopb/spm-test/objc/objc-qualified.m | 3 + .../bell/nanopb/spm-test/swift/main.swift | 1 + .../cspot/bell/nanopb/spm_headers/nanopb/pb.h | 1 + .../nanopb/spm_headers/nanopb/pb_common.h | 1 + .../nanopb/spm_headers/nanopb/pb_decode.h | 1 + .../nanopb/spm_headers/nanopb/pb_encode.h | 1 + .../cspot/bell/nanopb/spm_headers/pb.h | 1 + .../cspot/bell/nanopb/spm_headers/pb_common.h | 1 + .../cspot/bell/nanopb/spm_headers/pb_decode.h | 1 + .../cspot/bell/nanopb/spm_headers/pb_encode.h | 1 + .../spotify/cspot/bell/nanopb/tests/Makefile | 21 + .../cspot/bell/nanopb/tests/SConstruct | 236 ++ .../bell/nanopb/tests/alltypes/SConscript | 45 + .../nanopb/tests/alltypes/alltypes.options | 8 + .../bell/nanopb/tests/alltypes/alltypes.proto | 166 + .../nanopb/tests/alltypes/decode_alltypes.c | 332 ++ .../nanopb/tests/alltypes/encode_alltypes.c | 178 + .../nanopb/tests/alltypes_callback/SConscript | 28 + .../tests/alltypes_callback/alltypes.options | 10 + .../decode_alltypes_callback.c | 492 +++ .../encode_alltypes_callback.c | 491 +++ .../nanopb/tests/alltypes_pointer/SConscript | 39 + .../tests/alltypes_pointer/alltypes.options | 11 + .../decode_alltypes_pointer.c | 200 ++ .../encode_alltypes_pointer.c | 227 ++ .../nanopb/tests/alltypes_proto3/SConscript | 34 + .../tests/alltypes_proto3/alltypes.options | 5 + .../tests/alltypes_proto3/alltypes.proto | 101 + .../tests/alltypes_proto3/decode_alltypes.c | 166 + .../tests/alltypes_proto3/encode_alltypes.c | 112 + .../tests/alltypes_proto3_callback/SConscript | 23 + .../alltypes_proto3_callback/alltypes.options | 8 + .../decode_alltypes_callback.c | 422 +++ .../encode_alltypes_callback.c | 380 +++ .../nanopb/tests/anonymous_oneof/SConscript | 19 + .../tests/anonymous_oneof/decode_oneof.c | 88 + .../nanopb/tests/anonymous_oneof/oneof.proto | 23 + .../bell/nanopb/tests/any_type/SConscript | 23 + .../bell/nanopb/tests/any_type/anytest.proto | 27 + .../bell/nanopb/tests/any_type/decode_any.c | 49 + .../bell/nanopb/tests/any_type/encode_any.c | 46 + .../any_type/google/protobuf/any.options | 2 + .../tests/any_type/google/protobuf/any.proto | 154 + .../any_type/google/protobuf/duration.proto | 117 + .../tests/backwards_compatibility/SConscript | 11 + .../backwards_compatibility/alltypes_legacy.c | 40 + .../backwards_compatibility/alltypes_legacy.h | 348 ++ .../alltypes_legacy.options | 3 + .../alltypes_legacy.proto | 110 + .../backwards_compatibility/decode_legacy.c | 196 ++ .../backwards_compatibility/encode_legacy.c | 135 + .../bell/nanopb/tests/basic_buffer/SConscript | 12 + .../nanopb/tests/basic_buffer/decode_buffer.c | 88 + .../nanopb/tests/basic_buffer/encode_buffer.c | 38 + .../bell/nanopb/tests/basic_stream/SConscript | 12 + .../nanopb/tests/basic_stream/decode_stream.c | 87 + .../nanopb/tests/basic_stream/encode_stream.c | 40 + .../bell/nanopb/tests/buffer_only/SConscript | 28 + .../bell/nanopb/tests/callbacks/SConscript | 14 + .../nanopb/tests/callbacks/callbacks.proto | 18 + .../nanopb/tests/callbacks/decode_callbacks.c | 97 + .../nanopb/tests/callbacks/encode_callbacks.c | 92 + .../bell/nanopb/tests/comments/SConscript | 8 + .../nanopb/tests/comments/comments.expected | 6 + .../bell/nanopb/tests/comments/comments.proto | 17 + .../cspot/bell/nanopb/tests/common/SConscript | 48 + .../nanopb/tests/common/malloc_wrappers.c | 189 ++ .../nanopb/tests/common/malloc_wrappers.h | 10 + .../tests/common/malloc_wrappers_syshdr.h | 15 + .../bell/nanopb/tests/common/person.proto | 22 + .../bell/nanopb/tests/common/test_helpers.h | 17 + .../nanopb/tests/common/unittestproto.proto | 43 + .../bell/nanopb/tests/common/unittests.h | 26 + .../nanopb/tests/common_unittests/SConscript | 5 + .../tests/common_unittests/common_unittests.c | 149 + .../tests/cxx_callback_datatype/SConscript | 28 + .../cxx_callback_datatype.cpp | 92 + .../tests/cxx_callback_datatype/message.proto | 14 + .../nanopb/tests/cxx_descriptor/SConscript | 25 + .../nanopb/tests/cxx_descriptor/message.proto | 12 + .../cxx_descriptor/message_descriptor.cc | 29 + .../nanopb/tests/cxx_main_program/SConscript | 25 + .../nanopb/tests/cyclic_messages/SConscript | 11 + .../nanopb/tests/cyclic_messages/cyclic.proto | 27 + .../cyclic_messages/cyclic_callback.options | 6 + .../cyclic_messages/encode_cyclic_callback.c | 148 + .../nanopb/tests/decode_unittests/SConscript | 4 + .../tests/decode_unittests/decode_unittests.c | 446 +++ .../nanopb/tests/docker_images}/README.md | 0 .../nanopb/tests/docker_images/build_all.sh | 8 + .../tests/docker_images/ubuntu1804/Dockerfile | 15 + .../tests/docker_images/ubuntu2004/Dockerfile | 16 + .../tests/encode_arrays_unpacked/SConscript | 28 + .../nanopb/tests/encode_unittests/SConscript | 5 + .../tests/encode_unittests/encode_unittests.c | 429 +++ .../bell/nanopb/tests/enum_minmax/SConscript | 8 + .../nanopb/tests/enum_minmax/enumminmax.proto | 22 + .../tests/enum_minmax/enumminmax_unittests.c | 16 + .../bell/nanopb/tests/enum_sizes/SConscript | 12 + .../nanopb/tests/enum_sizes/enumsizes.proto | 86 + .../tests/enum_sizes/enumsizes_unittests.c | 72 + .../nanopb/tests/enum_to_string/SConscript | 7 + .../nanopb/tests/enum_to_string/enum.proto | 19 + .../tests/enum_to_string/enum_to_string.c | 19 + .../bell/nanopb/tests/extensions/SConscript | 16 + .../tests/extensions/decode_extensions.c | 57 + .../tests/extensions/encode_extensions.c | 54 + .../tests/extensions/extensions.options | 1 + .../nanopb/tests/extensions/extensions.proto | 19 + .../bell/nanopb/tests/extra_fields/SConscript | 16 + .../person_with_extra_field.expected | 14 + .../nanopb/tests/field_size_16/SConscript | 32 + .../tests/field_size_16/alltypes.options | 7 + .../nanopb/tests/field_size_16/alltypes.proto | 156 + .../tests/field_size_16_proto3/SConscript | 23 + .../field_size_16_proto3/alltypes.options | 5 + .../tests/field_size_16_proto3/alltypes.proto | 100 + .../field_size_16_proto3/decode_alltypes.c | 166 + .../field_size_16_proto3/encode_alltypes.c | 112 + .../nanopb/tests/field_size_32/SConscript | 32 + .../tests/field_size_32/alltypes.options | 6 + .../nanopb/tests/field_size_32/alltypes.proto | 156 + .../bell/nanopb/tests/fixed_count/SConscript | 14 + .../tests/fixed_count/fixed_count.proto | 21 + .../tests/fixed_count/fixed_count_unittests.c | 141 + .../tests/float_double_conversion/SConscript | 21 + .../float_double_conversion/doublemsg.proto | 5 + .../float_double_conversion.c | 90 + .../bell/nanopb/tests/fuzztest/SConscript | 155 + .../tests/fuzztest/alltypes_callback.options | 4 + .../tests/fuzztest/alltypes_pointer.options | 9 + .../fuzztest/alltypes_proto3_pointer.options | 4 + .../fuzztest/alltypes_proto3_static.options | 4 + .../tests/fuzztest/alltypes_static.options | 8 + .../bell/nanopb/tests/fuzztest/corpus.zip | Bin 0 -> 1119161 bytes .../bell/nanopb/tests/fuzztest/flakystream.c | 33 + .../bell/nanopb/tests/fuzztest/flakystream.h | 19 + .../bell/nanopb/tests/fuzztest/fuzztest.c | 469 +++ .../nanopb/tests/fuzztest/generate_message.c | 88 + .../bell/nanopb/tests/fuzztest/ossfuzz.sh | 45 + .../bell/nanopb/tests/fuzztest/random_data.c | 198 ++ .../bell/nanopb/tests/fuzztest/random_data.h | 44 + .../nanopb/tests/fuzztest/regressions.zip | Bin 0 -> 2572 bytes .../nanopb/tests/fuzztest/update_corpus.sh | 47 + .../bell/nanopb/tests/fuzztest/validation.c | 163 + .../bell/nanopb/tests/fuzztest/validation.h | 12 + .../tests/generator_relative_paths/SConscript | 44 + .../generator_relative_paths/any.expected | 1 + .../proto/protobuf/any.proto | 154 + .../proto/simple.proto | 8 + .../generator_relative_paths/simple.expected | 1 + .../generator_relative_paths/test.expected | 1 + .../tests/generator_relative_paths/test.proto | 7 + .../bell/nanopb/tests/infinity_nan/SConscript | 8 + .../nanopb/tests/infinity_nan/floats.proto | 12 + .../tests/infinity_nan/infinity_nan_test.c | 62 + .../cspot/bell/nanopb/tests/inline/SConscript | 16 + .../bell/nanopb/tests/inline/inline.expected | 3 + .../bell/nanopb/tests/inline/inline.proto | 17 + .../nanopb/tests/inline/inline_unittests.c | 73 + .../bell/nanopb/tests/intsizes/SConscript | 12 + .../bell/nanopb/tests/intsizes/intsizes.proto | 41 + .../tests/intsizes/intsizes_unittests.c | 145 + .../bell/nanopb/tests/io_errors/SConscript | 15 + .../nanopb/tests/io_errors/alltypes.options | 8 + .../bell/nanopb/tests/io_errors/io_errors.c | 140 + .../tests/io_errors_pointers/SConscript | 25 + .../tests/io_errors_pointers/alltypes.options | 8 + .../cspot/bell/nanopb/tests/map/SConscript | 21 + .../cspot/bell/nanopb/tests/map/decode_map.c | 60 + .../cspot/bell/nanopb/tests/map/encode_map.c | 37 + .../cspot/bell/nanopb/tests/map/map.options | 2 + .../cspot/bell/nanopb/tests/map/map.proto | 6 + .../bell/nanopb/tests/mem_release/SConscript | 13 + .../nanopb/tests/mem_release/mem_release.c | 246 ++ .../tests/mem_release/mem_release.proto | 41 + .../nanopb/tests/message_sizes/SConscript | 11 + .../bell/nanopb/tests/message_sizes/dummy.c | 9 + .../tests/message_sizes/messages1.proto | 29 + .../tests/message_sizes/messages2.proto | 10 + .../nanopb/tests/missing_fields/SConscript | 8 + .../tests/missing_fields/missing_fields.c | 53 + .../tests/missing_fields/missing_fields.proto | 140 + .../cspot/bell/nanopb/tests/msgid/SConscript | 22 + .../bell/nanopb/tests/msgid/decode_msgid.c | 105 + .../bell/nanopb/tests/msgid/encode_msgid.c | 90 + .../nanopb/tests/msgid/msgid_example.proto | 25 + .../nanopb/tests/multiple_files/SConscript | 17 + .../tests/multiple_files/multifile1.options | 1 + .../tests/multiple_files/multifile1.proto | 34 + .../tests/multiple_files/multifile2.proto | 22 + .../multiple_files/subdir/multifile2.proto | 30 + .../multiple_files/test_multiple_files.c | 38 + .../bell/nanopb/tests/no_errmsg/SConscript | 28 + .../bell/nanopb/tests/no_messages/SConscript | 7 + .../tests/no_messages/no_messages.proto | 9 + .../cspot/bell/nanopb/tests/oneof/SConscript | 22 + .../bell/nanopb/tests/oneof/decode_oneof.c | 131 + .../bell/nanopb/tests/oneof/encode_oneof.c | 64 + .../cspot/bell/nanopb/tests/oneof/oneof.proto | 32 + .../nanopb/tests/oneof_callback/SConscript | 22 + .../tests/oneof_callback/decode_oneof.c | 174 + .../tests/oneof_callback/encode_oneof.c | 126 + .../nanopb/tests/oneof_callback/oneof.proto | 41 + .../bell/nanopb/tests/options/SConscript | 15 + .../cspot/bell/nanopb/tests/options/options.c | 28 + .../bell/nanopb/tests/options/options.proto | 127 + .../nanopb/tests/options/options_c.expected | 3 + .../nanopb/tests/options/options_h.expected | 24 + .../tests/options/proto3_options.expected | 5 + .../nanopb/tests/options/proto3_options.proto | 18 + .../bell/nanopb/tests/package_name/SConscript | 38 + .../tests/package_name_nanopb/SConscript | 40 + .../nanopb/tests/proto3_optional/SConscript | 24 + .../nanopb/tests/proto3_optional/optional.c | 47 + .../tests/proto3_optional/optional.proto | 9 + .../bell/nanopb/tests/raw_decode/SConscript | 10 + .../bell/nanopb/tests/raw_decode/raw_decode.c | 194 ++ .../regression/GHSA-gcx3-7m76-287p/SConscript | 13 + .../regression/GHSA-gcx3-7m76-287p/test.c | 39 + .../regression/GHSA-gcx3-7m76-287p/test.proto | 7 + .../tests/regression/issue_118/SConscript | 12 + .../tests/regression/issue_118/enumdef.proto | 8 + .../tests/regression/issue_118/enumuse.proto | 7 + .../tests/regression/issue_125/SConscript | 9 + .../issue_125/extensionbug.expected | 3 + .../regression/issue_125/extensionbug.options | 4 + .../regression/issue_125/extensionbug.proto | 18 + .../tests/regression/issue_141/SConscript | 8 + .../regression/issue_141/testproto.expected | 7 + .../regression/issue_141/testproto.proto | 52 + .../tests/regression/issue_145/SConscript | 9 + .../regression/issue_145/comments.expected | 3 + .../regression/issue_145/comments.options | 6 + .../tests/regression/issue_145/comments.proto | 7 + .../tests/regression/issue_166/SConscript | 13 + .../regression/issue_166/enum_encoded_size.c | 43 + .../tests/regression/issue_166/enums.proto | 18 + .../tests/regression/issue_172/SConscript | 18 + .../tests/regression/issue_172/msg_size.c | 9 + .../issue_172/submessage/submessage.options | 1 + .../issue_172/submessage/submessage.proto | 4 + .../tests/regression/issue_172/test.proto | 6 + .../tests/regression/issue_188/SConscript | 6 + .../tests/regression/issue_188/oneof.proto | 29 + .../tests/regression/issue_195/SConscript | 10 + .../tests/regression/issue_195/test.expected | 1 + .../tests/regression/issue_195/test.proto | 8 + .../tests/regression/issue_203/SConscript | 10 + .../tests/regression/issue_203/file1.proto | 10 + .../tests/regression/issue_203/file2.proto | 10 + .../tests/regression/issue_205/SConscript | 14 + .../regression/issue_205/size_corruption.c | 12 + .../issue_205/size_corruption.proto | 11 + .../tests/regression/issue_227/SConscript | 14 + .../regression/issue_227/unaligned_uint64.c | 14 + .../issue_227/unaligned_uint64.proto | 8 + .../tests/regression/issue_229/SConscript | 13 + .../regression/issue_229/multiple_oneof.c | 35 + .../regression/issue_229/multiple_oneof.proto | 11 + .../tests/regression/issue_242/SConscript | 13 + .../tests/regression/issue_242/zero_value.c | 51 + .../regression/issue_242/zero_value.proto | 15 + .../tests/regression/issue_247/SConscript | 14 + .../tests/regression/issue_247/padding.c | 32 + .../tests/regression/issue_247/padding.proto | 12 + .../tests/regression/issue_249/SConscript | 12 + .../nanopb/tests/regression/issue_249/test.c | 59 + .../tests/regression/issue_249/test.proto | 11 + .../tests/regression/issue_253/SConscript | 15 + .../tests/regression/issue_253/short_array.c | 24 + .../regression/issue_253/short_array.proto | 7 + .../tests/regression/issue_256/SConscript | 16 + .../tests/regression/issue_256/submsg_array.c | 38 + .../regression/issue_256/submsg_array.proto | 11 + .../tests/regression/issue_259/SConscript | 21 + .../regression/issue_259/callback_pointer.c | 30 + .../issue_259/callback_pointer.proto | 11 + .../tests/regression/issue_306/SConscript | 7 + .../issue_306/large_extension.expected | 1 + .../issue_306/large_extension.proto | 10 + .../tests/regression/issue_322/SConscript | 14 + .../tests/regression/issue_322/defaults.c | 44 + .../tests/regression/issue_322/defaults.proto | 11 + .../tests/regression/issue_338/SConscript | 7 + .../tests/regression/issue_338/bigvalue.proto | 204 ++ .../tests/regression/issue_342/SConscript | 11 + .../regression/issue_342/extensions.proto | 11 + .../regression/issue_342/test_extensions.c | 52 + .../tests/regression/issue_363/SConscript | 14 + .../tests/regression/issue_363/oneofmsg.proto | 10 + .../regression/issue_363/test_oneofmsg.c | 42 + .../tests/regression/issue_376/SConscript | 14 + .../regression/issue_376/fixed_array.options | 2 + .../regression/issue_376/fixed_array.proto | 11 + .../regression/issue_376/test_fixarray.c | 40 + .../tests/regression/issue_380/SConscript | 9 + .../regression/issue_380/manglenames.options | 1 + .../regression/issue_380/manglenames.proto | 16 + .../tests/regression/issue_395/SConscript | 14 + .../nanopb/tests/regression/issue_395/test.c | 38 + .../tests/regression/issue_395/test.options | 3 + .../tests/regression/issue_395/test.proto | 37 + .../tests/regression/issue_407/SConscript | 8 + .../regression/issue_407/extensions.proto | 14 + .../regression/issue_407/test_extensions.c | 68 + .../tests/regression/issue_453/SConscript | 14 + .../nanopb/tests/regression/issue_453/test.c | 11 + .../tests/regression/issue_453/test.proto | 7 + .../tests/regression/issue_472/SConscript | 7 + .../tests/regression/issue_472/test.proto | 16 + .../tests/regression/issue_485/SConscript | 11 + .../tests/regression/issue_485/uint8.expected | 3 + .../tests/regression/issue_487/SConscript | 6 + .../tests/regression/issue_487/test.proto | 16 + .../tests/regression/issue_493/SConscript | 10 + .../tests/regression/issue_493/test.proto | 9 + .../tests/regression/issue_494/SConscript | 17 + .../tests/regression/issue_494/oneof.proto | 13 + .../tests/regression/issue_494/oneof_size.cc | 19 + .../regression/issue_494/submessage.proto | 17 + .../tests/regression/issue_504/SConscript | 12 + .../nanopb/tests/regression/issue_504/test.c | 78 + .../tests/regression/issue_504/test.proto | 19 + .../tests/regression/issue_522/SConscript | 13 + .../tests/regression/issue_522/uenum.proto | 36 + .../tests/regression/issue_524/SConscript | 11 + .../tests/regression/issue_524/oneof.expected | 1 + .../tests/regression/issue_524/oneof.proto | 15 + .../regression/issue_524/submessage.proto | 19 + .../tests/regression/issue_535/SConscript | 6 + .../regression/issue_535/issue_535.proto | 10 + .../tests/regression/issue_544/SConscript | 8 + .../regression/issue_544/submsg_callback.c | 57 + .../issue_544/submsg_callback.proto | 13 + .../tests/regression/issue_545/SConscript | 7 + .../issue_545/submsg_callback.proto | 23 + .../tests/regression/issue_547/SConscript | 21 + .../nanopb/tests/regression/issue_547/test.c | 28 + .../tests/regression/issue_547/test.proto | 7 + .../tests/regression/issue_558/SConscript | 8 + .../nanopb/tests/regression/issue_558/mixed.c | 49 + .../tests/regression/issue_558/mixed.proto | 8 + .../tests/regression/issue_569/SConscript | 16 + .../nanopb/tests/regression/issue_569/a.proto | 14 + .../nanopb/tests/regression/issue_569/b.proto | 19 + .../regression/issue_610/DataPacket.proto | 10 + .../regression/issue_610/LogMessage.proto | 5 + .../tests/regression/issue_610/SConscript | 31 + .../tests/regression/issue_610/first.expected | 2 + .../nanopb_generator_bug/first.proto | 11 + .../nanopb_generator_bug/first/a.proto | 13 + .../nanopb_generator_bug/first/a/aa.proto | 5 + .../nanopb_generator_bug/first/a/ab.proto | 5 + .../nanopb_generator_bug/first/b.proto | 11 + .../nanopb_generator_bug/first/b/ba.proto | 5 + .../tests/regression/issue_611/SConscript | 8 + .../tests/regression/issue_611/uenum.expected | 5 + .../tests/regression/issue_611/uenum.proto | 28 + .../tests/regression/issue_617/SConscript | 10 + .../tests/regression/issue_617/oneof.options | 4 + .../tests/regression/issue_617/oneof.proto | 41 + .../tests/regression/issue_617/test_oneof.c | 22 + .../tests/regression/issue_631/SConscript | 8 + .../issue_631/submsg_callback.proto | 22 + .../nanopb/tests/regression/issue_631/test.c | 14 + .../tests/regression/issue_637/SConscript | 9 + .../tests/regression/issue_637/oneof.proto | 18 + .../tests/regression/issue_637/other.proto | 6 + .../nanopb/tests/regression/issue_637/test.c | 5 + .../tests/regression/issue_644/SConscript | 8 + .../tests/regression/issue_644/int64.proto | 21 + .../tests/regression/issue_647/SConscript | 12 + .../nanopb/tests/regression/issue_647/repro.c | 16 + .../tests/regression/issue_647/repro.proto | 10 + .../tests/regression/issue_692/SConscript | 9 + .../tests/regression/issue_692/oneof.proto | 19 + .../tests/regression/issue_692/other.proto | 9 + .../nanopb/tests/regression/issue_692/test.c | 7 + .../tests/site_scons/platforms/__init__.py | 0 .../site_scons/platforms/avr/__init__.py | 0 .../tests/site_scons/platforms/avr/avr.py | 26 + .../tests/site_scons/platforms/avr/avr_io.c | 91 + .../tests/site_scons/platforms/avr/run_test.c | 196 ++ .../site_scons/platforms/mips/__init__.py | 0 .../tests/site_scons/platforms/mips/mips.py | 11 + .../site_scons/platforms/mipsel/__init__.py | 0 .../site_scons/platforms/mipsel/mipsel.py | 11 + .../site_scons/platforms/riscv64/__init__.py | 0 .../site_scons/platforms/riscv64/riscv64.py | 11 + .../site_scons/platforms/stm32/__init__.py | 0 .../site_scons/platforms/stm32/run_test.sh | 28 + .../tests/site_scons/platforms/stm32/stm32.py | 18 + .../site_scons/platforms/stm32/stm32_ram.ld | 194 ++ .../site_scons/platforms/stm32/vectors.c | 47 + .../bell/nanopb/tests/site_scons/site_init.py | 125 + .../tests/site_scons/site_tools/nanopb.py | 204 ++ .../bell/nanopb/tests/sort_by_tag/SConscript | 8 + .../nanopb/tests/sort_by_tag/sort_by_tag.c | 55 + .../tests/sort_by_tag/sort_by_tag.options | 2 + .../tests/sort_by_tag/sort_by_tag.proto | 21 + .../tests/special_characters/SConscript | 6 + .../funny-proto+name has.characters.proto | 21 + .../cspot/bell/nanopb/tests/splint/SConscript | 16 + .../cspot/bell/nanopb/tests/splint/splint.rc | 38 + .../bell/nanopb/tests/stackusage/SConscript | 7 + .../bell/nanopb/tests/stackusage/stackusage.c | 94 + .../tests/stackusage/stackusage.options | 3 + .../nanopb/tests/stackusage/stackusage.proto | 45 + .../nanopb/tests/typename_mangling/SConscript | 25 + .../tests/typename_mangling/test_flatten.c | 22 + .../typename_mangling/test_package_initials.c | 19 + .../typename_mangling/test_strip_package.c | 19 + .../typename_mangling/with_package.options | 5 + .../typename_mangling/with_package.proto | 38 + .../nanopb/tests/validate_utf8/SConscript | 28 + .../nanopb/tests/without_64bit/SConscript | 49 + .../tests/without_64bit/alltypes.options | 5 + .../nanopb/tests/without_64bit/alltypes.proto | 100 + .../tests/without_64bit/decode_alltypes.c | 182 ++ .../tests/without_64bit/encode_alltypes.c | 124 + .../tests/without_64bit/no_64bit_syshdr.h | 14 + .../cspot/bell/nanopb/tools/list_authors.sh | 7 + .../bell/nanopb/tools/make_linux_package.sh | 44 + .../bell/nanopb/tools/make_mac_package.sh | 41 + .../bell/nanopb/tools/make_windows_package.sh | 44 + .../cspot/bell/nanopb/tools/set_version.sh | 17 + .../spotify/cspot/cpp-reflection/.gitignore | 6 - .../cspot/cpp-reflection/alias_type.go | 21 - .../spotify/cspot/cpp-reflection/any_types.go | 192 -- .../cspot/cpp-reflection/class_type.go | 69 - .../spotify/cspot/cpp-reflection/corntext.go | 417 --- .../cspot/cpp-reflection/cpp_generator.go | 165 - .../spotify/cspot/cpp-reflection/enum_type.go | 44 - .../spotify/cspot/cpp-reflection/go.sum | 21 - .../spotify/cspot/cpp-reflection/main.go | 34 - .../cpp-reflection/optional_helper_types.go | 53 - .../cspot/cpp-reflection/optional_type.go | 54 - .../cspot/cpp-reflection/primitive_type.go | 26 - .../cspot/cpp-reflection/reflection_types.go | 1 - .../spotify/cspot/cpp-reflection/util.go | 25 - .../cpp-reflection/vector_helper_types.go | 55 - .../cspot/cpp-reflection/vector_type.go | 65 - .../cspot/protobuf/authentication.options | 6 + .../authentication.proto | 0 .../cspot/protobuf/keyexchange.options | 6 + .../{protocol => protobuf}/keyexchange.proto | 0 .../spotify/cspot/protobuf/mercury.options | 2 + .../{protocol => protobuf}/mercury.proto | 0 .../spotify/cspot/protobuf/metadata.options | 17 + .../{protocol => protobuf}/metadata.proto | 0 .../spotify/cspot/protobuf/spirc.options | 13 + .../cspot/{protocol => protobuf}/spirc.proto | 0 .../spotify/cspot/protos/AnyRefImpl.cpp | 13 - .../spotify/cspot/protos/ReflectTypeInfo.cpp | 1224 ------- .../spotify/cspot/protos/ReflectionInternal.h | 210 -- .../spotify/cspot/protos/authentication.h | 78 - components/spotify/cspot/protos/keyexchange.h | 138 - components/spotify/cspot/protos/mercury.h | 12 - components/spotify/cspot/protos/metadata.h | 82 - components/spotify/cspot/protos/protobuf.h | 715 ---- components/spotify/cspot/protos/spirc.h | 111 - 554 files changed, 36793 insertions(+), 3831 deletions(-) create mode 100644 components/spotify/cspot/bell/nanopb/.gitignore create mode 100644 components/spotify/cspot/bell/nanopb/.travis.yml create mode 100644 components/spotify/cspot/bell/nanopb/AUTHORS.txt create mode 100644 components/spotify/cspot/bell/nanopb/BUILD.bazel create mode 100644 components/spotify/cspot/bell/nanopb/CHANGELOG.txt create mode 100644 components/spotify/cspot/bell/nanopb/CMakeLists.txt create mode 100644 components/spotify/cspot/bell/nanopb/CONTRIBUTING.md create mode 100644 components/spotify/cspot/bell/nanopb/LICENSE.txt create mode 100644 components/spotify/cspot/bell/nanopb/Package.swift create mode 100644 components/spotify/cspot/bell/nanopb/README.md create mode 100644 components/spotify/cspot/bell/nanopb/WORKSPACE create mode 100644 components/spotify/cspot/bell/nanopb/build.py create mode 100644 components/spotify/cspot/bell/nanopb/conan-wrapper/CMakeLists.txt create mode 100644 components/spotify/cspot/bell/nanopb/conanfile.py create mode 100644 components/spotify/cspot/bell/nanopb/docs/Makefile create mode 100644 components/spotify/cspot/bell/nanopb/docs/concepts.md create mode 100644 components/spotify/cspot/bell/nanopb/docs/generator_flow.svg create mode 100644 components/spotify/cspot/bell/nanopb/docs/index.md create mode 100644 components/spotify/cspot/bell/nanopb/docs/logo/logo.png create mode 100644 components/spotify/cspot/bell/nanopb/docs/logo/logo.svg create mode 100644 components/spotify/cspot/bell/nanopb/docs/logo/logo16px.png create mode 100644 components/spotify/cspot/bell/nanopb/docs/logo/logo48px.png create mode 100644 components/spotify/cspot/bell/nanopb/docs/lsr.css create mode 100644 components/spotify/cspot/bell/nanopb/docs/migration.md create mode 100644 components/spotify/cspot/bell/nanopb/docs/reference.md create mode 100644 components/spotify/cspot/bell/nanopb/docs/security.md create mode 100644 components/spotify/cspot/bell/nanopb/docs/whats_new.md create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_relpath/CMakeLists.txt create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_relpath/README.txt create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_relpath/proto/simple.proto create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_relpath/proto/sub/unlucky.proto create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_relpath/simple.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_simple/CMakeLists.txt create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_simple/README.txt create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_simple/simple.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/cmake_simple/simple.proto create mode 100644 components/spotify/cspot/bell/nanopb/examples/network_server/Makefile create mode 100644 components/spotify/cspot/bell/nanopb/examples/network_server/README.txt create mode 100644 components/spotify/cspot/bell/nanopb/examples/network_server/client.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/network_server/common.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/network_server/common.h create mode 100644 components/spotify/cspot/bell/nanopb/examples/network_server/fileproto.options create mode 100644 components/spotify/cspot/bell/nanopb/examples/network_server/fileproto.proto create mode 100644 components/spotify/cspot/bell/nanopb/examples/network_server/server.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/platformio/.gitignore create mode 100644 components/spotify/cspot/bell/nanopb/examples/platformio/platformio.ini create mode 100644 components/spotify/cspot/bell/nanopb/examples/platformio/proto/pio_with_options.options create mode 100644 components/spotify/cspot/bell/nanopb/examples/platformio/proto/pio_with_options.proto create mode 100644 components/spotify/cspot/bell/nanopb/examples/platformio/proto/pio_without_options.proto create mode 100644 components/spotify/cspot/bell/nanopb/examples/platformio/src/pio_with_options.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/platformio/src/pio_without_options.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/platformio/src/test.h create mode 100644 components/spotify/cspot/bell/nanopb/examples/simple/Makefile create mode 100644 components/spotify/cspot/bell/nanopb/examples/simple/README.txt create mode 100644 components/spotify/cspot/bell/nanopb/examples/simple/simple.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/simple/simple.proto create mode 100644 components/spotify/cspot/bell/nanopb/examples/using_union_messages/Makefile create mode 100644 components/spotify/cspot/bell/nanopb/examples/using_union_messages/README.txt create mode 100644 components/spotify/cspot/bell/nanopb/examples/using_union_messages/decode.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/using_union_messages/encode.c create mode 100644 components/spotify/cspot/bell/nanopb/examples/using_union_messages/unionproto.proto create mode 100644 components/spotify/cspot/bell/nanopb/extra/FindNanopb.cmake create mode 100644 components/spotify/cspot/bell/nanopb/extra/nanopb-config-version.cmake.in create mode 100644 components/spotify/cspot/bell/nanopb/extra/nanopb-config.cmake create mode 100644 components/spotify/cspot/bell/nanopb/extra/nanopb.mk create mode 100644 components/spotify/cspot/bell/nanopb/extra/pb_syshdr.h create mode 100644 components/spotify/cspot/bell/nanopb/extra/poetry/poetry_build.sh create mode 100644 components/spotify/cspot/bell/nanopb/extra/poetry/pyproject.toml create mode 100644 components/spotify/cspot/bell/nanopb/generator/nanopb_generator.py create mode 100644 components/spotify/cspot/bell/nanopb/generator/nanopb_generator.py2 create mode 100644 components/spotify/cspot/bell/nanopb/generator/platformio_generator.py create mode 100644 components/spotify/cspot/bell/nanopb/generator/proto/Makefile create mode 100644 components/spotify/cspot/bell/nanopb/generator/proto/__init__.py create mode 100644 components/spotify/cspot/bell/nanopb/generator/proto/_utils.py create mode 100644 components/spotify/cspot/bell/nanopb/generator/proto/google/protobuf/descriptor.proto create mode 100644 components/spotify/cspot/bell/nanopb/generator/proto/nanopb.proto create mode 100644 components/spotify/cspot/bell/nanopb/generator/protoc create mode 100644 components/spotify/cspot/bell/nanopb/generator/protoc-gen-nanopb create mode 100644 components/spotify/cspot/bell/nanopb/generator/protoc-gen-nanopb-py2 create mode 100644 components/spotify/cspot/bell/nanopb/generator/protoc-gen-nanopb.bat create mode 100644 components/spotify/cspot/bell/nanopb/generator/protoc.bat create mode 100644 components/spotify/cspot/bell/nanopb/library.json create mode 100644 components/spotify/cspot/bell/nanopb/pb.h create mode 100644 components/spotify/cspot/bell/nanopb/pb_common.c create mode 100644 components/spotify/cspot/bell/nanopb/pb_common.h create mode 100644 components/spotify/cspot/bell/nanopb/pb_decode.c create mode 100644 components/spotify/cspot/bell/nanopb/pb_decode.h create mode 100644 components/spotify/cspot/bell/nanopb/pb_encode.c create mode 100644 components/spotify/cspot/bell/nanopb/pb_encode.h create mode 100644 components/spotify/cspot/bell/nanopb/spm-test/objc/c-header.c create mode 100644 components/spotify/cspot/bell/nanopb/spm-test/objc/objc-header.m create mode 100644 components/spotify/cspot/bell/nanopb/spm-test/objc/objc-module.m create mode 100644 components/spotify/cspot/bell/nanopb/spm-test/objc/objc-qualified.m create mode 100644 components/spotify/cspot/bell/nanopb/spm-test/swift/main.swift create mode 100644 components/spotify/cspot/bell/nanopb/spm_headers/nanopb/pb.h create mode 100644 components/spotify/cspot/bell/nanopb/spm_headers/nanopb/pb_common.h create mode 100644 components/spotify/cspot/bell/nanopb/spm_headers/nanopb/pb_decode.h create mode 100644 components/spotify/cspot/bell/nanopb/spm_headers/nanopb/pb_encode.h create mode 100644 components/spotify/cspot/bell/nanopb/spm_headers/pb.h create mode 100644 components/spotify/cspot/bell/nanopb/spm_headers/pb_common.h create mode 100644 components/spotify/cspot/bell/nanopb/spm_headers/pb_decode.h create mode 100644 components/spotify/cspot/bell/nanopb/spm_headers/pb_encode.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/Makefile create mode 100644 components/spotify/cspot/bell/nanopb/tests/SConstruct create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes/alltypes.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes/decode_alltypes.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes/encode_alltypes.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_callback/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_callback/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_callback/decode_alltypes_callback.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_callback/encode_alltypes_callback.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_pointer/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_pointer/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_pointer/decode_alltypes_pointer.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_pointer/encode_alltypes_pointer.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3/alltypes.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3/decode_alltypes.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3/encode_alltypes.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3_callback/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3_callback/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3_callback/decode_alltypes_callback.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/alltypes_proto3_callback/encode_alltypes_callback.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/anonymous_oneof/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/anonymous_oneof/decode_oneof.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/anonymous_oneof/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/any_type/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/any_type/anytest.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/any_type/decode_any.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/any_type/encode_any.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/any_type/google/protobuf/any.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/any_type/google/protobuf/any.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/any_type/google/protobuf/duration.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/backwards_compatibility/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/backwards_compatibility/alltypes_legacy.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/backwards_compatibility/alltypes_legacy.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/backwards_compatibility/alltypes_legacy.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/backwards_compatibility/alltypes_legacy.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/backwards_compatibility/decode_legacy.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/backwards_compatibility/encode_legacy.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/basic_buffer/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/basic_buffer/decode_buffer.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/basic_buffer/encode_buffer.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/basic_stream/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/basic_stream/decode_stream.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/basic_stream/encode_stream.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/buffer_only/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/callbacks/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/callbacks/callbacks.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/callbacks/decode_callbacks.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/callbacks/encode_callbacks.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/comments/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/comments/comments.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/comments/comments.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/common/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/common/malloc_wrappers.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/common/malloc_wrappers.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/common/malloc_wrappers_syshdr.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/common/person.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/common/test_helpers.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/common/unittestproto.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/common/unittests.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/common_unittests/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/common_unittests/common_unittests.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/cxx_callback_datatype/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/cxx_callback_datatype/cxx_callback_datatype.cpp create mode 100644 components/spotify/cspot/bell/nanopb/tests/cxx_callback_datatype/message.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/cxx_descriptor/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/cxx_descriptor/message.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/cxx_descriptor/message_descriptor.cc create mode 100644 components/spotify/cspot/bell/nanopb/tests/cxx_main_program/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/cyclic_messages/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/cyclic_messages/cyclic.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/cyclic_messages/cyclic_callback.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/cyclic_messages/encode_cyclic_callback.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/decode_unittests/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/decode_unittests/decode_unittests.c rename components/spotify/cspot/{cpp-reflection => bell/nanopb/tests/docker_images}/README.md (100%) create mode 100644 components/spotify/cspot/bell/nanopb/tests/docker_images/build_all.sh create mode 100644 components/spotify/cspot/bell/nanopb/tests/docker_images/ubuntu1804/Dockerfile create mode 100644 components/spotify/cspot/bell/nanopb/tests/docker_images/ubuntu2004/Dockerfile create mode 100644 components/spotify/cspot/bell/nanopb/tests/encode_arrays_unpacked/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/encode_unittests/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/encode_unittests/encode_unittests.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_minmax/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_minmax/enumminmax.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_minmax/enumminmax_unittests.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_sizes/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_sizes/enumsizes.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_sizes/enumsizes_unittests.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_to_string/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_to_string/enum.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/enum_to_string/enum_to_string.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/extensions/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/extensions/decode_extensions.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/extensions/encode_extensions.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/extensions/extensions.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/extensions/extensions.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/extra_fields/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/extra_fields/person_with_extra_field.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_16/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_16/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_16/alltypes.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_16_proto3/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_16_proto3/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_16_proto3/alltypes.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_16_proto3/decode_alltypes.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_16_proto3/encode_alltypes.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_32/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_32/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/field_size_32/alltypes.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/fixed_count/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/fixed_count/fixed_count.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/fixed_count/fixed_count_unittests.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/float_double_conversion/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/float_double_conversion/doublemsg.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/float_double_conversion/float_double_conversion.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/alltypes_callback.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/alltypes_pointer.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/alltypes_proto3_pointer.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/alltypes_proto3_static.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/alltypes_static.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/corpus.zip create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/flakystream.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/flakystream.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/fuzztest.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/generate_message.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/ossfuzz.sh create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/random_data.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/random_data.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/regressions.zip create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/update_corpus.sh create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/validation.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/fuzztest/validation.h create mode 100644 components/spotify/cspot/bell/nanopb/tests/generator_relative_paths/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/generator_relative_paths/any.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/generator_relative_paths/proto/protobuf/any.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/generator_relative_paths/proto/simple.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/generator_relative_paths/simple.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/generator_relative_paths/test.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/generator_relative_paths/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/infinity_nan/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/infinity_nan/floats.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/infinity_nan/infinity_nan_test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/inline/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/inline/inline.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/inline/inline.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/inline/inline_unittests.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/intsizes/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/intsizes/intsizes.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/intsizes/intsizes_unittests.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/io_errors/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/io_errors/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/io_errors/io_errors.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/io_errors_pointers/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/io_errors_pointers/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/map/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/map/decode_map.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/map/encode_map.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/map/map.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/map/map.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/mem_release/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/mem_release/mem_release.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/mem_release/mem_release.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/message_sizes/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/message_sizes/dummy.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/message_sizes/messages1.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/message_sizes/messages2.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/missing_fields/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/missing_fields/missing_fields.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/missing_fields/missing_fields.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/msgid/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/msgid/decode_msgid.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/msgid/encode_msgid.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/msgid/msgid_example.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/multiple_files/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/multiple_files/multifile1.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/multiple_files/multifile1.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/multiple_files/multifile2.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/multiple_files/subdir/multifile2.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/multiple_files/test_multiple_files.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/no_errmsg/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/no_messages/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/no_messages/no_messages.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/oneof/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/oneof/decode_oneof.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/oneof/encode_oneof.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/oneof/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/oneof_callback/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/oneof_callback/decode_oneof.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/oneof_callback/encode_oneof.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/oneof_callback/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/options/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/options/options.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/options/options.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/options/options_c.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/options/options_h.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/options/proto3_options.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/options/proto3_options.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/package_name/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/package_name_nanopb/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/proto3_optional/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/proto3_optional/optional.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/proto3_optional/optional.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/raw_decode/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/raw_decode/raw_decode.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/GHSA-gcx3-7m76-287p/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/GHSA-gcx3-7m76-287p/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/GHSA-gcx3-7m76-287p/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_118/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_118/enumdef.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_118/enumuse.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_125/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_125/extensionbug.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_125/extensionbug.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_125/extensionbug.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_141/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_141/testproto.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_141/testproto.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_145/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_145/comments.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_145/comments.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_145/comments.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_166/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_166/enum_encoded_size.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_166/enums.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_172/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_172/msg_size.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_172/submessage/submessage.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_172/submessage/submessage.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_172/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_188/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_188/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_195/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_195/test.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_195/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_203/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_203/file1.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_203/file2.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_205/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_205/size_corruption.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_205/size_corruption.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_227/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_227/unaligned_uint64.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_227/unaligned_uint64.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_229/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_229/multiple_oneof.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_229/multiple_oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_242/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_242/zero_value.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_242/zero_value.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_247/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_247/padding.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_247/padding.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_249/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_249/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_249/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_253/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_253/short_array.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_253/short_array.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_256/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_256/submsg_array.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_256/submsg_array.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_259/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_259/callback_pointer.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_259/callback_pointer.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_306/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_306/large_extension.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_306/large_extension.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_322/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_322/defaults.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_322/defaults.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_338/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_338/bigvalue.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_342/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_342/extensions.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_342/test_extensions.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_363/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_363/oneofmsg.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_363/test_oneofmsg.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_376/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_376/fixed_array.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_376/fixed_array.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_376/test_fixarray.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_380/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_380/manglenames.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_380/manglenames.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_395/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_395/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_395/test.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_395/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_407/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_407/extensions.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_407/test_extensions.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_453/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_453/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_453/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_472/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_472/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_485/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_485/uint8.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_487/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_487/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_493/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_493/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_494/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_494/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_494/oneof_size.cc create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_494/submessage.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_504/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_504/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_504/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_522/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_522/uenum.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_524/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_524/oneof.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_524/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_524/submessage.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_535/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_535/issue_535.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_544/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_544/submsg_callback.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_544/submsg_callback.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_545/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_545/submsg_callback.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_547/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_547/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_547/test.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_558/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_558/mixed.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_558/mixed.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_569/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_569/a.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_569/b.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/DataPacket.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/LogMessage.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/first.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/nanopb_generator_bug/first.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a/aa.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/a/ab.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/b.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_610/nanopb_generator_bug/first/b/ba.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_611/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_611/uenum.expected create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_611/uenum.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_617/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_617/oneof.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_617/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_617/test_oneof.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_631/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_631/submsg_callback.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_631/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_637/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_637/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_637/other.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_637/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_644/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_644/int64.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_647/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_647/repro.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_647/repro.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_692/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_692/oneof.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_692/other.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/regression/issue_692/test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/__init__.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/avr/__init__.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/avr/avr.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/avr/avr_io.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/avr/run_test.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/mips/__init__.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/mips/mips.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/mipsel/__init__.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/mipsel/mipsel.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/riscv64/__init__.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/riscv64/riscv64.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/stm32/__init__.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/stm32/run_test.sh create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/stm32/stm32.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/stm32/stm32_ram.ld create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/platforms/stm32/vectors.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/site_init.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/site_scons/site_tools/nanopb.py create mode 100644 components/spotify/cspot/bell/nanopb/tests/sort_by_tag/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/sort_by_tag/sort_by_tag.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/sort_by_tag/sort_by_tag.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/sort_by_tag/sort_by_tag.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/special_characters/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/special_characters/funny-proto+name has.characters.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/splint/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/splint/splint.rc create mode 100644 components/spotify/cspot/bell/nanopb/tests/stackusage/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/stackusage/stackusage.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/stackusage/stackusage.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/stackusage/stackusage.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/typename_mangling/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/typename_mangling/test_flatten.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/typename_mangling/test_package_initials.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/typename_mangling/test_strip_package.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/typename_mangling/with_package.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/typename_mangling/with_package.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/validate_utf8/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/without_64bit/SConscript create mode 100644 components/spotify/cspot/bell/nanopb/tests/without_64bit/alltypes.options create mode 100644 components/spotify/cspot/bell/nanopb/tests/without_64bit/alltypes.proto create mode 100644 components/spotify/cspot/bell/nanopb/tests/without_64bit/decode_alltypes.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/without_64bit/encode_alltypes.c create mode 100644 components/spotify/cspot/bell/nanopb/tests/without_64bit/no_64bit_syshdr.h create mode 100644 components/spotify/cspot/bell/nanopb/tools/list_authors.sh create mode 100644 components/spotify/cspot/bell/nanopb/tools/make_linux_package.sh create mode 100644 components/spotify/cspot/bell/nanopb/tools/make_mac_package.sh create mode 100644 components/spotify/cspot/bell/nanopb/tools/make_windows_package.sh create mode 100644 components/spotify/cspot/bell/nanopb/tools/set_version.sh delete mode 100644 components/spotify/cspot/cpp-reflection/.gitignore delete mode 100644 components/spotify/cspot/cpp-reflection/alias_type.go delete mode 100644 components/spotify/cspot/cpp-reflection/any_types.go delete mode 100644 components/spotify/cspot/cpp-reflection/class_type.go delete mode 100644 components/spotify/cspot/cpp-reflection/corntext.go delete mode 100644 components/spotify/cspot/cpp-reflection/cpp_generator.go delete mode 100644 components/spotify/cspot/cpp-reflection/enum_type.go delete mode 100644 components/spotify/cspot/cpp-reflection/go.sum delete mode 100644 components/spotify/cspot/cpp-reflection/main.go delete mode 100644 components/spotify/cspot/cpp-reflection/optional_helper_types.go delete mode 100644 components/spotify/cspot/cpp-reflection/optional_type.go delete mode 100644 components/spotify/cspot/cpp-reflection/primitive_type.go delete mode 100644 components/spotify/cspot/cpp-reflection/reflection_types.go delete mode 100644 components/spotify/cspot/cpp-reflection/util.go delete mode 100644 components/spotify/cspot/cpp-reflection/vector_helper_types.go delete mode 100644 components/spotify/cspot/cpp-reflection/vector_type.go create mode 100644 components/spotify/cspot/protobuf/authentication.options rename components/spotify/cspot/{protocol => protobuf}/authentication.proto (100%) create mode 100644 components/spotify/cspot/protobuf/keyexchange.options rename components/spotify/cspot/{protocol => protobuf}/keyexchange.proto (100%) create mode 100644 components/spotify/cspot/protobuf/mercury.options rename components/spotify/cspot/{protocol => protobuf}/mercury.proto (100%) create mode 100644 components/spotify/cspot/protobuf/metadata.options rename components/spotify/cspot/{protocol => protobuf}/metadata.proto (100%) create mode 100644 components/spotify/cspot/protobuf/spirc.options rename components/spotify/cspot/{protocol => protobuf}/spirc.proto (100%) delete mode 100644 components/spotify/cspot/protos/AnyRefImpl.cpp delete mode 100644 components/spotify/cspot/protos/ReflectTypeInfo.cpp delete mode 100644 components/spotify/cspot/protos/ReflectionInternal.h delete mode 100644 components/spotify/cspot/protos/authentication.h delete mode 100644 components/spotify/cspot/protos/keyexchange.h delete mode 100644 components/spotify/cspot/protos/mercury.h delete mode 100644 components/spotify/cspot/protos/metadata.h delete mode 100644 components/spotify/cspot/protos/protobuf.h delete mode 100644 components/spotify/cspot/protos/spirc.h diff --git a/components/spotify/cspot/bell/nanopb/.gitignore b/components/spotify/cspot/bell/nanopb/.gitignore new file mode 100644 index 00000000..25cbf9a4 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/.gitignore @@ -0,0 +1,31 @@ +*.gcda +*.gcno +*.gcov +*.o +*.pb.c +*.pb.h +*.pb +*.pyc +*_pb2.py +*~ +*.tar.gz +.sconsign.dblite +config.log +.sconf_temp +tests/build +julkaisu.txt +dist +docs/*.html +docs/generator_flow.png +examples/simple/simple +examples/network_server/client +examples/network_server/server +examples/using_double_on_avr/decode_double +examples/using_double_on_avr/encode_double +examples/using_double_on_avr/test_conversions +examples/using_union_messages/decode +examples/using_union_messages/encode +generator/nanopb_pb2.pyc +!generator-bin/**/* +bazel-* +extra/poetry/build diff --git a/components/spotify/cspot/bell/nanopb/.travis.yml b/components/spotify/cspot/bell/nanopb/.travis.yml new file mode 100644 index 00000000..0f9775c2 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/.travis.yml @@ -0,0 +1,32 @@ +language: c +dist: focal + +# Test using both gcc and clang +env: + - CC=gcc CXX=g++ + - CC=clang CXX=clang++ + +addons: + apt: + packages: + - scons + - python3 + - python3-protobuf + - protobuf-compiler + + +before_install: + - export PATH=$HOME/.local/bin:$HOME/protobuf/bin:$PATH + - export MAKEFLAGS=-j$(nproc) + - $CC --version + - $CXX --version + - python --version + - lsb_release -a + +script: + - pushd tests && scons CC=$CC CXX=$CXX && popd + +notifications: + email: + recipients: + - jpa@travis.mail.kapsi.fi diff --git a/components/spotify/cspot/bell/nanopb/AUTHORS.txt b/components/spotify/cspot/bell/nanopb/AUTHORS.txt new file mode 100644 index 00000000..465f1071 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/AUTHORS.txt @@ -0,0 +1,100 @@ +Petteri Aimonen +Michael Poole +Daniel Kan +Stan Hu +David Hotham +Steffen Siering +Jens Steinhauser +Pavel Ilin +Kent Ryhorchuk +Martin Donath +Oliver Lee +Michael Haberler +Nicolas Colomer +Ivan Kravets +Kyle Manna +Benjamin Kamath +Andrew Ruder +Kenshi Kawaguchi +isotes +Maxim Khitrov +Yaniv Mordekhay +Ming Zhao +Google, Inc. +Tom Roeder +Piotr Sikora +Bernhard Krämer +Konstantin Podsvirov +William A. Kennington III +Guillaume Lager +Tobias Haegermarck +Justin DeMartino +Constantine Grantcharov +Nick Ewalt +Harald Fernengel +Alice Wang +Kevin Fitch +Kamal Marhubi +Elco Jacobs +Sébastien Morin +Dave Flogeras +Edward Z. Yang +Robbie Shade +Andrew Ballinger +Hamina, Juha-Pekka +Jason Bishop +matejcik +Tobias Müller +Jari Vetoniemi +Gabriel Staples +Amarnath +Michal Rostecki +Pei Wang +Noah Pendleton <2538614+noahp@users.noreply.github.com> +Pavol Rusnak +der-imp +Mark Hill +Torfinn Berset +Bo Langgaard Lind +Stephane Dorre +Phillip Cao +Melvin Wang +Joshua Salzedo +Adam Klama +Anton Matosov +berni155 +bolind +David Lin +dch +devjoa +Evan Fisher +Fay +Florian Märkl +Franck +Ilya Averyanov +John Ullman +Ket3r +maciej +Marek Zukal +Paul Beusterien +Rogers Guedes +Stefan R. Filipek +T. Carl Beery +Vitali Lovich +Vojtěch Boček +Wael Nasreddine +wangli28 +Zukaitis +Alex Pacini +Cong +kurddt +otopetrik +Psy-Kai +a1lu +L <46594312+WakandaO2@users.noreply.github.com> +Melvin Wang +Tim Gates +leabut +Angel ILIEV +Jakub Tymejczyk +Matthew Simmons diff --git a/components/spotify/cspot/bell/nanopb/BUILD.bazel b/components/spotify/cspot/bell/nanopb/BUILD.bazel new file mode 100644 index 00000000..becdc574 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/BUILD.bazel @@ -0,0 +1,21 @@ +licenses(["notice"]) + +exports_files(["LICENSE.txt"]) + +package(default_visibility = ["//visibility:public"]) + +cc_library( + name = "nanopb", + srcs = [ + "pb_common.c", + "pb_decode.c", + "pb_encode.c", + ], + hdrs = [ + "pb.h", + "pb_common.h", + "pb_decode.h", + "pb_encode.h", + ], + visibility = ["//visibility:public"], +) diff --git a/components/spotify/cspot/bell/nanopb/CHANGELOG.txt b/components/spotify/cspot/bell/nanopb/CHANGELOG.txt new file mode 100644 index 00000000..f2c06503 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/CHANGELOG.txt @@ -0,0 +1,522 @@ +nanopb-0.4.5 (2021-03-22) + Fix invalid free() with oneof (#647, GHSA-7mv5-5mxh-qg88) + Fix unordered field numbers inside oneof causing fields to be ignored (#617) + Fix pb_decode() not initializing fields inside oneof (#635 + Fix compiler errors with complex oneof hierarchy and sizeof() (#610) + Fix descriptor width calculation for 64-bit types (#644) + Fix compiler error in generated initializer for submessage callback (#631) + Fix duplicate union definition in generated file (#637) + Fix test case build error on SCons 4.1.0 + Pip package: include nanopb_pb2.py (#629) + Make generator consider dependencies recursively (#610) + Bazel build system updates (#633) + Add support for including comments from .proto file (#85, #645) + +nanopb-0.4.4 (2020-11-25) + Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615, GHSA-85rr-4rh9-hhwh) + Fix generator error when oneof contains a single unresolved field size (#610) + Fix unsigned enums not working correctly inside OneOf (#611) + Fix recursion depth exceeded error in generator (#493) + Add '--version' option to nanopb_generator.py (#607) + Add support for proto3 optional fields introduced in protoc 3.12 (#591) + Add better error message when enum type is not found (#592) + Allow specifying descriptorsize on field level also (#546) + Allow multiple targets to be created by calling NANOPB_GENERATE_CPP() (#596) + Conanfile: Add protobuf-nanopb library to cpp_info.libs (#605) + Include version number in generator verbose output + Convert documentation to markdown format (#587) + Remove outdated transitional generator/nanopb/options.proto. + Test case improvements + Documentation improvements + +nanopb-0.4.3 (2020-09-21) + Fix generator error when output is in current directory (#553) + Fix issue with unknown message sizes being referred inside oneof encoded size calculation (#569) + Fix problem with [default=xxxx, (nanopb).proto3=true] field option combination (#558) + Fix cross compilation with Conan build system (#568) + Better support C++ types in generated structs (#577) + CMake rule improvements (#554, #555, #556, #561, #564) + Generator: fix compatibility bug with Python 3.1 and earlier + Make Linux and Mac packages use grpcio protoc + Make pb_decode_varint32() reject overlong varint encodings. + Performance optimizations + Test case improvements + Documentation improvements + +NOTE: version 0.4.3 changes layout of pb_msgdesc_t. It requires recompiling .pb.c files and +thus breaks ABI compatibility. In general, ABI compatibility is not currently maintained +between any nanopb versions. + +NOTE: There was an apparent false positive virus identification by Windows Defender of the +PyInstaller 3.6 based Windows package nanopb-0.4.3-windows-x86.zip. The package was replaced +by nanopb-0.4.3-p1-windows-x86.zip with rebuilt PyInstaller 4.0, which seems to avoid the problem. +Actual nanopb code is unchanged between the packages. + +nanopb-0.4.2 (2020-06-23) + Fix buffer overflow when encoding bytes with size set to 65535 (#547, GHSA-3p39-mfxg-hrq4) + Fix segfault with pointer fields and proto3_singular_msgs = true. (#504,#505) + Fix Windows 10 temp file handling (#486) + Fix macro name conflicts (ATMEGA32U4 UENUM and more) (#522) + Fix generator error with nested messages and default values (#487) + Fix nanopb_generator exception on enums with aliases (#535) + Fix compile error when struct members are called X or a (#492) + Fix sizeof(union ...) fallback not compiling with C++ (#415, #494) + Fix "missing required field" error with submessage callback (#544) + Fix field descriptor sizing with submsg_callback option (#545) + Fix protoc calling on Python 2 (#503) + Fix handling of varying NaN representations in PB_CONVERT_DOUBLE_FLOAT (#543) + Fix clang undefined behavior sanitizer errors. + Change generator to use Python 3 by default (#441, #509) + Binary packages updated to use Python 3 and grpcio-tools + Add support for infinity and nan floating-point defaults (#530, #538) + Add generator option sort_by_tag (#542) + Add type_override option to override type defined in .proto (#497) + Set proto2 enum fields to first value when no default is given, even if nonzero (#532,#539) + Include protoc-gen-nanopb in path in protoc wrapper script + Properly pass error status from protoc wrapper when calling binary protoc + Generator: pass --include_imports when calling protoc (#494) + Create intermediate directories when writing files to relative path (#512) + Add current directory to include path for protoc (#499) + Update readme to use nanopb_generator.py directly + Regression test for proto3 incorrectly considered empty (#504) + CMake: change package name to Nanopb for cmake 3.17 compatibility (#506) + CMake: remove find_package(PythonInterp) (#508) + CMake: use split --nanopb_opt only on protoc >= 3.6 (#515) + CMake: Relax python version spec, allowing Python3. (#534) + Swift package manager (#549) + Rename BUILD as BUILD.bazel (#537) + +Note: Windows binary packages in 0.4.2 and later require Windows 7 or newer. + +nanopb-0.4.1 (2020-02-02) + Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) + Avoid overflows in allocation for packed fields. + Verify stream size before allocating string / bytes. + Add workaround for avr-libc realloc() bug (#475) + Fix bug with field numbers >255 (#407) + Fix compilation error on platforms without uint8_t (#485) + Fix warnings on Python3.8 (#399, #467) + Make fixed_count option work when combined with FT_POINTER. + Add missing #define for submsg callbacks, add regression test (#472) + Fix ImportError when using generator/protoc with Python 3 + Remove accidental debug code in generator + Reduce stack usage (#484) + Remove PB_FIELDINFO_WIDTH option (#473) + Add nanopb-specific package name option (#422) + Add testcase for Any type (#163) + Add exclude option also from .proto/.options + Set default include path in the grpc_tools protoc wrapper. + Add workaround for python-protobuf 3.6.1 bug (#478) + Detect invalid wire type when decoding fields. + Improved fuzz testing + +nanopb-0.4.0 (2019-12-20) + New field descriptor format. + Make nanopb_generator automatically compile .proto files (#462) + Allow installing as Python package from pip (#460) + Use protoc from grpcio-tools Python package if available (#463) + Change proto3 message types to be optional (#308, #452) + Add pb_decode_ex(), pb_encode_ex() functions. + Automatically rebuild nanopb_pb2.py + Use plugin.proto that comes with python-protobuf (#234) + + Allow specifying a per-message callback. (#175) + Improve callback handling inside oneofs. (#175) + + Introduce new compile time flag: PB_VALIDATE_UTF8 (#437) + Add TypenameMangling.M_PACKAGE_INITIALS (#394) + Introduce new compile time flag: PB_ENCODE_ARRAYS_UNPACKED (#427) + Add default_has option (#423) + Add option for including extra files from .pb.h + Add generator option to error out on unmatched options (#458) + Generator: Allow comma separated options in plugin mode (#343) + Allow comma-separated option parsing to handle `#include` (#450) + Remove timestamp from generated files by default, add -t to keep it. + Make --no-strip-path default (#326) + Fix .options file case sensitivity on Windows. + Fix generator error with mangle_names option (#380) + Take int_size setting into account in calculating message sizes (#373) + .gitignore: don't ignore generator-bin files (#419) + Cleanup .pb.h header format + + Make tests run on AVR and STM32 + Add PB_CONVERT_DOUBLE_FLOAT setting to convert doubles on AVR. + Store field descriptor constants in flash on AVR (#464) + Added "f" suffix to const float declarations. (#453) + Fix clang-tidy warnings about using signed integers in binary bitwise operations (#451) + Add C++ message descriptors helper (#384) + Implement conan recipe (#378) + CMake: Split nanopb_out command (#454) + CMake: install created shared library(dll) in windows to the binary folder (#447) + +nanopb-0.3.9.8 (2021-03-22) + Fix invalid free() with oneof (#647, GHSA-7mv5-5mxh-qg88) + Don't generate lines with trailing spaces (#622) + Verify stream size before allocating string / bytes (#620) + +nanopb-0.3.9.7 (2020-11-25) + Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615, GHSA-85rr-4rh9-hhwh) + Fix unsigned enums not working correctly inside OneOf (#611) + Add '--version' option to nanopb_generator.py (#607) + SwiftPM rule updates (#567, #585) + +nanopb-0.3.9.6 (2020-06-23) + Fix buffer overflow when encoding bytes with size set to 65535 (#547, GHSA-3p39-mfxg-hrq4) + Fix proto3 submessage improperly considered empty (#504) + Fix ImportError when using generator/protoc with Python 3 + Add build rules for Swift package manager (#549) + +nanopb-0.3.9.5 (2020-02-02) + Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) + Add workaround for avr-libc realloc() bug (#475) + Fix empty submessages getting encoded in proto3 mode (#395) + Avoid overflows in allocation for packed fields. + +nanopb-0.3.9.4 (2019-10-13) + Fix undefined behavior with bool fields (#434) + Fix enum min/max defines when values are not in order (#405) + Fix network_server socket example with zero-length strings (#421) + Don't call stream read callback with count=0 (#421) + Add compile time flag PB_ENCODE_ARRAYS_UNPACKED (#427) + +nanopb-0.3.9.3 (2019-03-08) + NOTE: nanopb-0.3.9.3.tar.gz before 2019-03-21 was accidentally from 0.4 branch (#388) + Fix fixed size and callback repeated fields inside proto3 submessages (#376, #382, #386) + Fix incorrect PB_STATIC_ASSERT for bytes inside oneof (#363) + Fix generator error with mangle_names option (#380) + Generator: Allow comma separated options in plugin mode (#343) + +nanopb-0.3.9.2 (2018-11-10) + Erroneous free() when using callbacks combined with PB_ENABLE_MALLOC (#346) + Fix possible null-pointer dereference in decode_callback_field (#342) + Fix FindNanopb.cmake on Windows (#335) + Fix large generator memory usage with oneof fields (#338) + Fix error in splint test (#359) + Allow cmake to build as a shared library (#352, #353) + Add --no-strip-path command line option (#326) + Option for flattening nested protobuf names (#333) + Documentation fixes (#329, #350, #358) + Better error messages (#351) + +nanopb-0.3.9.1 (2018-04-14) + Fix handling of special characters in string/bytes default values (issue #322) + Fix encoding of negative numbers with PB_WITHOUT_64BIT (#285) + Fix _zero initializer for enums that don't begin at 0. (#295) + Multiple CMake fixes (#296, #299, #304, #312, #320) + Fix compiler warnings (#305) + Fix scons rules for Python 3 + Add check for large extension field number (issue #306) + Updated included descriptor.proto version (#314) + Resolve oneof sizes symbolically when needed (#311) + Add fixed_count option (#260) + Add some verbose prints in generator (issue #238) + Add test/example of using 'map' type. (#289) + +nanopb-0.3.9 (2017-09-23) + Fix bugs in proto3 encoding of submessages (#256) + Fix message size calculation for arrays of size 1 (#253) + Fix segfault with FT_CALLBACK inside FT_POINTER (#259) + Properly detect truncated tags in corrupted messages (#277) + Make pb_decode_varint32 overflow checks exact (#258) + Add option to build without 64-bit support (#86) + Add options to define source and header file extensions (#264) + Add pb_en/decode_nullterminated() (part of #278) + Add pb_decode_delimited_noinit (#284) + CMake: add dependency for .options file (#265) + CMake: change use of relative paths (#250,#271,#273) + Better error message for missing max_size option (#281) + Travis-CI build fixes (#283) + Add Bazel build system file (#266) + +nanopb-0.3.8 (2017-03-05) + Fix problems with multiple oneofs in same message (#229) + Zero-valued extension fields were mistakenly ignored by encoder (#242) + Multiple fixes related to proto3 mode (#242, #245, #247, #249) + Fix potential unaligned access (#226, #227) + Fix documentation for protoc --plugin argument (#239) + Extend inline / fixed length bytes array support (#244) + Add new option max_length for strings (#107) + Make string substream API more robust (#230) + Make pb_decode_varint32 public API (#231) + Allow overriding proto3 mode (#228) + Add optional enum->string mapping function (#223) + Add transitional options.proto file (#241) + Add better error message on Python library version incompatibility (#240) + Include version number in PlatformIO library.json (#222) + CMake build script changes (#236, #237) + Change download links to https + Improvements to test cases. + +nanopb-0.3.7 (2016-10-30) + Add support for proto3-style singular fields (#182, #206, #216) + Updated binary package protoc to version 3.1.0 + Add FT_INLINE allocation of bytes fields (#211) + Include package name in include guard (#207) + Fix missing warning with large bytes fields (issue #220) + Added CMake project (#208) + Add bazel BUILD file for nanopb (#209) + Added an AUTHORS file (#211) + Documentation updates + Improvements to test cases. + +nanopb-0.3.6 (2016-06-19) + Protect against corrupted _count fields in pb_release (#205) + Fix error in STATIC_ASSERT with multiple files (#203) + Add -D option to specify output directory (#193) + Generate MIN/MAX/ARRAYSIZE defines for enums (#194) + Generate comments about uncalculable message sizes (#195) + Documentation updates (#196, #201) + Improvements to test cases. + +nanopb-0.3.5 (2016-02-13) + NOTE: If you are using pb_syshdr.h, you will need to add uint_least8_t + definition. See docs/migration.rst for details. + + Fix generator crash with Enum inside Oneof (#188) + Fix some generator regressions related to .options file path (#172) + Add support for platforms without uint8_t (#191) + Allow const parameter to pb_istream_from_buffer (#152) + Ignore null pointers in pb_release() (#183) + Add support for anonymous unions (#184) + Add Python3 support to the generator (#169) + Add code generator insertion points to generated files (#178) + Improvements to CMake script (#181) + Improvements to test cases. + +nanopb-0.3.4 (2015-09-26) + Fix handling of unsigned 8- and 16-bit enums (issue 164) + Fix generator on systems where python = python3. (issue 155) + Fix compiler warning on GCC 5.x (issue 171) + Make the generator better handle imported .protos (issue 165) + Add packed_enum option to generator. + Add syntax= line to .proto files (issue 167) + Add PlatformIO registry manifest file. (pr 156) + +nanopb-0.3.3 (2015-04-10) + Fix missing files in Linux binary package (issue 146) + Fix generator bug when oneof is first field in a message. (issue 142) + Fix generator error when long_names:false is combined with Oneofs. (issue 147) + Fix oneof submessage initialization bug. (issue 149) + Fix problem with plugin options on Python 2.7.2 and older. (issue 153) + Fix crash when callback is inside oneof field. (issue 148) + Switch to .tar.gz format for Mac OS X packages. (issue 154) + Always define enum long names so that cross-file references work. (issue 118) + Add msgid generator option. (issue 151) + Improve comment support in .options files. (issue 145) + Updates for the CMake rule file, add cmake example. + Better error messages for syntax errors in .options file + +nanopb-0.3.2 (2015-01-24) + Fix memory leaks with PB_ENABLE_MALLOC with some submessage hierarchies (issue 138) + Implement support for oneofs (C unions). (issues 131, 141) + Add int_size option for generator (issue 139) + Add compilation option to disable struct packing. (issue 136) + Change PB_RETURN_ERROR() macro to avoid compiler warnings (issue 140) + Fix build problems with protoc 3.0.0 + Add support for POINTER type in extensions + Initialize also extension fields to defaults in pb_decode(). + Detect too large varint values when decoding. + +nanopb-0.3.1 (2014-09-11) + Fix security issue due to size_t overflows. (issue 132) + Fix memory leak with duplicated fields and PB_ENABLE_MALLOC + Fix crash if pb_release() is called twice. + Fix cyclic message support (issue 130) + Fix error in generated initializers for repeated pointer fields. + Improve tests (issues 113, 126) + +nanopb-0.3.0 (2014-08-26) + NOTE: See docs/migration.html or online at + http://koti.kapsi.fi/~jpa/nanopb/docs/migration.html + for changes in this version. Most importantly, you need to add + pb_common.c to the list of files to compile. + + Separated field iterator logic to pb_common.c (issue 128) + Change the _count fields to use pb_size_t datatype (issue 82) + Added PB_ prefix to macro names (issue 106) + Added #if version guard to generated files (issue 129) + Added migration document + +nanopb-0.2.9.5 (2020-06-23) + Fix buffer overflow when encoding bytes with size set to 65535 (#547, GHSA-3p39-mfxg-hrq4) + Backport Python 3 and protoc 3.x fixes to test cases + +nanopb-0.2.9.4 (2020-02-02) + Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) + Add workaround for avr-libc realloc() bug (#475) + +nanopb-0.2.9.3 (2016-06-19) + Protect against corrupted _count fields in pb_release (#205) + +nanopb-0.2.9.2 (2015-01-24) + Fix memory leaks with PB_ENABLE_MALLOC with some submessage hierarchies (issue 138) + Fix compilation error with generated initializers for repeated pointer fields + +nanopb-0.2.9.1 (2014-09-11) + Fix security issue due to size_t overflows. (issue 132) + Fix memory leak with duplicated fields and PB_ENABLE_MALLOC + Fix crash if pb_release() is called twice. + +nanopb-0.2.9 (2014-08-09) + NOTE: If you are using the -e option with the generator, you have + to prepend . to the argument to get the same behaviour as before. + + Do not automatically add a dot with generator -e option. (issue 122) + Fix problem with .options file and extension fields. (issue 125) + Don't use SIZE_MAX macro, as it is not in C89. (issue 120) + Generate #defines for initializing message structures. (issue 79) + Add skip_message option to generator. (issue 121) + Add PB_PACKED_STRUCT support for Keil MDK-ARM toolchain (issue 119) + Give better messages about the .options file path. (issue 124) + Improved tests + +nanopb-0.2.8 (2014-05-20) + Fix security issue with PB_ENABLE_MALLOC. (issue 117) + Add option to not add timestamps to .pb.h and .pb.c preambles. (issue 115) + Documentation updates + Improved tests + +nanopb-0.2.7 (2014-04-07) + Fix bug with default values for extension fields (issue 111) + Fix some MISRA-C warnings (issue 91) + Implemented optional malloc() support (issue 80) + Changed pointer-type bytes field datatype + Add a "found" field to pb_extension_t (issue 112) + Add convenience function pb_get_encoded_size() (issue 16) + +nanopb-0.2.6 (2014-02-15) + Fix generator error with bytes callback fields (issue 99) + Fix warnings about large integer constants (issue 102) + Add comments to where STATIC_ASSERT is used (issue 96) + Add warning about unknown field names on .options (issue 105) + Move descriptor.proto to google/protobuf subdirectory (issue 104) + Improved tests + +nanopb-0.2.5 (2014-01-01) + Fix a bug with encoding negative values in int32 fields (issue 97) + Create binary packages of the generator + dependencies (issue 47) + Add support for pointer-type fields to the encoder (part of issue 80) + Fixed path in FindNanopb.cmake (issue 94) + Improved tests + +nanopb-0.2.4 (2013-11-07) + Remove the deprecated NANOPB_INTERNALS functions from public API. + Document the security model. + Check array and bytes max sizes when encoding (issue 90) + Add #defines for maximum encoded message size (issue 89) + Add #define tags for extension fields (issue 93) + Fix MISRA C violations (issue 91) + Clean up pb_field_t definition with typedefs. + +nanopb-0.2.3 (2013-09-18) + Improve compatibility by removing ternary operator from initializations (issue 88) + Fix build error on Visual C++ (issue 84, patch by Markus Schwarzenberg) + Don't stop on unsupported extension fields (issue 83) + Add an example pb_syshdr.h file for non-C99 compilers + Reorganize tests and examples into subfolders (issue 63) + Switch from Makefiles to scons for building the tests + Make the tests buildable on Windows + +nanopb-0.2.2 (2013-08-18) + Add support for extension fields (issue 17) + Fix unknown fields in empty message (issue 78) + Include the field tags in the generated .pb.h file. + Add pb_decode_delimited and pb_encode_delimited wrapper functions (issue 74) + Add a section in top of pb.h for changing compilation settings (issue 76) + Documentation improvements (issues 12, 77 and others) + Improved tests + +nanopb-0.2.1 (2013-04-14) + NOTE: The default callback function signature has changed. + If you don't want to update your code, define PB_OLD_CALLBACK_STYLE. + + Change the callback function to use void** (issue 69) + Add support for defining the nanopb options in a separate file (issue 12) + Add support for packed structs in IAR and MSVC (in addition to GCC) (issue 66) + Implement error message support for the encoder side (issue 7) + Handle unterminated strings when encoding (issue 68) + Fix bug with empty strings in repeated string callbacks (issue 73) + Fix regression in 0.2.0 with optional callback fields (issue 70) + Fix bugs with empty message types (issues 64, 65) + Fix some compiler warnings on clang (issue 67) + Some portability improvements (issues 60, 62) + Various new generator options + Improved tests + +nanopb-0.2.0 (2013-03-02) + NOTE: This release requires you to regenerate all .pb.c + files. Files generated by older versions will not + compile anymore. + + Reformat generated .pb.c files using macros (issue 58) + Rename PB_HTYPE_ARRAY -> PB_HTYPE_REPEATED + Separate PB_HTYPE to PB_ATYPE and PB_HTYPE + Move STATIC_ASSERTs to .pb.c file + Added CMake file (by Pavel Ilin) + Add option to give file extension to generator (by Michael Haberler) + Documentation updates + +nanopb-0.1.9 (2013-02-13) + Fixed error message bugs (issues 52, 56) + Sanitize #ifndef filename (issue 50) + Performance improvements + Add compile-time option PB_BUFFER_ONLY + Add Java package name to nanopb.proto + Check for sizeof(double) == 8 (issue 54) + Added generator option to ignore some fields. (issue 51) + Added generator option to make message structs packed. (issue 49) + Add more test cases. + +nanopb-0.1.8 (2012-12-13) + Fix bugs in the enum short names introduced in 0.1.7 (issues 42, 43) + Fix STATIC_ASSERT macro when using multiple .proto files. (issue 41) + Fix missing initialization of istream.errmsg + Make tests/Makefile work for non-gcc compilers (issue 40) + +nanopb-0.1.7 (2012-11-11) + Remove "skip" mode from pb_istream_t callbacks. Example implementation had a bug. (issue 37) + Add option to use shorter names for enum values (issue 38) + Improve options support in generator (issues 12, 30) + Add nanopb version number to generated files (issue 36) + Add extern "C" to generated headers (issue 35) + Add names for structs to allow forward declaration (issue 39) + Add buffer size check in example (issue 34) + Fix build warnings on MS compilers (issue 33) + +nanopb-0.1.6 (2012-09-02) + Reorganize the field decoder interface (issue 2) + Improve performance in submessage decoding (issue 28) + Implement error messages in the decoder side (issue 7) + Extended testcases (alltypes test is now complete). + Fix some compiler warnings (issues 25, 26, 27, 32). + +nanopb-0.1.5 (2012-08-04) + Fix bug in decoder with packed arrays (issue 23). + Extended testcases. + Fix some compiler warnings. + +nanopb-0.1.4 (2012-07-05) + Add compile-time options for easy-to-use >255 field support. + Improve the detection of missing required fields. + Added example on how to handle union messages. + Fix generator error with .proto without messages. + Fix problems that stopped the code from compiling with some compilers. + Fix some compiler warnings. + +nanopb-0.1.3 (2012-06-12) + Refactor the field encoder interface. + Improve generator error messages (issue 5) + Add descriptor.proto into the #include exclusion list + Fix some compiler warnings. + +nanopb-0.1.2 (2012-02-15) + Make the generator to generate include for other .proto files (issue 4). + Fixed generator not working on Windows (issue 3) + +nanopb-0.1.1 (2012-01-14) + Fixed bug in encoder with 'bytes' fields (issue 1). + Fixed a bug in the generator that caused a compiler error on sfixed32 and sfixed64 fields. + Extended testcases. + +nanopb-0.1.0 (2012-01-06) + First stable release. diff --git a/components/spotify/cspot/bell/nanopb/CMakeLists.txt b/components/spotify/cspot/bell/nanopb/CMakeLists.txt new file mode 100644 index 00000000..cb90012b --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/CMakeLists.txt @@ -0,0 +1,143 @@ +cmake_minimum_required(VERSION 2.8.12) + +project(nanopb C) + +set(nanopb_VERSION_STRING nanopb-0.4.6-dev) +set(nanopb_SOVERSION 0) + +string(REPLACE "nanopb-" "" nanopb_VERSION ${nanopb_VERSION_STRING}) + +option(BUILD_SHARED_LIBS "Build shared libraries" OFF) +option(BUILD_STATIC_LIBS "Build static libraries" ON) + +option(nanopb_BUILD_RUNTIME "Build the headers and libraries needed at runtime" ON) +option(nanopb_BUILD_GENERATOR "Build the protoc plugin for code generation" ON) +option(nanopb_MSVC_STATIC_RUNTIME "Link static runtime libraries" ON) + +find_program(nanopb_PROTOC_PATH protoc) +if(NOT EXISTS ${nanopb_PROTOC_PATH}) + message(FATAL_ERROR "protoc compiler not found") +endif() + +if(NOT DEFINED CMAKE_DEBUG_POSTFIX) + set(CMAKE_DEBUG_POSTFIX "d") +endif() + +include(GNUInstallDirs) + +if(MSVC AND nanopb_MSVC_STATIC_RUNTIME) + foreach(flag_var + CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE + CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) + if(${flag_var} MATCHES "/MD") + string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") + endif(${flag_var} MATCHES "/MD") + endforeach(flag_var) +endif() + +if(NOT DEFINED CMAKE_INSTALL_CMAKEDIR) + set(CMAKE_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/nanopb") +endif() + +find_package(Python REQUIRED COMPONENTS Interpreter) +execute_process( + COMMAND ${Python_EXECUTABLE} -c + "import os.path, sys, sysconfig; print(os.path.relpath(sysconfig.get_path('purelib'), start=sys.prefix))" + OUTPUT_VARIABLE PYTHON_INSTDIR + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +if(nanopb_BUILD_GENERATOR) + set(generator_protos nanopb) + + foreach(generator_proto IN LISTS generator_protos) + string(REGEX REPLACE "([^;]+)" "${PROJECT_SOURCE_DIR}/generator/proto/\\1.proto" generator_proto_file "${generator_proto}") + string(REGEX REPLACE "([^;]+)" "\\1_pb2.py" generator_proto_py_file "${generator_proto}") + add_custom_command( + OUTPUT ${generator_proto_py_file} + COMMAND ${nanopb_PROTOC_PATH} --python_out=${PROJECT_BINARY_DIR} -I${PROJECT_SOURCE_DIR}/generator/proto ${generator_proto_file} + DEPENDS ${generator_proto_file} + ) + add_custom_target("generate_${generator_proto_py_file}" ALL DEPENDS ${generator_proto_py_file}) + install( + FILES ${PROJECT_BINARY_DIR}/${generator_proto_py_file} + ${generator_proto_file} + DESTINATION ${PYTHON_INSTDIR}/proto/ + ) + endforeach() +endif() + +install(FILES generator/proto/_utils.py + DESTINATION ${PYTHON_INSTDIR}/proto/) + +if(WIN32) + install( + PROGRAMS + generator/nanopb_generator.py + generator/protoc-gen-nanopb.bat + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) +else() + install( + PROGRAMS + generator/nanopb_generator.py + generator/protoc-gen-nanopb + DESTINATION ${CMAKE_INSTALL_BINDIR} + ) +endif() + +if(nanopb_BUILD_RUNTIME) + if(BUILD_SHARED_LIBS) + add_library(protobuf-nanopb SHARED + pb.h + pb_common.h + pb_common.c + pb_encode.h + pb_encode.c + pb_decode.h + pb_decode.c) + set_target_properties(protobuf-nanopb PROPERTIES + SOVERSION ${nanopb_SOVERSION}) + install(TARGETS protobuf-nanopb EXPORT nanopb-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) + target_include_directories(protobuf-nanopb INTERFACE + $ + $ + ) + endif() + + if(BUILD_STATIC_LIBS) + add_library(protobuf-nanopb-static STATIC + pb.h + pb_common.h + pb_common.c + pb_encode.h + pb_encode.c + pb_decode.h + pb_decode.c) + set_target_properties(protobuf-nanopb-static PROPERTIES + OUTPUT_NAME protobuf-nanopb) + install(TARGETS protobuf-nanopb-static EXPORT nanopb-targets + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + target_include_directories(protobuf-nanopb-static INTERFACE + $ + $ + ) + endif() + + configure_file(extra/nanopb-config-version.cmake.in + nanopb-config-version.cmake @ONLY) + + install(EXPORT nanopb-targets + DESTINATION ${CMAKE_INSTALL_CMAKEDIR} + NAMESPACE nanopb::) + + install(FILES extra/nanopb-config.cmake + ${CMAKE_CURRENT_BINARY_DIR}/nanopb-config-version.cmake + DESTINATION ${CMAKE_INSTALL_CMAKEDIR}) + + install(FILES pb.h pb_common.h pb_encode.h pb_decode.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +endif() diff --git a/components/spotify/cspot/bell/nanopb/CONTRIBUTING.md b/components/spotify/cspot/bell/nanopb/CONTRIBUTING.md new file mode 100644 index 00000000..4041bc3c --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/CONTRIBUTING.md @@ -0,0 +1,32 @@ +Contributing to Nanopb development +================================== + +Reporting issues and requesting features +---------------------------------------- + +Feel free to report any issues you see or features you would like +to see in the future to the Github issue tracker. Using the templates +below is preferred: + +* [Report a bug](https://github.com/nanopb/nanopb/issues/new?body=**Steps%20to%20reproduce%20the%20issue**%0a%0a1.%0a2.%0a3.%0a%0a**What%20happens?**%0A%0A**What%20should%20happen?**&labels=Type-Defect) +* [Request a feature](https://github.com/nanopb/nanopb/issues/new?body=**What%20should%20the%20feature%20do?**%0A%0A**In%20what%20situation%20would%20the%20feature%20be%20useful?**&labels=Type-Enhancement) + +Requesting help +--------------- + +If there is something strange going on, but you do not know if +it is actually a bug in nanopb, try asking first on the +[discussion forum](https://groups.google.com/forum/#!forum/nanopb). + +Pull requests +------------- + +Pull requests are welcome! + +If it is not obvious from the commit message, please indicate the +same information as you would for an issue report: + +* What functionality it fixes/adds. +* How can the problem be reproduced / when would the feature be useful. + + diff --git a/components/spotify/cspot/bell/nanopb/LICENSE.txt b/components/spotify/cspot/bell/nanopb/LICENSE.txt new file mode 100644 index 00000000..d11c9af1 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/LICENSE.txt @@ -0,0 +1,20 @@ +Copyright (c) 2011 Petteri Aimonen + +This software is provided 'as-is', without any express or +implied warranty. In no event will the authors be held liable +for any damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you + must not claim that you wrote the original software. If you use + this software in a product, an acknowledgment in the product + documentation would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and + must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source + distribution. diff --git a/components/spotify/cspot/bell/nanopb/Package.swift b/components/spotify/cspot/bell/nanopb/Package.swift new file mode 100644 index 00000000..1c62f986 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/Package.swift @@ -0,0 +1,63 @@ +// swift-tools-version:5.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "nanopb", + products: [ + .library( + name: "nanopb", + targets: ["nanopb"] + ) + ], + + targets: [ + .target( + name: "nanopb", + path: ".", + sources: [ + "pb.h", + "pb_common.h", + "pb_common.c", + "pb_decode.h", + "pb_decode.c", + "pb_encode.h", + "pb_encode.c" + ], + publicHeadersPath: "spm_headers", + cSettings: [ + .define("PB_FIELD_32BIT", to: "1"), + .define("PB_NO_PACKED_STRUCTS", to: "1"), + .define("PB_ENABLE_MALLOC", to: "1"), + ] + ), + .testTarget( + name: "swift-test", + dependencies: [ + "nanopb", + ], + path: "spm-test/swift", + cSettings: [ + .headerSearchPath("../"), + .define("PB_FIELD_32BIT", to: "1"), + .define("PB_NO_PACKED_STRUCTS", to: "1"), + .define("PB_ENABLE_MALLOC", to: "1"), + ] + ), + .testTarget( + name: "objc-test", + dependencies: [ + "nanopb", + ], + path: "spm-test/objc", + cSettings: [ + .headerSearchPath("../"), + .define("PB_FIELD_32BIT", to: "1"), + .define("PB_NO_PACKED_STRUCTS", to: "1"), + .define("PB_ENABLE_MALLOC", to: "1"), + ] + ) + ] +) + diff --git a/components/spotify/cspot/bell/nanopb/README.md b/components/spotify/cspot/bell/nanopb/README.md new file mode 100644 index 00000000..44aa3e41 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/README.md @@ -0,0 +1,108 @@ +Nanopb - Protocol Buffers for Embedded Systems +============================================== + +[![Build Status](https://travis-ci.com/nanopb/nanopb.svg?branch=master)](https://travis-ci.com/nanopb/nanopb) + +Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is +especially suitable for use in microcontrollers, but fits any memory +restricted system. + +* **Homepage:** https://jpa.kapsi.fi/nanopb/ +* **Documentation:** https://jpa.kapsi.fi/nanopb/docs/ +* **Downloads:** https://jpa.kapsi.fi/nanopb/download/ +* **Forum:** https://groups.google.com/forum/#!forum/nanopb +* **Nightly builds:** https://jpa.kapsi.fi/jenkins/job/nanopb/ + + +Using the nanopb library +------------------------ +To use the nanopb library, you need to do two things: + +1. Compile your .proto files for nanopb, using `protoc`. +2. Include *pb_encode.c*, *pb_decode.c* and *pb_common.c* in your project. + +The easiest way to get started is to study the project in "examples/simple". +It contains a Makefile, which should work directly under most Linux systems. +However, for any other kind of build system, see the manual steps in +README.txt in that folder. + + +Generating the headers +---------------------- +Protocol Buffers messages are defined in a `.proto` file, which follows a standard +format that is compatible with all Protocol Buffers libraries. To use it with nanopb, +you need to generate `.pb.c` and `.pb.h` files from it: + + python generator/nanopb_generator.py myprotocol.proto # For source checkout + generator-bin/nanopb_generator myprotocol.proto # For binary package + +(Note: For instructions for nanopb-0.3.9.x and older, see the documentation +of that particular version [here](https://github.com/nanopb/nanopb/blob/maintenance_0.3/README.md)) + +The binary packages for Windows, Linux and Mac OS X should contain all necessary +dependencies, including Python, python-protobuf library and protoc. If you are +using a git checkout or a plain source distribution, you will need to install +Python separately. Once you have Python, you can install the other dependencies +with `pip install protobuf grpcio-tools`. + +You can further customize the header generation by creating an `.options` file. +See [documentation](https://jpa.kapsi.fi/nanopb/docs/concepts.html#modifying-generator-behaviour) for details. + + +Running the tests +----------------- +If you want to perform further development of the nanopb core, or to verify +its functionality using your compiler and platform, you'll want to run the +test suite. The build rules for the test suite are implemented using Scons, +so you need to have that installed (ex: `sudo apt install scons` or `pip install scons`). +To run the tests: + + cd tests + scons + +This will show the progress of various test cases. If the output does not +end in an error, the test cases were successful. + +Note: Mac OS X by default aliases 'clang' as 'gcc', while not actually +supporting the same command line options as gcc does. To run tests on +Mac OS X, use: `scons CC=clang CXX=clang`. Same way can be used to run +tests with different compilers on any platform. + +For embedded platforms, there is currently support for running the tests +on STM32 discovery board and [simavr](https://github.com/buserror/simavr) +AVR simulator. Use `scons PLATFORM=STM32` and `scons PLATFORM=AVR` to run +these tests. + + +Build systems and integration +----------------------------- +Nanopb C code itself is designed to be portable and easy to build +on any platform. Often the bigger hurdle is running the generator which +takes in the `.proto` files and outputs `.pb.c` definitions. + +There exist build rules for several systems: + +* **Makefiles**: `extra/nanopb.mk`, see `examples/simple` +* **CMake**: `extra/FindNanopb.cmake`, see `examples/cmake` +* **SCons**: `tests/site_scons` (generator only) +* **Bazel**: `BUILD` in source root +* **Conan**: `conanfile.py` in source root +* **PlatformIO**: https://platformio.org/lib/show/431/Nanopb +* **PyPI/pip**: https://pypi.org/project/nanopb/ + +And also integration to platform interfaces: + +* **Arduino**: http://platformio.org/lib/show/1385/nanopb-arduino + +Building nanopb - Using vcpkg +----------------------------- + +You can download and install nanopb using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager: + + git clone https://github.com/Microsoft/vcpkg.git + cd vcpkg + ./bootstrap-vcpkg.sh + ./vcpkg integrate install + ./vcpkg install nanopb + +The nanopb port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository. diff --git a/components/spotify/cspot/bell/nanopb/WORKSPACE b/components/spotify/cspot/bell/nanopb/WORKSPACE new file mode 100644 index 00000000..e23271b0 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/WORKSPACE @@ -0,0 +1 @@ +workspace(name = "com_github_nanopb_nanopb") diff --git a/components/spotify/cspot/bell/nanopb/build.py b/components/spotify/cspot/bell/nanopb/build.py new file mode 100644 index 00000000..8d420cbe --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/build.py @@ -0,0 +1,6 @@ +from conan.packager import ConanMultiPackager + +if __name__ == "__main__": + builder = ConanMultiPackager(build_policy="outdated") + builder.add_common_builds(shared_option_name=None) + builder.run() diff --git a/components/spotify/cspot/bell/nanopb/conan-wrapper/CMakeLists.txt b/components/spotify/cspot/bell/nanopb/conan-wrapper/CMakeLists.txt new file mode 100644 index 00000000..5f11fd9d --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/conan-wrapper/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8.12) +project(cmake_wrapper) + +include(${CMAKE_CURRENT_BINARY_DIR}/conanbuildinfo.cmake) +conan_basic_setup() + +add_subdirectory(".." "nanopb") diff --git a/components/spotify/cspot/bell/nanopb/conanfile.py b/components/spotify/cspot/bell/nanopb/conanfile.py new file mode 100644 index 00000000..be03ed4f --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/conanfile.py @@ -0,0 +1,33 @@ +from conans import ConanFile, CMake, tools +from os import path + +class NanoPbConan(ConanFile): + name = "nanopb" + version = "0.4.6-dev" + license = "zlib" + url = "https://jpa.kapsi.fi/nanopb/" + description = "Protocol Buffers with small code size" + settings = "os_build", "compiler", "build_type", "arch" + generators = "cmake" + exports = '*' + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + def configure(self): + if self.settings.os_build == "Windows" and self.settings.compiler == "Visual Studio": + del self.options.fPIC + + def build(self): + cmake = CMake(self) + cmake.configure(source_folder=path.join(self.source_folder, "conan-wrapper")) + cmake.build() + cmake.install() + + def package_info(self): + self.cpp_info.includedirs = ["include"] + self.cpp_info.libdirs = ["lib"] + self.cpp_info.libs = ["protobuf-nanopb"] diff --git a/components/spotify/cspot/bell/nanopb/docs/Makefile b/components/spotify/cspot/bell/nanopb/docs/Makefile new file mode 100644 index 00000000..697aa328 --- /dev/null +++ b/components/spotify/cspot/bell/nanopb/docs/Makefile @@ -0,0 +1,23 @@ +INPUTS = index.md concepts.md reference.md security.md migration.md whats_new.md + +all: $(INPUTS:.md=.html) + +tmp_menu.html: $(INPUTS) + echo '
' > $@ + (echo '

Documentation index

'; \ + for file in $^; do echo -n '1. ['; sed -n '1 s!^# Nanopb: !! p' $$file; \ + echo -n "]("; echo $$file | sed 's/.md/.html)/' ; done;) | \ + pandoc -f markdown -t html5 >> $@ + echo '
' >> $@ + +%.html: %.md tmp_menu.html + sed '1 s!#!%!' $< | \ + pandoc -s -f markdown -t html5 -c lsr.css --toc --toc-depth=4 \ + --variable 'header-includes=' \ + --indented-code-classes=c \ + -o $@ + sed -i '/