Lines Matching refs:callback

52 callback function.
54 There are a few generic rules for callback functions:
61 4) Your callback may be used with substreams. In this case
73 bool (*callback)(pb_ostream_t *stream, const uint8_t *buf, size_t count);
79 The `callback` for output stream may be NULL, in which case the stream
101 bool callback(pb_ostream_t `stream, const uint8_t `buf, size_t count)
107 pb_ostream_t stdoutstream = {&callback, stdout, SIZE_MAX, 0};
122 bool (*callback)(pb_istream_t *stream, uint8_t *buf, size_t count);
127 The `callback` must always be a function pointer. `Bytes_left` is an
129 SIZE_MAX if your callback handles EOF as described above.
135 bool callback(pb_istream_t *stream, uint8_t *buf, size_t count)
154 pb_istream_t stdinstream = {&callback, stdin, SIZE_MAX};
162 1) Strings, bytes and repeated fields of any type map to callback
235 way you want, using a callback function.
237 The [pb_callback_t](reference.html#pb-callback-t) structure contains a
239 passing data to the callback. If the function pointer is NULL, the field
243 The actual behavior of the callback function is different in encoding
244 and decoding modes. In encoding mode, the callback is called once and
246 callback is called repeatedly for every data item.
261 When encoding, the callback should write out complete fields, including
272 If the callback is used in a submessage, it will be called multiple
275 callback is directly in the main message, it is called only once.
277 This callback writes out a dynamically sized string:
298 When decoding, the callback receives a length-limited substring that
303 The callback will be called multiple times for repeated fields. For
308 This callback reads multiple integers and prints them:
335 `callback_datatype` can be used to bind a callback function
340 data type used for callback state. Then the generator will automatically
350 callback. It will then read a function pointer from
457 fields, the callback values cannot be set before decoding. This is
460 separate message level callback can be used. See
483 additional callback field called `extensions`. The field and associated
577 7) Errors that happen in your callback functions.