1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 /** 17 * @addtogroup Web 18 * @{ 19 * 20 * @brief Provides APIs for the ArkWeb errors. 21 * @since 12 22 */ 23 /** 24 * @file arkweb_error_code.h 25 * 26 * @brief Declares the APIs for the ArkWeb errors. 27 * @kit ArkWeb 28 * @library libohweb.so 29 * @syscap SystemCapability.Web.Webview.Core 30 * @since 12 31 */ 32 #ifndef ARKWEB_ERROR_CODE_H 33 #define ARKWEB_ERROR_CODE_H 34 35 typedef enum ArkWeb_ErrorCode { 36 /* 37 * @brief Success. 38 * 39 * @syscap SystemCapability.Web.Webview.Core 40 * @since 12 41 */ 42 ARKWEB_SUCCESS = 0, 43 44 /* 45 * @brief Init error. The WebviewController must be associated with a Web component. 46 * 47 * @syscap SystemCapability.Web.Webview.Core 48 * @since 12 49 */ 50 ARKWEB_INIT_ERROR = 17100001, 51 52 /* 53 * @brief Unknown error. 54 * 55 * @syscap SystemCapability.Web.Webview.Core 56 * @since 12 57 */ 58 ARKWEB_ERROR_UNKNOWN = 17100100, 59 60 /* 61 * @brief Invalid param. 62 * 63 * @syscap SystemCapability.Web.Webview.Core 64 * @since 12 65 */ 66 ARKWEB_INVALID_PARAM = 17100101, 67 68 /* 69 * @brief Register custom schemes should be called before create any ArkWeb. 70 * 71 * @syscap SystemCapability.Web.Webview.Core 72 * @since 12 73 */ 74 ARKWEB_SCHEME_REGISTER_FAILED = 17100102, 75 76 /* 77 * @brief Invalid url. 78 * 79 * @syscap SystemCapability.Web.Webview.Core 80 * @since 12 81 */ 82 ARKWEB_INVALID_URL = 17100103, 83 84 /* 85 * @brief Invalid cookie value. 86 * 87 * @syscap SystemCapability.Web.Webview.Core 88 * @since 12 89 */ 90 ARKWEB_INVALID_COOKIE_VALUE = 17100104, 91 } ArkWeb_ErrorCode; 92 93 #endif // ARKWEB_ERROR_CODE_H