Lines Matching refs:stream
9 bool encode_string(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_string() argument
13 if (!pb_encode_tag_for_field(stream, field)) in encode_string()
16 return pb_encode_string(stream, (uint8_t*)str, strlen(str)); in encode_string()
19 bool encode_int32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_int32() argument
21 if (!pb_encode_tag_for_field(stream, field)) in encode_int32()
24 return pb_encode_varint(stream, 42); in encode_int32()
27 bool encode_fixed32(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_fixed32() argument
31 if (!pb_encode_tag_for_field(stream, field)) in encode_fixed32()
34 return pb_encode_fixed32(stream, &value); in encode_fixed32()
37 bool encode_fixed64(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_fixed64() argument
41 if (!pb_encode_tag_for_field(stream, field)) in encode_fixed64()
44 return pb_encode_fixed64(stream, &value); in encode_fixed64()
47 bool encode_repeatedstring(pb_ostream_t *stream, const pb_field_t *field, void * const *arg) in encode_repeatedstring() argument
54 if (!pb_encode_tag_for_field(stream, field)) in encode_repeatedstring()
57 if (!pb_encode_string(stream, (uint8_t*)str[i], strlen(str[i]))) in encode_repeatedstring()
66 pb_ostream_t stream; in main() local
69 stream = pb_ostream_from_buffer(buffer, 1024); in main()
84 if (!pb_encode(&stream, TestMessage_fields, &testmessage)) in main()
88 if (fwrite(buffer, stream.bytes_written, 1, stdout) != 1) in main()