| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
Deserializing not handled yet.
Note that the serializing case is fairly uninteresting, as assuming
valid input is passed in, there's no real reason why it should fail (and
if it does fail, it indicates a gross violation of our understanding of
the system.)
|
| |
|
|
|
|
|
|
|
| |
* Rename Writer::Encode* methods to Writer::Write*
* Rename: s/stream/writer/ (approximately)
but only where it applies to Writer (rather than pb_ostream_t).
|
|
|
|
|
|
|
|
|
|
| |
* Move creation of pb_ostream_t's into Writer
Writer now owns these structs
* Writer::FromBuffer -> Writer::Wrap
* add todo for possible future simplification.
|
|
|
|
| |
Wraps encoding of FieldValue's. At this point, raw pb_ostream_t structs
aren't used outside of Writer, except during creation of a Writer.
|
|
|
|
| |
Wraps encoding of FieldValue "Objects" (i.e. map<string, FieldValue>'s)
and their entries (i.e. pair<string, FieldValue>'s)
|
|
|
| |
Wraps encoding nested messages.
|
|
|
| |
Uses a custom pb_ostream_t. Previously used a stack allocated 1k buffer.
|
|
|
| |
Wraps the string encode method.
|
|
|
| |
Wraps the varint based encode methods.
|
|
|
| |
These can (recursively) contain other FieldValues.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This will likely only apply for proto messages that use 'oneof's. (Because we need to serialize these manually.)
The problem was that as we were adding additional types, TypeValue was evolving into a parallel implementation of the FieldValue union.
When serializing/deserializing oneofs we need to supply a custom value to serialize and a custom function to do the work. There's no value in translating from FieldValue to TypeValue just to store as this custom object. We might as well just store the FieldValue model directly and write the custom serializer/deserializer to use the model directly.
|
|
|
|
|
|
|
|
| |
Since we can't decode a value before knowing it's type, I've pulled the
tag handling out of these methods.
More context over here:
https://github.com/firebase/firebase-ios-sdk/pull/829
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* [En|De]codeUnsignedVarint -> [En|De]codeVarint
The 'unsigned' portion was misleading, as these varints work with both
signed and unsigned integers. (The 'signed' varints also work with both
signed and unsigned integers, but use zig-zag encoding so that negative
numbers are encoded more efficiently. Note that 'signed' varints aren't
used in the Value proto, so won't appear in the serializer class for at
least the short term.)
Added some docstrings to help disambiguate this.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Build (grpc's) nanopb with -DPB_FIELD_16BIT
We require (at least) 16 bit fields. (By default, nanopb uses 8 bit
fields, ie allowing up to 256 field tags.)
Also note that this patch adds this to grpc's nanopb, rather than to our
nanopb. We'll need to eventually either:
a) we instruct grpc to use our nanopb
b) we rely on grpc's nanopb instead of using our own.
(^ marked as a TODO for now.)
* Add some dependant protos
Imported from protobuf. Nanopb requires these to be present (though
anything using libprotobuf does not, as these are already built into
that.)
* Add generated nanopb protos based off of newly added proto definitions
* Build the nanopb protos
* Serialize and deserialize null
|
| |
|
|
|
|
|
| |
Use remote/serializer placeholder class as a hook for the test to ensure
nanopb headers can be found, and test can be linked.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rewrite cc_test to take named arguments
Cut down on build file verbosity by having cc_test take SOURCES and
DEPENDS. The separate invocation of target_link_libraries is no longer
necessary.
* Add a cc_library rule to parallel cc_test
This cuts down on build file verbosity.
* Automatically add OBJC_FLAGS to cc_libraries if applicable
* Exclude platform-specific libraries from 'all'
This is makes it possible to declare this kind of library
unconditionally. Usage within a test or as a dependency will actually
trigger building.
* Restore secure_random_test.cc; clean-up comments
|
|
* Clean up quoting and other minor issues
* Reorganize CMake build output
Make it clearer which parts of the output pertain to external projects.
* Use a consistent ordering of ExternalProject arguments
* Prevent the top-level build from running in parallel
This prevents spurious failures when running make -j.
* Actually parse arguments in the xcodebuild function
* Use ExternalProject features when available
* submodule limits from CMake 3.0
* shallow clones from CMake 3.6
* git progress output from CMake 3.8
* Only build the parts of leveldb we need
Skip building the tools and other libraries
* Avoid installing ExternalProjects
Consume build output directly so that we can build just the targets we
need. Installing causes all targets to be built.
This doesn't matter as much for these targets but the gRPC build
includes a ton of stuff we don't need so it's worth adopting this as a
general strategy.
* Define an external build for grpc
* Test that grpc can link successfully.
* Add a FindGRPC CMake module
* Actually comment ExternalProjext_GitSource
|