diff --git a/include/hos_errno.h b/include/hos_errno.h index f07b6d5f8182a54f3f65f3b652559da4df04d955..14708e37aa8594d33299cf74262d552636b0c73d 100755 --- a/include/hos_errno.h +++ b/include/hos_errno.h @@ -12,28 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -/** - * @defgroup hos_errno System Error No - * @ingroup utils - * @addtogroup Errno - * @{ - * - * @brief Defintion of error code. The error codes are applicable to both the application and kernel. - * - * @since 1.0 - * @version 1.0 - */ - -/** - * @file hos_errno.h - * - * @brief Defintion of error code. The error codes are applicable to both the application and kernel. - * - * @since 1.0 - * @version 1.0 - */ - #ifndef OHOS_ERRNO_H #define OHOS_ERRNO_H #ifdef __cplusplus @@ -41,41 +19,40 @@ extern "C" { #endif /* __cpluscplus */ #endif /* __cpluscplus */ - -/** - * @brief Defintion of error code. The error codes are applicable to both the application and kernel - */ +/* --------------------------------------------------------------------------------------------* + * Defintion of error code. The error codes are applicable to both the application and kernel + *-------------------------------------------------------------------------------------------- */ enum OHOSLiteErrorCode { - EC_SUCCESS = 0, /*< OK or No error */ - EC_FAILURE = -1, /*< Execution failed */ - EC_BADPTR = -2, /*< Bad pointer value */ - EC_NOMEMORY = -3, /*< No enough memory */ - EC_ADDRESS = -4, /*< Memory or bus address error */ - EC_IOERROR = -5, /*< I/O error */ - EC_BUSBUSY = -6, /*< xxx bus busy */ - EC_NORESPONCE = -7, /*< Function is no responce */ - EC_NODEVICE = -8, /*< No such device */ - EC_INVALID = -9, /*< Invalid argument */ - EC_BUSY = -10, /*< Device or resource busy */ - EC_NOSERVICE = -11, /*< No service */ - EC_PERMISSION = -12, /*< Permission denied */ - EC_NOFILE = -13, /*< No this file */ - EC_NOSPACE = -14, /*< No space left on device */ - EC_NODIR = -15, /*< Not a directory */ - EC_ROFILE = -16, /*< Read-only file system */ - EC_NAMETOOLONG = -17, /*< File name too long */ - EC_OPBLOCK = -18, /*< Operation would block */ - EC_TIMEOUT = -19, /*< Timer expired */ - EC_COMMU = -20, /*< Communication error on send */ - EC_PROTOCOL = -21, /*< Protocol error */ - EC_CANCELED = -22, /*< Operation Canceled */ - EC_NOKEY = -23, /*< Required key not available */ - EC_NOHANDLER = -24, /*< No handler to execute */ - EC_FLOWCTRL = -25, /*< Flow control */ - EC_NOINIT = -26, /*< device hasn't been initializeed */ - EC_NORESOURCE = -27, /*< resource error */ - EC_LLERRTOP = -127, /*< Low level function error code max value */ - EC_HLERRBASE = -128 /*< High level function error code baseline */ + EC_SUCCESS = 0, /* OK or No error */ + EC_FAILURE = -1, /* Execution failed */ + EC_BADPTR = -2, /* Bad pointer value */ + EC_NOMEMORY = -3, /* No enough memory */ + EC_ADDRESS = -4, /* Memory or bus address error */ + EC_IOERROR = -5, /* I/O error */ + EC_BUSBUSY = -6, /* xxx bus busy */ + EC_NORESPONCE = -7, /* Function is no responce */ + EC_NODEVICE = -8, /* No such device */ + EC_INVALID = -9, /* Invalid argument */ + EC_BUSY = -10, /* Device or resource busy */ + EC_NOSERVICE = -11, /* No service */ + EC_PERMISSION = -12, /* Permission denied */ + EC_NOFILE = -13, /* No this file */ + EC_NOSPACE = -14, /* No space left on device */ + EC_NODIR = -15, /* Not a directory */ + EC_ROFILE = -16, /* Read-only file system */ + EC_NAMETOOLONG = -17, /* File name too long */ + EC_OPBLOCK = -18, /* Operation would block */ + EC_TIMEOUT = -19, /* Timer expired */ + EC_COMMU = -20, /* Communication error on send */ + EC_PROTOCOL = -21, /* Protocol error */ + EC_CANCELED = -22, /* Operation Canceled */ + EC_NOKEY = -23, /* Required key not available */ + EC_NOHANDLER = -24, /* No handler to execute */ + EC_FLOWCTRL = -25, /* Flow control */ + EC_NOINIT = -26, /* device hasn't been initializeed */ + EC_NORESOURCE = -27, /* resource error */ + EC_LLERRTOP = -127, /* Low level function error code max value */ + EC_HLERRBASE = -128 /* High level function error code baseline */ }; #ifdef __cplusplus @@ -83,6 +60,4 @@ enum OHOSLiteErrorCode { } #endif /* __cpluscplus */ #endif /* __cpluscplus */ - #endif // OHOS_ERRNO_H -/** @} */ \ No newline at end of file diff --git a/include/hos_init.h b/include/hos_init.h index 45b7d24d41de5f01ea12a6b6286bded1570d43c4..1f6dee0de5fc5e48ba487dffe07bd979cc9af295 100755 --- a/include/hos_init.h +++ b/include/hos_init.h @@ -13,38 +13,8 @@ * limitations under the License. */ -/** - * @defgroup hos_init HOS Init - * @ingroup utils - * @addtogroup Init - * @{ - * - * @brief Provides the entries for initializing and starting services and features. - * - * This module provides the entries for initializing services and features during service - * development. \n - * Services and features are initialized in the following sequence: core phase, core system - * service, core system feature, system startup, system service, system feature, application-layer - * service, and application-layer feature. \n - * - * @since 1.0 - * @version 1.0 - */ - -/** - * @file hos_init.h - * - * @brief Provides the entries for initializing and starting services and features. - * - * This file provides the entries for initializing services and features during service - * development. \n - * - * @since 1.0 - * @version 1.0 - */ - -#ifndef HOS_LAYER_INIT_H -#define HOS_LAYER_INIT_H +#ifndef OHOS_LAYER_INIT_H +#define OHOS_LAYER_INIT_H #ifdef __cplusplus #if __cplusplus extern "C" { @@ -79,203 +49,31 @@ typedef void (*InitCall)(void); #define LAYER_INITCALL_DEF(func, layer, clayer) \ LAYER_INITCALL(func, layer, clayer, 2) -/** - * @brief Identifies the entry for initializing and starting a core phase by the priority 2. - * - * This macro is used when Samgr is initialized and started. \n - * This macro is used to identify the entry called at the priority 2 of the core phase of - * the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a core phase. - * The type is void (*)(void). - */ #define CORE_INIT(func) LAYER_INITCALL_DEF(func, core, "core") -/** - * @brief Identifies the entry for initializing and starting a core phase by the specified - * priority. - * - * This macro is used when Samgr is initialized and started. \n - * This macro is used to identify the entry called at the specified priority of the core phase of - * the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a core phase. - * The type is void (*)(void). - * @param priority Indicates the calling priority when starting the core phase. - * The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4. - */ #define CORE_INIT_PRI(func, priority) LAYER_INITCALL(func, core, "core", priority) -/** - * @brief Identifies the entry for initializing and starting a core system service by the - * priority 2. - * - * This macro is used to identify the entry called at the priority 2 in the core system - * service phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a core system service. - * The type is void (*)(void). - */ + #define SYS_SERVICE_INIT(func) LAYER_INITCALL_DEF(func, sys_service, "sys.service") -/** - * @brief Identifies the entry for initializing and starting a core system service by the - * specified priority. - * - * This macro is used to identify the entry called at the specified priority in the core system - * service phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a core system service. - * The type is void (*)(void). - * @param priority Indicates the calling priority when starting the core system service in the - * startup phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4. - */ #define SYS_SERVICE_INIT_PRI(func, priority) LAYER_INITCALL(func, sys_service, "sys.service", priority) -/** - * @brief Identifies the entry for initializing and starting a core system feature by the - * priority 2. - * - * This macro is used to identify the entry called at the priority 2 in the core system - * feature phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a core system service. - * The type is void (*)(void). - */ + #define SYS_FEATURE_INIT(func) LAYER_INITCALL_DEF(func, sys_feature, "sys.feature") -/** - * @brief Identifies the entry for initializing and starting a core system feature by the - * specified priority. - * - * This macro is used to identify the entry called at the specified priority in the core system - * feature phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a core system feature. - * The type is void (*)(void). - * @param priority Indicates the calling priority when starting the core system feature phase. - * The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4. - */ #define SYS_FEATURE_INIT_PRI(func, priority) LAYER_INITCALL(func, sys_feature, "sys.feature", priority) -/** - * @brief Identifies the entry for initializing and starting a system running phase by the - * priority 2. - * - * This macro is used to identify the entry called at the priority 2 in the system startup - * phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a system running phase. - * The type is void (*)(void). - */ + #define SYS_RUN(func) LAYER_INITCALL_DEF(func, run, "run") -/** - * @brief Identifies the entry for initializing and starting a system running phase by the - * specified priority. - * - * This macro is used to identify the entry called at the specified priority in the system startup - * phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a system running phase. - * The type is void (*)(void). - * @param priority Indicates the calling priority when starting the system startup phase. - * The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4. - */ #define SYS_RUN_PRI(func, priority) LAYER_INITCALL(func, run, "run", priority) -/** - * @brief Identifies the entry for initializing and starting a system service by the priority 2. - * - * This macro is used to identify the entry called at the priority 2 in the system service - * phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a system service. - * The type is void (*)(void). - */ #define SYSEX_SERVICE_INIT(func) LAYER_INITCALL_DEF(func, app_service, "app.service") -/** - * @brief Identifies the entry for initializing and starting a system service by the specified - * priority. - * - * This macro is used to identify the entry called at the specified priority of the system service - * phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a system service. - * The type is void (*)(void). - * @param priority Indicates the calling priority when starting the system service phase. - * The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4. - */ #define SYSEX_SERVICE_INIT_PRI(func, priority) LAYER_INITCALL(func, app_service, "app.service", priority) -/** - * @brief Identifies the entry for initializing and starting a system feature by the priority 2. - * - * This macro is used to identify the entry called at the priority 2 of the system feature - * phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a system feature. - * The type is void (*)(void). - */ #define SYSEX_FEATURE_INIT(func) LAYER_INITCALL_DEF(func, app_feature, "app.feature") -/** - * @brief Identifies the entry for initializing and starting a system feature by the specified - * priority. - * - * This macro is used to identify the entry called at the specified priority of the system feature - * phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting a system feature. - * The type is void (*)(void). - * @param priority Indicates the calling priority when starting the system feature phase. - * The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4. - */ #define SYSEX_FEATURE_INIT_PRI(func, priority) LAYER_INITCALL(func, app_feature, "app.feature", priority) -/** - * @brief Identifies the entry for initializing and starting an application-layer service by the - * priority 2. - * - * This macro is used to identify the entry called at the priority 2 of the application-layer - * service phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting an application-layer - * service. The type is void (*)(void). - */ #define APP_SERVICE_INIT(func) LAYER_INITCALL_DEF(func, app_service, "app.service") -/** - * @brief Identifies the entry for initializing and starting an application-layer service by the - * specified priority. - * - * This macro is used to identify the entry called at the specified priority of the - * application-layer service phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting an application-layer - * service. The type is void (*)(void). - * @param priority Indicates the calling priority when starting the application-layer service - * phase. The value range is [0,5), and the calling sequence is 0, 1, 2, 3, and 4. - */ #define APP_SERVICE_INIT_PRI(func, priority) LAYER_INITCALL(func, app_service, "app.service", priority) -/** - * @brief Identifies the entry for initializing and starting an application-layer feature by the - * priority 2. - * - * This macro is used to identify the entry called at the priority 2 of the application-layer - * feature phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting an application-layer - * feature. The type is void (*)(void). - */ #define APP_FEATURE_INIT(func) LAYER_INITCALL_DEF(func, app_feature, "app.feature") -/** - * @brief Identifies the entry for initializing and starting an application-layer feature by - * the specified priority. - * - * This macro is used to identify the entry called at the specified priority of the - * application-layer feature phase of the startup process. \n - * - * @param func Indicates the entry function for initializing and starting an application-layer - * feature. The type is void (*)(void). - * @param priority Indicates the calling priority when starting the application-layer feature. - * The value range is [0, 5), and the calling sequence is 0, 1, 2, 3, and 4. - */ #define APP_FEATURE_INIT_PRI(func, priority) LAYER_INITCALL(func, app_feature, "app.feature", priority) #ifdef __cplusplus @@ -284,4 +82,3 @@ typedef void (*InitCall)(void); #endif #endif #endif // OHOS_LAYER_INIT_H -/** @} */ \ No newline at end of file diff --git a/include/hos_types.h b/include/hos_types.h index 66dc6762cc82a0a1a714002941163b976eaada69..f13d633a0dedcabe1f80f03cb6f8ea5859497f4e 100755 --- a/include/hos_types.h +++ b/include/hos_types.h @@ -12,32 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -/** - * @defgroup hos_types HOS Types - * @ingroup utils - * @addtogroup Types - * @{ - * - * @brief Defintion of basic data types. - * - * The data types are applicable to both the application and kernel. \n - * - * @since 1.0 - * @version 1.0 - */ - -/** - * @file ohos_init.h - * - * @brief Defintion of basic data types. - * - * The data types are applicable to both the application and kernel. \n - * - * @since 1.0 - * @version 1.0 - */ - #ifndef OHOS_TYPES_H #define OHOS_TYPES_H @@ -47,8 +21,8 @@ extern "C"{ #endif #endif /* __cplusplus */ -/** - * @brief Defintion of basic data types. +/* + * Defintion of basic data types. * The data types are applicable to both the application and kernel. */ typedef unsigned char uint8; @@ -102,4 +76,4 @@ typedef unsigned int BOOL; #endif /* __cplusplus */ #endif /* OHOS_TYPES_H */ -/** @} */ \ No newline at end of file + diff --git a/include/kv_store.h b/include/kv_store.h index ccf4aed8f2bb6166e0dc3c78ce8d1d53358affa5..4f80056162181a905643ef4a4aecfeead72b70e6 100755 --- a/include/kv_store.h +++ b/include/kv_store.h @@ -14,8 +14,6 @@ */ /** - * @defgroup kv_store KV Storage - * @ingroup utils * @addtogroup kv_store * @{ * diff --git a/include/ohos_errno.h b/include/ohos_errno.h index 54a43b56b281d0a4530b89d1a7013974bbcde604..14708e37aa8594d33299cf74262d552636b0c73d 100755 --- a/include/ohos_errno.h +++ b/include/ohos_errno.h @@ -12,28 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -/** - * @defgroup ohos_errno System Error No - * @ingroup utils - * @addtogroup Errno - * @{ - * - * @brief Defintion of error code. The error codes are applicable to both the application and kernel. - * - * @since 1.0 - * @version 1.0 - */ - -/** - * @file ohos_errno.h - * - * @brief Defintion of error code. The error codes are applicable to both the application and kernel. - * - * @since 1.0 - * @version 1.0 - */ - #ifndef OHOS_ERRNO_H #define OHOS_ERRNO_H #ifdef __cplusplus @@ -41,41 +19,40 @@ extern "C" { #endif /* __cpluscplus */ #endif /* __cpluscplus */ - -/** - * @brief Defintion of error code. The error codes are applicable to both the application and kernel - */ +/* --------------------------------------------------------------------------------------------* + * Defintion of error code. The error codes are applicable to both the application and kernel + *-------------------------------------------------------------------------------------------- */ enum OHOSLiteErrorCode { - EC_SUCCESS = 0, /*< OK or No error */ - EC_FAILURE = -1, /*< Execution failed */ - EC_BADPTR = -2, /*< Bad pointer value */ - EC_NOMEMORY = -3, /*< No enough memory */ - EC_ADDRESS = -4, /*< Memory or bus address error */ - EC_IOERROR = -5, /*< I/O error */ - EC_BUSBUSY = -6, /*< xxx bus busy */ - EC_NORESPONCE = -7, /*< Function is no responce */ - EC_NODEVICE = -8, /*< No such device */ - EC_INVALID = -9, /*< Invalid argument */ - EC_BUSY = -10, /*< Device or resource busy */ - EC_NOSERVICE = -11, /*< No service */ - EC_PERMISSION = -12, /*< Permission denied */ - EC_NOFILE = -13, /*< No this file */ - EC_NOSPACE = -14, /*< No space left on device */ - EC_NODIR = -15, /*< Not a directory */ - EC_ROFILE = -16, /*< Read-only file system */ - EC_NAMETOOLONG = -17, /*< File name too long */ - EC_OPBLOCK = -18, /*< Operation would block */ - EC_TIMEOUT = -19, /*< Timer expired */ - EC_COMMU = -20, /*< Communication error on send */ - EC_PROTOCOL = -21, /*< Protocol error */ - EC_CANCELED = -22, /*< Operation Canceled */ - EC_NOKEY = -23, /*< Required key not available */ - EC_NOHANDLER = -24, /*< No handler to execute */ - EC_FLOWCTRL = -25, /*< Flow control */ - EC_NOINIT = -26, /*< device hasn't been initializeed */ - EC_NORESOURCE = -27, /*< resource error */ - EC_LLERRTOP = -127, /*< Low level function error code max value */ - EC_HLERRBASE = -128 /*< High level function error code baseline */ + EC_SUCCESS = 0, /* OK or No error */ + EC_FAILURE = -1, /* Execution failed */ + EC_BADPTR = -2, /* Bad pointer value */ + EC_NOMEMORY = -3, /* No enough memory */ + EC_ADDRESS = -4, /* Memory or bus address error */ + EC_IOERROR = -5, /* I/O error */ + EC_BUSBUSY = -6, /* xxx bus busy */ + EC_NORESPONCE = -7, /* Function is no responce */ + EC_NODEVICE = -8, /* No such device */ + EC_INVALID = -9, /* Invalid argument */ + EC_BUSY = -10, /* Device or resource busy */ + EC_NOSERVICE = -11, /* No service */ + EC_PERMISSION = -12, /* Permission denied */ + EC_NOFILE = -13, /* No this file */ + EC_NOSPACE = -14, /* No space left on device */ + EC_NODIR = -15, /* Not a directory */ + EC_ROFILE = -16, /* Read-only file system */ + EC_NAMETOOLONG = -17, /* File name too long */ + EC_OPBLOCK = -18, /* Operation would block */ + EC_TIMEOUT = -19, /* Timer expired */ + EC_COMMU = -20, /* Communication error on send */ + EC_PROTOCOL = -21, /* Protocol error */ + EC_CANCELED = -22, /* Operation Canceled */ + EC_NOKEY = -23, /* Required key not available */ + EC_NOHANDLER = -24, /* No handler to execute */ + EC_FLOWCTRL = -25, /* Flow control */ + EC_NOINIT = -26, /* device hasn't been initializeed */ + EC_NORESOURCE = -27, /* resource error */ + EC_LLERRTOP = -127, /* Low level function error code max value */ + EC_HLERRBASE = -128 /* High level function error code baseline */ }; #ifdef __cplusplus @@ -83,6 +60,4 @@ enum OHOSLiteErrorCode { } #endif /* __cpluscplus */ #endif /* __cpluscplus */ - #endif // OHOS_ERRNO_H -/** @} */ \ No newline at end of file diff --git a/include/ohos_init.h b/include/ohos_init.h index 989ac0df366bc8feca4b3e34fd8f4685fb0b486c..6d2411bb9166998fdf63718b85cb14758b3834c2 100755 --- a/include/ohos_init.h +++ b/include/ohos_init.h @@ -14,9 +14,7 @@ */ /** - * @defgroup ohos_init OHOS Init - * @ingroup utils - * @addtogroup Init + * @addtogroup Init OHOS Init * @{ * * @brief Provides the entries for initializing and starting services and features. diff --git a/include/ohos_types.h b/include/ohos_types.h index 0a719da4f8cfd3fc1dc1b3027a7bcaa3fe43a33b..1e198cc94cce51fc8b618537082c271200cfb1e4 100755 --- a/include/ohos_types.h +++ b/include/ohos_types.h @@ -12,32 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - -/** - * @defgroup ohos_types OHOS Types - * @ingroup utils - * @addtogroup Types - * @{ - * - * @brief Defintion of basic data types. - * - * The data types are applicable to both the application and kernel. \n - * - * @since 1.0 - * @version 1.0 - */ - -/** - * @file ohos_init.h - * - * @brief Defintion of basic data types. - * - * The data types are applicable to both the application and kernel. \n - * - * @since 1.0 - * @version 1.0 - */ - #ifndef OHOS_TYPES_H #define OHOS_TYPES_H @@ -47,8 +21,8 @@ extern "C"{ #endif #endif /* __cplusplus */ -/** - * @brief Defintion of basic data types. +/* + * Defintion of basic data types. * The data types are applicable to both the application and kernel. */ typedef unsigned char uint8; @@ -105,4 +79,4 @@ typedef unsigned int BOOL; #endif /* __cplusplus */ #endif /* OHOS_TYPES_H */ -/** @} */ \ No newline at end of file + diff --git a/include/utils_config.h b/include/utils_config.h index cd775da6b82feeca0403271a143cd42b901fd934..99d4c39e063b0f6e858c6dd4cba0a81aaf7ecbdb 100755 --- a/include/utils_config.h +++ b/include/utils_config.h @@ -14,8 +14,6 @@ */ /** - * @defgroup utils_config System Config - * @ingroup utils * @addtogroup utils_config * @{ * diff --git a/include/utils_file.h b/include/utils_file.h index a39b3f4eb8601b92e37081fd47368c385986e616..109dff21f80804df78cd82074acbd0d85fc85e6e 100755 --- a/include/utils_file.h +++ b/include/utils_file.h @@ -14,8 +14,6 @@ */ /** - * @defgroup utils_file File Operations. - * @ingroup utils * @addtogroup utils_file * @{ * @@ -184,7 +182,7 @@ int UtilsFileClose(int fd); * @since 1.0 * @version 1.0 */ -int UtilsFileRead(int fd, char *buf, unsigned int len); +int UtilsFileRead(int fd, char* buf, unsigned int len); /** * @brief Writes a specified length of data into a file with the specified file descriptor. @@ -196,7 +194,7 @@ int UtilsFileRead(int fd, char *buf, unsigned int len); * @since 1.0 * @version 1.0 */ -int UtilsFileWrite(int fd, const char *buf, unsigned int len); +int UtilsFileWrite(int fd, const char* buf, unsigned int len); /** * @brief Deletes a specified file. @@ -208,7 +206,7 @@ int UtilsFileWrite(int fd, const char *buf, unsigned int len); * @since 1.0 * @version 1.0 */ -int UtilsFileDelete(const char *path); +int UtilsFileDelete(const char* path); /** * @brief Obtains the file size. @@ -219,7 +217,7 @@ int UtilsFileDelete(const char *path); * @since 1.0 * @version 1.0 */ -int UtilsFileStat(const char *path, unsigned int *fileSize); +int UtilsFileStat(const char* path, unsigned int* fileSize); /** * @brief Adjusts the read and write position offset in a file. diff --git a/include/utils_list.h b/include/utils_list.h index 8d2cb3f8d1e69868bcc5f6f5af3c03a51c6ac00d..a31885915d7dad8d669f96885c17e0bbbfd74de3 100755 --- a/include/utils_list.h +++ b/include/utils_list.h @@ -13,7 +13,7 @@ * limitations under the License. */ -/** +/* * @defgroup utils_list Doubly linked list * @ingroup utils * @attention @@ -39,7 +39,7 @@ typedef struct UTILS_DL_LIST { struct UTILS_DL_LIST *pstNext; /* < Current node's pointer to the next node */ } UTILS_DL_LIST; -/** +/* * @ingroup utils_list * * @par Description: @@ -62,7 +62,7 @@ static inline void UtilsListInit(UTILS_DL_LIST *list) list->pstPrev = list; } -/** +/* * @ingroup utils_list * @brief Point to the next node pointed to by the current node. * @@ -84,7 +84,7 @@ static inline void UtilsListInit(UTILS_DL_LIST *list) */ #define UTILS_DL_LIST_FIRST(object) ((object)->pstNext) -/** +/* * @ingroup utils_list * @brief Node is the end of the list. * @@ -106,7 +106,7 @@ static inline void UtilsListInit(UTILS_DL_LIST *list) */ #define UTILS_DL_LIST_IS_END(list, node) ((list) == (node) ? TRUE : FALSE) -/** +/* * @ingroup utils_list * @brief Node is on the list. * @@ -128,7 +128,7 @@ static inline void UtilsListInit(UTILS_DL_LIST *list) */ #define UTILS_DL_LIST_IS_ON_QUEUE(node) ((node)->pstPrev != NULL && (node)->pstNext != NULL) -/** +/* * @ingroup utils_list * @brief Point to the previous node pointed to by the current node. * @@ -150,7 +150,7 @@ static inline void UtilsListInit(UTILS_DL_LIST *list) */ #define UTILS_DL_LIST_LAST(object) ((object)->pstPrev) -/** +/* * @ingroup utils_list * @brief Insert a new node to a doubly linked list. * @@ -177,7 +177,7 @@ static inline void UtilsListAdd(UTILS_DL_LIST *list, UTILS_DL_LIST *node) list->pstNext = node; } -/** +/* * @ingroup utils_list * @brief Insert a node to the tail of a doubly linked list. * @@ -201,7 +201,7 @@ static inline void UtilsListTailInsert(UTILS_DL_LIST *list, UTILS_DL_LIST *node) UtilsListAdd(list->pstPrev, node); } -/** +/* * @ingroup utils_list * @brief Insert a node to the head of a doubly linked list. * @@ -225,7 +225,7 @@ static inline void UtilsListHeadInsert(UTILS_DL_LIST *list, UTILS_DL_LIST *node) UtilsListAdd(list, node); } -/** +/* * @ingroup utils_list * * @par Description: @@ -252,7 +252,7 @@ static inline void UtilsListDelete(UTILS_DL_LIST *node) node->pstPrev = NULL; } -/** +/* * @ingroup utils_list * @brief Identify whether a specified doubly linked list is empty. * @@ -278,7 +278,7 @@ static inline bool UtilsListEmpty(UTILS_DL_LIST *list) return (bool)(list->pstNext == list); } -/** +/* * @ingroup utils_list * @brief Insert a new list to a doubly linked list. * @@ -310,7 +310,7 @@ static inline void UtilsListAddList(UTILS_DL_LIST *oldList, UTILS_DL_LIST *newLi newListTail->pstNext = oldListHead; } -/** +/* * @ingroup utils_list * @brief Insert a doubly list to the tail of a doubly linked list. * @@ -334,7 +334,7 @@ static inline void UtilsListTailInsertList(UTILS_DL_LIST *oldList, UTILS_DL_LIST UtilsListAddList(oldList->pstPrev, newList); } -/** +/* * @ingroup utils_list * @brief Insert a doubly list to the head of a doubly linked list. * @@ -358,7 +358,7 @@ static inline void UtilsListHeadInsertList(UTILS_DL_LIST *oldList, UTILS_DL_LIST UtilsListAddList(oldList, newList); } -/** +/* * @ingroup utils_list * @brief Obtain the offset of a field to a structure address. * @@ -379,7 +379,7 @@ static inline void UtilsListHeadInsertList(UTILS_DL_LIST *oldList, UTILS_DL_LIST */ #define OFFSET_OF_FIELD(type, field) ((unsigned int)&((type *)0)->field) -/** +/* * @ingroup utils_list * @brief Obtain the pointer to a doubly linked list in a structure. * @@ -400,7 +400,7 @@ static inline void UtilsListHeadInsertList(UTILS_DL_LIST *oldList, UTILS_DL_LIST */ #define UTILS_OFF_SET_OF(type, member) ((unsigned int)&((type *)0)->member) -/** +/* * @ingroup utils_list * @brief Obtain the pointer to a structure that contains a doubly linked list. * @@ -426,7 +426,7 @@ static inline void UtilsListHeadInsertList(UTILS_DL_LIST *oldList, UTILS_DL_LIST #define UTILS_DL_LIST_ENTRY(item, type, member) \ ((type *)(void *)((char *)(item) - UTILS_OFF_SET_OF(type, member))) -/** +/* * @ingroup utils_list * @brief Iterate over a doubly linked list of given type. * @@ -449,10 +449,10 @@ static inline void UtilsListHeadInsertList(UTILS_DL_LIST *oldList, UTILS_DL_LIST */ #define UTILS_DL_LIST_FOR_EACH_ENTRY(item, list, type, member) \ for (item = UTILS_DL_LIST_ENTRY((list)->pstNext, type, member); \ - &(item)->member != (list); \ + &(item)->member != (list); \ item = UTILS_DL_LIST_ENTRY((item)->member.pstNext, type, member)) -/** +/* * @ingroup utils_list * @brief iterate over a doubly linked list safe against removal of list entry. * @@ -477,10 +477,10 @@ static inline void UtilsListHeadInsertList(UTILS_DL_LIST *oldList, UTILS_DL_LIST #define UTILS_DL_LIST_FOR_EACH_ENTRY_SAFE(item, next, list, type, member) \ for (item = UTILS_DL_LIST_ENTRY((list)->pstNext, type, member), \ next = UTILS_DL_LIST_ENTRY((item)->member.pstNext, type, member); \ - &(item)->member != (list); \ + &(item)->member != (list); \ item = next, next = UTILS_DL_LIST_ENTRY((item)->member.pstNext, type, member)) -/** +/* * @ingroup utils_list * @brief Delete initialize a doubly linked list. * @@ -505,7 +505,7 @@ static inline void UtilsListDelInit(UTILS_DL_LIST *list) UtilsListInit(list); } -/** +/* * @ingroup utils_list * @brief iterate over a doubly linked list. * @@ -525,11 +525,11 @@ static inline void UtilsListDelInit(UTILS_DL_LIST *list) * @see */ #define UTILS_DL_LIST_FOR_EACH(item, list) \ - for (item = (list)->pstNext; \ - (item) != (list); \ + for (item = (list)->pstNext; \ + (item) != (list); \ item = (item)->pstNext) -/** +/* * @ingroup utils_list * @brief Iterate over a doubly linked list safe against removal of list entry. * @@ -550,11 +550,11 @@ static inline void UtilsListDelInit(UTILS_DL_LIST *list) * @see */ #define UTILS_DL_LIST_FOR_EACH_SAFE(item, next, list) \ - for (item = (list)->pstNext, next = (item)->pstNext; \ - (item) != (list); \ + for (item = (list)->pstNext, next = (item)->pstNext; \ + (item) != (list); \ item = next, next = (item)->pstNext) -/** +/* * @ingroup utils_list * @brief Initialize a double linked list. * @@ -592,7 +592,7 @@ static inline void UtilsListDelInit(UTILS_DL_LIST *list) __t = NULL; \ } else { \ __t = UTILS_DL_LIST_ENTRY((list)->pstNext, type, element); \ - UtilsListDelete((list)->pstNext); \ + UtilsListDelete((list)->pstNext); \ } \ __t; \ } while (0) @@ -614,5 +614,4 @@ static inline void UtilsListDelInit(UTILS_DL_LIST *list) #endif /* __cplusplus */ #endif /* __cplusplus */ -#endif /* _UTILS_LIST_H */ -/** @} */ \ No newline at end of file +#endif /* _UTILS_LIST_H */ \ No newline at end of file