Skip to content

Serialize and deserialize null #783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Firestore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,4 @@ include_directories(${FIREBASE_SOURCE_DIR})
include_directories(${FIREBASE_SOURCE_DIR}/Firestore/Protos/nanopb)

add_subdirectory(core)
add_subdirectory(Protos)
45 changes: 45 additions & 0 deletions Firestore/Protos/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cc_library(
firebase_firestore_protos_nanopb
SOURCES
nanopb/firestore/local/maybe_document.pb.c
nanopb/firestore/local/maybe_document.pb.h
nanopb/firestore/local/mutation.pb.c
nanopb/firestore/local/mutation.pb.h
nanopb/firestore/local/target.pb.c
nanopb/firestore/local/target.pb.h
nanopb/google/api/annotations.pb.c
nanopb/google/api/annotations.pb.h
nanopb/google/api/http.pb.c
nanopb/google/api/http.pb.h
nanopb/google/firestore/v1beta1/common.pb.c
nanopb/google/firestore/v1beta1/common.pb.h
nanopb/google/firestore/v1beta1/document.pb.c
nanopb/google/firestore/v1beta1/document.pb.h
nanopb/google/firestore/v1beta1/firestore.pb.c
nanopb/google/firestore/v1beta1/firestore.pb.h
nanopb/google/firestore/v1beta1/query.pb.c
nanopb/google/firestore/v1beta1/query.pb.h
nanopb/google/firestore/v1beta1/write.pb.c
nanopb/google/firestore/v1beta1/write.pb.h
nanopb/google/protobuf/any.pb.c
nanopb/google/protobuf/any.pb.h
nanopb/google/protobuf/empty.pb.c
nanopb/google/protobuf/empty.pb.h
nanopb/google/protobuf/struct.pb.c
nanopb/google/protobuf/struct.pb.h
nanopb/google/protobuf/timestamp.pb.c
nanopb/google/protobuf/timestamp.pb.h
nanopb/google/protobuf/wrappers.pb.c
nanopb/google/protobuf/wrappers.pb.h
nanopb/google/rpc/status.pb.c
nanopb/google/rpc/status.pb.h
nanopb/google/type/latlng.pb.c
nanopb/google/type/latlng.pb.h
DEPENDS
nanopb
)

target_compile_definitions(
firebase_firestore_protos_nanopb PUBLIC
-DPB_FIELD_16BIT
)
36 changes: 36 additions & 0 deletions Firestore/Protos/nanopb/google/protobuf/any.pb.c
Original file line number Diff line number Diff line change
@@ -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.8 at Mon Feb 12 11:03:06 2018. */

#include "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



const pb_field_t google_protobuf_Any_fields[3] = {
PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_protobuf_Any, type_url, type_url, 0),
PB_FIELD( 2, BYTES , SINGULAR, CALLBACK, OTHER, google_protobuf_Any, value, type_url, 0),
PB_LAST_FIELD
};


/* @@protoc_insertion_point(eof) */
69 changes: 69 additions & 0 deletions Firestore/Protos/nanopb/google/protobuf/any.pb.h
Original file line number Diff line number Diff line change
@@ -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.8 at Mon Feb 12 11:03:06 2018. */

#ifndef PB_GOOGLE_PROTOBUF_ANY_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_ANY_PB_H_INCLUDED
#include <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_protobuf_Any {
pb_callback_t type_url;
pb_callback_t value;
/* @@protoc_insertion_point(struct:google_protobuf_Any) */
} google_protobuf_Any;

/* Default values for struct fields */

/* Initializer values for message structs */
#define google_protobuf_Any_init_default {{{NULL}, NULL}, {{NULL}, NULL}}
#define google_protobuf_Any_init_zero {{{NULL}, NULL}, {{NULL}, NULL}}

/* Field tags (for use in manual encoding/decoding) */
#define google_protobuf_Any_type_url_tag 1
#define google_protobuf_Any_value_tag 2

/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_Any_fields[3];

/* Maximum encoded size of messages (where known) */
/* google_protobuf_Any_size depends on runtime parameters */

/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID

#define ANY_MESSAGES \


#endif

#ifdef __cplusplus
} /* extern "C" */
#endif
/* @@protoc_insertion_point(eof) */

#endif
34 changes: 34 additions & 0 deletions Firestore/Protos/nanopb/google/protobuf/empty.pb.c
Original file line number Diff line number Diff line change
@@ -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.
*/

/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.3.8 at Mon Feb 12 11:03:06 2018. */

#include "empty.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_Empty_fields[1] = {
PB_LAST_FIELD
};


/* @@protoc_insertion_point(eof) */
66 changes: 66 additions & 0 deletions Firestore/Protos/nanopb/google/protobuf/empty.pb.h
Original file line number Diff line number Diff line change
@@ -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 header */
/* Generated by nanopb-0.3.8 at Mon Feb 12 11:03:06 2018. */

#ifndef PB_GOOGLE_PROTOBUF_EMPTY_PB_H_INCLUDED
#define PB_GOOGLE_PROTOBUF_EMPTY_PB_H_INCLUDED
#include <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_protobuf_Empty {
char dummy_field;
/* @@protoc_insertion_point(struct:google_protobuf_Empty) */
} google_protobuf_Empty;

/* Default values for struct fields */

/* Initializer values for message structs */
#define google_protobuf_Empty_init_default {0}
#define google_protobuf_Empty_init_zero {0}

/* Field tags (for use in manual encoding/decoding) */

/* Struct field encoding specification for nanopb */
extern const pb_field_t google_protobuf_Empty_fields[1];

/* Maximum encoded size of messages (where known) */
#define google_protobuf_Empty_size 0

/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID

#define EMPTY_MESSAGES \


#endif

#ifdef __cplusplus
} /* extern "C" */
#endif
/* @@protoc_insertion_point(eof) */

#endif
81 changes: 81 additions & 0 deletions Firestore/Protos/nanopb/google/protobuf/wrappers.pb.c
Original file line number Diff line number Diff line change
@@ -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.3.8 at Mon Feb 12 11:03:06 2018. */

#include "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



const pb_field_t google_protobuf_DoubleValue_fields[2] = {
PB_FIELD( 1, DOUBLE , SINGULAR, STATIC , FIRST, google_protobuf_DoubleValue, value, value, 0),
PB_LAST_FIELD
};

const pb_field_t google_protobuf_FloatValue_fields[2] = {
PB_FIELD( 1, FLOAT , SINGULAR, STATIC , FIRST, google_protobuf_FloatValue, value, value, 0),
PB_LAST_FIELD
};

const pb_field_t google_protobuf_Int64Value_fields[2] = {
PB_FIELD( 1, INT64 , SINGULAR, STATIC , FIRST, google_protobuf_Int64Value, value, value, 0),
PB_LAST_FIELD
};

const pb_field_t google_protobuf_UInt64Value_fields[2] = {
PB_FIELD( 1, UINT64 , SINGULAR, STATIC , FIRST, google_protobuf_UInt64Value, value, value, 0),
PB_LAST_FIELD
};

const pb_field_t google_protobuf_Int32Value_fields[2] = {
PB_FIELD( 1, INT32 , SINGULAR, STATIC , FIRST, google_protobuf_Int32Value, value, value, 0),
PB_LAST_FIELD
};

const pb_field_t google_protobuf_UInt32Value_fields[2] = {
PB_FIELD( 1, UINT32 , SINGULAR, STATIC , FIRST, google_protobuf_UInt32Value, value, value, 0),
PB_LAST_FIELD
};

const pb_field_t google_protobuf_BoolValue_fields[2] = {
PB_FIELD( 1, BOOL , SINGULAR, STATIC , FIRST, google_protobuf_BoolValue, value, value, 0),
PB_LAST_FIELD
};

const pb_field_t google_protobuf_StringValue_fields[2] = {
PB_FIELD( 1, STRING , SINGULAR, CALLBACK, FIRST, google_protobuf_StringValue, value, value, 0),
PB_LAST_FIELD
};

const pb_field_t google_protobuf_BytesValue_fields[2] = {
PB_FIELD( 1, BYTES , SINGULAR, CALLBACK, FIRST, google_protobuf_BytesValue, value, value, 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) */
Loading