From 09e4eddd826e6391ab099f79bb0117c01801ab7a Mon Sep 17 00:00:00 2001 From: Michael Lehenbauer Date: Wed, 11 Apr 2018 08:55:42 -0700 Subject: Rebuild proto artifacts from existing sources and update README.md instructions. (#1058) --- .../FrameworkMaker.xcodeproj/project.pbxproj | 2 +- Firestore/Protos/README.md | 10 +++- .../Protos/nanopb/firestore/local/target.pb.c | 5 +- .../Protos/nanopb/firestore/local/target.pb.h | 12 +++-- .../google/firestore/v1beta1/Firestore.pbrpc.h | 58 ++++++++++++++++------ .../google/firestore/v1beta1/Firestore.pbrpc.m | 19 ++++++- 6 files changed, 80 insertions(+), 26 deletions(-) (limited to 'Firestore/Protos') diff --git a/Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj b/Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj index 2efcb21..4a1e9d4 100644 --- a/Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj +++ b/Firestore/Protos/FrameworkMaker.xcodeproj/project.pbxproj @@ -205,7 +205,7 @@ ); name = "[CP] Copy Pods Resources"; outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}", + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/gRPCCertificates.bundle", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; diff --git a/Firestore/Protos/README.md b/Firestore/Protos/README.md index 6137ff6..fbede5b 100644 --- a/Firestore/Protos/README.md +++ b/Firestore/Protos/README.md @@ -1,6 +1,11 @@ ## Usage -First, build protobuf and nanopb +First, make sure you have necessary prereqs for building: +``` +brew install automake libtool protobuf +``` + +Take a nap while that completes. Then, build protobuf and nanopb: ``` cd firebase-ios-sdk mkdir -p build @@ -15,7 +20,8 @@ cd firebase-ios-sdk/Firestore/Protos ./build-protos.sh ``` -Verify diffs, tests and make PR +Verify diffs (you'll likely need to re-add copyright notices, etc.), make sure +tests still pass, and create a PR. ### Script Details diff --git a/Firestore/Protos/nanopb/firestore/local/target.pb.c b/Firestore/Protos/nanopb/firestore/local/target.pb.c index 2805ceb..d00d4a6 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.3.8 at Fri Feb 2 17:48:02 2018. */ +/* Generated by nanopb-0.3.8 at Mon Apr 9 15:08:47 2018. */ #include "target.pb.h" @@ -36,10 +36,11 @@ const pb_field_t firestore_client_Target_fields[7] = { PB_LAST_FIELD }; -const pb_field_t firestore_client_TargetGlobal_fields[4] = { +const pb_field_t firestore_client_TargetGlobal_fields[5] = { 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_FIELD( 4, INT32 , SINGULAR, STATIC , OTHER, firestore_client_TargetGlobal, target_count, last_remote_snapshot_version, 0), PB_LAST_FIELD }; diff --git a/Firestore/Protos/nanopb/firestore/local/target.pb.h b/Firestore/Protos/nanopb/firestore/local/target.pb.h index 8cc146f..37b64a2 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.3.8 at Fri Feb 2 17:48:02 2018. */ +/* Generated by nanopb-0.3.8 at Mon Apr 9 15:08:47 2018. */ #ifndef PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED #define PB_FIRESTORE_CLIENT_TARGET_PB_H_INCLUDED @@ -52,6 +52,7 @@ typedef struct _firestore_client_TargetGlobal { int32_t highest_target_id; int64_t highest_listen_sequence_number; google_protobuf_Timestamp last_remote_snapshot_version; + int32_t target_count; /* @@protoc_insertion_point(struct:firestore_client_TargetGlobal) */ } firestore_client_TargetGlobal; @@ -59,9 +60,9 @@ typedef struct _firestore_client_TargetGlobal { /* 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_TargetGlobal_init_default {0, 0, google_protobuf_Timestamp_init_default, 0} #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} +#define firestore_client_TargetGlobal_init_zero {0, 0, google_protobuf_Timestamp_init_zero, 0} /* Field tags (for use in manual encoding/decoding) */ #define firestore_client_Target_query_tag 5 @@ -73,14 +74,15 @@ typedef struct _firestore_client_TargetGlobal { #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 +#define firestore_client_TargetGlobal_target_count_tag 4 /* 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]; +extern const pb_field_t firestore_client_TargetGlobal_fields[5]; /* Maximum encoded size of messages (where known) */ /* firestore_client_Target_size depends on runtime parameters */ -#define firestore_client_TargetGlobal_size 46 +#define firestore_client_TargetGlobal_size 57 /* Message IDs (where set with "msgid" option) */ #ifdef PB_MSGID diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h index d7f127b..991c3f0 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h +++ b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h @@ -14,29 +14,57 @@ * limitations under the License. */ -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h" +#if !GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO +#import "Firestore.pbobjc.h" +#endif #import #import #import #import -#import "Firestore/Protos/objc/google/api/Annotations.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Common.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Query.pbobjc.h" -#import "Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h" -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import -#else - #import "Empty.pbobjc.h" -#endif -#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS - #import +#if GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO + @class GCFSBatchGetDocumentsRequest; + @class GCFSBatchGetDocumentsResponse; + @class GCFSBeginTransactionRequest; + @class GCFSBeginTransactionResponse; + @class GCFSCommitRequest; + @class GCFSCommitResponse; + @class GCFSCreateDocumentRequest; + @class GCFSDeleteDocumentRequest; + @class GCFSDocument; + @class GCFSGetDocumentRequest; + @class GCFSListCollectionIdsRequest; + @class GCFSListCollectionIdsResponse; + @class GCFSListDocumentsRequest; + @class GCFSListDocumentsResponse; + @class GCFSListenRequest; + @class GCFSListenResponse; + @class GCFSRollbackRequest; + @class GCFSRunQueryRequest; + @class GCFSRunQueryResponse; + @class GCFSUpdateDocumentRequest; + @class GCFSWriteRequest; + @class GCFSWriteResponse; + @class GPBEmpty; #else - #import "Timestamp.pbobjc.h" + #import "Annotations.pbobjc.h" + #import "Common.pbobjc.h" + #import "Document.pbobjc.h" + #import "Query.pbobjc.h" + #import "Write.pbobjc.h" + #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import + #else + #import "Empty.pbobjc.h" + #endif + #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import + #else + #import "Timestamp.pbobjc.h" + #endif + #import "Status.pbobjc.h" #endif -#import "Firestore/Protos/objc/google/rpc/Status.pbobjc.h" NS_ASSUME_NONNULL_BEGIN diff --git a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m index eec4c9a..29359b6 100644 --- a/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m +++ b/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.m @@ -14,10 +14,27 @@ * limitations under the License. */ -#import "Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbrpc.h" +#import "Firestore.pbrpc.h" +#import "Firestore.pbobjc.h" #import #import +#import "Annotations.pbobjc.h" +#import "Common.pbobjc.h" +#import "Document.pbobjc.h" +#import "Query.pbobjc.h" +#import "Write.pbobjc.h" +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "Empty.pbobjc.h" +#endif +#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS + #import +#else + #import "Timestamp.pbobjc.h" +#endif +#import "Status.pbobjc.h" @implementation GCFSFirestore -- cgit v1.2.3