Lines Matching refs:stream

2  * The main function is pb_encode. You also need an output stream, and the
33 * Also, NULL pointer marks a 'sizing stream' that does not
38 bool (*callback)(pb_ostream_t *stream, const uint8_t *buf, size_t count);
53 /* Encode a single protocol buffers message from C structure into a stream.
61 * pb_ostream_t stream;
64 * stream = pb_ostream_from_buffer(buffer, sizeof(buffer));
65 * pb_encode(&stream, MyMessage_fields, &msg);
67 bool pb_encode(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct);
72 bool pb_encode_delimited(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct);
82 /* Create an output stream for writing into a memory buffer.
83 * The number of bytes written can be found in stream.bytes_written after
86 * Alternatively, you can use a custom stream that writes directly to e.g.
91 /* Pseudo-stream for measuring the size of a message without actually storing
96 * pb_ostream_t stream = PB_OSTREAM_SIZING;
97 * pb_encode(&stream, MyMessage_fields, &msg);
98 * printf("Message size is %d\n", stream.bytes_written);
106 /* Function to write into a pb_ostream_t stream. You can use this if you need
109 bool pb_write(pb_ostream_t *stream, const uint8_t *buf, size_t count);
118 bool pb_encode_tag_for_field(pb_ostream_t *stream, const pb_field_t *field);
122 bool pb_encode_tag(pb_ostream_t *stream, pb_wire_type_t wiretype, uint32_t field_number);
126 bool pb_encode_varint(pb_ostream_t *stream, uint64_t value);
130 bool pb_encode_svarint(pb_ostream_t *stream, int64_t value);
133 bool pb_encode_string(pb_ostream_t *stream, const uint8_t *buffer, size_t size);
137 bool pb_encode_fixed32(pb_ostream_t *stream, const void *value);
141 bool pb_encode_fixed64(pb_ostream_t *stream, const void *value);
148 bool pb_encode_submessage(pb_ostream_t *stream, const pb_field_t fields[], const void *src_struct);