From 33e92ff899ca76809d8e826bd885a746264fa4e8 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Wed, 26 Nov 2014 17:15:07 +0000 Subject: Fix error enum to not conflict and add monotonic time implementation --- include/nsutils/base64.h | 16 +++++++------- include/nsutils/errors.h | 56 ++++++++++++++++++++++++------------------------ include/nsutils/time.h | 2 +- 3 files changed, 37 insertions(+), 37 deletions(-) (limited to 'include') diff --git a/include/nsutils/base64.h b/include/nsutils/base64.h index 2bb10e4..672b69c 100644 --- a/include/nsutils/base64.h +++ b/include/nsutils/base64.h @@ -28,10 +28,10 @@ * \param output_length The length of data placed in \a output * \return NSERROR_OK on success and \a output updated else error code. */ -nserror nsu_base64_encode_alloc(const uint8_t *input, - size_t input_length, - uint8_t **output, - size_t *output_length); +nsuerror nsu_base64_encode_alloc(const uint8_t *input, + size_t input_length, + uint8_t **output, + size_t *output_length); /** * Base 64 decode data. @@ -44,9 +44,9 @@ nserror nsu_base64_encode_alloc(const uint8_t *input, * \param output_length The length of data placed in \a output * \return NSERROR_OK on success and \a output updated else error code. */ -nserror nsu_base64_decode_alloc(const uint8_t *input, - size_t input_length, - uint8_t **output, - size_t *output_length); +nsuerror nsu_base64_decode_alloc(const uint8_t *input, + size_t input_length, + uint8_t **output, + size_t *output_length); #endif diff --git a/include/nsutils/errors.h b/include/nsutils/errors.h index 0da38d9..ed459bc 100644 --- a/include/nsutils/errors.h +++ b/include/nsutils/errors.h @@ -19,60 +19,60 @@ * Enumeration of error codes */ typedef enum { - NSERROR_OK, /**< No error */ + NSUERROR_OK, /**< No error */ - NSERROR_UNKNOWN, /**< Unknown error - DO *NOT* USE */ + NSUERROR_UNKNOWN, /**< Unknown error - DO *NOT* USE */ - NSERROR_NOMEM, /**< Memory exhaustion */ + NSUERROR_NOMEM, /**< Memory exhaustion */ - NSERROR_NO_FETCH_HANDLER, /**< No fetch handler for URL scheme */ + NSUERROR_NO_FETCH_HANDLER, /**< No fetch handler for URL scheme */ - NSERROR_NOT_FOUND, /**< Requested item not found */ + NSUERROR_NOT_FOUND, /**< Requested item not found */ - NSERROR_NOT_DIRECTORY, /**< Missing directory */ + NSUERROR_NOT_DIRECTORY, /**< Missing directory */ - NSERROR_SAVE_FAILED, /**< Failed to save data */ + NSUERROR_SAVE_FAILED, /**< Failed to save data */ - NSERROR_CLONE_FAILED, /**< Failed to clone handle */ + NSUERROR_CLONE_FAILED, /**< Failed to clone handle */ - NSERROR_INIT_FAILED, /**< Initialisation failed */ + NSUERROR_INIT_FAILED, /**< Initialisation failed */ - NSERROR_MNG_ERROR, /**< An MNG error occurred */ + NSUERROR_MNG_ERROR, /**< An MNG error occurred */ - NSERROR_BAD_ENCODING, /**< The character set is unknown */ + NSUERROR_BAD_ENCODING, /**< The character set is unknown */ - NSERROR_NEED_DATA, /**< More data needed */ + NSUERROR_NEED_DATA, /**< More data needed */ - NSERROR_ENCODING_CHANGE, /**< The character changed */ + NSUERROR_ENCODING_CHANGE, /**< The character changed */ - NSERROR_BAD_PARAMETER, /**< Bad Parameter */ + NSUERROR_BAD_PARAMETER, /**< Bad Parameter */ - NSERROR_INVALID, /**< Invalid data */ + NSUERROR_INVALID, /**< Invalid data */ - NSERROR_BOX_CONVERT, /**< Box conversion failed */ + NSUERROR_BOX_CONVERT, /**< Box conversion failed */ - NSERROR_STOPPED, /**< Content conversion stopped */ + NSUERROR_STOPPED, /**< Content conversion stopped */ - NSERROR_DOM, /**< DOM call returned error */ + NSUERROR_DOM, /**< DOM call returned error */ - NSERROR_CSS, /**< CSS call returned error */ + NSUERROR_CSS, /**< CSS call returned error */ - NSERROR_CSS_BASE, /**< CSS base sheet failed */ + NSUERROR_CSS_BASE, /**< CSS base sheet failed */ - NSERROR_BAD_URL, /**< Bad URL */ + NSUERROR_BAD_URL, /**< Bad URL */ - NSERROR_BAD_CONTENT, /**< Bad Content */ + NSUERROR_BAD_CONTENT, /**< Bad Content */ - NSERROR_FRAME_DEPTH, /**< Exceeded frame depth */ + NSUERROR_FRAME_DEPTH, /**< Exceeded frame depth */ - NSERROR_PERMISSION, /**< Permission error */ + NSUERROR_PERMISSION, /**< Permission error */ - NSERROR_NOSPACE, /**< Insufficient space */ + NSUERROR_NOSPACE, /**< Insufficient space */ - NSERROR_BAD_SIZE, /**< Bad size */ + NSUERROR_BAD_SIZE, /**< Bad size */ - NSERROR_NOT_IMPLEMENTED, /**< Functionality is not implemented */ -} nserror; + NSUERROR_NOT_IMPLEMENTED, /**< Functionality is not implemented */ +} nsuerror; #endif diff --git a/include/nsutils/time.h b/include/nsutils/time.h index e07a670..bfc9490 100644 --- a/include/nsutils/time.h +++ b/include/nsutils/time.h @@ -26,6 +26,6 @@ * \param current The current value of the counter. * \return NSERROR_OK on success else error code. */ -nserror nsu_nsu_getmonotonic_ms(uint64_t *current); +nsuerror nsu_nsu_getmonotonic_ms(uint64_t *current); #endif -- cgit v1.2.3