diff options
| author | Yi Jin <jinyithu@google.com> | 2017-10-02 18:37:08 -0700 |
|---|---|---|
| committer | Yi Jin <jinyithu@google.com> | 2017-10-10 17:16:34 -0700 |
| commit | 974a9c28853d24ff94f000ae9f5c816d9538897b (patch) | |
| tree | 5bdd131934bf9febd9b0acffa5a9b18541609145 /docs/html/sdk/api_diff/24 | |
| parent | af60534c97fd91d283a8171aa82e5cef78f757d8 (diff) | |
Implement go/streaming-proto native libs, part 2
Implement ProtoOutputStream.h to write protobuf format data.
Usage of dumping proto:
ProtoOutputStream proto(fd);
proto.write(fieldId, value1); // dump a single value
// start to dump a message:
long long token = proto.start(messageFieldId);
proto.write(nestedField1, nestedValue1);
...
proto.end(token);
fieldId will be generated by protoc-cpp plugin(TBD). It is an encoded uint64_t
value, with 0 - 32 bits as its proto number, 33 - 40 bits reserved for
field type, int32, bool, string, message, etc. and 41 - 43 bits for
single, repeated or packed type. Currently packed field is not
supported.
Bug: 65641021
Test: N/A, need to wait for protoc-cpp plugin and will test in
incident_helper
Change-Id: Ic188615b950235aae0edeee4876b78d31feb5619
Diffstat (limited to 'docs/html/sdk/api_diff/24')
0 files changed, 0 insertions, 0 deletions
