Lines Matching refs:reader
23 * \brief This file defines reader objects, which together with their
43 * - Initially, the reader is in 'producing mode'.
44 * - The producer hands an incoming data buffer to the reader,
48 * request can't be fulfilled -- the producer revokes the reader's
49 * access to the incoming data buffer, putting the reader back to
52 * it to the reader until it switches back to consuming mode
57 * The abstract states of the reader from the producer's and
61 * reader consists of the following:
66 * when the reader is passed back to the producer via
71 * and producer mode, because it only interfaces with the reader
74 * - From the perspective of the producer, the reader's state is one of:
75 * - Attached: The reader is in consuming mode.
76 * - Unset: No incoming data buffer is currently managed by the reader,
78 * fully processed. More data needs to be fed into the reader
82 * reader, but some data from the previous incoming data
139 * the reader; it is provided to the reader
140 * through mbedtls_mps_reader_feed(). The reader
145 * The reader is in consuming mode if
158 * This is only used when the reader is in
171 * This is only used when the reader is in
179 * If a reader is reclaimed after an
181 * this variable is used to have the reader
185 * This is only used when the reader is in
190 * the reader. A few bytes could be saved by moving this to a
227 * A reader object is usually prepared and maintained
238 * \brief Initialize a reader object
240 * \param reader The reader to be initialized.
245 * for reading and writing is given to the reader for the
246 * duration of the reader's lifetime. It is thus the caller's
248 * the lifetime of the reader, and to properly zeroize and
249 * free the memory after the reader has been destroyed.
255 int mbedtls_mps_reader_init(mbedtls_mps_reader *reader,
260 * \brief Free a reader object
262 * \param reader The reader to be freed.
267 int mbedtls_mps_reader_free(mbedtls_mps_reader *reader);
270 * \brief Pass chunk of data for the reader to manage.
272 * \param reader The reader context to use. The reader must be
274 * \param buf The buffer to be managed by the reader.
277 * \return \c 0 on success. In this case, the reader will be
286 * In this case, the reader remains in producing mode and
292 int mbedtls_mps_reader_feed(mbedtls_mps_reader *reader,
297 * \brief Reclaim reader's access to the current input buffer.
299 * \param reader The reader context to use. The reader must be
302 * modified to indicate whether the reader has been paused
311 int mbedtls_mps_reader_reclaim(mbedtls_mps_reader *reader,
319 * \brief Request data from the reader.
321 * \param reader The reader context to use. The reader must
337 * reader remains intact and in consuming mode, and the consumer
354 int mbedtls_mps_reader_get(mbedtls_mps_reader *reader,
372 * \param reader The reader context to use.
378 int mbedtls_mps_reader_commit(mbedtls_mps_reader *reader);