diff --git a/web/webview/interfaces/native/arkweb_error_code.h b/web/webview/interfaces/native/arkweb_error_code.h index 6865c29be5aa7311a4bd314222d43f7ec567cc60..9e79224ab0ff294788d402ff3d466031174c1980 100644 --- a/web/webview/interfaces/native/arkweb_error_code.h +++ b/web/webview/interfaces/native/arkweb_error_code.h @@ -20,6 +20,7 @@ * @brief Provides APIs for the ArkWeb errors. * @since 12 */ + /** * @file arkweb_error_code.h * @@ -33,101 +34,95 @@ #define ARKWEB_ERROR_CODE_H typedef enum ArkWeb_ErrorCode { -/** @error Success. */ -ARKWEB_SUCCESS = 0, + /** @error Success. */ + ARKWEB_SUCCESS = 0, -/** @error Init error. */ -ARKWEB_INIT_ERROR = 17100001, + /** @error Init error. */ + ARKWEB_INIT_ERROR = 17100001, -/** @error Unknown error. */ -ARKWEB_ERROR_UNKNOWN = 17100100, + /** @error Unknown error. */ + ARKWEB_ERROR_UNKNOWN = 17100100, -/** @error Invalid param. */ -ARKWEB_INVALID_PARAM = 17100101, + /** @error Invalid param. */ + ARKWEB_INVALID_PARAM = 17100101, -/** @error Register custom schemes should be called before create any ArkWeb. */ -ARKWEB_SCHEME_REGISTER_FAILED = 17100102, + /** @error Register custom schemes should be called before create any ArkWeb. */ + ARKWEB_SCHEME_REGISTER_FAILED = 17100102, -/** @error Invalid url. */ -ARKWEB_INVALID_URL = 17100103, + /** @error Invalid url. */ + ARKWEB_INVALID_URL = 17100103, -/** @error Invalid cookie value. */ -ARKWEB_INVALID_COOKIE_VALUE = 17100104, + /** @error Invalid cookie value. */ + ARKWEB_INVALID_COOKIE_VALUE = 17100104, -/* + /* * @brief Failed to open the library. * * @syscap SystemCapability.Web.Webview.Core * @since 15 */ -ARKWEB_LIBRARY_OPEN_FAILURE = 17100105, + ARKWEB_LIBRARY_OPEN_FAILURE = 17100105, -/* + /* * @brief The required symbol was not found in the library. * * @syscap SystemCapability.Web.Webview.Core * @since 15 */ -ARKWEB_LIBRARY_SYMBOL_NOT_FOUND = 17100106, -} ArkWeb_ErrorCode; + ARKWEB_LIBRARY_SYMBOL_NOT_FOUND = 17100106, -typedef enum ArkWeb_BlanklessErrorCode { -/* - * @brief Success. + /* + * @brief The CookieManager not initialized. * * @syscap SystemCapability.Web.Webview.Core * @since 20 */ -ARKWEB_BLANKLESS_SUCCESS = 0, + ARKWEB_COOKIE_MANAGER_NOT_INITIALIZED = 17100107, +} ArkWeb_ErrorCode; -/* - * @brief Unknown error. +/** + * @brief Defines an enum for the error codes of the white screen optimization solution. * - * @syscap SystemCapability.Web.Webview.Core * @since 20 */ -ARKWEB_BLANKLESS_ERR_UNKNOWN = -1, +typedef enum ArkWeb_BlanklessErrorCode { + /** @error The operation is successful. */ + ARKWEB_BLANKLESS_SUCCESS = 0, -/* - * @brief Invalid args. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ -ARKWEB_BLANKLESS_ERR_INVALID_ARGS = -2, + /** @error Unidentified error. */ + ARKWEB_BLANKLESS_ERR_UNKNOWN = -1, -/* - * @brief Init error. The web controller is not binded with the component. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ -ARKWEB_BLANKLESS_ERR_CONTROLLER_NOT_INITED = -3, + /** @error Invalid parameter. */ + ARKWEB_BLANKLESS_ERR_INVALID_ARGS = -2, -/* + /** @error The web controller is not bound to a component. */ + ARKWEB_BLANKLESS_ERR_CONTROLLER_NOT_INITED = -3, + + /* * @brief The key of blankless was not matched. * * @syscap SystemCapability.Web.Webview.Core * @since 20 */ -ARKWEB_BLANKLESS_KEY_NOT_MATCH = -4, + ARKWEB_BLANKLESS_KEY_NOT_MATCH = -4, -/* + /* * @brief There are significant changes for the loading page. * * @syscap SystemCapability.Web.Webview.Core * @since 20 */ -ARKWEB_BLANKLESS_SIGNIFICANT_CHANGE = -5, + ARKWEB_BLANKLESS_SIGNIFICANT_CHANGE = -5, -/* - * @brief Device not support. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ -ARKWEB_BLANKLESS_ERR_DEVICE_NOT_SUPPORT = 801, -} ArkWeb_BlanklessErrorCode; + /** @error The device does not support this feature. */ + ARKWEB_BLANKLESS_ERR_DEVICE_NOT_SUPPORT = 801, + + /** @error The key value is not matched. The OH_NativeArkWeb_SetBlanklessLoadingWithKey and OH_NativeArkWeb_GetBlanklessInfoWithKey APIs must be used in pair and use the same key value. */ + ARKWEB_BLANKLESS_ERR_KEY_NOT_MATCH = -4, + /** @error If the similarity is low, the system determines that the change is too large. As a result, the OH_NativeArkWeb_SetBlanklessLoadingWithKey API fails to enable frame interpolation. */ + ARKWEB_BLANKLESS_ERR_SIGNIFICANT_CHANGE = -5, +} ArkWeb_BlanklessErrorCode; #endif // ARKWEB_ERROR_CODE_H -/** @} */ + +/** @} */ \ No newline at end of file