From 11d28d80ff0adb471c440a8f7d6c362d6f303006 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Wed, 31 Jan 2018 14:12:07 -0500 Subject: Add instructions for building nanopb protos Currently only supported on osx --- Firestore/Protos/README.md | 10 ++++++++++ Firestore/Protos/build-protos.sh | 12 +++++++++++- Firestore/Protos/protos/google/api/http.options | 1 + .../Protos/protos/google/firestore/v1beta1/document.options | 1 + .../Protos/protos/google/firestore/v1beta1/firestore.options | 6 ++++++ .../Protos/protos/google/firestore/v1beta1/write.options | 1 + Firestore/Protos/protos/google/protobuf/struct.options | 1 + 7 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 Firestore/Protos/protos/google/api/http.options create mode 100644 Firestore/Protos/protos/google/firestore/v1beta1/document.options create mode 100644 Firestore/Protos/protos/google/firestore/v1beta1/firestore.options create mode 100644 Firestore/Protos/protos/google/firestore/v1beta1/write.options create mode 100644 Firestore/Protos/protos/google/protobuf/struct.options (limited to 'Firestore') diff --git a/Firestore/Protos/README.md b/Firestore/Protos/README.md index cb6d90e..6137ff6 100644 --- a/Firestore/Protos/README.md +++ b/Firestore/Protos/README.md @@ -1,5 +1,15 @@ ## Usage +First, build protobuf and nanopb +``` +cd firebase-ios-sdk +mkdir -p build +cd build +cmake .. +make -j protobuf nanopb +``` + +Next, build the protos: ``` cd firebase-ios-sdk/Firestore/Protos ./build-protos.sh diff --git a/Firestore/Protos/build-protos.sh b/Firestore/Protos/build-protos.sh index 4cfb12e..5c3aa53 100755 --- a/Firestore/Protos/build-protos.sh +++ b/Firestore/Protos/build-protos.sh @@ -20,7 +20,17 @@ rm Podfile.lock pod update # Generate the objective C files from the protos. -./Pods/!ProtoCompiler/protoc --plugin=protoc-gen-grpc=Pods/\!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin -I protos --objc_out=objc --grpc_out=objc `find protos -name *.proto -print | xargs` +./Pods/!ProtoCompiler/protoc \ + --plugin=protoc-gen-grpc=Pods/\!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin \ + --plugin=../../build/external/nanopb/src/nanopb-build/generator/protoc-gen-nanopb \ + -I protos --objc_out=objc --grpc_out=objc \ + --nanopb_out="--options-file=protos/%s.options:nanopb" \ + `find protos -name *.proto -print | xargs` + +# If a proto uses a field named 'delete', nanopb happily uses that in the +# message definition. Works fine for C; not so much for C++. Rename uses of this +# to delete_ (which is how protoc does it for c++ files.) +perl -i -pe 's/\bdelete\b/delete_/g' `find nanopb -type f` # CocoaPods does not like paths in library imports, flatten them. diff --git a/Firestore/Protos/protos/google/api/http.options b/Firestore/Protos/protos/google/api/http.options new file mode 100644 index 0000000..6ddde53 --- /dev/null +++ b/Firestore/Protos/protos/google/api/http.options @@ -0,0 +1 @@ +google.api.HttpRule.pattern no_unions:true diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/document.options b/Firestore/Protos/protos/google/firestore/v1beta1/document.options new file mode 100644 index 0000000..e671c43 --- /dev/null +++ b/Firestore/Protos/protos/google/firestore/v1beta1/document.options @@ -0,0 +1 @@ +google.firestore.v1beta1.Value.value_type no_unions:true diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/firestore.options b/Firestore/Protos/protos/google/firestore/v1beta1/firestore.options new file mode 100644 index 0000000..71a05d4 --- /dev/null +++ b/Firestore/Protos/protos/google/firestore/v1beta1/firestore.options @@ -0,0 +1,6 @@ +google.firestore.v1beta1.GetDocumentRequest.consistency_selector no_unions:true +google.firestore.v1beta1.ListDocumentsRequest.consistency_selector no_unions:true +google.firestore.v1beta1.RunQueryRequest.consistency_selector no_unions:true +google.firestore.v1beta1.BatchGetDocumentsRequest.consistency_selector no_unions:true +google.firestore.v1beta1.BatchGetDocumentsResponse.result no_unions:true +google.firestore.v1beta1.Target.resume_type no_unions:true diff --git a/Firestore/Protos/protos/google/firestore/v1beta1/write.options b/Firestore/Protos/protos/google/firestore/v1beta1/write.options new file mode 100644 index 0000000..41c6a34 --- /dev/null +++ b/Firestore/Protos/protos/google/firestore/v1beta1/write.options @@ -0,0 +1 @@ +google.firestore.v1beta1.Write.operation no_unions:true diff --git a/Firestore/Protos/protos/google/protobuf/struct.options b/Firestore/Protos/protos/google/protobuf/struct.options new file mode 100644 index 0000000..56fa2d0 --- /dev/null +++ b/Firestore/Protos/protos/google/protobuf/struct.options @@ -0,0 +1 @@ +google.protobuf.Value.kind no_unions:true -- cgit v1.2.3 From 78e16f52a57822dc0b37ae18ca187b7952098400 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Wed, 31 Jan 2018 14:46:37 -0500 Subject: Add generated nanopb protos. 100% machine generated (except adding of the license). --- .../nanopb/firestore/local/maybe_document.pb.c | 66 +++ .../nanopb/firestore/local/maybe_document.pb.h | 88 ++++ .../Protos/nanopb/firestore/local/mutation.pb.c | 67 +++ .../Protos/nanopb/firestore/local/mutation.pb.h | 87 ++++ .../Protos/nanopb/firestore/local/target.pb.c | 71 +++ .../Protos/nanopb/firestore/local/target.pb.h | 98 ++++ .../Protos/nanopb/google/api/annotations.pb.c | 31 ++ .../Protos/nanopb/google/api/annotations.pb.h | 44 ++ Firestore/Protos/nanopb/google/api/http.pb.c | 78 ++++ Firestore/Protos/nanopb/google/api/http.pb.h | 105 +++++ .../nanopb/google/firestore/v1beta1/common.pb.c | 81 ++++ .../nanopb/google/firestore/v1beta1/common.pb.h | 124 +++++ .../nanopb/google/firestore/v1beta1/document.pb.c | 105 +++++ .../nanopb/google/firestore/v1beta1/document.pb.h | 155 +++++++ .../nanopb/google/firestore/v1beta1/firestore.pb.c | 259 +++++++++++ .../nanopb/google/firestore/v1beta1/firestore.pb.h | 508 +++++++++++++++++++++ .../nanopb/google/firestore/v1beta1/query.pb.c | 124 +++++ .../nanopb/google/firestore/v1beta1/query.pb.h | 240 ++++++++++ .../nanopb/google/firestore/v1beta1/write.pb.c | 110 +++++ .../nanopb/google/firestore/v1beta1/write.pb.h | 187 ++++++++ Firestore/Protos/nanopb/google/rpc/status.pb.c | 37 ++ Firestore/Protos/nanopb/google/rpc/status.pb.h | 73 +++ Firestore/Protos/nanopb/google/type/latlng.pb.c | 42 ++ Firestore/Protos/nanopb/google/type/latlng.pb.h | 69 +++ 24 files changed, 2849 insertions(+) create mode 100644 Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c create mode 100644 Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h create mode 100644 Firestore/Protos/nanopb/firestore/local/mutation.pb.c create mode 100644 Firestore/Protos/nanopb/firestore/local/mutation.pb.h create mode 100644 Firestore/Protos/nanopb/firestore/local/target.pb.c create mode 100644 Firestore/Protos/nanopb/firestore/local/target.pb.h create mode 100644 Firestore/Protos/nanopb/google/api/annotations.pb.c create mode 100644 Firestore/Protos/nanopb/google/api/annotations.pb.h create mode 100644 Firestore/Protos/nanopb/google/api/http.pb.c create mode 100644 Firestore/Protos/nanopb/google/api/http.pb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c create mode 100644 Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h create mode 100644 Firestore/Protos/nanopb/google/rpc/status.pb.c create mode 100644 Firestore/Protos/nanopb/google/rpc/status.pb.h create mode 100644 Firestore/Protos/nanopb/google/type/latlng.pb.c create mode 100644 Firestore/Protos/nanopb/google/type/latlng.pb.h (limited to 'Firestore') diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c new file mode 100644 index 0000000..45bc2f0 --- /dev/null +++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c @@ -0,0 +1,66 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "maybe_document.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t firestore_client_NoDocument_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, firestore_client_NoDocument, name, name, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_NoDocument, read_time, name, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t firestore_client_MaybeDocument_fields[3] = { + PB_ONEOF_FIELD(document_type, 1, MESSAGE , ONEOF, STATIC , FIRST, firestore_client_MaybeDocument, no_document, no_document, &firestore_client_NoDocument_fields), + PB_ONEOF_FIELD(document_type, 2, MESSAGE , ONEOF, STATIC , UNION, firestore_client_MaybeDocument, document, document, &google_firestore_v1beta1_Document_fields), + PB_LAST_FIELD +}; + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(firestore_client_NoDocument, read_time) < 65536 && pb_membersize(firestore_client_MaybeDocument, document_type.no_document) < 65536 && pb_membersize(firestore_client_MaybeDocument, document_type.document) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_firestore_client_NoDocument_firestore_client_MaybeDocument) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(firestore_client_NoDocument, read_time) < 256 && pb_membersize(firestore_client_MaybeDocument, document_type.no_document) < 256 && pb_membersize(firestore_client_MaybeDocument, document_type.document) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_firestore_client_NoDocument_firestore_client_MaybeDocument) +#endif + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h new file mode 100644 index 0000000..8c2f8bd --- /dev/null +++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h @@ -0,0 +1,88 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_PB_H_INCLUDED +#define PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_PB_H_INCLUDED +#include + +#include "google/firestore/v1beta1/document.pb.h" + +#include "google/protobuf/timestamp.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _firestore_client_NoDocument { + pb_callback_t name; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:firestore_client_NoDocument) */ +} firestore_client_NoDocument; + +typedef struct _firestore_client_MaybeDocument { + pb_size_t which_document_type; + union { + firestore_client_NoDocument no_document; + google_firestore_v1beta1_Document document; + } document_type; +/* @@protoc_insertion_point(struct:firestore_client_MaybeDocument) */ +} firestore_client_MaybeDocument; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define firestore_client_NoDocument_init_default {{{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define firestore_client_MaybeDocument_init_default {0, {firestore_client_NoDocument_init_default}} +#define firestore_client_NoDocument_init_zero {{{NULL}, NULL}, google_protobuf_Timestamp_init_zero} +#define firestore_client_MaybeDocument_init_zero {0, {firestore_client_NoDocument_init_zero}} + +/* Field tags (for use in manual encoding/decoding) */ +#define firestore_client_NoDocument_name_tag 1 +#define firestore_client_NoDocument_read_time_tag 2 +#define firestore_client_MaybeDocument_no_document_tag 1 +#define firestore_client_MaybeDocument_document_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t firestore_client_NoDocument_fields[3]; +extern const pb_field_t firestore_client_MaybeDocument_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* firestore_client_NoDocument_size depends on runtime parameters */ +/* firestore_client_MaybeDocument_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define MAYBE_DOCUMENT_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.pb.c b/Firestore/Protos/nanopb/firestore/local/mutation.pb.c new file mode 100644 index 0000000..39dfd77 --- /dev/null +++ b/Firestore/Protos/nanopb/firestore/local/mutation.pb.c @@ -0,0 +1,67 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "mutation.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t firestore_client_MutationQueue_fields[3] = { + PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_MutationQueue, last_acknowledged_batch_id, last_acknowledged_batch_id, 0), + PB_FIELD( 2, BYTES , SINGULAR, CALLBACK, OTHER, firestore_client_MutationQueue, last_stream_token, last_acknowledged_batch_id, 0), + PB_LAST_FIELD +}; + +const pb_field_t firestore_client_WriteBatch_fields[4] = { + PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_WriteBatch, batch_id, batch_id, 0), + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, firestore_client_WriteBatch, writes, batch_id, &google_firestore_v1beta1_Write_fields), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_WriteBatch, local_write_time, writes, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(firestore_client_WriteBatch, local_write_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_firestore_client_MutationQueue_firestore_client_WriteBatch) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(firestore_client_WriteBatch, local_write_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_firestore_client_MutationQueue_firestore_client_WriteBatch) +#endif + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.pb.h b/Firestore/Protos/nanopb/firestore/local/mutation.pb.h new file mode 100644 index 0000000..28b8e54 --- /dev/null +++ b/Firestore/Protos/nanopb/firestore/local/mutation.pb.h @@ -0,0 +1,87 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_FIRESTORE_CLIENT_MUTATION_PB_H_INCLUDED +#define PB_FIRESTORE_CLIENT_MUTATION_PB_H_INCLUDED +#include + +#include "google/firestore/v1beta1/write.pb.h" + +#include "google/protobuf/timestamp.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _firestore_client_MutationQueue { + int32_t last_acknowledged_batch_id; + pb_callback_t last_stream_token; +/* @@protoc_insertion_point(struct:firestore_client_MutationQueue) */ +} firestore_client_MutationQueue; + +typedef struct _firestore_client_WriteBatch { + int32_t batch_id; + pb_callback_t writes; + google_protobuf_Timestamp local_write_time; +/* @@protoc_insertion_point(struct:firestore_client_WriteBatch) */ +} firestore_client_WriteBatch; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define firestore_client_MutationQueue_init_default {0, {{NULL}, NULL}} +#define firestore_client_WriteBatch_init_default {0, {{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define firestore_client_MutationQueue_init_zero {0, {{NULL}, NULL}} +#define firestore_client_WriteBatch_init_zero {0, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} + +/* Field tags (for use in manual encoding/decoding) */ +#define firestore_client_MutationQueue_last_acknowledged_batch_id_tag 1 +#define firestore_client_MutationQueue_last_stream_token_tag 2 +#define firestore_client_WriteBatch_batch_id_tag 1 +#define firestore_client_WriteBatch_writes_tag 2 +#define firestore_client_WriteBatch_local_write_time_tag 3 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t firestore_client_MutationQueue_fields[3]; +extern const pb_field_t firestore_client_WriteBatch_fields[4]; + +/* Maximum encoded size of messages (where known) */ +/* firestore_client_MutationQueue_size depends on runtime parameters */ +/* firestore_client_WriteBatch_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define MUTATION_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/firestore/local/target.pb.c b/Firestore/Protos/nanopb/firestore/local/target.pb.c new file mode 100644 index 0000000..269eb04 --- /dev/null +++ b/Firestore/Protos/nanopb/firestore/local/target.pb.c @@ -0,0 +1,71 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "target.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t firestore_client_Target_fields[7] = { + PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_Target, target_id, target_id, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_Target, snapshot_version, target_id, &google_protobuf_Timestamp_fields), + PB_FIELD( 3, BYTES , SINGULAR, CALLBACK, OTHER, firestore_client_Target, resume_token, snapshot_version, 0), + PB_FIELD( 4, INT64 , SINGULAR, STATIC , OTHER, firestore_client_Target, last_listen_sequence_number, resume_token, 0), + PB_ONEOF_FIELD(target_type, 5, MESSAGE , ONEOF, STATIC , OTHER, firestore_client_Target, query, last_listen_sequence_number, &google_firestore_v1beta1_Target_QueryTarget_fields), + PB_ONEOF_FIELD(target_type, 6, MESSAGE , ONEOF, STATIC , UNION, firestore_client_Target, documents, last_listen_sequence_number, &google_firestore_v1beta1_Target_DocumentsTarget_fields), + PB_LAST_FIELD +}; + +const pb_field_t firestore_client_TargetGlobal_fields[4] = { + PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, firestore_client_TargetGlobal, highest_target_id, highest_target_id, 0), + PB_FIELD( 2, INT64 , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, highest_listen_sequence_number, highest_target_id, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, last_remote_snapshot_version, highest_listen_sequence_number, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(firestore_client_Target, target_type.query) < 65536 && pb_membersize(firestore_client_Target, target_type.documents) < 65536 && pb_membersize(firestore_client_Target, snapshot_version) < 65536 && pb_membersize(firestore_client_TargetGlobal, last_remote_snapshot_version) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_firestore_client_Target_firestore_client_TargetGlobal) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(firestore_client_Target, target_type.query) < 256 && pb_membersize(firestore_client_Target, target_type.documents) < 256 && pb_membersize(firestore_client_Target, snapshot_version) < 256 && pb_membersize(firestore_client_TargetGlobal, last_remote_snapshot_version) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_firestore_client_Target_firestore_client_TargetGlobal) +#endif + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/firestore/local/target.pb.h b/Firestore/Protos/nanopb/firestore/local/target.pb.h new file mode 100644 index 0000000..01b0fdc --- /dev/null +++ b/Firestore/Protos/nanopb/firestore/local/target.pb.h @@ -0,0 +1,98 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED +#define PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED +#include + +#include "google/firestore/v1beta1/firestore.pb.h" + +#include "google/protobuf/timestamp.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _firestore_client_Target { + int32_t target_id; + google_protobuf_Timestamp snapshot_version; + pb_callback_t resume_token; + int64_t last_listen_sequence_number; + pb_size_t which_target_type; + union { + google_firestore_v1beta1_Target_QueryTarget query; + google_firestore_v1beta1_Target_DocumentsTarget documents; + } target_type; +/* @@protoc_insertion_point(struct:firestore_client_Target) */ +} firestore_client_Target; + +typedef struct _firestore_client_TargetGlobal { + int32_t highest_target_id; + int64_t highest_listen_sequence_number; + google_protobuf_Timestamp last_remote_snapshot_version; +/* @@protoc_insertion_point(struct:firestore_client_TargetGlobal) */ +} firestore_client_TargetGlobal; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define firestore_client_Target_init_default {0, google_protobuf_Timestamp_init_default, {{NULL}, NULL}, 0, 0, {google_firestore_v1beta1_Target_QueryTarget_init_default}} +#define firestore_client_TargetGlobal_init_default {0, 0, google_protobuf_Timestamp_init_default} +#define firestore_client_Target_init_zero {0, google_protobuf_Timestamp_init_zero, {{NULL}, NULL}, 0, 0, {google_firestore_v1beta1_Target_QueryTarget_init_zero}} +#define firestore_client_TargetGlobal_init_zero {0, 0, google_protobuf_Timestamp_init_zero} + +/* Field tags (for use in manual encoding/decoding) */ +#define firestore_client_Target_query_tag 5 +#define firestore_client_Target_documents_tag 6 +#define firestore_client_Target_target_id_tag 1 +#define firestore_client_Target_snapshot_version_tag 2 +#define firestore_client_Target_resume_token_tag 3 +#define firestore_client_Target_last_listen_sequence_number_tag 4 +#define firestore_client_TargetGlobal_highest_target_id_tag 1 +#define firestore_client_TargetGlobal_highest_listen_sequence_number_tag 2 +#define firestore_client_TargetGlobal_last_remote_snapshot_version_tag 3 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t firestore_client_Target_fields[7]; +extern const pb_field_t firestore_client_TargetGlobal_fields[4]; + +/* Maximum encoded size of messages (where known) */ +/* firestore_client_Target_size depends on runtime parameters */ +#define firestore_client_TargetGlobal_size 46 + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define TARGET_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/api/annotations.pb.c b/Firestore/Protos/nanopb/google/api/annotations.pb.c new file mode 100644 index 0000000..f26aa49 --- /dev/null +++ b/Firestore/Protos/nanopb/google/api/annotations.pb.c @@ -0,0 +1,31 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "annotations.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/api/annotations.pb.h b/Firestore/Protos/nanopb/google/api/annotations.pb.h new file mode 100644 index 0000000..656d293 --- /dev/null +++ b/Firestore/Protos/nanopb/google/api/annotations.pb.h @@ -0,0 +1,44 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_API_ANNOTATIONS_PB_H_INCLUDED +#define PB_GOOGLE_API_ANNOTATIONS_PB_H_INCLUDED +#include + +#include "google/api/http.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Extensions */ +/* Extension field google_api_http was skipped because only "optional" + type of extension fields is currently supported. */ + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/api/http.pb.c b/Firestore/Protos/nanopb/google/api/http.pb.c new file mode 100644 index 0000000..d2c39aa --- /dev/null +++ b/Firestore/Protos/nanopb/google/api/http.pb.c @@ -0,0 +1,78 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "http.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_api_Http_fields[2] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_api_Http, rules, rules, &google_api_HttpRule_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_api_HttpRule_fields[10] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_api_HttpRule, selector, selector, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_api_HttpRule, get, selector, 0), + PB_FIELD( 3, STRING , SINGULAR, CALLBACK, OTHER, google_api_HttpRule, put, get, 0), + PB_FIELD( 4, STRING , SINGULAR, CALLBACK, OTHER, google_api_HttpRule, post, put, 0), + PB_FIELD( 5, STRING , SINGULAR, CALLBACK, OTHER, google_api_HttpRule, delete_, post, 0), + PB_FIELD( 6, STRING , SINGULAR, CALLBACK, OTHER, google_api_HttpRule, patch, delete_, 0), + PB_FIELD( 7, STRING , SINGULAR, CALLBACK, OTHER, google_api_HttpRule, body, patch, 0), + PB_FIELD( 8, MESSAGE , SINGULAR, STATIC , OTHER, google_api_HttpRule, custom, body, &google_api_CustomHttpPattern_fields), + PB_FIELD( 11, MESSAGE , REPEATED, CALLBACK, OTHER, google_api_HttpRule, additional_bindings, custom, &google_api_HttpRule_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_api_CustomHttpPattern_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_api_CustomHttpPattern, kind, kind, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_api_CustomHttpPattern, path, kind, 0), + PB_LAST_FIELD +}; + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_api_HttpRule, custom) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_api_Http_google_api_HttpRule_google_api_CustomHttpPattern) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_api_HttpRule, custom) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_api_Http_google_api_HttpRule_google_api_CustomHttpPattern) +#endif + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/api/http.pb.h b/Firestore/Protos/nanopb/google/api/http.pb.h new file mode 100644 index 0000000..e41343f --- /dev/null +++ b/Firestore/Protos/nanopb/google/api/http.pb.h @@ -0,0 +1,105 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_API_HTTP_PB_H_INCLUDED +#define PB_GOOGLE_API_HTTP_PB_H_INCLUDED +#include + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _google_api_CustomHttpPattern { + pb_callback_t kind; + pb_callback_t path; +/* @@protoc_insertion_point(struct:google_api_CustomHttpPattern) */ +} google_api_CustomHttpPattern; + +typedef struct _google_api_Http { + pb_callback_t rules; +/* @@protoc_insertion_point(struct:google_api_Http) */ +} google_api_Http; + +typedef struct _google_api_HttpRule { + pb_callback_t selector; + pb_callback_t get; + pb_callback_t put; + pb_callback_t post; + pb_callback_t delete_; + pb_callback_t patch; + pb_callback_t body; + google_api_CustomHttpPattern custom; + pb_callback_t additional_bindings; +/* @@protoc_insertion_point(struct:google_api_HttpRule) */ +} google_api_HttpRule; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_api_Http_init_default {{{NULL}, NULL}} +#define google_api_HttpRule_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, google_api_CustomHttpPattern_init_default, {{NULL}, NULL}} +#define google_api_CustomHttpPattern_init_default {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_api_Http_init_zero {{{NULL}, NULL}} +#define google_api_HttpRule_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, google_api_CustomHttpPattern_init_zero, {{NULL}, NULL}} +#define google_api_CustomHttpPattern_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_api_CustomHttpPattern_kind_tag 1 +#define google_api_CustomHttpPattern_path_tag 2 +#define google_api_Http_rules_tag 1 +#define google_api_HttpRule_selector_tag 1 +#define google_api_HttpRule_get_tag 2 +#define google_api_HttpRule_put_tag 3 +#define google_api_HttpRule_post_tag 4 +#define google_api_HttpRule_delete_tag 5 +#define google_api_HttpRule_patch_tag 6 +#define google_api_HttpRule_custom_tag 8 +#define google_api_HttpRule_body_tag 7 +#define google_api_HttpRule_additional_bindings_tag 11 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_api_Http_fields[2]; +extern const pb_field_t google_api_HttpRule_fields[10]; +extern const pb_field_t google_api_CustomHttpPattern_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_api_Http_size depends on runtime parameters */ +/* google_api_HttpRule_size depends on runtime parameters */ +/* google_api_CustomHttpPattern_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define HTTP_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c new file mode 100644 index 0000000..6b93f2a --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c @@ -0,0 +1,81 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "common.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1beta1_DocumentMask_fields[2] = { + PB_FIELD( 1, STRING , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_DocumentMask, field_paths, field_paths, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_Precondition_fields[3] = { + PB_ONEOF_FIELD(condition_type, 1, BOOL , ONEOF, STATIC , FIRST, google_firestore_v1beta1_Precondition, exists, exists, 0), + PB_ONEOF_FIELD(condition_type, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Precondition, update_time, update_time, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_TransactionOptions_fields[3] = { + PB_ONEOF_FIELD(mode, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_TransactionOptions, read_only, read_only, &google_firestore_v1beta1_TransactionOptions_ReadOnly_fields), + PB_ONEOF_FIELD(mode, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_TransactionOptions, read_write, read_write, &google_firestore_v1beta1_TransactionOptions_ReadWrite_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadWrite_fields[2] = { + PB_FIELD( 1, BYTES , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_TransactionOptions_ReadWrite, retry_transaction, retry_transaction, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadOnly_fields[2] = { + PB_ONEOF_FIELD(consistency_selector, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_TransactionOptions_ReadOnly, read_time, read_time, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Precondition, condition_type.update_time) < 65536 && pb_membersize(google_firestore_v1beta1_TransactionOptions, mode.read_only) < 65536 && pb_membersize(google_firestore_v1beta1_TransactionOptions, mode.read_write) < 65536 && pb_membersize(google_firestore_v1beta1_TransactionOptions_ReadOnly, consistency_selector.read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_DocumentMask_google_firestore_v1beta1_Precondition_google_firestore_v1beta1_TransactionOptions_google_firestore_v1beta1_TransactionOptions_ReadWrite_google_firestore_v1beta1_TransactionOptions_ReadOnly) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Precondition, condition_type.update_time) < 256 && pb_membersize(google_firestore_v1beta1_TransactionOptions, mode.read_only) < 256 && pb_membersize(google_firestore_v1beta1_TransactionOptions, mode.read_write) < 256 && pb_membersize(google_firestore_v1beta1_TransactionOptions_ReadOnly, consistency_selector.read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_DocumentMask_google_firestore_v1beta1_Precondition_google_firestore_v1beta1_TransactionOptions_google_firestore_v1beta1_TransactionOptions_ReadWrite_google_firestore_v1beta1_TransactionOptions_ReadOnly) +#endif + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h new file mode 100644 index 0000000..6f61794 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h @@ -0,0 +1,124 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_COMMON_PB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1BETA1_COMMON_PB_H_INCLUDED +#include + +#include "google/api/annotations.pb.h" + +#include "google/protobuf/timestamp.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _google_firestore_v1beta1_DocumentMask { + pb_callback_t field_paths; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentMask) */ +} google_firestore_v1beta1_DocumentMask; + +typedef struct _google_firestore_v1beta1_TransactionOptions_ReadWrite { + pb_callback_t retry_transaction; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_TransactionOptions_ReadWrite) */ +} google_firestore_v1beta1_TransactionOptions_ReadWrite; + +typedef struct _google_firestore_v1beta1_Precondition { + pb_size_t which_condition_type; + union { + bool exists; + google_protobuf_Timestamp update_time; + } condition_type; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Precondition) */ +} google_firestore_v1beta1_Precondition; + +typedef struct _google_firestore_v1beta1_TransactionOptions_ReadOnly { + pb_size_t which_consistency_selector; + union { + google_protobuf_Timestamp read_time; + } consistency_selector; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_TransactionOptions_ReadOnly) */ +} google_firestore_v1beta1_TransactionOptions_ReadOnly; + +typedef struct _google_firestore_v1beta1_TransactionOptions { + pb_size_t which_mode; + union { + google_firestore_v1beta1_TransactionOptions_ReadOnly read_only; + google_firestore_v1beta1_TransactionOptions_ReadWrite read_write; + } mode; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_TransactionOptions) */ +} google_firestore_v1beta1_TransactionOptions; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1beta1_DocumentMask_init_default {{{NULL}, NULL}} +#define google_firestore_v1beta1_Precondition_init_default {0, {0}} +#define google_firestore_v1beta1_TransactionOptions_init_default {0, {google_firestore_v1beta1_TransactionOptions_ReadOnly_init_default}} +#define google_firestore_v1beta1_TransactionOptions_ReadWrite_init_default {{{NULL}, NULL}} +#define google_firestore_v1beta1_TransactionOptions_ReadOnly_init_default {0, {google_protobuf_Timestamp_init_default}} +#define google_firestore_v1beta1_DocumentMask_init_zero {{{NULL}, NULL}} +#define google_firestore_v1beta1_Precondition_init_zero {0, {0}} +#define google_firestore_v1beta1_TransactionOptions_init_zero {0, {google_firestore_v1beta1_TransactionOptions_ReadOnly_init_zero}} +#define google_firestore_v1beta1_TransactionOptions_ReadWrite_init_zero {{{NULL}, NULL}} +#define google_firestore_v1beta1_TransactionOptions_ReadOnly_init_zero {0, {google_protobuf_Timestamp_init_zero}} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1beta1_DocumentMask_field_paths_tag 1 +#define google_firestore_v1beta1_TransactionOptions_ReadWrite_retry_transaction_tag 1 +#define google_firestore_v1beta1_Precondition_exists_tag 1 +#define google_firestore_v1beta1_Precondition_update_time_tag 2 +#define google_firestore_v1beta1_TransactionOptions_ReadOnly_read_time_tag 2 +#define google_firestore_v1beta1_TransactionOptions_read_only_tag 2 +#define google_firestore_v1beta1_TransactionOptions_read_write_tag 3 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1beta1_DocumentMask_fields[2]; +extern const pb_field_t google_firestore_v1beta1_Precondition_fields[3]; +extern const pb_field_t google_firestore_v1beta1_TransactionOptions_fields[3]; +extern const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadWrite_fields[2]; +extern const pb_field_t google_firestore_v1beta1_TransactionOptions_ReadOnly_fields[2]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1beta1_DocumentMask_size depends on runtime parameters */ +#define google_firestore_v1beta1_Precondition_size 24 +/* google_firestore_v1beta1_TransactionOptions_size depends on runtime parameters */ +/* google_firestore_v1beta1_TransactionOptions_ReadWrite_size depends on runtime parameters */ +#define google_firestore_v1beta1_TransactionOptions_ReadOnly_size 24 + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define COMMON_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c new file mode 100644 index 0000000..a35a713 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c @@ -0,0 +1,105 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "document.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1beta1_Document_fields[5] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_Document, name, name, 0), + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_Document, fields, name, &google_firestore_v1beta1_Document_FieldsEntry_fields), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Document, create_time, fields, &google_protobuf_Timestamp_fields), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Document, update_time, create_time, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_Document_FieldsEntry_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_Document_FieldsEntry, key, key, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Document_FieldsEntry, value, key, &google_firestore_v1beta1_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_Value_fields[12] = { + PB_FIELD( 1, BOOL , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_Value, boolean_value, boolean_value, 0), + PB_FIELD( 2, INT64 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Value, integer_value, boolean_value, 0), + PB_FIELD( 3, DOUBLE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Value, double_value, integer_value, 0), + PB_FIELD( 5, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_Value, reference_value, double_value, 0), + PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Value, map_value, reference_value, &google_firestore_v1beta1_MapValue_fields), + PB_FIELD( 8, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Value, geo_point_value, map_value, &google_type_LatLng_fields), + PB_FIELD( 9, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Value, array_value, geo_point_value, &google_firestore_v1beta1_ArrayValue_fields), + PB_FIELD( 10, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Value, timestamp_value, array_value, &google_protobuf_Timestamp_fields), + PB_FIELD( 11, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Value, null_value, timestamp_value, 0), + PB_FIELD( 17, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_Value, string_value, null_value, 0), + PB_FIELD( 18, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_Value, bytes_value, string_value, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ArrayValue_fields[2] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_ArrayValue, values, values, &google_firestore_v1beta1_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_MapValue_fields[2] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_MapValue, fields, fields, &google_firestore_v1beta1_MapValue_FieldsEntry_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_MapValue_FieldsEntry_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_MapValue_FieldsEntry, key, key, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_MapValue_FieldsEntry, value, key, &google_firestore_v1beta1_Value_fields), + PB_LAST_FIELD +}; + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Document, create_time) < 65536 && pb_membersize(google_firestore_v1beta1_Document, update_time) < 65536 && pb_membersize(google_firestore_v1beta1_Document_FieldsEntry, value) < 65536 && pb_membersize(google_firestore_v1beta1_Value, timestamp_value) < 65536 && pb_membersize(google_firestore_v1beta1_Value, geo_point_value) < 65536 && pb_membersize(google_firestore_v1beta1_Value, array_value) < 65536 && pb_membersize(google_firestore_v1beta1_Value, map_value) < 65536 && pb_membersize(google_firestore_v1beta1_MapValue_FieldsEntry, value) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_Document_google_firestore_v1beta1_Document_FieldsEntry_google_firestore_v1beta1_Value_google_firestore_v1beta1_ArrayValue_google_firestore_v1beta1_MapValue_google_firestore_v1beta1_MapValue_FieldsEntry) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Document, create_time) < 256 && pb_membersize(google_firestore_v1beta1_Document, update_time) < 256 && pb_membersize(google_firestore_v1beta1_Document_FieldsEntry, value) < 256 && pb_membersize(google_firestore_v1beta1_Value, timestamp_value) < 256 && pb_membersize(google_firestore_v1beta1_Value, geo_point_value) < 256 && pb_membersize(google_firestore_v1beta1_Value, array_value) < 256 && pb_membersize(google_firestore_v1beta1_Value, map_value) < 256 && pb_membersize(google_firestore_v1beta1_MapValue_FieldsEntry, value) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_Document_google_firestore_v1beta1_Document_FieldsEntry_google_firestore_v1beta1_Value_google_firestore_v1beta1_ArrayValue_google_firestore_v1beta1_MapValue_google_firestore_v1beta1_MapValue_FieldsEntry) +#endif + + +/* On some platforms (such as AVR), double is really float. + * These are not directly supported by nanopb, but see example_avr_double. + * To get rid of this error, remove any double fields from your .proto. + */ +PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h new file mode 100644 index 0000000..c9b36e2 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h @@ -0,0 +1,155 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_DOCUMENT_PB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1BETA1_DOCUMENT_PB_H_INCLUDED +#include + +#include "google/api/annotations.pb.h" + +#include "google/protobuf/struct.pb.h" + +#include "google/protobuf/timestamp.pb.h" + +#include "google/type/latlng.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _google_firestore_v1beta1_ArrayValue { + pb_callback_t values; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ArrayValue) */ +} google_firestore_v1beta1_ArrayValue; + +typedef struct _google_firestore_v1beta1_MapValue { + pb_callback_t fields; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_MapValue) */ +} google_firestore_v1beta1_MapValue; + +typedef struct _google_firestore_v1beta1_Document { + pb_callback_t name; + pb_callback_t fields; + google_protobuf_Timestamp create_time; + google_protobuf_Timestamp update_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Document) */ +} google_firestore_v1beta1_Document; + +typedef struct _google_firestore_v1beta1_Value { + bool boolean_value; + int64_t integer_value; + double double_value; + pb_callback_t reference_value; + google_firestore_v1beta1_MapValue map_value; + google_type_LatLng geo_point_value; + google_firestore_v1beta1_ArrayValue array_value; + google_protobuf_Timestamp timestamp_value; + google_protobuf_NullValue null_value; + pb_callback_t string_value; + pb_callback_t bytes_value; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Value) */ +} google_firestore_v1beta1_Value; + +typedef struct _google_firestore_v1beta1_Document_FieldsEntry { + pb_callback_t key; + google_firestore_v1beta1_Value value; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Document_FieldsEntry) */ +} google_firestore_v1beta1_Document_FieldsEntry; + +typedef struct _google_firestore_v1beta1_MapValue_FieldsEntry { + pb_callback_t key; + google_firestore_v1beta1_Value value; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_MapValue_FieldsEntry) */ +} google_firestore_v1beta1_MapValue_FieldsEntry; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1beta1_Document_init_default {{{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_default, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_Document_FieldsEntry_init_default {{{NULL}, NULL}, google_firestore_v1beta1_Value_init_default} +#define google_firestore_v1beta1_Value_init_default {0, 0, 0, {{NULL}, NULL}, google_firestore_v1beta1_MapValue_init_default, google_type_LatLng_init_default, google_firestore_v1beta1_ArrayValue_init_default, google_protobuf_Timestamp_init_default, _google_protobuf_NullValue_MIN, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_ArrayValue_init_default {{{NULL}, NULL}} +#define google_firestore_v1beta1_MapValue_init_default {{{NULL}, NULL}} +#define google_firestore_v1beta1_MapValue_FieldsEntry_init_default {{{NULL}, NULL}, google_firestore_v1beta1_Value_init_default} +#define google_firestore_v1beta1_Document_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_Document_FieldsEntry_init_zero {{{NULL}, NULL}, google_firestore_v1beta1_Value_init_zero} +#define google_firestore_v1beta1_Value_init_zero {0, 0, 0, {{NULL}, NULL}, google_firestore_v1beta1_MapValue_init_zero, google_type_LatLng_init_zero, google_firestore_v1beta1_ArrayValue_init_zero, google_protobuf_Timestamp_init_zero, _google_protobuf_NullValue_MIN, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_ArrayValue_init_zero {{{NULL}, NULL}} +#define google_firestore_v1beta1_MapValue_init_zero {{{NULL}, NULL}} +#define google_firestore_v1beta1_MapValue_FieldsEntry_init_zero {{{NULL}, NULL}, google_firestore_v1beta1_Value_init_zero} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1beta1_ArrayValue_values_tag 1 +#define google_firestore_v1beta1_MapValue_fields_tag 1 +#define google_firestore_v1beta1_Document_name_tag 1 +#define google_firestore_v1beta1_Document_fields_tag 2 +#define google_firestore_v1beta1_Document_create_time_tag 3 +#define google_firestore_v1beta1_Document_update_time_tag 4 +#define google_firestore_v1beta1_Value_null_value_tag 11 +#define google_firestore_v1beta1_Value_boolean_value_tag 1 +#define google_firestore_v1beta1_Value_integer_value_tag 2 +#define google_firestore_v1beta1_Value_double_value_tag 3 +#define google_firestore_v1beta1_Value_timestamp_value_tag 10 +#define google_firestore_v1beta1_Value_string_value_tag 17 +#define google_firestore_v1beta1_Value_bytes_value_tag 18 +#define google_firestore_v1beta1_Value_reference_value_tag 5 +#define google_firestore_v1beta1_Value_geo_point_value_tag 8 +#define google_firestore_v1beta1_Value_array_value_tag 9 +#define google_firestore_v1beta1_Value_map_value_tag 6 +#define google_firestore_v1beta1_Document_FieldsEntry_key_tag 1 +#define google_firestore_v1beta1_Document_FieldsEntry_value_tag 2 +#define google_firestore_v1beta1_MapValue_FieldsEntry_key_tag 1 +#define google_firestore_v1beta1_MapValue_FieldsEntry_value_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1beta1_Document_fields[5]; +extern const pb_field_t google_firestore_v1beta1_Document_FieldsEntry_fields[3]; +extern const pb_field_t google_firestore_v1beta1_Value_fields[12]; +extern const pb_field_t google_firestore_v1beta1_ArrayValue_fields[2]; +extern const pb_field_t google_firestore_v1beta1_MapValue_fields[2]; +extern const pb_field_t google_firestore_v1beta1_MapValue_FieldsEntry_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1beta1_Document_size depends on runtime parameters */ +/* google_firestore_v1beta1_Document_FieldsEntry_size depends on runtime parameters */ +/* google_firestore_v1beta1_Value_size depends on runtime parameters */ +/* google_firestore_v1beta1_ArrayValue_size depends on runtime parameters */ +/* google_firestore_v1beta1_MapValue_size depends on runtime parameters */ +/* google_firestore_v1beta1_MapValue_FieldsEntry_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define DOCUMENT_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c new file mode 100644 index 0000000..a450c28 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c @@ -0,0 +1,259 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "firestore.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1beta1_GetDocumentRequest_fields[5] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_GetDocumentRequest, name, name, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_GetDocumentRequest, mask, name, &google_firestore_v1beta1_DocumentMask_fields), + PB_FIELD( 3, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_GetDocumentRequest, transaction, mask, 0), + PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_GetDocumentRequest, read_time, transaction, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ListDocumentsRequest_fields[10] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_ListDocumentsRequest, parent, parent, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_ListDocumentsRequest, collection_id, parent, 0), + PB_FIELD( 3, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListDocumentsRequest, page_size, collection_id, 0), + PB_FIELD( 4, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_ListDocumentsRequest, page_token, page_size, 0), + PB_FIELD( 6, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_ListDocumentsRequest, order_by, page_token, 0), + PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListDocumentsRequest, mask, order_by, &google_firestore_v1beta1_DocumentMask_fields), + PB_FIELD( 8, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_ListDocumentsRequest, transaction, mask, 0), + PB_FIELD( 10, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListDocumentsRequest, read_time, transaction, &google_protobuf_Timestamp_fields), + PB_FIELD( 12, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListDocumentsRequest, show_missing, read_time, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ListDocumentsResponse_fields[3] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_ListDocumentsResponse, documents, documents, &google_firestore_v1beta1_Document_fields), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_ListDocumentsResponse, next_page_token, documents, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_CreateDocumentRequest_fields[6] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_CreateDocumentRequest, parent, parent, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_CreateDocumentRequest, collection_id, parent, 0), + PB_FIELD( 3, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_CreateDocumentRequest, document_id, collection_id, 0), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_CreateDocumentRequest, document, document_id, &google_firestore_v1beta1_Document_fields), + PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_CreateDocumentRequest, mask, document, &google_firestore_v1beta1_DocumentMask_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_UpdateDocumentRequest_fields[5] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_UpdateDocumentRequest, document, document, &google_firestore_v1beta1_Document_fields), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_UpdateDocumentRequest, update_mask, document, &google_firestore_v1beta1_DocumentMask_fields), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_UpdateDocumentRequest, mask, update_mask, &google_firestore_v1beta1_DocumentMask_fields), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_UpdateDocumentRequest, current_document, mask, &google_firestore_v1beta1_Precondition_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_DeleteDocumentRequest_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_DeleteDocumentRequest, name, name, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_DeleteDocumentRequest, current_document, name, &google_firestore_v1beta1_Precondition_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_BatchGetDocumentsRequest_fields[7] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_BatchGetDocumentsRequest, database, database, 0), + PB_FIELD( 2, STRING , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_BatchGetDocumentsRequest, documents, database, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_BatchGetDocumentsRequest, mask, documents, &google_firestore_v1beta1_DocumentMask_fields), + PB_FIELD( 4, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_BatchGetDocumentsRequest, transaction, mask, 0), + PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_BatchGetDocumentsRequest, new_transaction, transaction, &google_firestore_v1beta1_TransactionOptions_fields), + PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_BatchGetDocumentsRequest, read_time, new_transaction, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_BatchGetDocumentsResponse_fields[5] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_BatchGetDocumentsResponse, found, found, &google_firestore_v1beta1_Document_fields), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_BatchGetDocumentsResponse, missing, found, 0), + PB_FIELD( 3, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_BatchGetDocumentsResponse, transaction, missing, 0), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_BatchGetDocumentsResponse, read_time, transaction, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_BeginTransactionRequest_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_BeginTransactionRequest, database, database, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_BeginTransactionRequest, options, database, &google_firestore_v1beta1_TransactionOptions_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_BeginTransactionResponse_fields[2] = { + PB_FIELD( 1, BYTES , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_BeginTransactionResponse, transaction, transaction, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_CommitRequest_fields[4] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_CommitRequest, database, database, 0), + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_CommitRequest, writes, database, &google_firestore_v1beta1_Write_fields), + PB_FIELD( 3, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_CommitRequest, transaction, writes, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_CommitResponse_fields[3] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_CommitResponse, write_results, write_results, &google_firestore_v1beta1_WriteResult_fields), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_CommitResponse, commit_time, write_results, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_RollbackRequest_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_RollbackRequest, database, database, 0), + PB_FIELD( 2, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_RollbackRequest, transaction, database, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_RunQueryRequest_fields[6] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_RunQueryRequest, parent, parent, 0), + PB_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1beta1_RunQueryRequest, structured_query, parent, &google_firestore_v1beta1_StructuredQuery_fields), + PB_FIELD( 5, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_RunQueryRequest, transaction, query_type.structured_query, 0), + PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_RunQueryRequest, new_transaction, transaction, &google_firestore_v1beta1_TransactionOptions_fields), + PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_RunQueryRequest, read_time, new_transaction, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_RunQueryResponse_fields[5] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_RunQueryResponse, document, document, &google_firestore_v1beta1_Document_fields), + PB_FIELD( 2, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_RunQueryResponse, transaction, document, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_RunQueryResponse, read_time, transaction, &google_protobuf_Timestamp_fields), + PB_FIELD( 4, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_RunQueryResponse, skipped_results, read_time, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_WriteRequest_fields[6] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_WriteRequest, database, database, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_WriteRequest, stream_id, database, 0), + PB_FIELD( 3, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_WriteRequest, writes, stream_id, &google_firestore_v1beta1_Write_fields), + PB_FIELD( 4, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_WriteRequest, stream_token, writes, 0), + PB_FIELD( 5, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_WriteRequest, labels, stream_token, &google_firestore_v1beta1_WriteRequest_LabelsEntry_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_WriteRequest_LabelsEntry_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_WriteRequest_LabelsEntry, key, key, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_WriteRequest_LabelsEntry, value, key, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_WriteResponse_fields[5] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_WriteResponse, stream_id, stream_id, 0), + PB_FIELD( 2, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_WriteResponse, stream_token, stream_id, 0), + PB_FIELD( 3, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_WriteResponse, write_results, stream_token, &google_firestore_v1beta1_WriteResult_fields), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_WriteResponse, commit_time, write_results, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ListenRequest_fields[5] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_ListenRequest, database, database, 0), + PB_ONEOF_FIELD(target_change, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1beta1_ListenRequest, add_target, database, &google_firestore_v1beta1_Target_fields), + PB_ONEOF_FIELD(target_change, 3, INT32 , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenRequest, remove_target, database, 0), + PB_FIELD( 4, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_ListenRequest, labels, target_change.remove_target, &google_firestore_v1beta1_ListenRequest_LabelsEntry_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ListenRequest_LabelsEntry_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_ListenRequest_LabelsEntry, key, key, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_ListenRequest_LabelsEntry, value, key, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ListenResponse_fields[6] = { + PB_ONEOF_FIELD(response_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_ListenResponse, target_change, target_change, &google_firestore_v1beta1_TargetChange_fields), + PB_ONEOF_FIELD(response_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenResponse, document_change, document_change, &google_firestore_v1beta1_DocumentChange_fields), + PB_ONEOF_FIELD(response_type, 4, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenResponse, document_delete, document_delete, &google_firestore_v1beta1_DocumentDelete_fields), + PB_ONEOF_FIELD(response_type, 5, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenResponse, filter, filter, &google_firestore_v1beta1_ExistenceFilter_fields), + PB_ONEOF_FIELD(response_type, 6, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_ListenResponse, document_remove, document_remove, &google_firestore_v1beta1_DocumentRemove_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_Target_fields[7] = { + PB_ONEOF_FIELD(target_type, 2, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_Target, query, query, &google_firestore_v1beta1_Target_QueryTarget_fields), + PB_ONEOF_FIELD(target_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_Target, documents, documents, &google_firestore_v1beta1_Target_DocumentsTarget_fields), + PB_FIELD( 4, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_Target, resume_token, target_type.documents, 0), + PB_FIELD( 5, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Target, target_id, resume_token, 0), + PB_FIELD( 6, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Target, once, target_id, 0), + PB_FIELD( 11, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Target, read_time, once, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_Target_DocumentsTarget_fields[2] = { + PB_FIELD( 2, STRING , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_Target_DocumentsTarget, documents, documents, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_Target_QueryTarget_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_Target_QueryTarget, parent, parent, 0), + PB_ONEOF_FIELD(query_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1beta1_Target_QueryTarget, structured_query, parent, &google_firestore_v1beta1_StructuredQuery_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_TargetChange_fields[6] = { + PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_TargetChange, target_change_type, target_change_type, 0), + PB_FIELD( 2, INT32 , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_TargetChange, target_ids, target_change_type, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_TargetChange, cause, target_ids, &google_rpc_Status_fields), + PB_FIELD( 4, BYTES , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_TargetChange, resume_token, cause, 0), + PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_TargetChange, read_time, resume_token, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ListCollectionIdsRequest_fields[4] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_ListCollectionIdsRequest, parent, parent, 0), + PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ListCollectionIdsRequest, page_size, parent, 0), + PB_FIELD( 3, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_ListCollectionIdsRequest, page_token, page_size, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ListCollectionIdsResponse_fields[3] = { + PB_FIELD( 1, STRING , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_ListCollectionIdsResponse, collection_ids, collection_ids, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_ListCollectionIdsResponse, next_page_token, collection_ids, 0), + PB_LAST_FIELD +}; + + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_GetDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_GetDocumentRequest, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_ListDocumentsRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_ListDocumentsRequest, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_CreateDocumentRequest, document) < 65536 && pb_membersize(google_firestore_v1beta1_CreateDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, document) < 65536 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, update_mask) < 65536 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, current_document) < 65536 && pb_membersize(google_firestore_v1beta1_DeleteDocumentRequest, current_document) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, mask) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, new_transaction) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsResponse, found) < 65536 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsResponse, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_BeginTransactionRequest, options) < 65536 && pb_membersize(google_firestore_v1beta1_CommitResponse, commit_time) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, query_type.structured_query) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, new_transaction) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryResponse, document) < 65536 && pb_membersize(google_firestore_v1beta1_RunQueryResponse, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_WriteResponse, commit_time) < 65536 && pb_membersize(google_firestore_v1beta1_ListenRequest, target_change.add_target) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.target_change) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.document_change) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.document_delete) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.filter) < 65536 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.document_remove) < 65536 && pb_membersize(google_firestore_v1beta1_Target, target_type.query) < 65536 && pb_membersize(google_firestore_v1beta1_Target, target_type.documents) < 65536 && pb_membersize(google_firestore_v1beta1_Target, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_Target_QueryTarget, query_type.structured_query) < 65536 && pb_membersize(google_firestore_v1beta1_TargetChange, cause) < 65536 && pb_membersize(google_firestore_v1beta1_TargetChange, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_GetDocumentRequest_google_firestore_v1beta1_ListDocumentsRequest_google_firestore_v1beta1_ListDocumentsResponse_google_firestore_v1beta1_CreateDocumentRequest_google_firestore_v1beta1_UpdateDocumentRequest_google_firestore_v1beta1_DeleteDocumentRequest_google_firestore_v1beta1_BatchGetDocumentsRequest_google_firestore_v1beta1_BatchGetDocumentsResponse_google_firestore_v1beta1_BeginTransactionRequest_google_firestore_v1beta1_BeginTransactionResponse_google_firestore_v1beta1_CommitRequest_google_firestore_v1beta1_CommitResponse_google_firestore_v1beta1_RollbackRequest_google_firestore_v1beta1_RunQueryRequest_google_firestore_v1beta1_RunQueryResponse_google_firestore_v1beta1_WriteRequest_google_firestore_v1beta1_WriteRequest_LabelsEntry_google_firestore_v1beta1_WriteResponse_google_firestore_v1beta1_ListenRequest_google_firestore_v1beta1_ListenRequest_LabelsEntry_google_firestore_v1beta1_ListenResponse_google_firestore_v1beta1_Target_google_firestore_v1beta1_Target_DocumentsTarget_google_firestore_v1beta1_Target_QueryTarget_google_firestore_v1beta1_TargetChange_google_firestore_v1beta1_ListCollectionIdsRequest_google_firestore_v1beta1_ListCollectionIdsResponse) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_GetDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_GetDocumentRequest, read_time) < 256 && pb_membersize(google_firestore_v1beta1_ListDocumentsRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_ListDocumentsRequest, read_time) < 256 && pb_membersize(google_firestore_v1beta1_CreateDocumentRequest, document) < 256 && pb_membersize(google_firestore_v1beta1_CreateDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, document) < 256 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, update_mask) < 256 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_UpdateDocumentRequest, current_document) < 256 && pb_membersize(google_firestore_v1beta1_DeleteDocumentRequest, current_document) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, mask) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, new_transaction) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsRequest, read_time) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsResponse, found) < 256 && pb_membersize(google_firestore_v1beta1_BatchGetDocumentsResponse, read_time) < 256 && pb_membersize(google_firestore_v1beta1_BeginTransactionRequest, options) < 256 && pb_membersize(google_firestore_v1beta1_CommitResponse, commit_time) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, query_type.structured_query) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, new_transaction) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryRequest, read_time) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryResponse, document) < 256 && pb_membersize(google_firestore_v1beta1_RunQueryResponse, read_time) < 256 && pb_membersize(google_firestore_v1beta1_WriteResponse, commit_time) < 256 && pb_membersize(google_firestore_v1beta1_ListenRequest, target_change.add_target) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.target_change) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.document_change) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.document_delete) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.filter) < 256 && pb_membersize(google_firestore_v1beta1_ListenResponse, response_type.document_remove) < 256 && pb_membersize(google_firestore_v1beta1_Target, target_type.query) < 256 && pb_membersize(google_firestore_v1beta1_Target, target_type.documents) < 256 && pb_membersize(google_firestore_v1beta1_Target, read_time) < 256 && pb_membersize(google_firestore_v1beta1_Target_QueryTarget, query_type.structured_query) < 256 && pb_membersize(google_firestore_v1beta1_TargetChange, cause) < 256 && pb_membersize(google_firestore_v1beta1_TargetChange, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_GetDocumentRequest_google_firestore_v1beta1_ListDocumentsRequest_google_firestore_v1beta1_ListDocumentsResponse_google_firestore_v1beta1_CreateDocumentRequest_google_firestore_v1beta1_UpdateDocumentRequest_google_firestore_v1beta1_DeleteDocumentRequest_google_firestore_v1beta1_BatchGetDocumentsRequest_google_firestore_v1beta1_BatchGetDocumentsResponse_google_firestore_v1beta1_BeginTransactionRequest_google_firestore_v1beta1_BeginTransactionResponse_google_firestore_v1beta1_CommitRequest_google_firestore_v1beta1_CommitResponse_google_firestore_v1beta1_RollbackRequest_google_firestore_v1beta1_RunQueryRequest_google_firestore_v1beta1_RunQueryResponse_google_firestore_v1beta1_WriteRequest_google_firestore_v1beta1_WriteRequest_LabelsEntry_google_firestore_v1beta1_WriteResponse_google_firestore_v1beta1_ListenRequest_google_firestore_v1beta1_ListenRequest_LabelsEntry_google_firestore_v1beta1_ListenResponse_google_firestore_v1beta1_Target_google_firestore_v1beta1_Target_DocumentsTarget_google_firestore_v1beta1_Target_QueryTarget_google_firestore_v1beta1_TargetChange_google_firestore_v1beta1_ListCollectionIdsRequest_google_firestore_v1beta1_ListCollectionIdsResponse) +#endif + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h new file mode 100644 index 0000000..ef62edb --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h @@ -0,0 +1,508 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_FIRESTORE_PB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1BETA1_FIRESTORE_PB_H_INCLUDED +#include + +#include "google/api/annotations.pb.h" + +#include "google/firestore/v1beta1/common.pb.h" + +#include "google/firestore/v1beta1/document.pb.h" + +#include "google/firestore/v1beta1/query.pb.h" + +#include "google/firestore/v1beta1/write.pb.h" + +#include "google/protobuf/empty.pb.h" + +#include "google/protobuf/timestamp.pb.h" + +#include "google/rpc/status.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Enum definitions */ +typedef enum _google_firestore_v1beta1_TargetChange_TargetChangeType { + google_firestore_v1beta1_TargetChange_TargetChangeType_NO_CHANGE = 0, + google_firestore_v1beta1_TargetChange_TargetChangeType_ADD = 1, + google_firestore_v1beta1_TargetChange_TargetChangeType_REMOVE = 2, + google_firestore_v1beta1_TargetChange_TargetChangeType_CURRENT = 3, + google_firestore_v1beta1_TargetChange_TargetChangeType_RESET = 4 +} google_firestore_v1beta1_TargetChange_TargetChangeType; +#define _google_firestore_v1beta1_TargetChange_TargetChangeType_MIN google_firestore_v1beta1_TargetChange_TargetChangeType_NO_CHANGE +#define _google_firestore_v1beta1_TargetChange_TargetChangeType_MAX google_firestore_v1beta1_TargetChange_TargetChangeType_RESET +#define _google_firestore_v1beta1_TargetChange_TargetChangeType_ARRAYSIZE ((google_firestore_v1beta1_TargetChange_TargetChangeType)(google_firestore_v1beta1_TargetChange_TargetChangeType_RESET+1)) + +/* Struct definitions */ +typedef struct _google_firestore_v1beta1_BeginTransactionResponse { + pb_callback_t transaction; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_BeginTransactionResponse) */ +} google_firestore_v1beta1_BeginTransactionResponse; + +typedef struct _google_firestore_v1beta1_CommitRequest { + pb_callback_t database; + pb_callback_t writes; + pb_callback_t transaction; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_CommitRequest) */ +} google_firestore_v1beta1_CommitRequest; + +typedef struct _google_firestore_v1beta1_ListCollectionIdsResponse { + pb_callback_t collection_ids; + pb_callback_t next_page_token; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListCollectionIdsResponse) */ +} google_firestore_v1beta1_ListCollectionIdsResponse; + +typedef struct _google_firestore_v1beta1_ListDocumentsResponse { + pb_callback_t documents; + pb_callback_t next_page_token; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListDocumentsResponse) */ +} google_firestore_v1beta1_ListDocumentsResponse; + +typedef struct _google_firestore_v1beta1_ListenRequest_LabelsEntry { + pb_callback_t key; + pb_callback_t value; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListenRequest_LabelsEntry) */ +} google_firestore_v1beta1_ListenRequest_LabelsEntry; + +typedef struct _google_firestore_v1beta1_RollbackRequest { + pb_callback_t database; + pb_callback_t transaction; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_RollbackRequest) */ +} google_firestore_v1beta1_RollbackRequest; + +typedef struct _google_firestore_v1beta1_Target_DocumentsTarget { + pb_callback_t documents; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Target_DocumentsTarget) */ +} google_firestore_v1beta1_Target_DocumentsTarget; + +typedef struct _google_firestore_v1beta1_WriteRequest { + pb_callback_t database; + pb_callback_t stream_id; + pb_callback_t writes; + pb_callback_t stream_token; + pb_callback_t labels; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_WriteRequest) */ +} google_firestore_v1beta1_WriteRequest; + +typedef struct _google_firestore_v1beta1_WriteRequest_LabelsEntry { + pb_callback_t key; + pb_callback_t value; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_WriteRequest_LabelsEntry) */ +} google_firestore_v1beta1_WriteRequest_LabelsEntry; + +typedef struct _google_firestore_v1beta1_BatchGetDocumentsRequest { + pb_callback_t database; + pb_callback_t documents; + google_firestore_v1beta1_DocumentMask mask; + pb_callback_t transaction; + google_firestore_v1beta1_TransactionOptions new_transaction; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_BatchGetDocumentsRequest) */ +} google_firestore_v1beta1_BatchGetDocumentsRequest; + +typedef struct _google_firestore_v1beta1_BatchGetDocumentsResponse { + google_firestore_v1beta1_Document found; + pb_callback_t missing; + pb_callback_t transaction; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_BatchGetDocumentsResponse) */ +} google_firestore_v1beta1_BatchGetDocumentsResponse; + +typedef struct _google_firestore_v1beta1_BeginTransactionRequest { + pb_callback_t database; + google_firestore_v1beta1_TransactionOptions options; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_BeginTransactionRequest) */ +} google_firestore_v1beta1_BeginTransactionRequest; + +typedef struct _google_firestore_v1beta1_CommitResponse { + pb_callback_t write_results; + google_protobuf_Timestamp commit_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_CommitResponse) */ +} google_firestore_v1beta1_CommitResponse; + +typedef struct _google_firestore_v1beta1_CreateDocumentRequest { + pb_callback_t parent; + pb_callback_t collection_id; + pb_callback_t document_id; + google_firestore_v1beta1_Document document; + google_firestore_v1beta1_DocumentMask mask; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_CreateDocumentRequest) */ +} google_firestore_v1beta1_CreateDocumentRequest; + +typedef struct _google_firestore_v1beta1_DeleteDocumentRequest { + pb_callback_t name; + google_firestore_v1beta1_Precondition current_document; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DeleteDocumentRequest) */ +} google_firestore_v1beta1_DeleteDocumentRequest; + +typedef struct _google_firestore_v1beta1_GetDocumentRequest { + pb_callback_t name; + google_firestore_v1beta1_DocumentMask mask; + pb_callback_t transaction; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_GetDocumentRequest) */ +} google_firestore_v1beta1_GetDocumentRequest; + +typedef struct _google_firestore_v1beta1_ListCollectionIdsRequest { + pb_callback_t parent; + int32_t page_size; + pb_callback_t page_token; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListCollectionIdsRequest) */ +} google_firestore_v1beta1_ListCollectionIdsRequest; + +typedef struct _google_firestore_v1beta1_ListDocumentsRequest { + pb_callback_t parent; + pb_callback_t collection_id; + int32_t page_size; + pb_callback_t page_token; + pb_callback_t order_by; + google_firestore_v1beta1_DocumentMask mask; + pb_callback_t transaction; + google_protobuf_Timestamp read_time; + bool show_missing; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListDocumentsRequest) */ +} google_firestore_v1beta1_ListDocumentsRequest; + +typedef struct _google_firestore_v1beta1_RunQueryRequest { + pb_callback_t parent; + pb_size_t which_query_type; + union { + google_firestore_v1beta1_StructuredQuery structured_query; + } query_type; + pb_callback_t transaction; + google_firestore_v1beta1_TransactionOptions new_transaction; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_RunQueryRequest) */ +} google_firestore_v1beta1_RunQueryRequest; + +typedef struct _google_firestore_v1beta1_RunQueryResponse { + google_firestore_v1beta1_Document document; + pb_callback_t transaction; + google_protobuf_Timestamp read_time; + int32_t skipped_results; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_RunQueryResponse) */ +} google_firestore_v1beta1_RunQueryResponse; + +typedef struct _google_firestore_v1beta1_TargetChange { + google_firestore_v1beta1_TargetChange_TargetChangeType target_change_type; + pb_callback_t target_ids; + google_rpc_Status cause; + pb_callback_t resume_token; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_TargetChange) */ +} google_firestore_v1beta1_TargetChange; + +typedef struct _google_firestore_v1beta1_Target_QueryTarget { + pb_callback_t parent; + pb_size_t which_query_type; + union { + google_firestore_v1beta1_StructuredQuery structured_query; + } query_type; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Target_QueryTarget) */ +} google_firestore_v1beta1_Target_QueryTarget; + +typedef struct _google_firestore_v1beta1_UpdateDocumentRequest { + google_firestore_v1beta1_Document document; + google_firestore_v1beta1_DocumentMask update_mask; + google_firestore_v1beta1_DocumentMask mask; + google_firestore_v1beta1_Precondition current_document; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_UpdateDocumentRequest) */ +} google_firestore_v1beta1_UpdateDocumentRequest; + +typedef struct _google_firestore_v1beta1_WriteResponse { + pb_callback_t stream_id; + pb_callback_t stream_token; + pb_callback_t write_results; + google_protobuf_Timestamp commit_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_WriteResponse) */ +} google_firestore_v1beta1_WriteResponse; + +typedef struct _google_firestore_v1beta1_ListenResponse { + pb_size_t which_response_type; + union { + google_firestore_v1beta1_TargetChange target_change; + google_firestore_v1beta1_DocumentChange document_change; + google_firestore_v1beta1_DocumentDelete document_delete; + google_firestore_v1beta1_ExistenceFilter filter; + google_firestore_v1beta1_DocumentRemove document_remove; + } response_type; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListenResponse) */ +} google_firestore_v1beta1_ListenResponse; + +typedef struct _google_firestore_v1beta1_Target { + pb_size_t which_target_type; + union { + google_firestore_v1beta1_Target_QueryTarget query; + google_firestore_v1beta1_Target_DocumentsTarget documents; + } target_type; + pb_callback_t resume_token; + int32_t target_id; + bool once; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Target) */ +} google_firestore_v1beta1_Target; + +typedef struct _google_firestore_v1beta1_ListenRequest { + pb_callback_t database; + pb_size_t which_target_change; + union { + google_firestore_v1beta1_Target add_target; + int32_t remove_target; + } target_change; + pb_callback_t labels; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ListenRequest) */ +} google_firestore_v1beta1_ListenRequest; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1beta1_GetDocumentRequest_init_default {{{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_default, {{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_ListDocumentsRequest_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, {{NULL}, NULL}, {{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_default, {{NULL}, NULL}, google_protobuf_Timestamp_init_default, 0} +#define google_firestore_v1beta1_ListDocumentsResponse_init_default {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_CreateDocumentRequest_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, google_firestore_v1beta1_Document_init_default, google_firestore_v1beta1_DocumentMask_init_default} +#define google_firestore_v1beta1_UpdateDocumentRequest_init_default {google_firestore_v1beta1_Document_init_default, google_firestore_v1beta1_DocumentMask_init_default, google_firestore_v1beta1_DocumentMask_init_default, google_firestore_v1beta1_Precondition_init_default} +#define google_firestore_v1beta1_DeleteDocumentRequest_init_default {{{NULL}, NULL}, google_firestore_v1beta1_Precondition_init_default} +#define google_firestore_v1beta1_BatchGetDocumentsRequest_init_default {{{NULL}, NULL}, {{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_default, {{NULL}, NULL}, google_firestore_v1beta1_TransactionOptions_init_default, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_BatchGetDocumentsResponse_init_default {google_firestore_v1beta1_Document_init_default, {{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_BeginTransactionRequest_init_default {{{NULL}, NULL}, google_firestore_v1beta1_TransactionOptions_init_default} +#define google_firestore_v1beta1_BeginTransactionResponse_init_default {{{NULL}, NULL}} +#define google_firestore_v1beta1_CommitRequest_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_CommitResponse_init_default {{{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_RollbackRequest_init_default {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_RunQueryRequest_init_default {{{NULL}, NULL}, 0, {google_firestore_v1beta1_StructuredQuery_init_default}, {{NULL}, NULL}, google_firestore_v1beta1_TransactionOptions_init_default, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_RunQueryResponse_init_default {google_firestore_v1beta1_Document_init_default, {{NULL}, NULL}, google_protobuf_Timestamp_init_default, 0} +#define google_firestore_v1beta1_WriteRequest_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_WriteRequest_LabelsEntry_init_default {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_WriteResponse_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_ListenRequest_init_default {{{NULL}, NULL}, 0, {google_firestore_v1beta1_Target_init_default}, {{NULL}, NULL}} +#define google_firestore_v1beta1_ListenRequest_LabelsEntry_init_default {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_ListenResponse_init_default {0, {google_firestore_v1beta1_TargetChange_init_default}} +#define google_firestore_v1beta1_Target_init_default {0, {google_firestore_v1beta1_Target_QueryTarget_init_default}, {{NULL}, NULL}, 0, 0, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_Target_DocumentsTarget_init_default {{{NULL}, NULL}} +#define google_firestore_v1beta1_Target_QueryTarget_init_default {{{NULL}, NULL}, 0, {google_firestore_v1beta1_StructuredQuery_init_default}} +#define google_firestore_v1beta1_TargetChange_init_default {_google_firestore_v1beta1_TargetChange_TargetChangeType_MIN, {{NULL}, NULL}, google_rpc_Status_init_default, {{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_ListCollectionIdsRequest_init_default {{{NULL}, NULL}, 0, {{NULL}, NULL}} +#define google_firestore_v1beta1_ListCollectionIdsResponse_init_default {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_GetDocumentRequest_init_zero {{{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_zero, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_ListDocumentsRequest_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, {{NULL}, NULL}, {{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_zero, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero, 0} +#define google_firestore_v1beta1_ListDocumentsResponse_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_CreateDocumentRequest_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, google_firestore_v1beta1_Document_init_zero, google_firestore_v1beta1_DocumentMask_init_zero} +#define google_firestore_v1beta1_UpdateDocumentRequest_init_zero {google_firestore_v1beta1_Document_init_zero, google_firestore_v1beta1_DocumentMask_init_zero, google_firestore_v1beta1_DocumentMask_init_zero, google_firestore_v1beta1_Precondition_init_zero} +#define google_firestore_v1beta1_DeleteDocumentRequest_init_zero {{{NULL}, NULL}, google_firestore_v1beta1_Precondition_init_zero} +#define google_firestore_v1beta1_BatchGetDocumentsRequest_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_zero, {{NULL}, NULL}, google_firestore_v1beta1_TransactionOptions_init_zero, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_BatchGetDocumentsResponse_init_zero {google_firestore_v1beta1_Document_init_zero, {{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_BeginTransactionRequest_init_zero {{{NULL}, NULL}, google_firestore_v1beta1_TransactionOptions_init_zero} +#define google_firestore_v1beta1_BeginTransactionResponse_init_zero {{{NULL}, NULL}} +#define google_firestore_v1beta1_CommitRequest_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_CommitResponse_init_zero {{{NULL}, NULL}, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_RollbackRequest_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_RunQueryRequest_init_zero {{{NULL}, NULL}, 0, {google_firestore_v1beta1_StructuredQuery_init_zero}, {{NULL}, NULL}, google_firestore_v1beta1_TransactionOptions_init_zero, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_RunQueryResponse_init_zero {google_firestore_v1beta1_Document_init_zero, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero, 0} +#define google_firestore_v1beta1_WriteRequest_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_WriteRequest_LabelsEntry_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_WriteResponse_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_ListenRequest_init_zero {{{NULL}, NULL}, 0, {google_firestore_v1beta1_Target_init_zero}, {{NULL}, NULL}} +#define google_firestore_v1beta1_ListenRequest_LabelsEntry_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_ListenResponse_init_zero {0, {google_firestore_v1beta1_TargetChange_init_zero}} +#define google_firestore_v1beta1_Target_init_zero {0, {google_firestore_v1beta1_Target_QueryTarget_init_zero}, {{NULL}, NULL}, 0, 0, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_Target_DocumentsTarget_init_zero {{{NULL}, NULL}} +#define google_firestore_v1beta1_Target_QueryTarget_init_zero {{{NULL}, NULL}, 0, {google_firestore_v1beta1_StructuredQuery_init_zero}} +#define google_firestore_v1beta1_TargetChange_init_zero {_google_firestore_v1beta1_TargetChange_TargetChangeType_MIN, {{NULL}, NULL}, google_rpc_Status_init_zero, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_ListCollectionIdsRequest_init_zero {{{NULL}, NULL}, 0, {{NULL}, NULL}} +#define google_firestore_v1beta1_ListCollectionIdsResponse_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1beta1_BeginTransactionResponse_transaction_tag 1 +#define google_firestore_v1beta1_CommitRequest_database_tag 1 +#define google_firestore_v1beta1_CommitRequest_writes_tag 2 +#define google_firestore_v1beta1_CommitRequest_transaction_tag 3 +#define google_firestore_v1beta1_ListCollectionIdsResponse_collection_ids_tag 1 +#define google_firestore_v1beta1_ListCollectionIdsResponse_next_page_token_tag 2 +#define google_firestore_v1beta1_ListDocumentsResponse_documents_tag 1 +#define google_firestore_v1beta1_ListDocumentsResponse_next_page_token_tag 2 +#define google_firestore_v1beta1_ListenRequest_LabelsEntry_key_tag 1 +#define google_firestore_v1beta1_ListenRequest_LabelsEntry_value_tag 2 +#define google_firestore_v1beta1_RollbackRequest_database_tag 1 +#define google_firestore_v1beta1_RollbackRequest_transaction_tag 2 +#define google_firestore_v1beta1_Target_DocumentsTarget_documents_tag 2 +#define google_firestore_v1beta1_WriteRequest_database_tag 1 +#define google_firestore_v1beta1_WriteRequest_stream_id_tag 2 +#define google_firestore_v1beta1_WriteRequest_writes_tag 3 +#define google_firestore_v1beta1_WriteRequest_stream_token_tag 4 +#define google_firestore_v1beta1_WriteRequest_labels_tag 5 +#define google_firestore_v1beta1_WriteRequest_LabelsEntry_key_tag 1 +#define google_firestore_v1beta1_WriteRequest_LabelsEntry_value_tag 2 +#define google_firestore_v1beta1_BatchGetDocumentsRequest_database_tag 1 +#define google_firestore_v1beta1_BatchGetDocumentsRequest_documents_tag 2 +#define google_firestore_v1beta1_BatchGetDocumentsRequest_mask_tag 3 +#define google_firestore_v1beta1_BatchGetDocumentsRequest_transaction_tag 4 +#define google_firestore_v1beta1_BatchGetDocumentsRequest_new_transaction_tag 5 +#define google_firestore_v1beta1_BatchGetDocumentsRequest_read_time_tag 7 +#define google_firestore_v1beta1_BatchGetDocumentsResponse_found_tag 1 +#define google_firestore_v1beta1_BatchGetDocumentsResponse_missing_tag 2 +#define google_firestore_v1beta1_BatchGetDocumentsResponse_transaction_tag 3 +#define google_firestore_v1beta1_BatchGetDocumentsResponse_read_time_tag 4 +#define google_firestore_v1beta1_BeginTransactionRequest_database_tag 1 +#define google_firestore_v1beta1_BeginTransactionRequest_options_tag 2 +#define google_firestore_v1beta1_CommitResponse_write_results_tag 1 +#define google_firestore_v1beta1_CommitResponse_commit_time_tag 2 +#define google_firestore_v1beta1_CreateDocumentRequest_parent_tag 1 +#define google_firestore_v1beta1_CreateDocumentRequest_collection_id_tag 2 +#define google_firestore_v1beta1_CreateDocumentRequest_document_id_tag 3 +#define google_firestore_v1beta1_CreateDocumentRequest_document_tag 4 +#define google_firestore_v1beta1_CreateDocumentRequest_mask_tag 5 +#define google_firestore_v1beta1_DeleteDocumentRequest_name_tag 1 +#define google_firestore_v1beta1_DeleteDocumentRequest_current_document_tag 2 +#define google_firestore_v1beta1_GetDocumentRequest_name_tag 1 +#define google_firestore_v1beta1_GetDocumentRequest_mask_tag 2 +#define google_firestore_v1beta1_GetDocumentRequest_transaction_tag 3 +#define google_firestore_v1beta1_GetDocumentRequest_read_time_tag 5 +#define google_firestore_v1beta1_ListCollectionIdsRequest_parent_tag 1 +#define google_firestore_v1beta1_ListCollectionIdsRequest_page_size_tag 2 +#define google_firestore_v1beta1_ListCollectionIdsRequest_page_token_tag 3 +#define google_firestore_v1beta1_ListDocumentsRequest_parent_tag 1 +#define google_firestore_v1beta1_ListDocumentsRequest_collection_id_tag 2 +#define google_firestore_v1beta1_ListDocumentsRequest_page_size_tag 3 +#define google_firestore_v1beta1_ListDocumentsRequest_page_token_tag 4 +#define google_firestore_v1beta1_ListDocumentsRequest_order_by_tag 6 +#define google_firestore_v1beta1_ListDocumentsRequest_mask_tag 7 +#define google_firestore_v1beta1_ListDocumentsRequest_transaction_tag 8 +#define google_firestore_v1beta1_ListDocumentsRequest_read_time_tag 10 +#define google_firestore_v1beta1_ListDocumentsRequest_show_missing_tag 12 +#define google_firestore_v1beta1_RunQueryRequest_structured_query_tag 2 +#define google_firestore_v1beta1_RunQueryRequest_parent_tag 1 +#define google_firestore_v1beta1_RunQueryRequest_transaction_tag 5 +#define google_firestore_v1beta1_RunQueryRequest_new_transaction_tag 6 +#define google_firestore_v1beta1_RunQueryRequest_read_time_tag 7 +#define google_firestore_v1beta1_RunQueryResponse_transaction_tag 2 +#define google_firestore_v1beta1_RunQueryResponse_document_tag 1 +#define google_firestore_v1beta1_RunQueryResponse_read_time_tag 3 +#define google_firestore_v1beta1_RunQueryResponse_skipped_results_tag 4 +#define google_firestore_v1beta1_TargetChange_target_change_type_tag 1 +#define google_firestore_v1beta1_TargetChange_target_ids_tag 2 +#define google_firestore_v1beta1_TargetChange_cause_tag 3 +#define google_firestore_v1beta1_TargetChange_resume_token_tag 4 +#define google_firestore_v1beta1_TargetChange_read_time_tag 6 +#define google_firestore_v1beta1_Target_QueryTarget_structured_query_tag 2 +#define google_firestore_v1beta1_Target_QueryTarget_parent_tag 1 +#define google_firestore_v1beta1_UpdateDocumentRequest_document_tag 1 +#define google_firestore_v1beta1_UpdateDocumentRequest_update_mask_tag 2 +#define google_firestore_v1beta1_UpdateDocumentRequest_mask_tag 3 +#define google_firestore_v1beta1_UpdateDocumentRequest_current_document_tag 4 +#define google_firestore_v1beta1_WriteResponse_stream_id_tag 1 +#define google_firestore_v1beta1_WriteResponse_stream_token_tag 2 +#define google_firestore_v1beta1_WriteResponse_write_results_tag 3 +#define google_firestore_v1beta1_WriteResponse_commit_time_tag 4 +#define google_firestore_v1beta1_ListenResponse_target_change_tag 2 +#define google_firestore_v1beta1_ListenResponse_document_change_tag 3 +#define google_firestore_v1beta1_ListenResponse_document_delete_tag 4 +#define google_firestore_v1beta1_ListenResponse_filter_tag 5 +#define google_firestore_v1beta1_ListenResponse_document_remove_tag 6 +#define google_firestore_v1beta1_Target_query_tag 2 +#define google_firestore_v1beta1_Target_documents_tag 3 +#define google_firestore_v1beta1_Target_resume_token_tag 4 +#define google_firestore_v1beta1_Target_read_time_tag 11 +#define google_firestore_v1beta1_Target_target_id_tag 5 +#define google_firestore_v1beta1_Target_once_tag 6 +#define google_firestore_v1beta1_ListenRequest_add_target_tag 2 +#define google_firestore_v1beta1_ListenRequest_remove_target_tag 3 +#define google_firestore_v1beta1_ListenRequest_database_tag 1 +#define google_firestore_v1beta1_ListenRequest_labels_tag 4 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1beta1_GetDocumentRequest_fields[5]; +extern const pb_field_t google_firestore_v1beta1_ListDocumentsRequest_fields[10]; +extern const pb_field_t google_firestore_v1beta1_ListDocumentsResponse_fields[3]; +extern const pb_field_t google_firestore_v1beta1_CreateDocumentRequest_fields[6]; +extern const pb_field_t google_firestore_v1beta1_UpdateDocumentRequest_fields[5]; +extern const pb_field_t google_firestore_v1beta1_DeleteDocumentRequest_fields[3]; +extern const pb_field_t google_firestore_v1beta1_BatchGetDocumentsRequest_fields[7]; +extern const pb_field_t google_firestore_v1beta1_BatchGetDocumentsResponse_fields[5]; +extern const pb_field_t google_firestore_v1beta1_BeginTransactionRequest_fields[3]; +extern const pb_field_t google_firestore_v1beta1_BeginTransactionResponse_fields[2]; +extern const pb_field_t google_firestore_v1beta1_CommitRequest_fields[4]; +extern const pb_field_t google_firestore_v1beta1_CommitResponse_fields[3]; +extern const pb_field_t google_firestore_v1beta1_RollbackRequest_fields[3]; +extern const pb_field_t google_firestore_v1beta1_RunQueryRequest_fields[6]; +extern const pb_field_t google_firestore_v1beta1_RunQueryResponse_fields[5]; +extern const pb_field_t google_firestore_v1beta1_WriteRequest_fields[6]; +extern const pb_field_t google_firestore_v1beta1_WriteRequest_LabelsEntry_fields[3]; +extern const pb_field_t google_firestore_v1beta1_WriteResponse_fields[5]; +extern const pb_field_t google_firestore_v1beta1_ListenRequest_fields[5]; +extern const pb_field_t google_firestore_v1beta1_ListenRequest_LabelsEntry_fields[3]; +extern const pb_field_t google_firestore_v1beta1_ListenResponse_fields[6]; +extern const pb_field_t google_firestore_v1beta1_Target_fields[7]; +extern const pb_field_t google_firestore_v1beta1_Target_DocumentsTarget_fields[2]; +extern const pb_field_t google_firestore_v1beta1_Target_QueryTarget_fields[3]; +extern const pb_field_t google_firestore_v1beta1_TargetChange_fields[6]; +extern const pb_field_t google_firestore_v1beta1_ListCollectionIdsRequest_fields[4]; +extern const pb_field_t google_firestore_v1beta1_ListCollectionIdsResponse_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1beta1_GetDocumentRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_ListDocumentsRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_ListDocumentsResponse_size depends on runtime parameters */ +/* google_firestore_v1beta1_CreateDocumentRequest_size depends on runtime parameters */ +#define google_firestore_v1beta1_UpdateDocumentRequest_size (44 + google_firestore_v1beta1_Document_size + google_firestore_v1beta1_DocumentMask_size + google_firestore_v1beta1_DocumentMask_size) +/* google_firestore_v1beta1_DeleteDocumentRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_BatchGetDocumentsRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_BatchGetDocumentsResponse_size depends on runtime parameters */ +/* google_firestore_v1beta1_BeginTransactionRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_BeginTransactionResponse_size depends on runtime parameters */ +/* google_firestore_v1beta1_CommitRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_CommitResponse_size depends on runtime parameters */ +/* google_firestore_v1beta1_RollbackRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_RunQueryRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_RunQueryResponse_size depends on runtime parameters */ +/* google_firestore_v1beta1_WriteRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_WriteRequest_LabelsEntry_size depends on runtime parameters */ +/* google_firestore_v1beta1_WriteResponse_size depends on runtime parameters */ +/* google_firestore_v1beta1_ListenRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_ListenRequest_LabelsEntry_size depends on runtime parameters */ +/* google_firestore_v1beta1_ListenResponse_size depends on runtime parameters */ +/* google_firestore_v1beta1_Target_size depends on runtime parameters */ +/* google_firestore_v1beta1_Target_DocumentsTarget_size depends on runtime parameters */ +/* google_firestore_v1beta1_Target_QueryTarget_size depends on runtime parameters */ +/* google_firestore_v1beta1_TargetChange_size depends on runtime parameters */ +/* google_firestore_v1beta1_ListCollectionIdsRequest_size depends on runtime parameters */ +/* google_firestore_v1beta1_ListCollectionIdsResponse_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define FIRESTORE_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c new file mode 100644 index 0000000..c3dbc55 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c @@ -0,0 +1,124 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "query.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1beta1_StructuredQuery_fields[9] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery, select, select, &google_firestore_v1beta1_StructuredQuery_Projection_fields), + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_StructuredQuery, from, select, &google_firestore_v1beta1_StructuredQuery_CollectionSelector_fields), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, where, from, &google_firestore_v1beta1_StructuredQuery_Filter_fields), + PB_FIELD( 4, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_StructuredQuery, order_by, where, &google_firestore_v1beta1_StructuredQuery_Order_fields), + PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, limit, order_by, &google_protobuf_Int32Value_fields), + PB_FIELD( 6, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, offset, limit, 0), + PB_FIELD( 7, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, start_at, offset, &google_firestore_v1beta1_Cursor_fields), + PB_FIELD( 8, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery, end_at, start_at, &google_firestore_v1beta1_Cursor_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_StructuredQuery_CollectionSelector_fields[3] = { + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_StructuredQuery_CollectionSelector, collection_id, collection_id, 0), + PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_CollectionSelector, all_descendants, collection_id, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_StructuredQuery_Filter_fields[4] = { + PB_ONEOF_FIELD(filter_type, 1, MESSAGE , ONEOF, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_Filter, composite_filter, composite_filter, &google_firestore_v1beta1_StructuredQuery_CompositeFilter_fields), + PB_ONEOF_FIELD(filter_type, 2, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_StructuredQuery_Filter, field_filter, field_filter, &google_firestore_v1beta1_StructuredQuery_FieldFilter_fields), + PB_ONEOF_FIELD(filter_type, 3, MESSAGE , ONEOF, STATIC , UNION, google_firestore_v1beta1_StructuredQuery_Filter, unary_filter, unary_filter, &google_firestore_v1beta1_StructuredQuery_UnaryFilter_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_StructuredQuery_CompositeFilter_fields[3] = { + PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_CompositeFilter, op, op, 0), + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_StructuredQuery_CompositeFilter, filters, op, &google_firestore_v1beta1_StructuredQuery_Filter_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_StructuredQuery_FieldFilter_fields[4] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_FieldFilter, field, field, &google_firestore_v1beta1_StructuredQuery_FieldReference_fields), + PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_FieldFilter, op, field, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_FieldFilter, value, op, &google_firestore_v1beta1_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_StructuredQuery_UnaryFilter_fields[3] = { + PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_UnaryFilter, op, op, 0), + PB_ONEOF_FIELD(operand_type, 2, MESSAGE , ONEOF, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_UnaryFilter, field, op, &google_firestore_v1beta1_StructuredQuery_FieldReference_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_StructuredQuery_Order_fields[3] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_StructuredQuery_Order, field, field, &google_firestore_v1beta1_StructuredQuery_FieldReference_fields), + PB_FIELD( 2, UENUM , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_StructuredQuery_Order, direction, field, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_StructuredQuery_FieldReference_fields[2] = { + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_StructuredQuery_FieldReference, field_path, field_path, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_StructuredQuery_Projection_fields[2] = { + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_StructuredQuery_Projection, fields, fields, &google_firestore_v1beta1_StructuredQuery_FieldReference_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_Cursor_fields[3] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_firestore_v1beta1_Cursor, values, values, &google_firestore_v1beta1_Value_fields), + PB_FIELD( 2, BOOL , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Cursor, before, values, 0), + PB_LAST_FIELD +}; + + + + + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_StructuredQuery, select) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery, where) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery, start_at) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery, end_at) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery, limit) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, filter_type.composite_filter) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, filter_type.field_filter) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, filter_type.unary_filter) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_FieldFilter, field) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_FieldFilter, value) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_UnaryFilter, operand_type.field) < 65536 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Order, field) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_StructuredQuery_google_firestore_v1beta1_StructuredQuery_CollectionSelector_google_firestore_v1beta1_StructuredQuery_Filter_google_firestore_v1beta1_StructuredQuery_CompositeFilter_google_firestore_v1beta1_StructuredQuery_FieldFilter_google_firestore_v1beta1_StructuredQuery_UnaryFilter_google_firestore_v1beta1_StructuredQuery_Order_google_firestore_v1beta1_StructuredQuery_FieldReference_google_firestore_v1beta1_StructuredQuery_Projection_google_firestore_v1beta1_Cursor) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_StructuredQuery, select) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery, where) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery, start_at) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery, end_at) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery, limit) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, filter_type.composite_filter) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, filter_type.field_filter) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Filter, filter_type.unary_filter) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_FieldFilter, field) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_FieldFilter, value) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_UnaryFilter, operand_type.field) < 256 && pb_membersize(google_firestore_v1beta1_StructuredQuery_Order, field) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_StructuredQuery_google_firestore_v1beta1_StructuredQuery_CollectionSelector_google_firestore_v1beta1_StructuredQuery_Filter_google_firestore_v1beta1_StructuredQuery_CompositeFilter_google_firestore_v1beta1_StructuredQuery_FieldFilter_google_firestore_v1beta1_StructuredQuery_UnaryFilter_google_firestore_v1beta1_StructuredQuery_Order_google_firestore_v1beta1_StructuredQuery_FieldReference_google_firestore_v1beta1_StructuredQuery_Projection_google_firestore_v1beta1_Cursor) +#endif + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h new file mode 100644 index 0000000..c6c555b --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h @@ -0,0 +1,240 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_QUERY_PB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1BETA1_QUERY_PB_H_INCLUDED +#include + +#include "google/api/annotations.pb.h" + +#include "google/firestore/v1beta1/document.pb.h" + +#include "google/protobuf/wrappers.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Enum definitions */ +typedef enum _google_firestore_v1beta1_StructuredQuery_Direction { + google_firestore_v1beta1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED = 0, + google_firestore_v1beta1_StructuredQuery_Direction_ASCENDING = 1, + google_firestore_v1beta1_StructuredQuery_Direction_DESCENDING = 2 +} google_firestore_v1beta1_StructuredQuery_Direction; +#define _google_firestore_v1beta1_StructuredQuery_Direction_MIN google_firestore_v1beta1_StructuredQuery_Direction_DIRECTION_UNSPECIFIED +#define _google_firestore_v1beta1_StructuredQuery_Direction_MAX google_firestore_v1beta1_StructuredQuery_Direction_DESCENDING +#define _google_firestore_v1beta1_StructuredQuery_Direction_ARRAYSIZE ((google_firestore_v1beta1_StructuredQuery_Direction)(google_firestore_v1beta1_StructuredQuery_Direction_DESCENDING+1)) + +typedef enum _google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator { + google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED = 0, + google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_AND = 1 +} google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator; +#define _google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MIN google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_OPERATOR_UNSPECIFIED +#define _google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MAX google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_AND +#define _google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_ARRAYSIZE ((google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator)(google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_AND+1)) + +typedef enum _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator { + google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED = 0, + google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_LESS_THAN = 1, + google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_LESS_THAN_OR_EQUAL = 2, + google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_GREATER_THAN = 3, + google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_GREATER_THAN_OR_EQUAL = 4, + google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_EQUAL = 5 +} google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator; +#define _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MIN google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_OPERATOR_UNSPECIFIED +#define _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MAX google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_EQUAL +#define _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_ARRAYSIZE ((google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator)(google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_EQUAL+1)) + +typedef enum _google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator { + google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED = 0, + google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_IS_NAN = 2, + google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_IS_NULL = 3 +} google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator; +#define _google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MIN google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_OPERATOR_UNSPECIFIED +#define _google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MAX google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_IS_NULL +#define _google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_ARRAYSIZE ((google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator)(google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_IS_NULL+1)) + +/* Struct definitions */ +typedef struct _google_firestore_v1beta1_StructuredQuery_FieldReference { + pb_callback_t field_path; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_FieldReference) */ +} google_firestore_v1beta1_StructuredQuery_FieldReference; + +typedef struct _google_firestore_v1beta1_StructuredQuery_Projection { + pb_callback_t fields; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_Projection) */ +} google_firestore_v1beta1_StructuredQuery_Projection; + +typedef struct _google_firestore_v1beta1_Cursor { + pb_callback_t values; + bool before; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Cursor) */ +} google_firestore_v1beta1_Cursor; + +typedef struct _google_firestore_v1beta1_StructuredQuery_CollectionSelector { + pb_callback_t collection_id; + bool all_descendants; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_CollectionSelector) */ +} google_firestore_v1beta1_StructuredQuery_CollectionSelector; + +typedef struct _google_firestore_v1beta1_StructuredQuery_CompositeFilter { + google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator op; + pb_callback_t filters; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_CompositeFilter) */ +} google_firestore_v1beta1_StructuredQuery_CompositeFilter; + +typedef struct _google_firestore_v1beta1_StructuredQuery_FieldFilter { + google_firestore_v1beta1_StructuredQuery_FieldReference field; + google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator op; + google_firestore_v1beta1_Value value; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_FieldFilter) */ +} google_firestore_v1beta1_StructuredQuery_FieldFilter; + +typedef struct _google_firestore_v1beta1_StructuredQuery_Order { + google_firestore_v1beta1_StructuredQuery_FieldReference field; + google_firestore_v1beta1_StructuredQuery_Direction direction; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_Order) */ +} google_firestore_v1beta1_StructuredQuery_Order; + +typedef struct _google_firestore_v1beta1_StructuredQuery_UnaryFilter { + google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator op; + pb_size_t which_operand_type; + union { + google_firestore_v1beta1_StructuredQuery_FieldReference field; + } operand_type; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_UnaryFilter) */ +} google_firestore_v1beta1_StructuredQuery_UnaryFilter; + +typedef struct _google_firestore_v1beta1_StructuredQuery_Filter { + pb_size_t which_filter_type; + union { + google_firestore_v1beta1_StructuredQuery_CompositeFilter composite_filter; + google_firestore_v1beta1_StructuredQuery_FieldFilter field_filter; + google_firestore_v1beta1_StructuredQuery_UnaryFilter unary_filter; + } filter_type; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery_Filter) */ +} google_firestore_v1beta1_StructuredQuery_Filter; + +typedef struct _google_firestore_v1beta1_StructuredQuery { + google_firestore_v1beta1_StructuredQuery_Projection select; + pb_callback_t from; + google_firestore_v1beta1_StructuredQuery_Filter where; + pb_callback_t order_by; + google_protobuf_Int32Value limit; + int32_t offset; + google_firestore_v1beta1_Cursor start_at; + google_firestore_v1beta1_Cursor end_at; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_StructuredQuery) */ +} google_firestore_v1beta1_StructuredQuery; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1beta1_StructuredQuery_init_default {google_firestore_v1beta1_StructuredQuery_Projection_init_default, {{NULL}, NULL}, google_firestore_v1beta1_StructuredQuery_Filter_init_default, {{NULL}, NULL}, google_protobuf_Int32Value_init_default, 0, google_firestore_v1beta1_Cursor_init_default, google_firestore_v1beta1_Cursor_init_default} +#define google_firestore_v1beta1_StructuredQuery_CollectionSelector_init_default {{{NULL}, NULL}, 0} +#define google_firestore_v1beta1_StructuredQuery_Filter_init_default {0, {google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_default}} +#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_default {_google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MIN, {{NULL}, NULL}} +#define google_firestore_v1beta1_StructuredQuery_FieldFilter_init_default {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default, _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1beta1_Value_init_default} +#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_init_default {_google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default}} +#define google_firestore_v1beta1_StructuredQuery_Order_init_default {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default, _google_firestore_v1beta1_StructuredQuery_Direction_MIN} +#define google_firestore_v1beta1_StructuredQuery_FieldReference_init_default {{{NULL}, NULL}} +#define google_firestore_v1beta1_StructuredQuery_Projection_init_default {{{NULL}, NULL}} +#define google_firestore_v1beta1_Cursor_init_default {{{NULL}, NULL}, 0} +#define google_firestore_v1beta1_StructuredQuery_init_zero {google_firestore_v1beta1_StructuredQuery_Projection_init_zero, {{NULL}, NULL}, google_firestore_v1beta1_StructuredQuery_Filter_init_zero, {{NULL}, NULL}, google_protobuf_Int32Value_init_zero, 0, google_firestore_v1beta1_Cursor_init_zero, google_firestore_v1beta1_Cursor_init_zero} +#define google_firestore_v1beta1_StructuredQuery_CollectionSelector_init_zero {{{NULL}, NULL}, 0} +#define google_firestore_v1beta1_StructuredQuery_Filter_init_zero {0, {google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_zero}} +#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_zero {_google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MIN, {{NULL}, NULL}} +#define google_firestore_v1beta1_StructuredQuery_FieldFilter_init_zero {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1beta1_Value_init_zero} +#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_init_zero {_google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero}} +#define google_firestore_v1beta1_StructuredQuery_Order_init_zero {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1beta1_StructuredQuery_Direction_MIN} +#define google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero {{{NULL}, NULL}} +#define google_firestore_v1beta1_StructuredQuery_Projection_init_zero {{{NULL}, NULL}} +#define google_firestore_v1beta1_Cursor_init_zero {{{NULL}, NULL}, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1beta1_StructuredQuery_FieldReference_field_path_tag 2 +#define google_firestore_v1beta1_StructuredQuery_Projection_fields_tag 2 +#define google_firestore_v1beta1_Cursor_values_tag 1 +#define google_firestore_v1beta1_Cursor_before_tag 2 +#define google_firestore_v1beta1_StructuredQuery_CollectionSelector_collection_id_tag 2 +#define google_firestore_v1beta1_StructuredQuery_CollectionSelector_all_descendants_tag 3 +#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_op_tag 1 +#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_filters_tag 2 +#define google_firestore_v1beta1_StructuredQuery_FieldFilter_field_tag 1 +#define google_firestore_v1beta1_StructuredQuery_FieldFilter_op_tag 2 +#define google_firestore_v1beta1_StructuredQuery_FieldFilter_value_tag 3 +#define google_firestore_v1beta1_StructuredQuery_Order_field_tag 1 +#define google_firestore_v1beta1_StructuredQuery_Order_direction_tag 2 +#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_field_tag 2 +#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_op_tag 1 +#define google_firestore_v1beta1_StructuredQuery_Filter_composite_filter_tag 1 +#define google_firestore_v1beta1_StructuredQuery_Filter_field_filter_tag 2 +#define google_firestore_v1beta1_StructuredQuery_Filter_unary_filter_tag 3 +#define google_firestore_v1beta1_StructuredQuery_select_tag 1 +#define google_firestore_v1beta1_StructuredQuery_from_tag 2 +#define google_firestore_v1beta1_StructuredQuery_where_tag 3 +#define google_firestore_v1beta1_StructuredQuery_order_by_tag 4 +#define google_firestore_v1beta1_StructuredQuery_start_at_tag 7 +#define google_firestore_v1beta1_StructuredQuery_end_at_tag 8 +#define google_firestore_v1beta1_StructuredQuery_offset_tag 6 +#define google_firestore_v1beta1_StructuredQuery_limit_tag 5 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_fields[9]; +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_CollectionSelector_fields[3]; +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_Filter_fields[4]; +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_CompositeFilter_fields[3]; +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_FieldFilter_fields[4]; +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_UnaryFilter_fields[3]; +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_Order_fields[3]; +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_FieldReference_fields[2]; +extern const pb_field_t google_firestore_v1beta1_StructuredQuery_Projection_fields[2]; +extern const pb_field_t google_firestore_v1beta1_Cursor_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1beta1_StructuredQuery_size depends on runtime parameters */ +/* google_firestore_v1beta1_StructuredQuery_CollectionSelector_size depends on runtime parameters */ +/* google_firestore_v1beta1_StructuredQuery_Filter_size depends on runtime parameters */ +/* google_firestore_v1beta1_StructuredQuery_CompositeFilter_size depends on runtime parameters */ +#define google_firestore_v1beta1_StructuredQuery_FieldFilter_size (14 + google_firestore_v1beta1_StructuredQuery_FieldReference_size + google_firestore_v1beta1_Value_size) +/* google_firestore_v1beta1_StructuredQuery_UnaryFilter_size depends on runtime parameters */ +#define google_firestore_v1beta1_StructuredQuery_Order_size (8 + google_firestore_v1beta1_StructuredQuery_FieldReference_size) +/* google_firestore_v1beta1_StructuredQuery_FieldReference_size depends on runtime parameters */ +/* google_firestore_v1beta1_StructuredQuery_Projection_size depends on runtime parameters */ +/* google_firestore_v1beta1_Cursor_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define QUERY_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c new file mode 100644 index 0000000..79b4c63 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c @@ -0,0 +1,110 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "write.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_firestore_v1beta1_Write_fields[7] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_Write, update, update, &google_firestore_v1beta1_Document_fields), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_Write, delete_, update, 0), + PB_FIELD( 3, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Write, update_mask, delete_, &google_firestore_v1beta1_DocumentMask_fields), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Write, current_document, update_mask, &google_firestore_v1beta1_Precondition_fields), + PB_FIELD( 5, STRING , SINGULAR, CALLBACK, OTHER, google_firestore_v1beta1_Write, verify, current_document, 0), + PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_Write, transform, verify, &google_firestore_v1beta1_DocumentTransform_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_DocumentTransform_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_DocumentTransform, document, document, 0), + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_DocumentTransform, field_transforms, document, &google_firestore_v1beta1_DocumentTransform_FieldTransform_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_DocumentTransform_FieldTransform_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_DocumentTransform_FieldTransform, field_path, field_path, 0), + PB_ONEOF_FIELD(transform_type, 2, ENUM , ONEOF, STATIC , OTHER, google_firestore_v1beta1_DocumentTransform_FieldTransform, set_to_server_value, field_path, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_WriteResult_fields[3] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_WriteResult, update_time, update_time, &google_protobuf_Timestamp_fields), + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_WriteResult, transform_results, update_time, &google_firestore_v1beta1_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_DocumentChange_fields[4] = { + PB_FIELD( 1, MESSAGE , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_DocumentChange, document, document, &google_firestore_v1beta1_Document_fields), + PB_FIELD( 5, INT32 , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_DocumentChange, target_ids, document, 0), + PB_FIELD( 6, INT32 , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_DocumentChange, removed_target_ids, target_ids, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_DocumentDelete_fields[4] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_DocumentDelete, document, document, 0), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_DocumentDelete, read_time, document, &google_protobuf_Timestamp_fields), + PB_FIELD( 6, INT32 , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_DocumentDelete, removed_target_ids, read_time, 0), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_DocumentRemove_fields[4] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_firestore_v1beta1_DocumentRemove, document, document, 0), + PB_FIELD( 2, INT32 , REPEATED, CALLBACK, OTHER, google_firestore_v1beta1_DocumentRemove, removed_target_ids, document, 0), + PB_FIELD( 4, MESSAGE , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_DocumentRemove, read_time, removed_target_ids, &google_protobuf_Timestamp_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_firestore_v1beta1_ExistenceFilter_fields[3] = { + PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_firestore_v1beta1_ExistenceFilter, target_id, target_id, 0), + PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_firestore_v1beta1_ExistenceFilter, count, target_id, 0), + PB_LAST_FIELD +}; + + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Write, update) < 65536 && pb_membersize(google_firestore_v1beta1_Write, transform) < 65536 && pb_membersize(google_firestore_v1beta1_Write, update_mask) < 65536 && pb_membersize(google_firestore_v1beta1_Write, current_document) < 65536 && pb_membersize(google_firestore_v1beta1_WriteResult, update_time) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentChange, document) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentDelete, read_time) < 65536 && pb_membersize(google_firestore_v1beta1_DocumentRemove, read_time) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_firestore_v1beta1_Write_google_firestore_v1beta1_DocumentTransform_google_firestore_v1beta1_DocumentTransform_FieldTransform_google_firestore_v1beta1_WriteResult_google_firestore_v1beta1_DocumentChange_google_firestore_v1beta1_DocumentDelete_google_firestore_v1beta1_DocumentRemove_google_firestore_v1beta1_ExistenceFilter) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_firestore_v1beta1_Write, update) < 256 && pb_membersize(google_firestore_v1beta1_Write, transform) < 256 && pb_membersize(google_firestore_v1beta1_Write, update_mask) < 256 && pb_membersize(google_firestore_v1beta1_Write, current_document) < 256 && pb_membersize(google_firestore_v1beta1_WriteResult, update_time) < 256 && pb_membersize(google_firestore_v1beta1_DocumentChange, document) < 256 && pb_membersize(google_firestore_v1beta1_DocumentDelete, read_time) < 256 && pb_membersize(google_firestore_v1beta1_DocumentRemove, read_time) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_firestore_v1beta1_Write_google_firestore_v1beta1_DocumentTransform_google_firestore_v1beta1_DocumentTransform_FieldTransform_google_firestore_v1beta1_WriteResult_google_firestore_v1beta1_DocumentChange_google_firestore_v1beta1_DocumentDelete_google_firestore_v1beta1_DocumentRemove_google_firestore_v1beta1_ExistenceFilter) +#endif + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h new file mode 100644 index 0000000..d9e15d3 --- /dev/null +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h @@ -0,0 +1,187 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_FIRESTORE_V1BETA1_WRITE_PB_H_INCLUDED +#define PB_GOOGLE_FIRESTORE_V1BETA1_WRITE_PB_H_INCLUDED +#include + +#include "google/api/annotations.pb.h" + +#include "google/firestore/v1beta1/common.pb.h" + +#include "google/firestore/v1beta1/document.pb.h" + +#include "google/protobuf/timestamp.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Enum definitions */ +typedef enum _google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue { + google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED = 0, + google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME = 1 +} google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue; +#define _google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MIN google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_SERVER_VALUE_UNSPECIFIED +#define _google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MAX google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME +#define _google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_ARRAYSIZE ((google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue)(google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_REQUEST_TIME+1)) + +/* Struct definitions */ +typedef struct _google_firestore_v1beta1_DocumentTransform { + pb_callback_t document; + pb_callback_t field_transforms; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentTransform) */ +} google_firestore_v1beta1_DocumentTransform; + +typedef struct _google_firestore_v1beta1_DocumentChange { + google_firestore_v1beta1_Document document; + pb_callback_t target_ids; + pb_callback_t removed_target_ids; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentChange) */ +} google_firestore_v1beta1_DocumentChange; + +typedef struct _google_firestore_v1beta1_DocumentDelete { + pb_callback_t document; + google_protobuf_Timestamp read_time; + pb_callback_t removed_target_ids; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentDelete) */ +} google_firestore_v1beta1_DocumentDelete; + +typedef struct _google_firestore_v1beta1_DocumentRemove { + pb_callback_t document; + pb_callback_t removed_target_ids; + google_protobuf_Timestamp read_time; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentRemove) */ +} google_firestore_v1beta1_DocumentRemove; + +typedef struct _google_firestore_v1beta1_DocumentTransform_FieldTransform { + pb_callback_t field_path; + pb_size_t which_transform_type; + union { + google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue set_to_server_value; + } transform_type; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_DocumentTransform_FieldTransform) */ +} google_firestore_v1beta1_DocumentTransform_FieldTransform; + +typedef struct _google_firestore_v1beta1_ExistenceFilter { + int32_t target_id; + int32_t count; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_ExistenceFilter) */ +} google_firestore_v1beta1_ExistenceFilter; + +typedef struct _google_firestore_v1beta1_Write { + google_firestore_v1beta1_Document update; + pb_callback_t delete_; + google_firestore_v1beta1_DocumentMask update_mask; + google_firestore_v1beta1_Precondition current_document; + pb_callback_t verify; + google_firestore_v1beta1_DocumentTransform transform; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_Write) */ +} google_firestore_v1beta1_Write; + +typedef struct _google_firestore_v1beta1_WriteResult { + google_protobuf_Timestamp update_time; + pb_callback_t transform_results; +/* @@protoc_insertion_point(struct:google_firestore_v1beta1_WriteResult) */ +} google_firestore_v1beta1_WriteResult; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_firestore_v1beta1_Write_init_default {google_firestore_v1beta1_Document_init_default, {{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_default, google_firestore_v1beta1_Precondition_init_default, {{NULL}, NULL}, google_firestore_v1beta1_DocumentTransform_init_default} +#define google_firestore_v1beta1_DocumentTransform_init_default {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_DocumentTransform_FieldTransform_init_default {{{NULL}, NULL}, 0, {_google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MIN}} +#define google_firestore_v1beta1_WriteResult_init_default {google_protobuf_Timestamp_init_default, {{NULL}, NULL}} +#define google_firestore_v1beta1_DocumentChange_init_default {google_firestore_v1beta1_Document_init_default, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_DocumentDelete_init_default {{{NULL}, NULL}, google_protobuf_Timestamp_init_default, {{NULL}, NULL}} +#define google_firestore_v1beta1_DocumentRemove_init_default {{{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_ExistenceFilter_init_default {0, 0} +#define google_firestore_v1beta1_Write_init_zero {google_firestore_v1beta1_Document_init_zero, {{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_zero, google_firestore_v1beta1_Precondition_init_zero, {{NULL}, NULL}, google_firestore_v1beta1_DocumentTransform_init_zero} +#define google_firestore_v1beta1_DocumentTransform_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_DocumentTransform_FieldTransform_init_zero {{{NULL}, NULL}, 0, {_google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MIN}} +#define google_firestore_v1beta1_WriteResult_init_zero {google_protobuf_Timestamp_init_zero, {{NULL}, NULL}} +#define google_firestore_v1beta1_DocumentChange_init_zero {google_firestore_v1beta1_Document_init_zero, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_DocumentDelete_init_zero {{{NULL}, NULL}, google_protobuf_Timestamp_init_zero, {{NULL}, NULL}} +#define google_firestore_v1beta1_DocumentRemove_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_ExistenceFilter_init_zero {0, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_firestore_v1beta1_DocumentTransform_document_tag 1 +#define google_firestore_v1beta1_DocumentTransform_field_transforms_tag 2 +#define google_firestore_v1beta1_DocumentChange_document_tag 1 +#define google_firestore_v1beta1_DocumentChange_target_ids_tag 5 +#define google_firestore_v1beta1_DocumentChange_removed_target_ids_tag 6 +#define google_firestore_v1beta1_DocumentDelete_document_tag 1 +#define google_firestore_v1beta1_DocumentDelete_removed_target_ids_tag 6 +#define google_firestore_v1beta1_DocumentDelete_read_time_tag 4 +#define google_firestore_v1beta1_DocumentRemove_document_tag 1 +#define google_firestore_v1beta1_DocumentRemove_removed_target_ids_tag 2 +#define google_firestore_v1beta1_DocumentRemove_read_time_tag 4 +#define google_firestore_v1beta1_DocumentTransform_FieldTransform_set_to_server_value_tag 2 +#define google_firestore_v1beta1_DocumentTransform_FieldTransform_field_path_tag 1 +#define google_firestore_v1beta1_ExistenceFilter_target_id_tag 1 +#define google_firestore_v1beta1_ExistenceFilter_count_tag 2 +#define google_firestore_v1beta1_Write_update_tag 1 +#define google_firestore_v1beta1_Write_delete_tag 2 +#define google_firestore_v1beta1_Write_verify_tag 5 +#define google_firestore_v1beta1_Write_transform_tag 6 +#define google_firestore_v1beta1_Write_update_mask_tag 3 +#define google_firestore_v1beta1_Write_current_document_tag 4 +#define google_firestore_v1beta1_WriteResult_update_time_tag 1 +#define google_firestore_v1beta1_WriteResult_transform_results_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_firestore_v1beta1_Write_fields[7]; +extern const pb_field_t google_firestore_v1beta1_DocumentTransform_fields[3]; +extern const pb_field_t google_firestore_v1beta1_DocumentTransform_FieldTransform_fields[3]; +extern const pb_field_t google_firestore_v1beta1_WriteResult_fields[3]; +extern const pb_field_t google_firestore_v1beta1_DocumentChange_fields[4]; +extern const pb_field_t google_firestore_v1beta1_DocumentDelete_fields[4]; +extern const pb_field_t google_firestore_v1beta1_DocumentRemove_fields[4]; +extern const pb_field_t google_firestore_v1beta1_ExistenceFilter_fields[3]; + +/* Maximum encoded size of messages (where known) */ +/* google_firestore_v1beta1_Write_size depends on runtime parameters */ +/* google_firestore_v1beta1_DocumentTransform_size depends on runtime parameters */ +/* google_firestore_v1beta1_DocumentTransform_FieldTransform_size depends on runtime parameters */ +/* google_firestore_v1beta1_WriteResult_size depends on runtime parameters */ +/* google_firestore_v1beta1_DocumentChange_size depends on runtime parameters */ +/* google_firestore_v1beta1_DocumentDelete_size depends on runtime parameters */ +/* google_firestore_v1beta1_DocumentRemove_size depends on runtime parameters */ +#define google_firestore_v1beta1_ExistenceFilter_size 22 + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define WRITE_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/rpc/status.pb.c b/Firestore/Protos/nanopb/google/rpc/status.pb.c new file mode 100644 index 0000000..f745a6b --- /dev/null +++ b/Firestore/Protos/nanopb/google/rpc/status.pb.c @@ -0,0 +1,37 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "status.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_rpc_Status_fields[4] = { + PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_rpc_Status, code, code, 0), + PB_FIELD( 2, STRING , SINGULAR, CALLBACK, OTHER, google_rpc_Status, message, code, 0), + PB_FIELD( 3, MESSAGE , REPEATED, CALLBACK, OTHER, google_rpc_Status, details, message, &google_protobuf_Any_fields), + PB_LAST_FIELD +}; + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/rpc/status.pb.h b/Firestore/Protos/nanopb/google/rpc/status.pb.h new file mode 100644 index 0000000..0081c09 --- /dev/null +++ b/Firestore/Protos/nanopb/google/rpc/status.pb.h @@ -0,0 +1,73 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_RPC_STATUS_PB_H_INCLUDED +#define PB_GOOGLE_RPC_STATUS_PB_H_INCLUDED +#include + +#include "google/protobuf/any.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _google_rpc_Status { + int32_t code; + pb_callback_t message; + pb_callback_t details; +/* @@protoc_insertion_point(struct:google_rpc_Status) */ +} google_rpc_Status; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_rpc_Status_init_default {0, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_rpc_Status_init_zero {0, {{NULL}, NULL}, {{NULL}, NULL}} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_rpc_Status_code_tag 1 +#define google_rpc_Status_message_tag 2 +#define google_rpc_Status_details_tag 3 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_rpc_Status_fields[4]; + +/* Maximum encoded size of messages (where known) */ +/* google_rpc_Status_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define STATUS_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/type/latlng.pb.c b/Firestore/Protos/nanopb/google/type/latlng.pb.c new file mode 100644 index 0000000..ae2ddc9 --- /dev/null +++ b/Firestore/Protos/nanopb/google/type/latlng.pb.c @@ -0,0 +1,42 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#include "latlng.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_type_LatLng_fields[3] = { + PB_FIELD( 1, DOUBLE , SINGULAR, STATIC , FIRST, google_type_LatLng, latitude, latitude, 0), + PB_FIELD( 2, DOUBLE , SINGULAR, STATIC , OTHER, google_type_LatLng, longitude, latitude, 0), + PB_LAST_FIELD +}; + + +/* On some platforms (such as AVR), double is really float. + * These are not directly supported by nanopb, but see example_avr_double. + * To get rid of this error, remove any double fields from your .proto. + */ +PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/type/latlng.pb.h b/Firestore/Protos/nanopb/google/type/latlng.pb.h new file mode 100644 index 0000000..5157868 --- /dev/null +++ b/Firestore/Protos/nanopb/google/type/latlng.pb.h @@ -0,0 +1,69 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ + +#ifndef PB_GOOGLE_TYPE_LATLNG_PB_H_INCLUDED +#define PB_GOOGLE_TYPE_LATLNG_PB_H_INCLUDED +#include + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _google_type_LatLng { + double latitude; + double longitude; +/* @@protoc_insertion_point(struct:google_type_LatLng) */ +} google_type_LatLng; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_type_LatLng_init_default {0, 0} +#define google_type_LatLng_init_zero {0, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_type_LatLng_latitude_tag 1 +#define google_type_LatLng_longitude_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_type_LatLng_fields[3]; + +/* Maximum encoded size of messages (where known) */ +#define google_type_LatLng_size 18 + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define LATLNG_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif -- cgit v1.2.3 From 9a71ce8e677cdd1bff4c8fd21666a074d1e893b7 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Fri, 2 Feb 2018 13:54:39 -0500 Subject: Import "well-known" protos (and generated nanopb files) For use by nanopb (which otherwise doesn't know what to do with these.) --- Firestore/Protos/build-protos.sh | 4 + .../Protos/nanopb/google/protobuf/struct.pb.c | 87 ++++++++++++++ .../Protos/nanopb/google/protobuf/struct.pb.h | 117 ++++++++++++++++++ .../Protos/nanopb/google/protobuf/timestamp.pb.c | 36 ++++++ .../Protos/nanopb/google/protobuf/timestamp.pb.h | 69 +++++++++++ .../Protos/protos/google/protobuf/struct.proto | 96 +++++++++++++++ .../Protos/protos/google/protobuf/timestamp.proto | 133 +++++++++++++++++++++ 7 files changed, 542 insertions(+) create mode 100644 Firestore/Protos/nanopb/google/protobuf/struct.pb.c create mode 100644 Firestore/Protos/nanopb/google/protobuf/struct.pb.h create mode 100644 Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c create mode 100644 Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h create mode 100644 Firestore/Protos/protos/google/protobuf/struct.proto create mode 100644 Firestore/Protos/protos/google/protobuf/timestamp.proto (limited to 'Firestore') diff --git a/Firestore/Protos/build-protos.sh b/Firestore/Protos/build-protos.sh index 5c3aa53..ced0ee5 100755 --- a/Firestore/Protos/build-protos.sh +++ b/Firestore/Protos/build-protos.sh @@ -27,6 +27,10 @@ pod update --nanopb_out="--options-file=protos/%s.options:nanopb" \ `find protos -name *.proto -print | xargs` +# Remove "well-known" protos from objc. (We get these for free. We only need +# them for nanopb.) +rm -rf objc/google/protobuf/ + # If a proto uses a field named 'delete', nanopb happily uses that in the # message definition. Works fine for C; not so much for C++. Rename uses of this # to delete_ (which is how protoc does it for c++ files.) diff --git a/Firestore/Protos/nanopb/google/protobuf/struct.pb.c b/Firestore/Protos/nanopb/google/protobuf/struct.pb.c new file mode 100644 index 0000000..b0ed35c --- /dev/null +++ b/Firestore/Protos/nanopb/google/protobuf/struct.pb.c @@ -0,0 +1,87 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.3.9 at Tue Jan 30 18:12:08 2018. */ + +#include "struct.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_protobuf_Struct_fields[2] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_protobuf_Struct, fields, fields, &google_protobuf_Struct_FieldsEntry_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_protobuf_Struct_FieldsEntry_fields[3] = { + PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_protobuf_Struct_FieldsEntry, key, key, 0), + PB_FIELD( 2, MESSAGE , SINGULAR, STATIC , OTHER, google_protobuf_Struct_FieldsEntry, value, key, &google_protobuf_Value_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_protobuf_Value_fields[7] = { + PB_FIELD( 1, UENUM , SINGULAR, STATIC , FIRST, google_protobuf_Value, null_value, null_value, 0), + PB_FIELD( 2, DOUBLE , SINGULAR, STATIC , OTHER, google_protobuf_Value, number_value, null_value, 0), + PB_FIELD( 3, STRING , SINGULAR, CALLBACK, OTHER, google_protobuf_Value, string_value, number_value, 0), + PB_FIELD( 4, BOOL , SINGULAR, STATIC , OTHER, google_protobuf_Value, bool_value, string_value, 0), + PB_FIELD( 5, MESSAGE , SINGULAR, STATIC , OTHER, google_protobuf_Value, struct_value, bool_value, &google_protobuf_Struct_fields), + PB_FIELD( 6, MESSAGE , SINGULAR, STATIC , OTHER, google_protobuf_Value, list_value, struct_value, &google_protobuf_ListValue_fields), + PB_LAST_FIELD +}; + +const pb_field_t google_protobuf_ListValue_fields[2] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_protobuf_ListValue, values, values, &google_protobuf_Value_fields), + PB_LAST_FIELD +}; + + + +/* Check that field information fits in pb_field_t */ +#if !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_32BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in 8 or 16 bit + * field descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_protobuf_Struct_FieldsEntry, value) < 65536 && pb_membersize(google_protobuf_Value, struct_value) < 65536 && pb_membersize(google_protobuf_Value, list_value) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_protobuf_Struct_google_protobuf_Struct_FieldsEntry_google_protobuf_Value_google_protobuf_ListValue) +#endif + +#if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) +/* If you get an error here, it means that you need to define PB_FIELD_16BIT + * compile-time option. You can do that in pb.h or on compiler command line. + * + * The reason you need to do this is that some of your messages contain tag + * numbers or field sizes that are larger than what can fit in the default + * 8 bit descriptors. + */ +PB_STATIC_ASSERT((pb_membersize(google_protobuf_Struct_FieldsEntry, value) < 256 && pb_membersize(google_protobuf_Value, struct_value) < 256 && pb_membersize(google_protobuf_Value, list_value) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_protobuf_Struct_google_protobuf_Struct_FieldsEntry_google_protobuf_Value_google_protobuf_ListValue) +#endif + + +/* On some platforms (such as AVR), double is really float. + * These are not directly supported by nanopb, but see example_avr_double. + * To get rid of this error, remove any double fields from your .proto. + */ +PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES) + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/protobuf/struct.pb.h b/Firestore/Protos/nanopb/google/protobuf/struct.pb.h new file mode 100644 index 0000000..1871f0e --- /dev/null +++ b/Firestore/Protos/nanopb/google/protobuf/struct.pb.h @@ -0,0 +1,117 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.3.9 at Tue Jan 30 18:12:08 2018. */ + +#ifndef PB_GOOGLE_PROTOBUF_STRUCT_PB_H_INCLUDED +#define PB_GOOGLE_PROTOBUF_STRUCT_PB_H_INCLUDED +#include + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Enum definitions */ +typedef enum _google_protobuf_NullValue { + google_protobuf_NullValue_NULL_VALUE = 0 +} google_protobuf_NullValue; +#define _google_protobuf_NullValue_MIN google_protobuf_NullValue_NULL_VALUE +#define _google_protobuf_NullValue_MAX google_protobuf_NullValue_NULL_VALUE +#define _google_protobuf_NullValue_ARRAYSIZE ((google_protobuf_NullValue)(google_protobuf_NullValue_NULL_VALUE+1)) + +/* Struct definitions */ +typedef struct _google_protobuf_ListValue { + pb_callback_t values; +/* @@protoc_insertion_point(struct:google_protobuf_ListValue) */ +} google_protobuf_ListValue; + +typedef struct _google_protobuf_Struct { + pb_callback_t fields; +/* @@protoc_insertion_point(struct:google_protobuf_Struct) */ +} google_protobuf_Struct; + +typedef struct _google_protobuf_Value { + google_protobuf_NullValue null_value; + double number_value; + pb_callback_t string_value; + bool bool_value; + google_protobuf_Struct struct_value; + google_protobuf_ListValue list_value; +/* @@protoc_insertion_point(struct:google_protobuf_Value) */ +} google_protobuf_Value; + +typedef struct _google_protobuf_Struct_FieldsEntry { + pb_callback_t key; + google_protobuf_Value value; +/* @@protoc_insertion_point(struct:google_protobuf_Struct_FieldsEntry) */ +} google_protobuf_Struct_FieldsEntry; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_protobuf_Struct_init_default {{{NULL}, NULL}} +#define google_protobuf_Struct_FieldsEntry_init_default {{{NULL}, NULL}, google_protobuf_Value_init_default} +#define google_protobuf_Value_init_default {(google_protobuf_NullValue)0, 0, {{NULL}, NULL}, 0, google_protobuf_Struct_init_default, google_protobuf_ListValue_init_default} +#define google_protobuf_ListValue_init_default {{{NULL}, NULL}} +#define google_protobuf_Struct_init_zero {{{NULL}, NULL}} +#define google_protobuf_Struct_FieldsEntry_init_zero {{{NULL}, NULL}, google_protobuf_Value_init_zero} +#define google_protobuf_Value_init_zero {(google_protobuf_NullValue)0, 0, {{NULL}, NULL}, 0, google_protobuf_Struct_init_zero, google_protobuf_ListValue_init_zero} +#define google_protobuf_ListValue_init_zero {{{NULL}, NULL}} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_protobuf_ListValue_values_tag 1 +#define google_protobuf_Struct_fields_tag 1 +#define google_protobuf_Value_null_value_tag 1 +#define google_protobuf_Value_number_value_tag 2 +#define google_protobuf_Value_string_value_tag 3 +#define google_protobuf_Value_bool_value_tag 4 +#define google_protobuf_Value_struct_value_tag 5 +#define google_protobuf_Value_list_value_tag 6 +#define google_protobuf_Struct_FieldsEntry_key_tag 1 +#define google_protobuf_Struct_FieldsEntry_value_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_protobuf_Struct_fields[2]; +extern const pb_field_t google_protobuf_Struct_FieldsEntry_fields[3]; +extern const pb_field_t google_protobuf_Value_fields[7]; +extern const pb_field_t google_protobuf_ListValue_fields[2]; + +/* Maximum encoded size of messages (where known) */ +/* google_protobuf_Struct_size depends on runtime parameters */ +/* google_protobuf_Struct_FieldsEntry_size depends on runtime parameters */ +/* google_protobuf_Value_size depends on runtime parameters */ +/* google_protobuf_ListValue_size depends on runtime parameters */ + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define STRUCT_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c new file mode 100644 index 0000000..0ad8cd7 --- /dev/null +++ b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c @@ -0,0 +1,36 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb constant definitions */ +/* Generated by nanopb-0.3.9 at Tue Jan 30 18:12:08 2018. */ + +#include "timestamp.pb.h" + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + + + +const pb_field_t google_protobuf_Timestamp_fields[3] = { + PB_FIELD( 1, INT64 , SINGULAR, STATIC , FIRST, google_protobuf_Timestamp, seconds, seconds, 0), + PB_FIELD( 2, INT32 , SINGULAR, STATIC , OTHER, google_protobuf_Timestamp, nanos, seconds, 0), + PB_LAST_FIELD +}; + + +/* @@protoc_insertion_point(eof) */ diff --git a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h new file mode 100644 index 0000000..84dd444 --- /dev/null +++ b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h @@ -0,0 +1,69 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.3.9 at Tue Jan 30 18:12:08 2018. */ + +#ifndef PB_GOOGLE_PROTOBUF_TIMESTAMP_PB_H_INCLUDED +#define PB_GOOGLE_PROTOBUF_TIMESTAMP_PB_H_INCLUDED +#include + +/* @@protoc_insertion_point(includes) */ +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _google_protobuf_Timestamp { + int64_t seconds; + int32_t nanos; +/* @@protoc_insertion_point(struct:google_protobuf_Timestamp) */ +} google_protobuf_Timestamp; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define google_protobuf_Timestamp_init_default {0, 0} +#define google_protobuf_Timestamp_init_zero {0, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define google_protobuf_Timestamp_seconds_tag 1 +#define google_protobuf_Timestamp_nanos_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t google_protobuf_Timestamp_fields[3]; + +/* Maximum encoded size of messages (where known) */ +#define google_protobuf_Timestamp_size 22 + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define TIMESTAMP_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif +/* @@protoc_insertion_point(eof) */ + +#endif diff --git a/Firestore/Protos/protos/google/protobuf/struct.proto b/Firestore/Protos/protos/google/protobuf/struct.proto new file mode 100644 index 0000000..7d7808e --- /dev/null +++ b/Firestore/Protos/protos/google/protobuf/struct.proto @@ -0,0 +1,96 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "github.com/golang/protobuf/ptypes/struct;structpb"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "StructProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + + +// `Struct` represents a structured data value, consisting of fields +// which map to dynamically typed values. In some languages, `Struct` +// might be supported by a native representation. For example, in +// scripting languages like JS a struct is represented as an +// object. The details of that representation are described together +// with the proto support for the language. +// +// The JSON representation for `Struct` is JSON object. +message Struct { + // Unordered map of dynamically typed values. + map fields = 1; +} + +// `Value` represents a dynamically typed value which can be either +// null, a number, a string, a boolean, a recursive struct value, or a +// list of values. A producer of value is expected to set one of that +// variants, absence of any variant indicates an error. +// +// The JSON representation for `Value` is JSON value. +message Value { + // The kind of value. + oneof kind { + // Represents a null value. + NullValue null_value = 1; + // Represents a double value. + double number_value = 2; + // Represents a string value. + string string_value = 3; + // Represents a boolean value. + bool bool_value = 4; + // Represents a structured value. + Struct struct_value = 5; + // Represents a repeated `Value`. + ListValue list_value = 6; + } +} + +// `NullValue` is a singleton enumeration to represent the null value for the +// `Value` type union. +// +// The JSON representation for `NullValue` is JSON `null`. +enum NullValue { + // Null value. + NULL_VALUE = 0; +} + +// `ListValue` is a wrapper around a repeated field of values. +// +// The JSON representation for `ListValue` is JSON array. +message ListValue { + // Repeated field of dynamically typed values. + repeated Value values = 1; +} diff --git a/Firestore/Protos/protos/google/protobuf/timestamp.proto b/Firestore/Protos/protos/google/protobuf/timestamp.proto new file mode 100644 index 0000000..b7cbd17 --- /dev/null +++ b/Firestore/Protos/protos/google/protobuf/timestamp.proto @@ -0,0 +1,133 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package google.protobuf; + +option csharp_namespace = "Google.Protobuf.WellKnownTypes"; +option cc_enable_arenas = true; +option go_package = "github.com/golang/protobuf/ptypes/timestamp"; +option java_package = "com.google.protobuf"; +option java_outer_classname = "TimestampProto"; +option java_multiple_files = true; +option objc_class_prefix = "GPB"; + +// A Timestamp represents a point in time independent of any time zone +// or calendar, represented as seconds and fractions of seconds at +// nanosecond resolution in UTC Epoch time. It is encoded using the +// Proleptic Gregorian Calendar which extends the Gregorian calendar +// backwards to year one. It is encoded assuming all minutes are 60 +// seconds long, i.e. leap seconds are "smeared" so that no leap second +// table is needed for interpretation. Range is from +// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. +// By restricting to that range, we ensure that we can convert to +// and from RFC 3339 date strings. +// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt). +// +// # Examples +// +// Example 1: Compute Timestamp from POSIX `time()`. +// +// Timestamp timestamp; +// timestamp.set_seconds(time(NULL)); +// timestamp.set_nanos(0); +// +// Example 2: Compute Timestamp from POSIX `gettimeofday()`. +// +// struct timeval tv; +// gettimeofday(&tv, NULL); +// +// Timestamp timestamp; +// timestamp.set_seconds(tv.tv_sec); +// timestamp.set_nanos(tv.tv_usec * 1000); +// +// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. +// +// FILETIME ft; +// GetSystemTimeAsFileTime(&ft); +// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; +// +// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z +// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. +// Timestamp timestamp; +// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); +// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); +// +// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. +// +// long millis = System.currentTimeMillis(); +// +// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) +// .setNanos((int) ((millis % 1000) * 1000000)).build(); +// +// +// Example 5: Compute Timestamp from current time in Python. +// +// timestamp = Timestamp() +// timestamp.GetCurrentTime() +// +// # JSON Mapping +// +// In JSON format, the Timestamp type is encoded as a string in the +// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the +// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" +// where {year} is always expressed using four digits while {month}, {day}, +// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional +// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), +// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone +// is required, though only UTC (as indicated by "Z") is presently supported. +// +// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past +// 01:30 UTC on January 15, 2017. +// +// In JavaScript, one can convert a Date object to this format using the +// standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString] +// method. In Python, a standard `datetime.datetime` object can be converted +// to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) +// with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one +// can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( +// http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()) +// to obtain a formatter capable of generating timestamps in this format. +// +// +message Timestamp { + + // Represents seconds of UTC time since Unix epoch + // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + // 9999-12-31T23:59:59Z inclusive. + int64 seconds = 1; + + // Non-negative fractions of a second at nanosecond resolution. Negative + // second values with fractions must still have non-negative nanos values + // that count forward in time. Must be from 0 to 999,999,999 + // inclusive. + int32 nanos = 2; +} -- cgit v1.2.3 From 3fcdf510ce4b7f50e44445ff329d9019e73ba257 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Fri, 2 Feb 2018 14:12:51 -0500 Subject: Hook up nanopb to firestorep project Use remote/serializer placeholder class as a hook for the test to ensure nanopb headers can be found, and test can be linked. --- CMakeLists.txt | 2 +- Firestore/CMakeLists.txt | 4 ++ .../src/firebase/firestore/remote/CMakeLists.txt | 3 ++ .../src/firebase/firestore/remote/serializer.cc | 34 ++++++++++++++++ .../src/firebase/firestore/remote/serializer.h | 45 ++++++++++++++++++++++ .../test/firebase/firestore/remote/CMakeLists.txt | 1 + .../firebase/firestore/remote/serializer_test.cc | 28 ++++++++++++++ cmake/FindNanopb.cmake | 34 ++++++++++++++++ cmake/external/firestore.cmake | 1 + 9 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 Firestore/core/src/firebase/firestore/remote/serializer.cc create mode 100644 Firestore/core/src/firebase/firestore/remote/serializer.h create mode 100644 Firestore/core/test/firebase/firestore/remote/serializer_test.cc create mode 100644 cmake/FindNanopb.cmake (limited to 'Firestore') diff --git a/CMakeLists.txt b/CMakeLists.txt index 370655c..15b68b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,6 @@ include(external/FirebaseCore) include(external/googletest) include(external/leveldb) include(external/grpc) -include(external/firestore) include(external/protobuf) include(external/nanopb) +include(external/firestore) diff --git a/Firestore/CMakeLists.txt b/Firestore/CMakeLists.txt index b8c95c6..25f27fa 100644 --- a/Firestore/CMakeLists.txt +++ b/Firestore/CMakeLists.txt @@ -47,6 +47,7 @@ add_library( find_package(LevelDB REQUIRED) find_package(GRPC REQUIRED) +find_package(Nanopb REQUIRED) if(APPLE) find_package(FirebaseCore REQUIRED) @@ -63,4 +64,7 @@ include_directories(${FIREBASE_INSTALL_DIR}) # Fully qualified imports, project wide include_directories(${FIREBASE_SOURCE_DIR}) +# Include nanopb generated sources +include_directories(${FIREBASE_SOURCE_DIR}/Firestore/Protos/nanopb) + add_subdirectory(core) diff --git a/Firestore/core/src/firebase/firestore/remote/CMakeLists.txt b/Firestore/core/src/firebase/firestore/remote/CMakeLists.txt index 43320ce..a218e3b 100644 --- a/Firestore/core/src/firebase/firestore/remote/CMakeLists.txt +++ b/Firestore/core/src/firebase/firestore/remote/CMakeLists.txt @@ -17,6 +17,9 @@ cc_library( SOURCES datastore.h datastore.cc + serializer.h + serializer.cc DEPENDS grpc::grpc + nanopb ) diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.cc b/Firestore/core/src/firebase/firestore/remote/serializer.cc new file mode 100644 index 0000000..1831222 --- /dev/null +++ b/Firestore/core/src/firebase/firestore/remote/serializer.cc @@ -0,0 +1,34 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/remote/serializer.h" + +// TODO(rsgowman): These are (currently!) unnecessary includes. Adding for now +// to ensure we can find nanopb's generated header files. +#include "Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h" +#include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h" + + +namespace firebase { +namespace firestore { +namespace remote { + +Serializer::Serializer() { +} + +} // namespace remote +} // namespace firestore +} // namespace firebase diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.h b/Firestore/core/src/firebase/firestore/remote/serializer.h new file mode 100644 index 0000000..4dc6b9e --- /dev/null +++ b/Firestore/core/src/firebase/firestore/remote/serializer.h @@ -0,0 +1,45 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_REMOTE_SERIALIZER_H_ +#define FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_REMOTE_SERIALIZER_H_ + +namespace firebase { +namespace firestore { +namespace remote { + +/** + * @brief Converts internal model objects to their equivalent protocol buffer + * form. + * + * Methods starting with "Encode" convert to a protocol buffer and methods + * starting with "Decode" convert from a protocol buffer. + * + */ +// TODO(rsgowman): Original docs also has this: "Throws an exception if a +// protocol buffer is missing a critical field or has a value we can't +// interpret." Adjust for C++. +class Serializer { + public: + // TODO(rsgowman): Adjust ctor to accept a DatabaseID... once that exists. + Serializer(/*DatabaseID databaseId*/); +}; + +} // namespace remote +} // namespace firestore +} // namespace firebase + +#endif // FIRESTORE_CORE_SRC_FIREBASE_FIRESTORE_REMOTE_SERIALIZER_H_ diff --git a/Firestore/core/test/firebase/firestore/remote/CMakeLists.txt b/Firestore/core/test/firebase/firestore/remote/CMakeLists.txt index 7d99e6f..d42b107 100644 --- a/Firestore/core/test/firebase/firestore/remote/CMakeLists.txt +++ b/Firestore/core/test/firebase/firestore/remote/CMakeLists.txt @@ -16,6 +16,7 @@ cc_test( firebase_firestore_remote_test SOURCES datastore_test.cc + serializer_test.cc DEPENDS firebase_firestore_remote ) diff --git a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc new file mode 100644 index 0000000..6a58adb --- /dev/null +++ b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc @@ -0,0 +1,28 @@ +/* + * Copyright 2018 Google + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "Firestore/core/src/firebase/firestore/remote/serializer.h" + +#include +#include + +TEST(Serializer, CanLinkToNanopb) { + // This test doesn't actually do anything interesting as far as actually using + // nanopb is concerned but that it can run at all is proof that all the + // libraries required for nanopb to work are actually linked correctly into + // the test. + pb_ostream_from_buffer(NULL, 0); +} diff --git a/cmake/FindNanopb.cmake b/cmake/FindNanopb.cmake new file mode 100644 index 0000000..fab6f4a --- /dev/null +++ b/cmake/FindNanopb.cmake @@ -0,0 +1,34 @@ +include(FindPackageHandleStandardArgs) + +set(BINARY_DIR ${FIREBASE_INSTALL_DIR}/external/nanopb) + +find_path( + NANOPB_INCLUDE_DIR pb.h + HINTS ${BINARY_DIR}/src/nanopb +) + +find_library( + NANOPB_LIBRARY + NAMES protobuf-nanopb protobuf-nanopbd + HINTS ${BINARY_DIR}/src/nanopb-build +) + +find_package_handle_standard_args( + nanopb + DEFAULT_MSG + NANOPB_INCLUDE_DIR + NANOPB_LIBRARY +) + +if(NANOPB_FOUND) + set(NANOPB_INCLUDE_DIRS ${NANOPB_INCLUDE_DIR} ) + + if (NOT TARGET nanopb) + add_library(nanopb UNKNOWN IMPORTED) + set_target_properties( + nanopb PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES ${NANOPB_INCLUDE_DIRS} + IMPORTED_LOCATION ${NANOPB_LIBRARY} + ) + endif() +endif(NANOPB_FOUND) diff --git a/cmake/external/firestore.cmake b/cmake/external/firestore.cmake index 1a89435..94f7cae 100644 --- a/cmake/external/firestore.cmake +++ b/cmake/external/firestore.cmake @@ -21,6 +21,7 @@ ExternalProject_Add( googletest leveldb grpc + nanopb # Lay the binary directory out as if this were a subproject. This makes it # possible to build and test in it directly. -- cgit v1.2.3 From c896fab35f0b37123175eb1011e6155ecb36a92b Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Fri, 2 Feb 2018 14:36:18 -0500 Subject: ./style.sh --- Firestore/core/src/firebase/firestore/remote/serializer.cc | 3 +-- Firestore/core/test/firebase/firestore/remote/serializer_test.cc | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'Firestore') diff --git a/Firestore/core/src/firebase/firestore/remote/serializer.cc b/Firestore/core/src/firebase/firestore/remote/serializer.cc index 1831222..d3cdd3f 100644 --- a/Firestore/core/src/firebase/firestore/remote/serializer.cc +++ b/Firestore/core/src/firebase/firestore/remote/serializer.cc @@ -18,9 +18,8 @@ // TODO(rsgowman): These are (currently!) unnecessary includes. Adding for now // to ensure we can find nanopb's generated header files. -#include "Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h" #include "Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h" - +#include "Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h" namespace firebase { namespace firestore { diff --git a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc index 6a58adb..1be5a87 100644 --- a/Firestore/core/test/firebase/firestore/remote/serializer_test.cc +++ b/Firestore/core/test/firebase/firestore/remote/serializer_test.cc @@ -16,8 +16,8 @@ #include "Firestore/core/src/firebase/firestore/remote/serializer.h" -#include #include +#include TEST(Serializer, CanLinkToNanopb) { // This test doesn't actually do anything interesting as far as actually using -- cgit v1.2.3 From fd0b332f4609bb3a2e3918f24ca470b1a3c2a301 Mon Sep 17 00:00:00 2001 From: Rich Gowman Date: Mon, 5 Feb 2018 13:55:20 -0500 Subject: Downgrade nanopb from 0.4.0-dev to 0.3.8. Also regenerate the protos --- Firestore/Protos/build-protos.sh | 2 +- .../nanopb/firestore/local/maybe_document.pb.c | 2 +- .../nanopb/firestore/local/maybe_document.pb.h | 2 +- .../Protos/nanopb/firestore/local/mutation.pb.c | 2 +- .../Protos/nanopb/firestore/local/mutation.pb.h | 2 +- .../Protos/nanopb/firestore/local/target.pb.c | 2 +- .../Protos/nanopb/firestore/local/target.pb.h | 2 +- .../Protos/nanopb/google/api/annotations.pb.c | 2 +- .../Protos/nanopb/google/api/annotations.pb.h | 2 +- Firestore/Protos/nanopb/google/api/http.pb.c | 2 +- Firestore/Protos/nanopb/google/api/http.pb.h | 2 +- .../nanopb/google/firestore/v1beta1/common.pb.c | 2 +- .../nanopb/google/firestore/v1beta1/common.pb.h | 2 +- .../nanopb/google/firestore/v1beta1/document.pb.c | 2 +- .../nanopb/google/firestore/v1beta1/document.pb.h | 6 ++-- .../nanopb/google/firestore/v1beta1/firestore.pb.c | 2 +- .../nanopb/google/firestore/v1beta1/firestore.pb.h | 6 ++-- .../nanopb/google/firestore/v1beta1/query.pb.c | 2 +- .../nanopb/google/firestore/v1beta1/query.pb.h | 18 +++++----- .../nanopb/google/firestore/v1beta1/write.pb.c | 2 +- .../nanopb/google/firestore/v1beta1/write.pb.h | 6 ++-- .../Protos/nanopb/google/protobuf/struct.pb.c | 2 +- .../Protos/nanopb/google/protobuf/struct.pb.h | 2 +- .../Protos/nanopb/google/protobuf/timestamp.pb.c | 2 +- .../Protos/nanopb/google/protobuf/timestamp.pb.h | 2 +- Firestore/Protos/nanopb/google/rpc/status.pb.c | 2 +- Firestore/Protos/nanopb/google/rpc/status.pb.h | 2 +- Firestore/Protos/nanopb/google/type/latlng.pb.c | 2 +- Firestore/Protos/nanopb/google/type/latlng.pb.h | 2 +- cmake/FindNanopb.cmake | 2 +- cmake/external/nanopb.cmake | 40 ++++++++++------------ 31 files changed, 62 insertions(+), 66 deletions(-) (limited to 'Firestore') diff --git a/Firestore/Protos/build-protos.sh b/Firestore/Protos/build-protos.sh index ced0ee5..a535f16 100755 --- a/Firestore/Protos/build-protos.sh +++ b/Firestore/Protos/build-protos.sh @@ -22,7 +22,7 @@ pod update # Generate the objective C files from the protos. ./Pods/!ProtoCompiler/protoc \ --plugin=protoc-gen-grpc=Pods/\!ProtoCompiler-gRPCPlugin/grpc_objective_c_plugin \ - --plugin=../../build/external/nanopb/src/nanopb-build/generator/protoc-gen-nanopb \ + --plugin=../../build/external/nanopb/src/nanopb/generator/protoc-gen-nanopb \ -I protos --objc_out=objc --grpc_out=objc \ --nanopb_out="--options-file=protos/%s.options:nanopb" \ `find protos -name *.proto -print | xargs` diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c index 45bc2f0..7cd4035 100644 --- a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c +++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "maybe_document.pb.h" diff --git a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h index 8c2f8bd..b159cd1 100644 --- a/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h +++ b/Firestore/Protos/nanopb/firestore/local/maybe_document.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_PB_H_INCLUDED #define PB_FIRESTORE_CLIENT_MAYBE_DOCUMENT_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.pb.c b/Firestore/Protos/nanopb/firestore/local/mutation.pb.c index 39dfd77..7dedb14 100644 --- a/Firestore/Protos/nanopb/firestore/local/mutation.pb.c +++ b/Firestore/Protos/nanopb/firestore/local/mutation.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "mutation.pb.h" diff --git a/Firestore/Protos/nanopb/firestore/local/mutation.pb.h b/Firestore/Protos/nanopb/firestore/local/mutation.pb.h index 28b8e54..537d0cd 100644 --- a/Firestore/Protos/nanopb/firestore/local/mutation.pb.h +++ b/Firestore/Protos/nanopb/firestore/local/mutation.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_FIRESTORE_CLIENT_MUTATION_PB_H_INCLUDED #define PB_FIRESTORE_CLIENT_MUTATION_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/firestore/local/target.pb.c b/Firestore/Protos/nanopb/firestore/local/target.pb.c index 269eb04..2805ceb 100644 --- a/Firestore/Protos/nanopb/firestore/local/target.pb.c +++ b/Firestore/Protos/nanopb/firestore/local/target.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "target.pb.h" diff --git a/Firestore/Protos/nanopb/firestore/local/target.pb.h b/Firestore/Protos/nanopb/firestore/local/target.pb.h index 01b0fdc..8cc146f 100644 --- a/Firestore/Protos/nanopb/firestore/local/target.pb.h +++ b/Firestore/Protos/nanopb/firestore/local/target.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED #define PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/google/api/annotations.pb.c b/Firestore/Protos/nanopb/google/api/annotations.pb.c index f26aa49..6da5206 100644 --- a/Firestore/Protos/nanopb/google/api/annotations.pb.c +++ b/Firestore/Protos/nanopb/google/api/annotations.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "annotations.pb.h" diff --git a/Firestore/Protos/nanopb/google/api/annotations.pb.h b/Firestore/Protos/nanopb/google/api/annotations.pb.h index 656d293..33c9ba8 100644 --- a/Firestore/Protos/nanopb/google/api/annotations.pb.h +++ b/Firestore/Protos/nanopb/google/api/annotations.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_API_ANNOTATIONS_PB_H_INCLUDED #define PB_GOOGLE_API_ANNOTATIONS_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/google/api/http.pb.c b/Firestore/Protos/nanopb/google/api/http.pb.c index d2c39aa..5219163 100644 --- a/Firestore/Protos/nanopb/google/api/http.pb.c +++ b/Firestore/Protos/nanopb/google/api/http.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "http.pb.h" diff --git a/Firestore/Protos/nanopb/google/api/http.pb.h b/Firestore/Protos/nanopb/google/api/http.pb.h index e41343f..e29758c 100644 --- a/Firestore/Protos/nanopb/google/api/http.pb.h +++ b/Firestore/Protos/nanopb/google/api/http.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_API_HTTP_PB_H_INCLUDED #define PB_GOOGLE_API_HTTP_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c index 6b93f2a..de2cf65 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "common.pb.h" diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h index 6f61794..277d9b8 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/common.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_FIRESTORE_V1BETA1_COMMON_PB_H_INCLUDED #define PB_GOOGLE_FIRESTORE_V1BETA1_COMMON_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c index a35a713..862c884 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "document.pb.h" diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h index c9b36e2..180c1af 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/document.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_FIRESTORE_V1BETA1_DOCUMENT_PB_H_INCLUDED #define PB_GOOGLE_FIRESTORE_V1BETA1_DOCUMENT_PB_H_INCLUDED @@ -89,13 +89,13 @@ typedef struct _google_firestore_v1beta1_MapValue_FieldsEntry { /* Initializer values for message structs */ #define google_firestore_v1beta1_Document_init_default {{{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_default, google_protobuf_Timestamp_init_default} #define google_firestore_v1beta1_Document_FieldsEntry_init_default {{{NULL}, NULL}, google_firestore_v1beta1_Value_init_default} -#define google_firestore_v1beta1_Value_init_default {0, 0, 0, {{NULL}, NULL}, google_firestore_v1beta1_MapValue_init_default, google_type_LatLng_init_default, google_firestore_v1beta1_ArrayValue_init_default, google_protobuf_Timestamp_init_default, _google_protobuf_NullValue_MIN, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_Value_init_default {0, 0, 0, {{NULL}, NULL}, google_firestore_v1beta1_MapValue_init_default, google_type_LatLng_init_default, google_firestore_v1beta1_ArrayValue_init_default, google_protobuf_Timestamp_init_default, (google_protobuf_NullValue)0, {{NULL}, NULL}, {{NULL}, NULL}} #define google_firestore_v1beta1_ArrayValue_init_default {{{NULL}, NULL}} #define google_firestore_v1beta1_MapValue_init_default {{{NULL}, NULL}} #define google_firestore_v1beta1_MapValue_FieldsEntry_init_default {{{NULL}, NULL}, google_firestore_v1beta1_Value_init_default} #define google_firestore_v1beta1_Document_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero, google_protobuf_Timestamp_init_zero} #define google_firestore_v1beta1_Document_FieldsEntry_init_zero {{{NULL}, NULL}, google_firestore_v1beta1_Value_init_zero} -#define google_firestore_v1beta1_Value_init_zero {0, 0, 0, {{NULL}, NULL}, google_firestore_v1beta1_MapValue_init_zero, google_type_LatLng_init_zero, google_firestore_v1beta1_ArrayValue_init_zero, google_protobuf_Timestamp_init_zero, _google_protobuf_NullValue_MIN, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_firestore_v1beta1_Value_init_zero {0, 0, 0, {{NULL}, NULL}, google_firestore_v1beta1_MapValue_init_zero, google_type_LatLng_init_zero, google_firestore_v1beta1_ArrayValue_init_zero, google_protobuf_Timestamp_init_zero, (google_protobuf_NullValue)0, {{NULL}, NULL}, {{NULL}, NULL}} #define google_firestore_v1beta1_ArrayValue_init_zero {{{NULL}, NULL}} #define google_firestore_v1beta1_MapValue_init_zero {{{NULL}, NULL}} #define google_firestore_v1beta1_MapValue_FieldsEntry_init_zero {{{NULL}, NULL}, google_firestore_v1beta1_Value_init_zero} diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c index a450c28..bc8eca9 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "firestore.pb.h" diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h index ef62edb..5bfbcf8 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/firestore.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_FIRESTORE_V1BETA1_FIRESTORE_PB_H_INCLUDED #define PB_GOOGLE_FIRESTORE_V1BETA1_FIRESTORE_PB_H_INCLUDED @@ -305,7 +305,7 @@ typedef struct _google_firestore_v1beta1_ListenRequest { #define google_firestore_v1beta1_Target_init_default {0, {google_firestore_v1beta1_Target_QueryTarget_init_default}, {{NULL}, NULL}, 0, 0, google_protobuf_Timestamp_init_default} #define google_firestore_v1beta1_Target_DocumentsTarget_init_default {{{NULL}, NULL}} #define google_firestore_v1beta1_Target_QueryTarget_init_default {{{NULL}, NULL}, 0, {google_firestore_v1beta1_StructuredQuery_init_default}} -#define google_firestore_v1beta1_TargetChange_init_default {_google_firestore_v1beta1_TargetChange_TargetChangeType_MIN, {{NULL}, NULL}, google_rpc_Status_init_default, {{NULL}, NULL}, google_protobuf_Timestamp_init_default} +#define google_firestore_v1beta1_TargetChange_init_default {(google_firestore_v1beta1_TargetChange_TargetChangeType)0, {{NULL}, NULL}, google_rpc_Status_init_default, {{NULL}, NULL}, google_protobuf_Timestamp_init_default} #define google_firestore_v1beta1_ListCollectionIdsRequest_init_default {{{NULL}, NULL}, 0, {{NULL}, NULL}} #define google_firestore_v1beta1_ListCollectionIdsResponse_init_default {{{NULL}, NULL}, {{NULL}, NULL}} #define google_firestore_v1beta1_GetDocumentRequest_init_zero {{{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_zero, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} @@ -332,7 +332,7 @@ typedef struct _google_firestore_v1beta1_ListenRequest { #define google_firestore_v1beta1_Target_init_zero {0, {google_firestore_v1beta1_Target_QueryTarget_init_zero}, {{NULL}, NULL}, 0, 0, google_protobuf_Timestamp_init_zero} #define google_firestore_v1beta1_Target_DocumentsTarget_init_zero {{{NULL}, NULL}} #define google_firestore_v1beta1_Target_QueryTarget_init_zero {{{NULL}, NULL}, 0, {google_firestore_v1beta1_StructuredQuery_init_zero}} -#define google_firestore_v1beta1_TargetChange_init_zero {_google_firestore_v1beta1_TargetChange_TargetChangeType_MIN, {{NULL}, NULL}, google_rpc_Status_init_zero, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} +#define google_firestore_v1beta1_TargetChange_init_zero {(google_firestore_v1beta1_TargetChange_TargetChangeType)0, {{NULL}, NULL}, google_rpc_Status_init_zero, {{NULL}, NULL}, google_protobuf_Timestamp_init_zero} #define google_firestore_v1beta1_ListCollectionIdsRequest_init_zero {{{NULL}, NULL}, 0, {{NULL}, NULL}} #define google_firestore_v1beta1_ListCollectionIdsResponse_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c index c3dbc55..4e68490 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "query.pb.h" diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h index c6c555b..faad2a2 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/query.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_FIRESTORE_V1BETA1_QUERY_PB_H_INCLUDED #define PB_GOOGLE_FIRESTORE_V1BETA1_QUERY_PB_H_INCLUDED @@ -154,20 +154,20 @@ typedef struct _google_firestore_v1beta1_StructuredQuery { #define google_firestore_v1beta1_StructuredQuery_init_default {google_firestore_v1beta1_StructuredQuery_Projection_init_default, {{NULL}, NULL}, google_firestore_v1beta1_StructuredQuery_Filter_init_default, {{NULL}, NULL}, google_protobuf_Int32Value_init_default, 0, google_firestore_v1beta1_Cursor_init_default, google_firestore_v1beta1_Cursor_init_default} #define google_firestore_v1beta1_StructuredQuery_CollectionSelector_init_default {{{NULL}, NULL}, 0} #define google_firestore_v1beta1_StructuredQuery_Filter_init_default {0, {google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_default}} -#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_default {_google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MIN, {{NULL}, NULL}} -#define google_firestore_v1beta1_StructuredQuery_FieldFilter_init_default {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default, _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1beta1_Value_init_default} -#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_init_default {_google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default}} -#define google_firestore_v1beta1_StructuredQuery_Order_init_default {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default, _google_firestore_v1beta1_StructuredQuery_Direction_MIN} +#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_default {(google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator)0, {{NULL}, NULL}} +#define google_firestore_v1beta1_StructuredQuery_FieldFilter_init_default {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default, (google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator)0, google_firestore_v1beta1_Value_init_default} +#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_init_default {(google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator)0, 0, {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default}} +#define google_firestore_v1beta1_StructuredQuery_Order_init_default {google_firestore_v1beta1_StructuredQuery_FieldReference_init_default, (google_firestore_v1beta1_StructuredQuery_Direction)0} #define google_firestore_v1beta1_StructuredQuery_FieldReference_init_default {{{NULL}, NULL}} #define google_firestore_v1beta1_StructuredQuery_Projection_init_default {{{NULL}, NULL}} #define google_firestore_v1beta1_Cursor_init_default {{{NULL}, NULL}, 0} #define google_firestore_v1beta1_StructuredQuery_init_zero {google_firestore_v1beta1_StructuredQuery_Projection_init_zero, {{NULL}, NULL}, google_firestore_v1beta1_StructuredQuery_Filter_init_zero, {{NULL}, NULL}, google_protobuf_Int32Value_init_zero, 0, google_firestore_v1beta1_Cursor_init_zero, google_firestore_v1beta1_Cursor_init_zero} #define google_firestore_v1beta1_StructuredQuery_CollectionSelector_init_zero {{{NULL}, NULL}, 0} #define google_firestore_v1beta1_StructuredQuery_Filter_init_zero {0, {google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_zero}} -#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_zero {_google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator_MIN, {{NULL}, NULL}} -#define google_firestore_v1beta1_StructuredQuery_FieldFilter_init_zero {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator_MIN, google_firestore_v1beta1_Value_init_zero} -#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_init_zero {_google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator_MIN, 0, {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero}} -#define google_firestore_v1beta1_StructuredQuery_Order_init_zero {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero, _google_firestore_v1beta1_StructuredQuery_Direction_MIN} +#define google_firestore_v1beta1_StructuredQuery_CompositeFilter_init_zero {(google_firestore_v1beta1_StructuredQuery_CompositeFilter_Operator)0, {{NULL}, NULL}} +#define google_firestore_v1beta1_StructuredQuery_FieldFilter_init_zero {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero, (google_firestore_v1beta1_StructuredQuery_FieldFilter_Operator)0, google_firestore_v1beta1_Value_init_zero} +#define google_firestore_v1beta1_StructuredQuery_UnaryFilter_init_zero {(google_firestore_v1beta1_StructuredQuery_UnaryFilter_Operator)0, 0, {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero}} +#define google_firestore_v1beta1_StructuredQuery_Order_init_zero {google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero, (google_firestore_v1beta1_StructuredQuery_Direction)0} #define google_firestore_v1beta1_StructuredQuery_FieldReference_init_zero {{{NULL}, NULL}} #define google_firestore_v1beta1_StructuredQuery_Projection_init_zero {{{NULL}, NULL}} #define google_firestore_v1beta1_Cursor_init_zero {{{NULL}, NULL}, 0} diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c index 79b4c63..462eca6 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "write.pb.h" diff --git a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h index d9e15d3..a44b6d4 100644 --- a/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h +++ b/Firestore/Protos/nanopb/google/firestore/v1beta1/write.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_FIRESTORE_V1BETA1_WRITE_PB_H_INCLUDED #define PB_GOOGLE_FIRESTORE_V1BETA1_WRITE_PB_H_INCLUDED @@ -111,7 +111,7 @@ typedef struct _google_firestore_v1beta1_WriteResult { /* Initializer values for message structs */ #define google_firestore_v1beta1_Write_init_default {google_firestore_v1beta1_Document_init_default, {{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_default, google_firestore_v1beta1_Precondition_init_default, {{NULL}, NULL}, google_firestore_v1beta1_DocumentTransform_init_default} #define google_firestore_v1beta1_DocumentTransform_init_default {{{NULL}, NULL}, {{NULL}, NULL}} -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_init_default {{{NULL}, NULL}, 0, {_google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MIN}} +#define google_firestore_v1beta1_DocumentTransform_FieldTransform_init_default {{{NULL}, NULL}, 0, {(google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue)0}} #define google_firestore_v1beta1_WriteResult_init_default {google_protobuf_Timestamp_init_default, {{NULL}, NULL}} #define google_firestore_v1beta1_DocumentChange_init_default {google_firestore_v1beta1_Document_init_default, {{NULL}, NULL}, {{NULL}, NULL}} #define google_firestore_v1beta1_DocumentDelete_init_default {{{NULL}, NULL}, google_protobuf_Timestamp_init_default, {{NULL}, NULL}} @@ -119,7 +119,7 @@ typedef struct _google_firestore_v1beta1_WriteResult { #define google_firestore_v1beta1_ExistenceFilter_init_default {0, 0} #define google_firestore_v1beta1_Write_init_zero {google_firestore_v1beta1_Document_init_zero, {{NULL}, NULL}, google_firestore_v1beta1_DocumentMask_init_zero, google_firestore_v1beta1_Precondition_init_zero, {{NULL}, NULL}, google_firestore_v1beta1_DocumentTransform_init_zero} #define google_firestore_v1beta1_DocumentTransform_init_zero {{{NULL}, NULL}, {{NULL}, NULL}} -#define google_firestore_v1beta1_DocumentTransform_FieldTransform_init_zero {{{NULL}, NULL}, 0, {_google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue_MIN}} +#define google_firestore_v1beta1_DocumentTransform_FieldTransform_init_zero {{{NULL}, NULL}, 0, {(google_firestore_v1beta1_DocumentTransform_FieldTransform_ServerValue)0}} #define google_firestore_v1beta1_WriteResult_init_zero {google_protobuf_Timestamp_init_zero, {{NULL}, NULL}} #define google_firestore_v1beta1_DocumentChange_init_zero {google_firestore_v1beta1_Document_init_zero, {{NULL}, NULL}, {{NULL}, NULL}} #define google_firestore_v1beta1_DocumentDelete_init_zero {{{NULL}, NULL}, google_protobuf_Timestamp_init_zero, {{NULL}, NULL}} diff --git a/Firestore/Protos/nanopb/google/protobuf/struct.pb.c b/Firestore/Protos/nanopb/google/protobuf/struct.pb.c index b0ed35c..2826aab 100644 --- a/Firestore/Protos/nanopb/google/protobuf/struct.pb.c +++ b/Firestore/Protos/nanopb/google/protobuf/struct.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.3.9 at Tue Jan 30 18:12:08 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "struct.pb.h" diff --git a/Firestore/Protos/nanopb/google/protobuf/struct.pb.h b/Firestore/Protos/nanopb/google/protobuf/struct.pb.h index 1871f0e..b325b60 100644 --- a/Firestore/Protos/nanopb/google/protobuf/struct.pb.h +++ b/Firestore/Protos/nanopb/google/protobuf/struct.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.9 at Tue Jan 30 18:12:08 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_PROTOBUF_STRUCT_PB_H_INCLUDED #define PB_GOOGLE_PROTOBUF_STRUCT_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c index 0ad8cd7..4f03c19 100644 --- a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c +++ b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.3.9 at Tue Jan 30 18:12:08 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "timestamp.pb.h" diff --git a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h index 84dd444..d7be977 100644 --- a/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h +++ b/Firestore/Protos/nanopb/google/protobuf/timestamp.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.9 at Tue Jan 30 18:12:08 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_PROTOBUF_TIMESTAMP_PB_H_INCLUDED #define PB_GOOGLE_PROTOBUF_TIMESTAMP_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/google/rpc/status.pb.c b/Firestore/Protos/nanopb/google/rpc/status.pb.c index f745a6b..dbdccce 100644 --- a/Firestore/Protos/nanopb/google/rpc/status.pb.c +++ b/Firestore/Protos/nanopb/google/rpc/status.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "status.pb.h" diff --git a/Firestore/Protos/nanopb/google/rpc/status.pb.h b/Firestore/Protos/nanopb/google/rpc/status.pb.h index 0081c09..afcbab9 100644 --- a/Firestore/Protos/nanopb/google/rpc/status.pb.h +++ b/Firestore/Protos/nanopb/google/rpc/status.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_RPC_STATUS_PB_H_INCLUDED #define PB_GOOGLE_RPC_STATUS_PB_H_INCLUDED diff --git a/Firestore/Protos/nanopb/google/type/latlng.pb.c b/Firestore/Protos/nanopb/google/type/latlng.pb.c index ae2ddc9..b5f6424 100644 --- a/Firestore/Protos/nanopb/google/type/latlng.pb.c +++ b/Firestore/Protos/nanopb/google/type/latlng.pb.c @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb constant definitions */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #include "latlng.pb.h" diff --git a/Firestore/Protos/nanopb/google/type/latlng.pb.h b/Firestore/Protos/nanopb/google/type/latlng.pb.h index 5157868..fa5703b 100644 --- a/Firestore/Protos/nanopb/google/type/latlng.pb.h +++ b/Firestore/Protos/nanopb/google/type/latlng.pb.h @@ -15,7 +15,7 @@ */ /* Automatically generated nanopb header */ -/* Generated by nanopb-0.4.0-dev at Wed Jan 31 18:12:27 2018. */ +/* Generated by nanopb-0.3.8 at Fri Feb 2 17:48:02 2018. */ #ifndef PB_GOOGLE_TYPE_LATLNG_PB_H_INCLUDED #define PB_GOOGLE_TYPE_LATLNG_PB_H_INCLUDED diff --git a/cmake/FindNanopb.cmake b/cmake/FindNanopb.cmake index fab6f4a..fb22aef 100644 --- a/cmake/FindNanopb.cmake +++ b/cmake/FindNanopb.cmake @@ -21,7 +21,7 @@ find_package_handle_standard_args( ) if(NANOPB_FOUND) - set(NANOPB_INCLUDE_DIRS ${NANOPB_INCLUDE_DIR} ) + set(NANOPB_INCLUDE_DIRS ${NANOPB_INCLUDE_DIR}) if (NOT TARGET nanopb) add_library(nanopb UNKNOWN IMPORTED) diff --git a/cmake/external/nanopb.cmake b/cmake/external/nanopb.cmake index d602d9a..c78613f 100644 --- a/cmake/external/nanopb.cmake +++ b/cmake/external/nanopb.cmake @@ -1,6 +1,4 @@ -# Copyright 2018 Google -# -# Licensed under the Apache License, Version 2.0 (the "License"); +# Copyright 2018 Google # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # @@ -18,7 +16,7 @@ include(ExternalProjectFlags) ExternalProject_GitSource( NANOPB_GIT GIT_REPOSITORY "https://github.com/nanopb/nanopb.git" - GIT_TAG "master" # Needs the most recent. 0.3.9 doesn't fully support cmake. + GIT_TAG "0.3.8" ) ExternalProject_Add( @@ -28,34 +26,32 @@ ExternalProject_Add( ${NANOPB_GIT} + BUILD_IN_SOURCE ON + PREFIX ${PROJECT_BINARY_DIR}/external/nanopb + # Note for (not yet released) nanopb 0.4.0: nanopb will (likely) switch to + # cmake for the protoc plugin. Set these additional cmake variables to use + # it. + # -Dnanopb_BUILD_GENERATOR:BOOL=ON + # -Dnanopb_PROTOC_PATH:STRING=${FIREBASE_INSTALL_DIR}/external/protobuf/src/protobuf-build/src/protoc CMAKE_ARGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DBUILD_SHARED_LIBS:BOOL=OFF - -Dnanopb_BUILD_GENERATOR:BOOL=ON - -Dnanopb_PROTOC_PATH:STRING=${FIREBASE_INSTALL_DIR}/external/protobuf/src/protobuf-build/src/protoc BUILD_COMMAND - ${CMAKE_COMMAND} --build . - # NB: The following additional build commands are only necessary to - # regenerate the nanopb proto files. - COMMAND - ${CMAKE_COMMAND} -E make_directory /generator/proto COMMAND - ${CMAKE_COMMAND} -E copy /generator/proto/__init__.py /generator/proto/ - COMMAND - ${CMAKE_COMMAND} -E copy /generator/protoc-gen-nanopb /generator/ - COMMAND - ${CMAKE_COMMAND} -E copy /generator/nanopb_generator.py /generator/ - COMMAND - ${CMAKE_COMMAND} -E copy /nanopb_pb2.py /generator/proto/ + ${CMAKE_COMMAND} --build . + # NB: The following additional command is only necessary to regenerate the + # nanopb proto files. COMMAND - ${CMAKE_COMMAND} -E copy /plugin_pb2.py /generator/proto/ + make -C /generator/proto - # TODO: once we clone via a tag (rather than the master branch) we should - # disable updates; i.e.: - # UPDATE_COMMAND "" + # nanopb relies on $PATH for the location of protoc. cmake makes it difficult + # to adjust the path, so we'll just patch the build files with the exact + # location of protoc. + PATCH_COMMAND perl -i -pe s,protoc,${FIREBASE_INSTALL_DIR}/external/protobuf/src/protobuf-build/src/protoc,g ./CMakeLists.txt ./generator/proto/Makefile + UPDATE_COMMAND "" INSTALL_COMMAND "" ) -- cgit v1.2.3