/nanopb-3.4.0/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-3.4.0/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-3.4.0/tests/cxx_callback_datatype/ |
D | message.proto | 12 // Instead of std::vector<SubMessage> callback handles wrapping/unwrapping of the int.
|
/nanopb-3.4.0/tests/regression/issue_249/ |
D | SConscript | 1 # Regression test for Issue 249: proto3 mode pb_decode() corrupts callback fields
|
/nanopb-3.4.0/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-3.4.0/tests/regression/issue_544/ |
D | SConscript | 2 # Decoding whole submessage in submessage callback causes "missing required field"
|
/nanopb-3.4.0/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. 154 // Fields with dynamic length are converted to either a pointer or a callback.
|
/nanopb-3.4.0/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 | 43 …use `FT_CALLBACK`, `FT_POINTER`, `FT_STATIC` or `FT_IGNORE` to select a callback field, a dynamica… 217 | `PB_LTYPE_SUBMSG_W_CB` |0x09 |Submessage with pre-decoding callback. 241 …|0x40 |A field with dynamic storage size. Struct field contains a pointer to a callback function. 265 |`field_callback` | Function used to handle all callback fields in this message. By default `pb_def… 342 A pointer to the *arg* is passed to the callback when calling. It can be 343 used to store any information that the callback might need. Note that 345 `&data` in your main code, in the callback you can access it like this: 389 as for normal callback fields, except that they get called for any 408 | type | Pointer to the structure that defines the callback functions. 409 … to the variable that stores the field value (as used by the default extension callback functions.) [all …]
|
/nanopb-3.4.0/ |
D | pb_encode.h | 36 const 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 | 70 stream.callback = ▮ in pb_ostream_from_buffer() 72 stream.callback = &buf_write; in pb_ostream_from_buffer() 85 if (count > 0 && stream->callback != NULL) in pb_write() 97 if (!stream->callback(stream, buf, count)) in pb_write() 176 if (stream->callback == NULL) in encode_array() 743 if (stream->callback == NULL) in pb_encode_submessage() 751 substream.callback = stream->callback; in pb_encode_submessage() 937 pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; in pb_enc_submessage() local 938 if (callback->funcs.encode) in pb_enc_submessage() 940 if (!callback->funcs.encode(stream, field, &callback->arg)) in pb_enc_submessage()
|
D | pb_decode.c | 87 if (buf == NULL && stream->callback != buf_read) in pb_read() 107 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() 1604 pb_callback_t *callback = (pb_callback_t*)field->pSize - 1; in pb_dec_submessage() local 1605 if (callback->funcs.decode) in pb_dec_submessage() 1607 status = callback->funcs.decode(&substream, field, &callback->arg); in pb_dec_submessage()
|
D | CHANGELOG.txt | 30 Fix passing of error message from substream callback (#703) 75 Fix compiler error in generated initializer for submessage callback (#631) 132 Fix "missing required field" error with submessage callback (#544) 191 Allow specifying a per-message callback. (#175) 192 Improve callback handling inside oneofs. (#175) 254 Don't call stream read callback with count=0 (#421) 259 Fix fixed size and callback repeated fields inside proto3 submessages (#376, #382, #386) 376 Fix crash when callback is inside oneof field. (issue 148) 463 Fix generator error with bytes callback fields (issue 99) 505 NOTE: The default callback function signature has changed. [all …]
|
/nanopb-3.4.0/spm_headers/nanopb/ |
D | pb_encode.h | 36 const 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-3.4.0/tests/callbacks/ |
D | SConscript | 1 # Test the functionality of the callback fields.
|
/nanopb-3.4.0/tests/regression/issue_259/ |
D | SConscript | 1 # Check that callback fields inside malloc()ed messages
|
/nanopb-3.4.0/tests/fuzztest/ |
D | flakystream.c | 26 stream->stream.callback = flakystream_callback; in flakystream_init()
|
/nanopb-3.4.0/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-3.4.0/tests/common/ |
D | unittestproto.proto | 23 // Nanopb does not care about the actual defined data type for callback
|
/nanopb-3.4.0/examples/network_server/ |
D | fileproto.options | 9 # On the other hand, using the callback interface, it is not necessary
|