/nanopb-2.7.6/tests/oneof_callback/ |
D | oneof.proto | 5 // Repeated callback inside submessage inside oneof 11 // String callback inside submessage inside oneof 17 // String callback directly inside oneof
|
D | SConscript | 1 # Test decoder callback support inside oneofs.
|
/nanopb-2.7.6/tests/basic_stream/ |
D | decode_stream.c | 58 bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) in callback() function 76 pb_istream_t stream = {&callback, NULL, SIZE_MAX}; in main()
|
/nanopb-2.7.6/docs/ |
D | concepts.md | 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. [all …]
|
D | whats_new.md | 81 once. So far the callback functions have been stored in the message 88 store the callback pointers either. 92 for most applications that have a single callback function for each 99 that object in custom way in your callback. 105 ### Message level callback for oneofs 111 Setting this option to true will cause a new message level callback to 112 be added before the `which_field` of the oneof. This callback will be 114 message is decoded. The callback can either choose to set callback 116 there and then. If any unread data remains after the callback returns,
|
D | reference.md | 38 …use `FT_CALLBACK`, `FT_POINTER`, `FT_STATIC` or `FT_IGNORE` to select a callback field, a dynamica… 204 | `PB_LTYPE_SUBMSG_W_CB` |0x09 |Submessage with pre-decoding callback. 228 …|0x40 |A field with dynamic storage size. Struct field contains a pointer to a callback function. 252 |`field_callback` | Function used to handle all callback fields in this message. By default `pb_def… 329 A pointer to the *arg* is passed to the callback when calling. It can be 330 used to store any information that the callback might need. Note that 332 `&data` in your main code, in the callback you can access it like this: 376 as for normal callback fields, except that they get called for any 395 | type | Pointer to the structure that defines the callback functions. 396 … to the variable that stores the field value (as used by the default extension callback functions.) [all …]
|
/nanopb-2.7.6/tests/cxx_callback_datatype/ |
D | message.proto | 12 // Instead of std::vector<SubMessage> callback handles wrapping/unwrapping of the int.
|
/nanopb-2.7.6/tests/regression/issue_249/ |
D | SConscript | 1 # Regression test for Issue 249: proto3 mode pb_decode() corrupts callback fields
|
/nanopb-2.7.6/tests/cyclic_messages/ |
D | SConscript | 3 # Encode cyclic messages with callback fields
|
D | cyclic.proto | 2 // These can only be handled in pointer/callback mode,
|
/nanopb-2.7.6/tests/regression/issue_544/ |
D | SConscript | 2 # Decoding whole submessage in submessage callback causes "missing required field"
|
/nanopb-2.7.6/ |
D | pb_encode.h | 36 int *callback; member 38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
|
D | pb_decode.h | 35 int *callback; member 37 bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count);
|
D | pb_encode.c | 68 stream.callback = (void*)1; /* Just a marker value */ in pb_ostream_from_buffer() 70 stream.callback = &buf_write; in pb_ostream_from_buffer() 83 if (count > 0 && stream->callback != NULL) in pb_write() 95 if (!stream->callback(stream, buf, count)) in pb_write() 174 if (stream->callback == NULL) in encode_array() 730 if (stream->callback == NULL) in pb_encode_submessage() 738 substream.callback = stream->callback; in pb_encode_submessage() 924 pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; in pb_enc_submessage() local 925 if (callback->funcs.encode) in pb_enc_submessage() 927 if (!callback->funcs.encode(stream, field, &callback->arg)) in pb_enc_submessage()
|
D | CHANGELOG.txt | 7 Fix compiler error in generated initializer for submessage callback (#631) 64 Fix "missing required field" error with submessage callback (#544) 123 Allow specifying a per-message callback. (#175) 124 Improve callback handling inside oneofs. (#175) 179 Don't call stream read callback with count=0 (#421) 184 Fix fixed size and callback repeated fields inside proto3 submessages (#376, #382, #386) 301 Fix crash when callback is inside oneof field. (issue 148) 388 Fix generator error with bytes callback fields (issue 99) 430 NOTE: The default callback function signature has changed. 433 Change the callback function to use void** (issue 69) [all …]
|
D | pb_decode.c | 91 if (buf == NULL && stream->callback != buf_read) in pb_read() 111 if (!stream->callback(stream, buf, count)) in pb_read() 130 if (!stream->callback(stream, buf, 1)) in pb_readbyte() 153 stream.callback = NULL; in pb_istream_from_buffer() 155 stream.callback = &buf_read; in pb_istream_from_buffer() 1586 pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; in pb_dec_submessage() local 1587 if (callback->funcs.decode) in pb_dec_submessage() 1589 status = callback->funcs.decode(&substream, field, &callback->arg); in pb_dec_submessage()
|
/nanopb-2.7.6/spm_headers/nanopb/ |
D | pb_encode.h | 36 int *callback; member 38 bool (*callback)(pb_ostream_t *stream, const pb_byte_t *buf, size_t count);
|
D | pb_decode.h | 35 int *callback; member 37 bool (*callback)(pb_istream_t *stream, pb_byte_t *buf, size_t count);
|
/nanopb-2.7.6/generator/proto/ |
D | nanopb.proto | 15 FT_CALLBACK = 1; // Always generate a callback field. 64 // Force type of field (callback or static allocation) 106 // Generate message-level callback that is called before decoding submessages. 107 // This can be used to set callback fields for submsgs inside oneofs. 114 // Data type for storage associated with callback fields. 118 // Prior to nanopb-0.4.0, the callback was specified in per-field pb_callback_t 120 // fields. Instead, a new method allows specifying a per-message callback that 121 // will be called for all callback fields in a message type.
|
/nanopb-2.7.6/tests/callbacks/ |
D | SConscript | 1 # Test the functionality of the callback fields.
|
/nanopb-2.7.6/tests/regression/issue_259/ |
D | SConscript | 1 # Check that callback fields inside malloc()ed messages
|
/nanopb-2.7.6/tests/fuzztest/ |
D | flakystream.c | 26 stream->stream.callback = flakystream_callback; in flakystream_init()
|
/nanopb-2.7.6/tests/raw_decode/ |
D | raw_decode.c | 17 bool callback(pb_istream_t *stream, uint8_t *buf, size_t count) in callback() function 184 pb_istream_t stream = {&callback, NULL, SIZE_MAX}; in main()
|
/nanopb-2.7.6/tests/common/ |
D | unittestproto.proto | 23 // Nanopb does not care about the actual defined data type for callback
|
/nanopb-2.7.6/examples/network_server/ |
D | fileproto.options | 9 # On the other hand, using the callback interface, it is not necessary
|