Lines Matching refs:stream
14 bool write_prefix(pb_ostream_t *stream, int msgid) in write_prefix() argument
17 return pb_write(stream, &prefix, 1); in write_prefix()
25 bool encode_MyMessage1(pb_ostream_t *stream) in encode_MyMessage1() argument
29 return write_prefix(stream, MyMessage1_msgid) in encode_MyMessage1()
30 && pb_encode(stream, MyMessage1_fields, &msg); in encode_MyMessage1()
33 bool encode_MyMessage2(pb_ostream_t *stream) in encode_MyMessage2() argument
38 return write_prefix(stream, MyMessage2_msgid) in encode_MyMessage2()
39 && pb_encode(stream, MyMessage2_fields, &msg); in encode_MyMessage2()
42 bool encode_MyMessage3(pb_ostream_t *stream) in encode_MyMessage3() argument
46 return write_prefix(stream, MyMessage3_msgid) in encode_MyMessage3()
47 && pb_encode(stream, MyMessage3_fields, &msg); in encode_MyMessage3()
53 pb_ostream_t stream; in main() local
64 stream = pb_ostream_from_buffer(buffer, sizeof(buffer)); in main()
68 status = encode_MyMessage1(&stream); in main()
72 status = encode_MyMessage2(&stream); in main()
76 status = encode_MyMessage3(&stream); in main()
82 fwrite(buffer, 1, stream.bytes_written, stdout); in main()
87 fprintf(stderr, "Encoding failed: %s\n", PB_GET_ERROR(&stream)); in main()