Skip to content

Commit 0c17e0f

Browse files
committed
cbor.h, cborencoder.c: Migrate documentation for encoder functions
1 parent 34e931e commit 0c17e0f

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

src/cbor.h

-13
Original file line numberDiff line numberDiff line change
@@ -216,19 +216,6 @@ typedef enum CborEncoderAppendType
216216
CborEncoderApendRawData = 2
217217
} CborEncoderAppendType;
218218

219-
/**
220-
* Writer interface call-back function. When there is data to be written to
221-
* the CBOR document, this routine will be called. The \a token parameter is
222-
* taken from the \a token argument provided to \ref cbor_encoder_init_writer
223-
* and may be used in any way the writer function sees fit.
224-
*
225-
* The \a data parameter contains a pointer to the raw bytes to be copied to
226-
* the output buffer, with \a len specifying how long the payload is, which
227-
* can be as small as a single byte or an entire (byte or text) string.
228-
*
229-
* The \a append parameter informs the writer function whether it is writing
230-
* a string or general CBOR data.
231-
*/
232219
typedef CborError (*CborEncoderWriteFunction)(void *token, const void *data, size_t len, CborEncoderAppendType append);
233220

234221
enum CborEncoderFlags

src/cborencoder.c

+17
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,23 @@
196196
* Structure used to encode to CBOR.
197197
*/
198198

199+
/**
200+
* \file cbor.h
201+
* \typedef CborEncoderWriteFunction
202+
*
203+
* Writer interface call-back function. When there is data to be written to
204+
* the CBOR document, this routine will be called. The \a token parameter is
205+
* taken from the \a token argument provided to \ref cbor_encoder_init_writer
206+
* and may be used in any way the writer function sees fit.
207+
*
208+
* The \a data parameter contains a pointer to the raw bytes to be copied to
209+
* the output buffer, with \a len specifying how long the payload is, which
210+
* can be as small as a single byte or an entire (byte or text) string.
211+
*
212+
* The \a append parameter informs the writer function whether it is writing
213+
* a string or general CBOR data.
214+
*/
215+
199216
/**
200217
* Initializes a CborEncoder structure \a encoder by pointing it to buffer \a
201218
* buffer of size \a size. The \a flags field is currently unused and must be

0 commit comments

Comments
 (0)