Skip to content

Commit

Permalink
Finish up private and deprecated and doxygen errors for decode
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurence Lundblade committed Dec 18, 2024
1 parent f775466 commit 0dcd44d
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 67 deletions.
4 changes: 2 additions & 2 deletions QCBOR.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
Expand Down Expand Up @@ -776,7 +776,7 @@
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES;
Expand Down
44 changes: 21 additions & 23 deletions inc/qcbor/qcbor_encode.h
Original file line number Diff line number Diff line change
Expand Up @@ -3156,62 +3156,62 @@ QCBOREncode_AddEncodedToMap(QCBOREncodeContext *pCtx, const char *szLabel, Usefu
* BEGINNING OF PRIVATE INLINE IMPLEMENTATION *
* ========================================================================= */

/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void QCBOREncode_Private_AppendCBORHead(QCBOREncodeContext *pMe,
const uint8_t uMajorType,
const uint64_t uArgument,
const uint8_t uMinLen);


/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_AddBuffer(QCBOREncodeContext *pCtx,
uint8_t uMajorType,
UsefulBufC Bytes);


/* Semi-private function for adding a double with preferred encoding. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_AddPreferredDouble(QCBOREncodeContext *pMe, const double dNum);


/* Semi-private function for adding a float with preferred encoding. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_AddPreferredFloat(QCBOREncodeContext *pMe, const float fNum);


/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_OpenMapOrArray(QCBOREncodeContext *pCtx,
uint8_t uMajorType);


/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_OpenMapOrArrayIndefiniteLength(QCBOREncodeContext *pCtx,
uint8_t uMajorType);


/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_CloseMapOrArray(QCBOREncodeContext *pCtx,
uint8_t uMajorType);


/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_CloseMapOrArrayIndefiniteLength(QCBOREncodeContext *pCtx,
uint8_t uMajorType);

/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_AddTBigNumberMain(QCBOREncodeContext *pMe,
const uint8_t uTagRequirement,
bool bPreferred,
const bool bNegative,
const UsefulBufC BigNumber);

/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_AddTExpIntMantissa(QCBOREncodeContext *pMe,
const int uTagRequirement,
Expand All @@ -3220,7 +3220,7 @@ QCBOREncode_Private_AddTExpIntMantissa(QCBOREncodeContext *pMe,
const int64_t nMantissa);


/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_AddTExpBigMantissa(QCBOREncodeContext *pMe,
const int uTagRequirement,
Expand All @@ -3230,7 +3230,7 @@ QCBOREncode_Private_AddTExpBigMantissa(QCBOREncodeContext *pMe,
const bool bBigNumIsNegative);


/* Semi-private funcion used by public inline functions. See qcbor_encode.c */
/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_AddTExpBigMantissaRaw(QCBOREncodeContext *pMe,
const int uTagRequirement,
Expand All @@ -3240,6 +3240,8 @@ QCBOREncode_Private_AddTExpBigMantissaRaw(QCBOREncodeContext *pMe,
const bool bBigNumIsNegative);

/**
* @private
*
* @brief Semi-private method to add simple items and floating-point.
*
* @param[in] pMe The encoding context.
Expand All @@ -3263,15 +3265,11 @@ QCBOREncode_Private_AddType7(QCBOREncodeContext *pMe,
}


/* Forward declaration */
static void
QCBOREncode_AddSZString(QCBOREncodeContext *pMe, const char *szString);



/** @private Semi-private function. See qcbor_encode.c */
void
QCBOREncode_Private_CloseMapUnsorted(QCBOREncodeContext *pMe);


static inline void
QCBOREncode_Config(QCBOREncodeContext *pMe, enum QCBOREncodeConfig uConfig)
{
Expand All @@ -3297,9 +3295,6 @@ QCBOREncode_ConfigReduced(QCBOREncodeContext *pMe, enum QCBOREncodeConfig uConfi






static inline void
QCBOREncode_AddInt64ToMapSZ(QCBOREncodeContext *pMe,
const char *szLabel,
Expand Down Expand Up @@ -3458,6 +3453,7 @@ QCBOREncode_AddTag(QCBOREncodeContext *pMe, const uint64_t uTag)

#ifndef USEFULBUF_DISABLE_ALL_FLOAT

/** @private */
static inline void
QCBOREncode_Private_AddDoubleRaw(QCBOREncodeContext *pMe, const double dNum)
{
Expand Down Expand Up @@ -3514,6 +3510,7 @@ QCBOREncode_AddDoubleToMapN(QCBOREncodeContext *pMe,
}


/** @private */
static inline void
QCBOREncode_Private_AddFloatRaw(QCBOREncodeContext *pMe, const float fNum)
{
Expand Down Expand Up @@ -3884,11 +3881,12 @@ QCBOREncode_AddTBigNumberNoPreferredToMapN(QCBOREncodeContext *pMe,
QCBOREncode_AddTBigNumberNoPreferred(pMe, uTagRequirement, bNegative, BigNumber);
}

/*
/**
* @private
* @brief Add the tag number for a big number (private).
*
* @param[in] pMe The decode context.
* @param[in] uTagRequirement
* @param[in] uTagRequirement TODO: fill in
* @param[in] bNegative If true, big number is negative.
*/
static inline void
Expand Down
5 changes: 3 additions & 2 deletions inc/qcbor/qcbor_main_decode.h
Original file line number Diff line number Diff line change
Expand Up @@ -1414,7 +1414,8 @@ QCBORDecode_SetError(QCBORDecodeContext *pCtx, QCBORError uError);
* ========================================================================= */

/**
* @brief Configure CBOR decoder context for QCBOR v1 compatibility (deprecated).
* @deprecated The v2 tag number behavior is more correct.
* @brief [Deprecated] Configure CBOR decoder context for QCBOR v1 compatibility.
*
* @param[in] pCtx The context to configure.
*
Expand All @@ -1432,7 +1433,7 @@ QCBORDecode_SetError(QCBORDecodeContext *pCtx, QCBORError uError);
* number processing is too loose. See @ref v2-Tag-Decoding.
*
* This links in a fair bit of object code for all the tag content
* handlers that were always present in v1. To get the v1 behavior
* handlers that were always present in v1. To get the v1 tag number behavior
* without the object code for the tag content handlers, pass
* @ref QCBOR_DECODE_ALLOW_UNPROCESSED_TAG_NUMBERS to
* QCBORDecode_Init().
Expand Down
Loading

0 comments on commit 0dcd44d

Please sign in to comment.