Skip to content

Commit 5b11fd6

Browse files
committed
cbor.h, cborencoder.c: Migrate documentation for encoder functions
1 parent 5b74b5d commit 5b11fd6

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

src/cbor.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -212,19 +212,6 @@ typedef enum CborEncoderAppendType
212212
CborEncoderApendRawData = 2
213213
} CborEncoderAppendType;
214214

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

230217
enum CborEncoderFlags

src/cborencoder.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,23 @@
195195
* Structure used to encode to CBOR.
196196
*/
197197

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

0 commit comments

Comments
 (0)