From 2366f2e0469748bd7501d1c7138f85f9597de6e9 Mon Sep 17 00:00:00 2001 From: xiyupeng Date: Fri, 24 May 2024 11:53:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?API=E6=B3=A8=E9=87=8A=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiyupeng --- .../interfaces/native/arkweb_error_code.h | 21 +- .../interfaces/native/arkweb_net_error_list.h | 1680 +++++------------ .../interfaces/native/arkweb_scheme_handler.h | 459 +++-- 3 files changed, 768 insertions(+), 1392 deletions(-) diff --git a/web/webview/interfaces/native/arkweb_error_code.h b/web/webview/interfaces/native/arkweb_error_code.h index 07f274025..d7e0a76d2 100644 --- a/web/webview/interfaces/native/arkweb_error_code.h +++ b/web/webview/interfaces/native/arkweb_error_code.h @@ -32,28 +32,13 @@ #define ARKWEB_ERROR_CODE_H typedef enum ArkWeb_ErrorCode { -/* - * @brief Unknown error. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 - */ +/** @error Unknown error. */ ARKWEB_ERROR_UNKNOWN = 17100100, -/* - * @brief Invalid param. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 - */ +/** @error Invalid param. */ ARKWEB_INVALID_PARAM = 17100101, -/* - * @brief Register custom schemes should be called before create any ArkWeb. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 - */ +/** @error Register custom schemes should be called before create any ArkWeb. */ ARKWEB_SCHEME_REGISTER_FAILED = 17100102, } ArkWeb_ErrorCode; diff --git a/web/webview/interfaces/native/arkweb_net_error_list.h b/web/webview/interfaces/native/arkweb_net_error_list.h index f8ef5b247..2e0a1c16a 100644 --- a/web/webview/interfaces/native/arkweb_net_error_list.h +++ b/web/webview/interfaces/native/arkweb_net_error_list.h @@ -32,907 +32,598 @@ #define ARKWEB_NET_ERROR_LIST_H typedef enum ArkWeb_NetError { - /* - * @brief Normal. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Normal. */ ARKWEB_NET_OK = 0, - /* - * @brief An asynchronous IO operation is not yet complete. This usually does not + /** + * @error An asynchronous IO operation is not yet complete. This usually does not * indicate a fatal error. Typically this error will be generated as a * notification to wait for some external notification that the IO operation * finally completed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_IO_PENDING = -1, - /* - * @brief A generic failure occurred. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error A generic failure occurred. */ ARKWEB_ERR_FAILED = -2, - /* - * @brief An operation was aborted. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An operation was aborted. */ ARKWEB_ERR_ABORTED = -3, - /* - * @brief An argument to the function is incorrect. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An argument to the function is incorrect. */ ARKWEB_ERR_INVALID_ARGUMENT = -4, - /* - * @brief The handle or file descriptor is invalid. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The handle or file descriptor is invalid. */ ARKWEB_ERR_INVALID_HANDLE = -5, - /* - * @brief The file or directory cannot be found. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The file or directory cannot be found. */ ARKWEB_ERR_FILE_NOT_FOUND = -6, - /* - * @brief An operation timed out. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An operation timed out. */ ARKWEB_ERR_TIMED_OUT = -7, - /* - * @brief The file is too large. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The file is too large. */ ARKWEB_ERR_FILE_TOO_LARGE = -8, - /* - * @brief An unexpected error. This may be caused by a programming mistake or an + /** + * @error An unexpected error. This may be caused by a programming mistake or an * invalid assumption. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_UNEXPECTED = -9, - /* - * @brief Permission to access a resource, other than the network, was denied. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Permission to access a resource, other than the network, was denied. */ ARKWEB_ERR_ACCESS_DENIED = -10, - /* - * @brief The operation failed because of unimplemented functionality. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The operation failed because of unimplemented functionality. */ ARKWEB_ERR_NOT_IMPLEMENTED = -11, - /* - * @brief There were not enough resources to complete the operation. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error There were not enough resources to complete the operation. */ ARKWEB_ERR_INSUFFICIENT_RESOURCES = -12, - /* - * @brief Memory allocation failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Memory allocation failed. */ ARKWEB_ERR_OUT_OF_MEMORY = -13, - /* - * @brief The file upload failed because the file's modification time was different + /** + * @error The file upload failed because the file's modification time was different * from the expectation. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_UPLOAD_FILE_CHANGED = -14, - /* - * @brief The socket is not connected. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The socket is not connected. */ ARKWEB_ERR_SOCKET_NOT_CONNECTED = -15, - /* - * @brief The file already exists. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The file already exists. */ ARKWEB_ERR_FILE_EXISTS = -16, - /* - * @brief The path or file name is too long. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The path or file name is too long. */ ARKWEB_ERR_FILE_PATH_TOO_LONG = -17, - /* - * @brief Not enough room left on the disk. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Not enough room left on the disk. */ ARKWEB_ERR_FILE_NO_SPACE = -18, - /* - * @brief The file has a virus. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The file has a virus. */ ARKWEB_ERR_FILE_VIRUS_INFECTED = -19, - /* - * @brief The client chose to block the request. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The client chose to block the request. */ ARKWEB_ERR_BLOCKED_BY_CLIENT = -20, - /* - * @brief The network changed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The network changed. */ ARKWEB_ERR_NETWORK_CHANGED = -21, - /* - * @brief The request was blocked by the URL block list configured by the domain + /** + * @error The request was blocked by the URL block list configured by the domain * administrator. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_BLOCKED_BY_ADMINISTRATOR = -22, - /* - * @brief The socket is already connected. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The socket is already connected. */ ARKWEB_ERR_SOCKET_CONNECTED = -23, - /* - * @brief The upload failed because the upload stream needed to be re-read, due to a + /** + * @error The upload failed because the upload stream needed to be re-read, due to a * retry or a redirect, but the upload stream doesn't support that operation. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25, - /* - * @brief The request failed because the URLRequestContext is shutting down, or has + /** + * @error The request failed because the URLRequestContext is shutting down, or has * been shut down. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CONTEXT_SHUT_DOWN = -26, - /* - * @brief The request failed because the response was delivered along with requirements + /** + * @error The request failed because the response was delivered along with requirements * which are not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor * checks and 'Cross-Origin-Resource-Policy' for instance). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_BLOCKED_BY_RESPONSE = -27, - /* - * @brief The request was blocked by system policy disallowing some or all cleartext + /** + * @error The request was blocked by system policy disallowing some or all cleartext * requests. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CLEARTEXT_NOT_PERMITTED = -29, - /* - * @brief The request was blocked by a Content Security Policy. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The request was blocked by a Content Security Policy. */ ARKWEB_ERR_BLOCKED_BY_CSP = -30, - /* - * @brief The request was blocked because of no H/2 or QUIC session. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The request was blocked because of no H/2 or QUIC session. */ ARKWEB_ERR_H2_OR_QUIC_REQUIRED = -31, - /* - * @brief The request was blocked by CORB or ORB. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The request was blocked by CORB or ORB. */ ARKWEB_ERR_BLOCKED_BY_ORB = -32, - /* - * @brief A connection was closed (corresponding to a TCP FIN). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error A connection was closed (corresponding to a TCP FIN). */ ARKWEB_ERR_CONNECTION_CLOSED = -100, - /* - * @brief A connection was reset (corresponding to a TCP RST). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error A connection was reset (corresponding to a TCP RST). */ ARKWEB_ERR_CONNECTION_RESET = -101, - /* - * @brief A connection attempt was refused. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error A connection attempt was refused. */ ARKWEB_ERR_CONNECTION_REFUSED = -102, - /* - * @brief A connection timed out as a result of not receiving an ACK for data sent. + /** + * @error A connection timed out as a result of not receiving an ACK for data sent. * This can include a FIN packet that did not get ACK'd. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CONNECTION_ABORTED = -103, - /* - * @brief A connection attempt failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error A connection attempt failed. */ ARKWEB_ERR_CONNECTION_FAILED = -104, - /* - * @brief The host name could not be resolved. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The host name could not be resolved. */ ARKWEB_ERR_NAME_NOT_RESOLVED = -105, - /* - * @brief The Internet connection has been lost. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The Internet connection has been lost. */ ARKWEB_ERR_INTERNET_DISCONNECTED = -106, - /* - * @brief An SSL protocol error occurred. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An SSL protocol error occurred. */ ARKWEB_ERR_SSL_PROTOCOL_ERROR = -107, - /* - * @brief The IP address or port number is invalid (e.g., cannot connect to the IP + /** + * @error The IP address or port number is invalid (e.g., cannot connect to the IP * address 0 or the port 0). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_ADDRESS_INVALID = -108, - /* - * @brief The IP address is unreachable. This usually means that there is no route to + /** + * @error The IP address is unreachable. This usually means that there is no route to * the specified host or network. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_ADDRESS_UNREACHABLE = -109, - /* - * @brief The server requested a client certificate for SSL client authentication. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The server requested a client certificate for SSL client authentication. */ ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110, - /* - * @brief A tunnel connection through the proxy could not be established. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error A tunnel connection through the proxy could not be established. */ ARKWEB_ERR_TUNNEL_CONNECTION_FAILED = -111, - /* - * @brief No SSL protocol versions are enabled. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error No SSL protocol versions are enabled. */ ARKWEB_ERR_NO_SSL_VERSIONS_ENABLED = -112, - /* - * @brief The client and server don't support a common SSL protocol version or + /** + * @error The client and server don't support a common SSL protocol version or * cipher suite. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113, - /* - * @brief The server requested a renegotiation (rehandshake). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The server requested a renegotiation (rehandshake). */ ARKWEB_ERR_SSL_RENEGOTIATION_REQUESTED = -114, - /* - * @brief The proxy requested authentication (for tunnel establishment, with an + /** + * @error The proxy requested authentication (for tunnel establishment, with an * unsupported method. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_PROXY_AUTH_UNSUPPORTED = -115, - /* - * @brief The SSL handshake failed because of a bad or missing client certificate. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The SSL handshake failed because of a bad or missing client certificate. */ ARKWEB_ERR_BAD_SSL_CLIENT_AUTH_CERT = -117, - /* - * @brief A connection attempt timed out. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error A connection attempt timed out. */ ARKWEB_ERR_CONNECTION_TIMED_OUT = -118, - /* - * @brief There are too many pending DNS resolves, so a request in the queue was + /** + * @error There are too many pending DNS resolves, so a request in the queue was * aborted. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119, - /* - * @brief Failed establishing a connection to the SOCKS proxy server for a target host. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Failed establishing a connection to the SOCKS proxy server for a target host. */ ARKWEB_ERR_SOCKS_CONNECTION_FAILED = -120, - /* - * @brief The SOCKS proxy server failed establishing connection to the target host + /** + * @error The SOCKS proxy server failed establishing connection to the target host * because that host is unreachable. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121, - /* - * @brief The request to negotiate an alternate protocol failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The request to negotiate an alternate protocol failed. */ ARKWEB_ERR_ALPN_NEGOTIATION_FAILED = -122, - /* - * @brief The peer sent an SSL no_renegotiation alert message. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The peer sent an SSL no_renegotiation alert message. */ ARKWEB_ERR_SSL_NO_RENEGOTIATION = -123, - /* - * @brief Winsock sometimes reports more data written than passed. This is probably + /** + * @error Winsock sometimes reports more data written than passed. This is probably * due to a broken LSP. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124, - /* - * @brief An SSL peer sent us a fatal decompression_failure alert. This typically + /** + * @error An SSL peer sent us a fatal decompression_failure alert. This typically * occurs when a peer selects DEFLATE compression in the mistaken belief that * it supports it. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125, - /* - * @brief An SSL peer sent us a fatal bad_record_mac alert. This has been observed + /** + * @error An SSL peer sent us a fatal bad_record_mac alert. This has been observed * from servers with buggy DEFLATE support. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_BAD_RECORD_MAC_ALERT = -126, - /* - * @brief The proxy requested authentication (for tunnel establishment). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The proxy requested authentication (for tunnel establishment). */ ARKWEB_ERR_PROXY_AUTH_REQUESTED = -127, - /* - * @brief Could not create a connection to the proxy server. An error occurred + /** + * @error Could not create a connection to the proxy server. An error occurred * either in resolving its name, or in connecting a socket to it. * Note that this does NOT include failures during the actual "CONNECT" method * of an HTTP proxy. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_PROXY_CONNECTION_FAILED = -130, - /* - * @brief A mandatory proxy configuration could not be used. Currently this means + /** + * @error A mandatory proxy configuration could not be used. Currently this means * that a mandatory PAC script could not be fetched, parsed or executed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131, - /* - * @brief We've hit the max socket limit for the socket pool while preconnecting. We + /** + * @error We've hit the max socket limit for the socket pool while preconnecting. We * don't bother trying to preconnect more sockets. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133, - /* - * @brief The permission to use the SSL client certificate's private key was denied. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The permission to use the SSL client certificate's private key was denied. */ ARKWEB_ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134, - /* - * @brief The SSL client certificate has no private key. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The SSL client certificate has no private key. */ ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135, - /* - * @brief The certificate presented by the HTTPS Proxy was invalid. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The certificate presented by the HTTPS Proxy was invalid. */ ARKWEB_ERR_PROXY_CERTIFICATE_INVALID = -136, - /* - * @brief An error occurred when trying to do a name resolution (DNS). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An error occurred when trying to do a name resolution (DNS). */ ARKWEB_ERR_NAME_RESOLUTION_FAILED = -137, - /* - * @brief Permission to access the network was denied. This is used to distinguish + /** + * @error Permission to access the network was denied. This is used to distinguish * errors that were most likely caused by a firewall from other access denied * errors. See also ERR_ACCESS_DENIED. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_NETWORK_ACCESS_DENIED = -138, - /* - * @brief The request throttler module cancelled this request to avoid DDOS. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The request throttler module cancelled this request to avoid DDOS. */ ARKWEB_ERR_TEMPORARILY_THROTTLED = -139, - /* - * @brief A request to create an SSL tunnel connection through the HTTPS proxy + /** + * @error A request to create an SSL tunnel connection through the HTTPS proxy * received a 302 (temporary redirect, response. The response body might * include a description of why the request failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140, - /* - * @brief We were unable to sign the CertificateVerify data of an SSL client auth + /** + * @error We were unable to sign the CertificateVerify data of an SSL client auth * handshake with the client certificate's private key. * Possible causes for this include the user implicitly or explicitly * denying access to the private key, the private key may not be valid for * signing, the key may be relying on a cached handle which is no longer * valid, or the CSP won't allow arbitrary data to be signed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141, - /* - * @brief The message was too large for the transport. (for example a UDP message + /** + * @error The message was too large for the transport. (for example a UDP message * which exceeds size threshold). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_MSG_TOO_BIG = -142, - /* - * @brief Websocket protocol error. Indicates that we are terminating the connection + /** + * @error Websocket protocol error. Indicates that we are terminating the connection * due to a malformed frame or other protocol violation. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_WS_PROTOCOL_ERROR = -145, - /* - * @brief Returned when attempting to bind an address that is already in use. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Returned when attempting to bind an address that is already in use. */ ARKWEB_ERR_ADDRESS_IN_USE = -147, - /* - * @brief An operation failed because the SSL handshake has not completed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An operation failed because the SSL handshake has not completed. */ ARKWEB_ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148, - /* - * @brief SSL peer's public key is invalid. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error SSL peer's public key is invalid. */ ARKWEB_ERR_SSL_BAD_PEER_PUBLIC_KEY = -149, - /* - * @brief The certificate didn't match the built-in public key pins for the host name. + /** + * @error The certificate didn't match the built-in public key pins for the host name. * The pins are set in net/http/transport_security_state.cc and require that * one of a set of public keys exist on the path from the leaf to the root. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150, - /* - * @brief Server request for client certificate did not contain any types we support. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Server request for client certificate did not contain any types we support. */ ARKWEB_ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151, - /* - * @brief An SSL peer sent us a fatal decrypt_error alert. This typically occurs when + /** + * @error An SSL peer sent us a fatal decrypt_error alert. This typically occurs when * a peer could not correctly verify a signature (in CertificateVerify or * ServerKeyExchange, or validate a Finished message. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_DECRYPT_ERROR_ALERT = -153, - /* - * @brief There are too many pending WebSocketJob instances, so the new job was not + /** + * @error There are too many pending WebSocketJob instances, so the new job was not * pushed to the queue. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154, - /* - * @brief The SSL server certificate changed in a renegotiation. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The SSL server certificate changed in a renegotiation. */ ARKWEB_ERR_SSL_SERVER_CERT_CHANGED = -156, - /* - * @brief The SSL server sent us a fatal unrecognized_name alert. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The SSL server sent us a fatal unrecognized_name alert. */ ARKWEB_ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159, - /* - * @brief Failed to set the socket's receive buffer size as requested. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Failed to set the socket's receive buffer size as requested. */ ARKWEB_ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160, - /* - * @brief Failed to set the socket's send buffer size as requested. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Failed to set the socket's send buffer size as requested. */ ARKWEB_ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161, - /* - * @brief Failed to set the socket's receive buffer size as requested, despite success + /** + * @error Failed to set the socket's receive buffer size as requested, despite success * return code from setsockopt. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162, - /* - * @brief Failed to set the socket's send buffer size as requested, despite success + /** + * @error Failed to set the socket's send buffer size as requested, despite success * return code from setsockopt. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163, - /* - * @brief Failed to import a client certificate from the platform store into the SSL + /** + * @error Failed to import a client certificate from the platform store into the SSL * library. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164, - /* - * @brief Resolving a hostname to an IP address list included the IPv4 address + /** + * @error Resolving a hostname to an IP address list included the IPv4 address * "127.0.53.53". This is a special IP address which ICANN has recommended to * indicate there was a name collision, and alert admins to a potential * problem. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_ICANN_NAME_COLLISION = -166, - /* - * @brief The SSL server presented a certificate which could not be decoded. This is + /** + * @error The SSL server presented a certificate which could not be decoded. This is * not a certificate error code as no X509Certificate object is available. This * error is fatal. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_SERVER_CERT_BAD_FORMAT = -167, - /* - * @brief Certificate Transparency: Received a signed tree head that failed to parse. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Certificate Transparency: Received a signed tree head that failed to parse. */ ARKWEB_ERR_CT_STH_PARSING_FAILED = -168, - /* - * @brief Certificate Transparency: Received a signed tree head whose JSON parsing was + /** + * @error Certificate Transparency: Received a signed tree head whose JSON parsing was * OK but was missing some of the fields. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CT_STH_INCOMPLETE = -169, - /* - * @brief The attempt to reuse a connection to send proxy auth credentials failed + /** + * @error The attempt to reuse a connection to send proxy auth credentials failed * before the AuthController was used to generate credentials. The caller should * reuse the controller with a new connection. This error is only used * internally by the network stack. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170, - /* - * @brief Certificate Transparency: Failed to parse the received consistency proof. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Certificate Transparency: Failed to parse the received consistency proof. */ ARKWEB_ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171, - /* - * @brief The SSL server required an unsupported cipher suite that has since been + /** + * @error The SSL server required an unsupported cipher suite that has since been * removed. This error will temporarily be signaled on a fallback for one or two * releases immediately following a cipher suite's removal, after which the * fallback will be removed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_OBSOLETE_CIPHER = -172, - /* - * @brief When a WebSocket handshake is done successfully and the connection has been + /** + * @error When a WebSocket handshake is done successfully and the connection has been * upgraded, the URLRequest is cancelled with this error code. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_WS_UPGRADE = -173, - /* - * @brief Socket ReadIfReady support is not implemented. This error should not be user + /** + * @error Socket ReadIfReady support is not implemented. This error should not be user * visible, because the normal Read(, method is used as a fallback. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_READ_IF_READY_NOT_IMPLEMENTED = -174, - /* - * @brief No socket buffer space is available. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error No socket buffer space is available. */ ARKWEB_ERR_NO_BUFFER_SPACE = -176, - /* - * @brief There were no common signature algorithms between our client certificate + /** + * @error There were no common signature algorithms between our client certificate * private key and the server's preferences. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177, - /* - * @brief TLS 1.3 early data was rejected by the server. This will be received before + /** + * @error TLS 1.3 early data was rejected by the server. This will be received before * any data is returned from the socket. The request should be retried with * early data disabled. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_EARLY_DATA_REJECTED = -178, - /* - * @brief TLS 1.3 early data was offered, but the server responded with TLS 1.2 or + /** + * @error TLS 1.3 early data was offered, but the server responded with TLS 1.2 or * earlier. This is an internal error code to account for a * backwards-compatibility issue with early data and TLS 1.2. It will be * received before any data is returned from the socket. The request should be * retried with early data disabled. * See https://tools.ietf.org/html/rfc8446#appendix-D.3 for details. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_WRONG_VERSION_ON_EARLY_DATA = -179, - /* - * @brief TLS 1.3 was enabled, but a lower version was negotiated and the server + /** + * @error TLS 1.3 was enabled, but a lower version was negotiated and the server * returned a value indicating it supported TLS 1.3. This is part of a security * check in TLS 1.3, but it may also indicate the user is behind a buggy * TLS-terminating proxy which implemented TLS 1.2 incorrectly. (See * rhttps://crbug.com/boringssl/226., - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_TLS13_DOWNGRADE_DETECTED = -180, - /* - * @brief The server's certificate has a keyUsage extension incompatible with the + /** + * @error The server's certificate has a keyUsage extension incompatible with the * negotiated TLS key exchange method. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181, - /* - * @brief The ECHConfigList fetched over DNS cannot be parsed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The ECHConfigList fetched over DNS cannot be parsed. */ ARKWEB_ERR_INVALID_ECH_CONFIG_LIST = -182, - /* - * @brief ECH was enabled, but the server was unable to decrypt the encrypted + /** + * @error ECH was enabled, but the server was unable to decrypt the encrypted * ClientHello. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_ECH_NOT_NEGOTIATED = -183, - /* - * @brief ECH was enabled, the server was unable to decrypt the encrypted ClientHello, + /** + * @error ECH was enabled, the server was unable to decrypt the encrypted ClientHello, * and additionally did not present a certificate valid for the public name. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184, - /* - * @brief The server responded with a certificate whose common name did not match + /** + * @error The server responded with a certificate whose common name did not match * the host name. This could mean: * 1. An attacker has redirected our traffic to their server and is * presenting a certificate for which they know the private key. @@ -941,27 +632,21 @@ typedef enum ArkWeb_NetError { * network's login page. * 4. The OS has used a DNS search suffix and the server doesn't have * a certificate for the abbreviated name in the address bar. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_COMMON_NAME_INVALID = -200, - /* - * @brief The server responded with a certificate that, by our clock, appears to + /** + * @error The server responded with a certificate that, by our clock, appears to * either not yet be valid or to have expired. This could mean: * 1. An attacker is presenting an old certificate for which they have * managed to obtain the private key. * 2. The server is misconfigured and is not presenting a valid cert. * 3. Our clock is wrong. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_DATE_INVALID = -201, - /* - * @brief The server responded with a certificate that is signed by an authority + /** + * @error The server responded with a certificate that is signed by an authority * we don't trust. The could mean: * 1. An attacker has substituted the real certificate for a cert that * contains their public key and is signed by their cousin. @@ -969,1074 +654,696 @@ typedef enum ArkWeb_NetError { * know about, but should trust. * 3. The server is presenting a self-signed certificate, providing no * defense against active attackers (but foiling passive attackers). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_AUTHORITY_INVALID = -202, - /* - * @brief The server responded with a certificate that contains errors. + /** + * @error The server responded with a certificate that contains errors. * This error is not recoverable. * MSDN describes this error as follows: * "The SSL certificate contains errors." * NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency, * use that code instead of this one from now on. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_CONTAINS_ERRORS = -203, - /* - * @brief The certificate has no mechanism for determining if it is revoked. In + /** + * @error The certificate has no mechanism for determining if it is revoked. In * effect, this certificate cannot be revoked. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_NO_REVOCATION_MECHANISM = -204, - /* - * @brief Revocation information for the security certificate for this site is not + /** + * @error Revocation information for the security certificate for this site is not * available. This could mean: * 1. An attacker has compromised the private key in the certificate and is * blocking our attempt to find out that the cert was revoked. * 2. The certificate is unrevoked, but the revocation server is busy or * unavailable. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205, - /* - * @brief The server responded with a certificate has been revoked. + /** + * @error The server responded with a certificate has been revoked. * We have the capability to ignore this error, but it is probably not the * thing to do. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_REVOKED = -206, - /* - * @brief The server responded with a certificate that is invalid. + /** + * @error The server responded with a certificate that is invalid. * This error is not recoverable. * MSDN describes this error as follows: * "The SSL certificate is invalid." - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_INVALID = -207, - /* - * @brief The server responded with a certificate that is signed using a weak + /** + * @error The server responded with a certificate that is signed using a weak * signature algorithm. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208, - /* - * @brief The host name specified in the certificate is not unique. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The host name specified in the certificate is not unique. */ ARKWEB_ERR_CERT_NON_UNIQUE_NAME = -210, - /* - * @brief The server responded with a certificate that contains a weak key (e.g. + /** + * @error The server responded with a certificate that contains a weak key (e.g. * a too-small RSA key). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_WEAK_KEY = -211, - /* - * @brief The certificate claimed DNS names that are in violation of name constraints. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The certificate claimed DNS names that are in violation of name constraints. */ ARKWEB_ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212, - /* - * @brief The certificate's validity period is too long. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The certificate's validity period is too long. */ ARKWEB_ERR_CERT_VALIDITY_TOO_LONG = -213, - /* - * @brief Certificate Transparency was required for this connection, but the server + /** + * @error Certificate Transparency was required for this connection, but the server * did not provide CT information that complied with the policy. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214, - /* - * @brief The certificate chained to a legacy Symantec root that is no longer trusted. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The certificate chained to a legacy Symantec root that is no longer trusted. */ ARKWEB_ERR_CERT_SYMANTEC_LEGACY = -215, - /* - * @brief The certificate is known to be used for interception by an entity other + /** + * @error The certificate is known to be used for interception by an entity other * the device owner. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217, - /* - * @brief The connection uses an obsolete version of SSL/TLS or cipher. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The connection uses an obsolete version of SSL/TLS or cipher. */ ARKWEB_ERR_SSL_OBSOLETE_VERSION_OR_CIPHER = -218, - /* - * @brief The value immediately past the last certificate error code. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The value immediately past the last certificate error code. */ ARKWEB_ERR_CERT_END = -219, - /* - * @brief The URL is invalid. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The URL is invalid. */ ARKWEB_ERR_INVALID_URL = -300, - /* - * @brief The scheme of the URL is disallowed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The scheme of the URL is disallowed. */ ARKWEB_ERR_DISALLOWED_URL_SCHEME = -301, - /* - * @brief The scheme of the URL is unknown. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The scheme of the URL is unknown. */ ARKWEB_ERR_UNKNOWN_URL_SCHEME = -302, - /* - * @brief Attempting to load an URL resulted in a redirect to an invalid URL. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Attempting to load an URL resulted in a redirect to an invalid URL. */ ARKWEB_ERR_INVALID_REDIRECT = -303, - /* - * @brief Attempting to load an URL resulted in too many redirects. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Attempting to load an URL resulted in too many redirects. */ ARKWEB_ERR_TOO_MANY_REDIRECTS = -310, - /* - * @brief Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect + /** + * @error Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect * to file:// is considered unsafe). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_UNSAFE_REDIRECT = -311, - /* - * @brief Attempting to load an URL with an unsafe port number. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Attempting to load an URL with an unsafe port number. */ ARKWEB_ERR_UNSAFE_PORT = -312, - /* - * @brief The server's response was invalid. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The server's response was invalid. */ ARKWEB_ERR_INVALID_RESPONSE = -320, - /* - * @brief Error in chunked transfer encoding. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Error in chunked transfer encoding. */ ARKWEB_ERR_INVALID_CHUNKED_ENCODING = -321, - /* - * @brief The server did not support the request method. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The server did not support the request method. */ ARKWEB_ERR_METHOD_UNSUPPORTED = -322, - /* - * @brief The response was 407 (Proxy Authentication Required,, yet we did not send + /** + * @error The response was 407 (Proxy Authentication Required,, yet we did not send * the request to a proxy. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_UNEXPECTED_PROXY_AUTH = -323, - /* - * @brief The server closed the connection without sending any data. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The server closed the connection without sending any data. */ ARKWEB_ERR_EMPTY_RESPONSE = -324, - /* - * @brief The headers section of the response is too large. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The headers section of the response is too large. */ ARKWEB_ERR_RESPONSE_HEADERS_TOO_BIG = -325, - /* - * @brief The evaluation of the PAC script failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The evaluation of the PAC script failed. */ ARKWEB_ERR_PAC_SCRIPT_FAILED = -327, - /* - * @brief The response was 416 (Requested range not satisfiable, and the server cannot + /** + * @error The response was 416 (Requested range not satisfiable, and the server cannot * satisfy the range requested. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328, - /* - * @brief The identity used for authentication is invalid. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The identity used for authentication is invalid. */ ARKWEB_ERR_MALFORMED_IDENTITY = -329, - /* - * @brief Content decoding of the response body failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Content decoding of the response body failed. */ ARKWEB_ERR_CONTENT_DECODING_FAILED = -330, - /* - * @brief An operation could not be completed because all network IO + /** + * @error An operation could not be completed because all network IO * is suspended. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_NETWORK_IO_SUSPENDED = -331, - /* - * @brief FLIP data received without receiving a SYN_REPLY on the stream. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error FLIP data received without receiving a SYN_REPLY on the stream. */ ARKWEB_ERR_SYN_REPLY_NOT_RECEIVED = -332, - /* - * @brief Converting the response to target encoding failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Converting the response to target encoding failed. */ ARKWEB_ERR_ENCODING_CONVERSION_FAILED = -333, - /* - * @brief The server sent an FTP directory listing in a format we do not understand. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The server sent an FTP directory listing in a format we do not understand. */ ARKWEB_ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334, - /* - * @brief There are no supported proxies in the provided list. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error There are no supported proxies in the provided list. */ ARKWEB_ERR_NO_SUPPORTED_PROXIES = -336, - /* - * @brief There is an HTTP/2 protocol error. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error There is an HTTP/2 protocol error. */ ARKWEB_ERR_HTTP2_PROTOCOL_ERROR = -337, - /* - * @brief Credentials could not be established during HTTP Authentication. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Credentials could not be established during HTTP Authentication. */ ARKWEB_ERR_INVALID_AUTH_CREDENTIALS = -338, - /* - * @brief An HTTP Authentication scheme was tried which is not supported on this + /** + * @error An HTTP Authentication scheme was tried which is not supported on this * machine. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_UNSUPPORTED_AUTH_SCHEME = -339, - /* - * @brief Detecting the encoding of the response failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Detecting the encoding of the response failed. */ ARKWEB_ERR_ENCODING_DETECTION_FAILED = -340, - /* - * @brief (GSSAPI, No Kerberos credentials were available during HTTP Authentication. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error (GSSAPI, No Kerberos credentials were available during HTTP Authentication. */ ARKWEB_ERR_MISSING_AUTH_CREDENTIALS = -341, - /* - * @brief An unexpected, but documented, SSPI or GSSAPI status code was returned. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An unexpected, but documented, SSPI or GSSAPI status code was returned. */ ARKWEB_ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342, - /* - * @brief The environment was not set up correctly for authentication (for + /** + * @error The environment was not set up correctly for authentication (for * example, no KDC could be found or the principal is unknown. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343, - /* - * @brief An undocumented SSPI or GSSAPI status code was returned. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An undocumented SSPI or GSSAPI status code was returned. */ ARKWEB_ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344, - /* - * @brief The HTTP response was too big to drain. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The HTTP response was too big to drain. */ ARKWEB_ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345, - /* - * @brief The HTTP response contained multiple distinct Content-Length headers. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The HTTP response contained multiple distinct Content-Length headers. */ ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346, - /* - * @brief HTTP/2 headers have been received, but not all of them - status or version + /** + * @error HTTP/2 headers have been received, but not all of them - status or version * headers are missing, so we're expecting additional frames to complete them. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_INCOMPLETE_HTTP2_HEADERS = -347, - /* - * @brief No PAC URL configuration could be retrieved from DHCP. This can indicate + /** + * @error No PAC URL configuration could be retrieved from DHCP. This can indicate * either a failure to retrieve the DHCP configuration, or that there was no * PAC URL configured in DHCP. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_PAC_NOT_IN_DHCP = -348, - /* - * @brief The HTTP response contained multiple Content-Disposition headers. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The HTTP response contained multiple Content-Disposition headers. */ ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349, - /* - * @brief The HTTP response contained multiple Location headers. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The HTTP response contained multiple Location headers. */ ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350, - /* - * @brief HTTP/2 server refused the request without processing, and sent either a + /** + * @error HTTP/2 server refused the request without processing, and sent either a * GOAWAY frame with error code NO_ERROR and Last-Stream-ID lower than the * stream id corresponding to the request indicating that this request has not * been processed yet, or a RST_STREAM frame with error code REFUSED_STREAM. * Client MAY retry (on a different connection). See RFC7540 Section 8.1.4. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_HTTP2_SERVER_REFUSED_STREAM = -351, - /* - * @brief HTTP/2 server didn't respond to the PING message. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error HTTP/2 server didn't respond to the PING message. */ ARKWEB_ERR_HTTP2_PING_FAILED = -352, - /* - * @brief The HTTP response body transferred fewer bytes than were advertised by the + /** + * @error The HTTP response body transferred fewer bytes than were advertised by the * Content-Length header when the connection is closed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CONTENT_LENGTH_MISMATCH = -354, - /* - * @brief The HTTP response body is transferred with Chunked-Encoding, but the + /** + * @error The HTTP response body is transferred with Chunked-Encoding, but the * terminating zero-length chunk was never sent when the connection is closed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_INCOMPLETE_CHUNKED_ENCODING = -355, - /* - * @brief There is a QUIC protocol error. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error There is a QUIC protocol error. */ ARKWEB_ERR_QUIC_PROTOCOL_ERROR = -356, - /* - * @brief The HTTP headers were truncated by an EOF. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The HTTP headers were truncated by an EOF. */ ARKWEB_ERR_RESPONSE_HEADERS_TRUNCATED = -357, - /* - * @brief The QUIC crypto handshake failed. This means that the server was unable + /** + * @error The QUIC crypto handshake failed. This means that the server was unable * to read any requests sent, so they may be resent. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_QUIC_HANDSHAKE_FAILED = -358, - /* - * @brief Transport security is inadequate for the HTTP/2 version. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Transport security is inadequate for the HTTP/2 version. */ ARKWEB_ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360, - /* - * @brief The peer violated HTTP/2 flow control. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The peer violated HTTP/2 flow control. */ ARKWEB_ERR_HTTP2_FLOW_CONTROL_ERROR = -361, - /* - * @brief The peer sent an improperly sized HTTP/2 frame. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The peer sent an improperly sized HTTP/2 frame. */ ARKWEB_ERR_HTTP2_FRAME_SIZE_ERROR = -362, - /* - * @brief Decoding or encoding of compressed HTTP/2 headers failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Decoding or encoding of compressed HTTP/2 headers failed. */ ARKWEB_ERR_HTTP2_COMPRESSION_ERROR = -363, - /* - * @brief Proxy Auth Requested without a valid Client Socket Handle. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Proxy Auth Requested without a valid Client Socket Handle. */ ARKWEB_ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364, - /* - * @brief HTTP_1_1_REQUIRED error code received on HTTP/2 session. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error HTTP_1_1_REQUIRED error code received on HTTP/2 session. */ ARKWEB_ERR_HTTP_1_1_REQUIRED = -365, - /* - * @brief HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy. */ ARKWEB_ERR_PROXY_HTTP_1_1_REQUIRED = -366, - /* - * @brief The PAC script terminated fatally and must be reloaded. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The PAC script terminated fatally and must be reloaded. */ ARKWEB_ERR_PAC_SCRIPT_TERMINATED = -367, - /* - * @brief The server was expected to return an HTTP/1.x response, but did not. Rather + /** + * @error The server was expected to return an HTTP/1.x response, but did not. Rather * than treat it as HTTP/0.9, this error is returned. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_INVALID_HTTP_RESPONSE = -370, - /* - * @brief Initializing content decoding failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Initializing content decoding failed. */ ARKWEB_ERR_CONTENT_DECODING_INIT_FAILED = -371, - /* - * @brief Received HTTP/2 RST_STREAM frame with NO_ERROR error code. This error should + /** + * @error Received HTTP/2 RST_STREAM frame with NO_ERROR error code. This error should * be handled internally by HTTP/2 code, and should not make it above the * SpdyStream layer. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372, - /* - * @brief The pushed stream claimed by the request is no longer available. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The pushed stream claimed by the request is no longer available. */ ARKWEB_ERR_HTTP2_PUSHED_STREAM_NOT_AVAILABLE = -373, - /* - * @brief A pushed stream was claimed and later reset by the server. When this happens, + /** + * @error A pushed stream was claimed and later reset by the server. When this happens, * the request should be retried. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER = -374, - /* - * @brief An HTTP transaction was retried too many times due for authentication or + /** + * @error An HTTP transaction was retried too many times due for authentication or * invalid certificates. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_TOO_MANY_RETRIES = -375, - /* - * @brief Received an HTTP/2 frame on a closed stream. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Received an HTTP/2 frame on a closed stream. */ ARKWEB_ERR_HTTP2_STREAM_CLOSED = -376, - /* - * @brief Client is refusing an HTTP/2 stream. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Client is refusing an HTTP/2 stream. */ ARKWEB_ERR_HTTP2_CLIENT_REFUSED_STREAM = -377, - /* - * @brief A pushed HTTP/2 stream was claimed by a request based on matching URL and + /** + * @error A pushed HTTP/2 stream was claimed by a request based on matching URL and * request headers, but the pushed response headers do not match the request. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH = -378, - /* - * @brief The server returned a non-2xx HTTP response code. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The server returned a non-2xx HTTP response code. */ ARKWEB_ERR_HTTP_RESPONSE_CODE_FAILURE = -379, - /* - * @brief The certificate presented on a QUIC connection does not chain to a known root + /** + * @error The certificate presented on a QUIC connection does not chain to a known root * and the origin connected to is not on a list of domains where unknown roots * are allowed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_QUIC_UNKNOWN_CERT_ROOT = -380, - /* - * @brief A GOAWAY frame has been received indicating that the request has not been + /** + * @error A GOAWAY frame has been received indicating that the request has not been * processed and is therefore safe to retry on a different connection. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381, - /* - * @brief The ACCEPT_CH restart has been triggered too many times. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The ACCEPT_CH restart has been triggered too many times. */ ARKWEB_ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382, - /* - * @brief The IP address space of the remote endpoint differed from the previous + /** + * @error The IP address space of the remote endpoint differed from the previous * observed value during the same request. Any cache entry for the affected * request should be invalidated. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383, - /* - * @brief The IP address space of the cached remote endpoint is blocked by local + /** + * @error The IP address space of the cached remote endpoint is blocked by local * network access check. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_LOCAL_NETWORK_ACCESS_POLICY = -384, - /* - * @brief The cache does not have the requested entry. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The cache does not have the requested entry. */ ARKWEB_ERR_CACHE_MISS = -400, - /* - * @brief Unable to read from the disk cache. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Unable to read from the disk cache. */ ARKWEB_ERR_CACHE_READ_FAILURE = -401, - /* - * @brief Unable to write to the disk cache. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Unable to write to the disk cache. */ ARKWEB_ERR_CACHE_WRITE_FAILURE = -402, - /* - * @brief The operation is not supported for this entry. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The operation is not supported for this entry. */ ARKWEB_ERR_CACHE_OPERATION_UNSUPPORTED = -403, - /* - * @brief The disk cache is unable to open this entry. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The disk cache is unable to open this entry. */ ARKWEB_ERR_CACHE_OPEN_FAILURE = -404, - /* - * @brief The disk cache is unable to create this entry. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The disk cache is unable to create this entry. */ ARKWEB_ERR_CACHE_CREATE_FAILURE = -405, - /* - * @brief Multiple transactions are racing to create disk cache entries. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Multiple transactions are racing to create disk cache entries. */ ARKWEB_ERR_CACHE_RACE = -406, - /* - * @brief The cache was unable to read a checksum record on an entry. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The cache was unable to read a checksum record on an entry. */ ARKWEB_ERR_CACHE_CHECKSUM_READ_FAILURE = -407, - /* - * @brief The cache found an entry with an invalid checksum. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The cache found an entry with an invalid checksum. */ ARKWEB_ERR_CACHE_CHECKSUM_MISMATCH = -408, - /* - * @brief Internal error code for the HTTP cache. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Internal error code for the HTTP cache. */ ARKWEB_ERR_CACHE_LOCK_TIMEOUT = -409, - /* - * @brief Received a challenge after the transaction has read some data, and the + /** + * @error Received a challenge after the transaction has read some data, and the * credentials aren't available. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410, - /* - * @brief Internal not-quite error code for the HTTP cache. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Internal not-quite error code for the HTTP cache. */ ARKWEB_ERR_CACHE_ENTRY_NOT_SUITABLE = -411, - /* - * @brief The disk cache is unable to doom this entry. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The disk cache is unable to doom this entry. */ ARKWEB_ERR_CACHE_DOOM_FAILURE = -412, - /* - * @brief The disk cache is unable to open or create this entry. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The disk cache is unable to open or create this entry. */ ARKWEB_ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413, - /* - * @brief The server's response was insecure (e.g. there was a cert error). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The server's response was insecure (e.g. there was a cert error). */ ARKWEB_ERR_INSECURE_RESPONSE = -501, - /* - * @brief An attempt to import a client certificate failed, as the user's key + /** + * @error An attempt to import a client certificate failed, as the user's key * database lacked a corresponding private key. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_NO_PRIVATE_KEY_FOR_CERT = -502, - /* - * @brief An error adding a certificate to the OS certificate database. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An error adding a certificate to the OS certificate database. */ ARKWEB_ERR_ADD_USER_CERT_FAILED = -503, - /* - * @brief An error occurred while handling a signed exchange. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An error occurred while handling a signed exchange. */ ARKWEB_ERR_INVALID_SIGNED_EXCHANGE = -504, - /* - * @brief An error occurred while handling a Web Bundle source. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error An error occurred while handling a Web Bundle source. */ ARKWEB_ERR_INVALID_WEB_BUNDLE = -505, - /* - * @brief A Trust Tokens protocol operation-executing request failed for one of a + /** + * @error A Trust Tokens protocol operation-executing request failed for one of a * number of reasons (precondition failure, internal error, bad response). - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_TRUST_TOKEN_OPERATION_FAILED = -506, - /* - * @brief When handling a Trust Tokens protocol operation-executing request, the system + /** + * @error When handling a Trust Tokens protocol operation-executing request, the system * was able to execute the request's Trust Tokens operation without sending the * request to its destination. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507, - /* - * @brief A generic error for failed FTP control connection command. + /** + * @error A generic error for failed FTP control connection command. * If possible, please use or add a more specific error code. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_FTP_FAILED = -601, - /* - * @brief The server cannot fulfill the request at this point. This is a temporary error. + /** + * @error The server cannot fulfill the request at this point. This is a temporary error. * FTP response code 421. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_FTP_SERVICE_UNAVAILABLE = -602, - /* - * @brief The server has aborted the transfer. + /** + * @error The server has aborted the transfer. * FTP response code 426. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_FTP_TRANSFER_ABORTED = -603, - /* - * @brief The file is busy, or some other temporary error condition on opening the file. + /** + * @error The file is busy, or some other temporary error condition on opening the file. * FTP response code 450. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_FTP_FILE_BUSY = -604, - /* - * @brief Server rejected our command because of syntax errors. + /** + * @error Server rejected our command because of syntax errors. * FTP response codes 500, 501. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_FTP_SYNTAX_ERROR = -605, - /* - * @brief Server does not support the command we issued. + /** + * @error Server does not support the command we issued. * FTP response codes 502, 504. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_FTP_COMMAND_UNSUPPORTED = -606, - /* - * @brief Server rejected our command because we didn't issue the commands in right order. + /** + * @error Server rejected our command because we didn't issue the commands in right order. * FTP response code 503. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_FTP_BAD_COMMAND_SEQUENCE = -607, - /* - * @brief PKCS #12 import failed due to incorrect password. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error PKCS #12 import failed due to incorrect password. */ ARKWEB_ERR_PKCS12_IMPORT_BAD_PASSWORD = -701, - /* - * @brief PKCS #12 import failed due to other error. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error PKCS #12 import failed due to other error. */ ARKWEB_ERR_PKCS12_IMPORT_FAILED = -702, - /* - * @brief CA import failed - not a CA cert. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error CA import failed - not a CA cert. */ ARKWEB_ERR_IMPORT_CA_CERT_NOT_CA = -703, - /* - * @brief Import failed - certificate already exists in database. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Import failed - certificate already exists in database. */ ARKWEB_ERR_IMPORT_CERT_ALREADY_EXISTS = -704, - /* - * @brief CA import failed due to some other error. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error CA import failed due to some other error. */ ARKWEB_ERR_IMPORT_CA_CERT_FAILED = -705, - /* - * @brief Server certificate import failed due to some internal error. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Server certificate import failed due to some internal error. */ ARKWEB_ERR_IMPORT_SERVER_CERT_FAILED = -706, - /* - * @brief PKCS #12 import failed due to invalid MAC. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error PKCS #12 import failed due to invalid MAC. */ ARKWEB_ERR_PKCS12_IMPORT_INVALID_MAC = -707, - /* - * @brief PKCS #12 import failed due to invalid/corrupt file. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error PKCS #12 import failed due to invalid/corrupt file. */ ARKWEB_ERR_PKCS12_IMPORT_INVALID_FILE = -708, - /* - * @brief PKCS #12 import failed due to unsupported features. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error PKCS #12 import failed due to unsupported features. */ ARKWEB_ERR_PKCS12_IMPORT_UNSUPPORTED = -709, - /* - * @brief Key generation failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Key generation failed. */ ARKWEB_ERR_KEY_GENERATION_FAILED = -710, - /* - * @brief Failure to export private key. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Failure to export private key. */ ARKWEB_ERR_PRIVATE_KEY_EXPORT_FAILED = -712, - /* - * @brief Self-signed certificate generation failed. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Self-signed certificate generation failed. */ ARKWEB_ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713, - /* - * @brief The certificate database changed in some way. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The certificate database changed in some way. */ ARKWEB_ERR_CERT_DATABASE_CHANGED = -714, - /* - * @brief The certificate verifier configuration changed in some way. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error The certificate verifier configuration changed in some way. */ ARKWEB_ERR_CERT_VERIFIER_CHANGED = -716, - /* - * @brief DNS resolver received a malformed response. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error DNS resolver received a malformed response. */ ARKWEB_ERR_DNS_MALFORMED_RESPONSE = -800, - /* - * @brief DNS server requires TCP. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error DNS server requires TCP. */ ARKWEB_ERR_DNS_SERVER_REQUIRES_TCP = -801, - /* - * @brief DNS server failed. This error is returned for all of the following + /** + * @error DNS server failed. This error is returned for all of the following * error conditions: * 1 - Format error - The name server was unable to interpret the query. * 2 - Server failure - The name server was unable to process this query @@ -2045,77 +1352,50 @@ typedef enum ArkWeb_NetError { * kind of query. * 5 - Refused - The name server refuses to perform the specified * operation for policy reasons. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_DNS_SERVER_FAILED = -802, - /* - * @brief DNS transaction timed out. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error DNS transaction timed out. */ ARKWEB_ERR_DNS_TIMED_OUT = -803, - /* - * @brief The entry was not found in cache or other local sources, for lookups where + /** + * @error The entry was not found in cache or other local sources, for lookups where * only local sources were queried. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_DNS_CACHE_MISS = -804, - /* - * @brief Suffix search list rules prevent resolution of the given host name. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Suffix search list rules prevent resolution of the given host name. */ ARKWEB_ERR_DNS_SEARCH_EMPTY = -805, - /* - * @brief Failed to sort addresses according to RFC3484. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Failed to sort addresses according to RFC3484. */ ARKWEB_ERR_DNS_SORT_ERROR = -806, - /* - * @brief Failed to resolve the hostname of a DNS-over-HTTPS server. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error Failed to resolve the hostname of a DNS-over-HTTPS server. */ ARKWEB_ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808, - /* - * @brief DNS identified the request as disallowed for insecure connection (http/ws). + /** + * @error DNS identified the request as disallowed for insecure connection (http/ws). * Error should be handled as if an HTTP redirect was received to redirect to * https or wss. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_DNS_NAME_HTTPS_ONLY = -809, - /* - * @brief All DNS requests associated with this job have been cancelled. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** + * @error All DNS requests associated with this job have been cancelled. */ ARKWEB_ERR_DNS_REQUEST_CANCELED = -810, - /* - * @brief The hostname resolution of HTTPS record was expected to be resolved with + /** + * @error The hostname resolution of HTTPS record was expected to be resolved with * alpn values of supported protocols, but did not. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 */ ARKWEB_ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811, } ArkWeb_NetError; diff --git a/web/webview/interfaces/native/arkweb_scheme_handler.h b/web/webview/interfaces/native/arkweb_scheme_handler.h index 9de9b94b4..7750265cf 100644 --- a/web/webview/interfaces/native/arkweb_scheme_handler.h +++ b/web/webview/interfaces/native/arkweb_scheme_handler.h @@ -40,7 +40,7 @@ extern "C" { #endif -/* +/** * @brief Configuration information for custom schemes. * * @syscap SystemCapability.Web.Webview.Core @@ -49,95 +49,133 @@ extern "C" { typedef enum ArkWeb_CustomSchemeOption { OH_ARKWEB_SCHEME_OPTION_NONE = 0, - /* - * @brief If ARKWEB_SCHEME_OPTION_STANDARD is set the scheme will be handled as a standard scheme. The standard - * schemes needs to comply with the URL normalization and parsing rules defined in Section 3.1 of RFC 1738, - * which can be found in the http://www.ietf.org/rfc/rfc1738.txt. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** If ARKWEB_SCHEME_OPTION_STANDARD is set, the scheme will be handled as a standard scheme. The standard + * schemes need to comply with the URL normalization and parsing rules defined in Section 3.1 of RFC 1738, + * which can be found in the http://www.ietf.org/rfc/rfc1738.txt. */ ARKWEB_SCHEME_OPTION_STANDARD = 1 << 0, - /* - * @brief If ARKWEB_SCHEME_OPTION_LOCAL is set, the same security rules as those applied to the "file" URL will be - * used to handle the scheme. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** If ARKWEB_SCHEME_OPTION_LOCAL is set, the same security rules as those applied to the "file" URL will be + * used to handle the scheme. */ ARKWEB_SCHEME_OPTION_LOCAL = 1 << 1, - /* - * @brief If ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED is set, then the scheme can only be displayed from other content - * hosted using the same scheme. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** If ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED is set, then the scheme can only be displayed from other content + * hosted using the same scheme. */ ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2, - /* - * @brief If ARKWEB_SCHEME_OPTION_SECURE is set, the same security rules as those applied to the "https" URL will be - * used to handle the scheme. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** If ARKWEB_SCHEME_OPTION_SECURE is set, the same security rules as those applied to the "https" URL will be + * used to handle the scheme. */ ARKWEB_SCHEME_OPTION_SECURE = 1 << 3, - /* - * @brief If ARKWEB_SCHEME_OPTION_CORS_ENABLED is set, then the scheme can be sent CORS requests. In most case this - * value should be set when ARKWEB_SCHEME_OPTION_STANDARD is set. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** If ARKWEB_SCHEME_OPTION_CORS_ENABLED is set, then the scheme can be sent CORS requests. In most cases this + * value should be set when ARKWEB_SCHEME_OPTION_STANDARD is set. */ ARKWEB_SCHEME_OPTION_CORS_ENABLED = 1 << 4, - /* - * @brief If ARKWEB_SCHEME_OPTION_CSP_BYPASSING is set, then this scheme can bypass Content Security Policy (CSP) - * checks. In most cases, this value should not be set when ARKWEB_SCHEME_OPTION_STANDARD is set. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 + /** If ARKWEB_SCHEME_OPTION_CSP_BYPASSING is set, then this scheme can bypass Content Security Policy (CSP) + * checks. In most cases, this value should not be set when ARKWEB_SCHEME_OPTION_STANDARD is set. */ ARKWEB_SCHEME_OPTION_CSP_BYPASSING = 1 << 5, - /* - * @brief If ARKWEB_SCHEME_OPTION_FETCH_ENABLED is set, then this scheme can perform FETCH API requests. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 - */ + /** If ARKWEB_SCHEME_OPTION_FETCH_ENABLED is set, then this scheme can perform FETCH API requests. */ ARKWEB_SCHEME_OPTION_FETCH_ENABLED = 1 << 6, - /* - * @brief If ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED is set, then the js of this scheme can generate code cache. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 - */ + /** If ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED is set, then the js of this scheme can generate code cache. */ ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED = 1 << 7, } ArkWeb_CustomSchemeOption; -/* - * @brief This class is used to intercept requests for a specified scheme. +/** + * @brief Resource type for a request. + * + * These constants match their equivalents in Chromium's ResourceType and should not be renumbered.\n + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 + */ +typedef enum ArkWeb_ResourceType { + /** Top level page. */ + MAIN_FRAME = 0, + + /** Frame or Iframe. */ + SUB_FRAME = 1, + + /** CSS stylesheet. */ + STYLE_SHEET = 2, + + /** External script. */ + SCRIPT = 3, + + /** Image(jpg/gif/png/etc). */ + IMAGE = 4, + + /** Font. */ + FONT_RESOURCE = 5, + + /** Some other subresource. This is the default type if the actual type is unknown. */ + SUB_RESOURCE = 6, + + /** Object (or embed) tag for a plugin, or a resource that a plugin requested. */ + OBJECT = 7, + + /** Media resource. */ + MEDIA = 8, + + /** Main resource of a dedicated worker. */ + WORKER = 9, + + /** Main resource of a shared worker. */ + SHARED_WORKER = 10, + + /** Explicitly requested prefetch. */ + PREFETCH = 11, + + /** Favicon. */ + FAVICON = 12, + + /** XMLHttpRequest. */ + XHR = 13, + + /** Ping request for /sendBeacon. */ + PING = 14, + + /** The main resource of a service worker. */ + SERVICE_WORKER = 15, + + /** Report of Content Security Policy violations. */ + CSP_REPORT = 16, + + /** Resource that a plugin requested. */ + PLUGIN_RESOURCE = 17, + + /** A main-frame service worker navigation preload request. */ + NAVIGATION_PRELOAD_MAIN_FRAME = 19, + + /** A sub-frame service worker navigation preload request. */ + NAVIGATION_PRELOAD_SUB_FRAME = 20, +} ArkWeb_ResourceType; + +/** + * @brief This class is used to intercept requests for a specified scheme. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ typedef struct ArkWeb_SchemeHandler_ ArkWeb_SchemeHandler; -/* - * @brief Used to intercept url requests. Response headers and body can be sent through ArkWeb_ResourceHandler. +/** + * @brief Used to intercept url requests. + * + * Response headers and body can be sent through ArkWeb_ResourceHandler.\n * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ typedef struct ArkWeb_ResourceHandler_ ArkWeb_ResourceHandler; -/* +/** * @brief The response of the intercepted request. * * @syscap SystemCapability.Web.Webview.Core @@ -145,16 +183,17 @@ typedef struct ArkWeb_ResourceHandler_ ArkWeb_ResourceHandler; */ typedef struct ArkWeb_Response_ ArkWeb_Response; -/* - * @brief The info of the request. You can obtain the requested URL, method, post data, and other information through - * OH_ArkWeb_ResourceRequest. +/** + * @brief The info of the request. + * + * You can obtain the requested URL, method, post data, and other information through OH_ArkWeb_ResourceRequest.\n * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ typedef struct ArkWeb_ResourceRequest_ ArkWeb_ResourceRequest; -/* +/** * @brief The request headers of the request. * * @syscap SystemCapability.Web.Webview.Core @@ -162,8 +201,10 @@ typedef struct ArkWeb_ResourceRequest_ ArkWeb_ResourceRequest; */ typedef struct ArkWeb_RequestHeaderList_ ArkWeb_RequestHeaderList; -/* - * @brief The http body of the request. Use OH_ArkWebHttpBodyStream_* interface to read the body. +/** + * @brief The http body of the request. + * + * Use OH_ArkWebHttpBodyStream_* interface to read the body.\n * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -171,9 +212,11 @@ typedef struct ArkWeb_RequestHeaderList_ ArkWeb_RequestHeaderList; typedef struct ArkWeb_HttpBodyStream_ ArkWeb_HttpBodyStream; -/* - * @brief Callback for handling the request. This will called on the IO thread. should not use resourceHandler in the - * function. +/** + * @brief Callback for handling the request. + * + * This will be called on the IO thread.\n + * * @param schemeHandler The ArkWeb_SchemeHandler. * @param resourceRequest Obtain request's information through this. * @param resourceHandler The ArkWeb_ResourceHandler for the request. It should not be used if intercept is set to @@ -188,10 +231,13 @@ typedef void (*ArkWeb_OnRequestStart)(const ArkWeb_SchemeHandler* schemeHandler, const ArkWeb_ResourceHandler* resourceHandler, bool* intercept); -/* - * @brief Callback when the request is completed. This will called on the IO thread. - * Should destory the resourceRequest by ArkWeb_ResourceRequest_Destroy and use ArkWeb_ResourceHandler_Destroy - * destroy the ArkWeb_ResourceHandler received in ArkWeb_OnRequestStart. +/** + * @brief Callback when the request is completed. + * + * This will be called on the IO thread.\n + * Should destory the resourceRequest by ArkWeb_ResourceRequest_Destroy and use ArkWeb_ResourceHandler_Destroy\n + * destroy the ArkWeb_ResourceHandler received in ArkWeb_OnRequestStart.\n + * * @param schemeHandler The ArkWeb_SchemeHandler. * @param resourceRequest The ArkWeb_ResourceRequest. * @@ -201,7 +247,7 @@ typedef void (*ArkWeb_OnRequestStart)(const ArkWeb_SchemeHandler* schemeHandler, typedef void (*ArkWeb_OnRequestStop)(const ArkWeb_SchemeHandler* schemeHandler, const ArkWeb_ResourceRequest* resourceRequest); -/* +/** * @brief Callback when the read operation done. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param buffer The buffer to receive data. @@ -216,17 +262,17 @@ typedef void (*ArkWeb_HttpBodyStreamReadCallback)(const ArkWeb_HttpBodyStream* h uint8_t* buffer, int bytesRead); -/* +/** * @brief Callback when the init operation done. * @param httpBodyStream The ArkWeb_HttpBodyStream. - * @param result ARKWEB_NET_OK on success otherwise refer to ARKWEB_NET_ERROR. + * @param result {@link ARKWEB_NET_OK} on success otherwise refer to arkweb_net_error_list.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ typedef void (*ArkWeb_HttpBodyStreamInitCallback)(const ArkWeb_HttpBodyStream* httpBodyStream, ArkWeb_NetError result); -/* +/** * @brief Destroy the ArkWeb_RequestHeaderList. * @param requestHeaderList The ArkWeb_RequestHeaderList to be destroyed. * @@ -235,7 +281,7 @@ typedef void (*ArkWeb_HttpBodyStreamInitCallback)(const ArkWeb_HttpBodyStream* h */ void OH_ArkWebRequestHeaderList_Destroy(ArkWeb_RequestHeaderList* requestHeaderList); -/* +/** * @brief Get the request headers size. * @param requestHeaderList The list of request header. * @return The size of request headers. -1 if requestHeaderList is invalid. @@ -245,7 +291,7 @@ void OH_ArkWebRequestHeaderList_Destroy(ArkWeb_RequestHeaderList* requestHeaderL */ int32_t OH_ArkWebRequestHeaderList_GetSize(const ArkWeb_RequestHeaderList* requestHeaderList); -/* +/** * @brief Get the specified request header. * @param requestHeaderList The list of request header. * @param index The index of request header. @@ -260,18 +306,19 @@ void OH_ArkWebRequestHeaderList_GetHeader(const ArkWeb_RequestHeaderList* reques char** key, char** value); -/* +/** * @brief Set a user data to ArkWeb_ResourceRequest. * @param resourceRequest The ArkWeb_ResourceRequest. * @param userData The user data to set. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResourceRequest_SetUserData(ArkWeb_ResourceRequest* resourceRequest, void* userData); -/* +/** * @brief Get the user data from ArkWeb_ResourceRequest. * @param resourceRequest The ArkWeb_ResourceRequest. * @return The set user data. @@ -281,7 +328,7 @@ int32_t OH_ArkWebResourceRequest_SetUserData(ArkWeb_ResourceRequest* resourceReq */ void* OH_ArkWebResourceRequest_GetUserData(const ArkWeb_ResourceRequest* resourceRequest); -/* +/** * @brief Get the method of request. * @param resourceRequest The ArkWeb_ResourceRequest. * @param method The request's http method. This function will allocate memory for the method string and caller must @@ -292,7 +339,7 @@ void* OH_ArkWebResourceRequest_GetUserData(const ArkWeb_ResourceRequest* resourc */ void OH_ArkWebResourceRequest_GetMethod(const ArkWeb_ResourceRequest* resourceRequest, char** method); -/* +/** * @brief Get the url of request. * @param resourceRequest The ArkWeb_ResourceRequest. * @param url The request's url. This function will allocate memory for the url string and caller must release the @@ -303,7 +350,7 @@ void OH_ArkWebResourceRequest_GetMethod(const ArkWeb_ResourceRequest* resourceRe */ void OH_ArkWebResourceRequest_GetUrl(const ArkWeb_ResourceRequest* resourceRequest, char** url); -/* +/** * @brief Create a ArkWeb_HttpBodyStream which used to read the http body. * @param resourceRequest The ArkWeb_ResourceRequest. * @param httpBodyStream The request's http body. This function will allocate memory for the http body stream and @@ -315,7 +362,7 @@ void OH_ArkWebResourceRequest_GetUrl(const ArkWeb_ResourceRequest* resourceReque void OH_ArkWebResourceRequest_GetHttpBodyStream(const ArkWeb_ResourceRequest* resourceRequest, ArkWeb_HttpBodyStream** httpBodyStream); -/* +/** * @brief Destroy the http body stream. * @param httpBodyStream The httpBodyStream to be destroyed. * @@ -324,18 +371,40 @@ void OH_ArkWebResourceRequest_GetHttpBodyStream(const ArkWeb_ResourceRequest* re */ void OH_ArkWebResourceRequest_DestroyHttpBodyStream(ArkWeb_HttpBodyStream* httpBodyStream); -/* +/** + * @brief Get the resource type of request. + * @param resourceRequest The ArkWeb_ResourceRequest. + * @return The resource type of request. -1 if resourceRequest is invalid. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 + */ +int32_t OH_ArkWebResourceRequest_GetResourceType(const ArkWeb_ResourceRequest* resourceRequest); + +/** + * @brief Get the url of frame which trigger this request. + * @param resourceRequest The ArkWeb_ResourceRequest. + * @param frameUrl The url of frame which trigger this request. This function will allocate memory for the url string + * and caller must release the string by OH_ArkWeb_ReleaseString. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 + */ +void OH_ArkWebResourceRequest_GetFrameUrl(const ArkWeb_ResourceRequest* resourceRequest, char** frameUrl); + +/** * @brief Set a user data to ArkWeb_HttpBodyStream. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param userData The user data to set. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebHttpBodyStream_SetUserData(ArkWeb_HttpBodyStream* httpBodyStream, void* userData); -/* +/** * @brief Get the user data from ArkWeb_HttpBodyStream. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return The set user data. @@ -345,13 +414,16 @@ int32_t OH_ArkWebHttpBodyStream_SetUserData(ArkWeb_HttpBodyStream* httpBodyStrea */ void* OH_ArkWebHttpBodyStream_GetUserData(const ArkWeb_HttpBodyStream* httpBodyStream); -/* - * @brief Set the callback for OH_ArkWebHttpBodyStream_Read, the result of OH_ArkWebHttpBodyStream_Read will be - * notified to caller through the readCallback. The callback will runs in the same thread as - * OH_ArkWebHttpBodyStream_Read. +/** + * @brief Set the callback for OH_ArkWebHttpBodyStream_Read. + * + * The result of OH_ArkWebHttpBodyStream_Read will be notified to caller through the readCallback.\n + * The callback will run in the same thread as OH_ArkWebHttpBodyStream_Read.\n + * * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param readCallback The callback of read function. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -359,11 +431,15 @@ void* OH_ArkWebHttpBodyStream_GetUserData(const ArkWeb_HttpBodyStream* httpBodyS int32_t OH_ArkWebHttpBodyStream_SetReadCallback(ArkWeb_HttpBodyStream* httpBodyStream, ArkWeb_HttpBodyStreamReadCallback readCallback); -/* - * @brief Init the http body stream. This function must be called before calling any other functions. +/** + * @brief Init the http body stream. + * + * This function must be called before calling any other functions.\n + * * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param initCallback The callback of init. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -371,10 +447,12 @@ int32_t OH_ArkWebHttpBodyStream_SetReadCallback(ArkWeb_HttpBodyStream* httpBodyS int32_t OH_ArkWebHttpBodyStream_Init(ArkWeb_HttpBodyStream* httpBodyStream, ArkWeb_HttpBodyStreamInitCallback initCallback); -/* - * @brief Read the http body to the buffer. The buffer must be larger than the bufLen. We will be reading data from a - * worker thread to the buffer, so should not use the buffer in other threads before the callback to avoid - * concurrency issues. +/** + * @brief Read the http body to the buffer. + * + * The buffer must be larger than the bufLen. We will be reading data from a worker thread to the buffer,\n + * so should not use the buffer in other threads before the callback to avoid concurrency issues.\n + * * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param buffer The buffer to receive data. * @param bufLen The size of bytes to read. @@ -384,9 +462,11 @@ int32_t OH_ArkWebHttpBodyStream_Init(ArkWeb_HttpBodyStream* httpBodyStream, */ void OH_ArkWebHttpBodyStream_Read(const ArkWeb_HttpBodyStream* httpBodyStream, uint8_t* buffer, int bufLen); -/* +/** * @brief Get the total size of the data stream. - * When data is chunked or httpBodyStream is invalid, always return zero. + * + * When data is chunked or httpBodyStream is invalid, always return zero.\n + * * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return The size of data stream. * @@ -395,7 +475,7 @@ void OH_ArkWebHttpBodyStream_Read(const ArkWeb_HttpBodyStream* httpBodyStream, u */ uint64_t OH_ArkWebHttpBodyStream_GetSize(const ArkWeb_HttpBodyStream* httpBodyStream); -/* +/** * @brief Get the current position of the data stream. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return The current position of data stream. 0 if httpBodyStream is invalid. @@ -405,7 +485,7 @@ uint64_t OH_ArkWebHttpBodyStream_GetSize(const ArkWeb_HttpBodyStream* httpBodySt */ uint64_t OH_ArkWebHttpBodyStream_GetPosition(const ArkWeb_HttpBodyStream* httpBodyStream); -/* +/** * @brief Get if the data stream is chunked. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return True if is chunked; false otherwise. @@ -416,9 +496,11 @@ uint64_t OH_ArkWebHttpBodyStream_GetPosition(const ArkWeb_HttpBodyStream* httpBo bool OH_ArkWebHttpBodyStream_IsChunked(const ArkWeb_HttpBodyStream* httpBodyStream); -/* - * @brief Returns true if all data has been consumed from this upload data stream. For chunked uploads, returns false - * until the first read attempt. +/** + * @brief Returns true if all data has been consumed from this upload data stream. + * + * For chunked uploads, returns false until the first read attempt.\n + * * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return True if all data has been consumed; false otherwise. * @@ -427,9 +509,12 @@ bool OH_ArkWebHttpBodyStream_IsChunked(const ArkWeb_HttpBodyStream* httpBodyStre */ bool OH_ArkWebHttpBodyStream_IsEof(const ArkWeb_HttpBodyStream* httpBodyStream); -/* - * @brief Returns true if the upload data in the stream is entirely in memory, and all read requests will succeed - * synchronously. Expected to return false for chunked requests. +/** + * @brief Returns true if the upload data in the stream is entirely in memory, + * and all read requests will succeed synchronously. + * + * Expected to return false for chunked requests.\n + * * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return True if the upload data is in memory; false otherwise. * @@ -438,17 +523,18 @@ bool OH_ArkWebHttpBodyStream_IsEof(const ArkWeb_HttpBodyStream* httpBodyStream); */ bool OH_ArkWebHttpBodyStream_IsInMemory(const ArkWeb_HttpBodyStream* httpBodyStream); -/* +/** * @brief Destroy the ArkWeb_ResourceRequest. * @param resourceRequest The ArkWeb_ResourceRequest. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResourceRequest_Destroy(const ArkWeb_ResourceRequest* resourceRequest); -/* +/** * @brief Get the referrer of request. * @param resourceRequest The ArkWeb_ResourceRequest. * @param referrer The request's referrer. This function will allocate memory for the post data string and caller @@ -459,7 +545,7 @@ int32_t OH_ArkWebResourceRequest_Destroy(const ArkWeb_ResourceRequest* resourceR */ void OH_ArkWebResourceRequest_GetReferrer(const ArkWeb_ResourceRequest* resourceRequest, char** referrer); -/* +/** * @brief Get the OH_ArkWeb_RequestHeaderList of the request. * @param resourceRequest The ArkWeb_ResourceRequest. * @param requestHeaderList The RequestHeaderList of request. @@ -470,7 +556,7 @@ void OH_ArkWebResourceRequest_GetReferrer(const ArkWeb_ResourceRequest* resource void OH_ArkWebResourceRequest_GetRequestHeaders(const ArkWeb_ResourceRequest* resourceRequest, ArkWeb_RequestHeaderList** requestHeaderList); -/* +/** * @brief Get if this is a redirect request. * @param resourceRequest The ArkWeb_ResourceRequest. * @return True if this is a redirect; false otherwise. @@ -480,7 +566,7 @@ void OH_ArkWebResourceRequest_GetRequestHeaders(const ArkWeb_ResourceRequest* re */ bool OH_ArkWebResourceRequest_IsRedirect(const ArkWeb_ResourceRequest* resourceRequest); -/* +/** * @brief Get if this is a request from main frame. * @param resourceRequest The ArkWeb_ResourceRequest. * @return True if this is from main frame; false otherwise. @@ -490,7 +576,7 @@ bool OH_ArkWebResourceRequest_IsRedirect(const ArkWeb_ResourceRequest* resourceR */ bool OH_ArkWebResourceRequest_IsMainFrame(const ArkWeb_ResourceRequest* resourceRequest); -/* +/** * @brief Get if this is a request is triggered by user gesutre. * @param resourceRequest The ArkWeb_ResourceRequest. * @return True if this is triggered by user gesture; false otherwise. @@ -500,22 +586,30 @@ bool OH_ArkWebResourceRequest_IsMainFrame(const ArkWeb_ResourceRequest* resource */ bool OH_ArkWebResourceRequest_HasGesture(const ArkWeb_ResourceRequest* resourceRequest); -/* - * @brief Register custom scheme to the ArkWeb. Should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT and - * DATA schemes. This function should be called on main thread. +/** + * @brief Register custom scheme to the ArkWeb. + * + * Should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.\n + * This function should be called on main thread.\n + * * @param scheme The scheme to regist. * @param option The configuration of the scheme. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_ERROR_UNKNOWN} 17100100 - Unknown error. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * {@link ARKWEB_SCHEME_REGISTER_FAILED} 17100102 - Register custom schemes should be called + * before create any ArkWeb. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWeb_RegisterCustomSchemes(const char* scheme, int32_t option); -/* +/** * @brief Set a ArkWeb_SchemeHandler for a specific scheme to intercept requests of that scheme type. - * SchemeHandler should be set after the BrowserContext created. - * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb. + * + * SchemeHandler should be set after the BrowserContext created.\n + * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.\n * * @param scheme Scheme that need to be intercepted. * @param schemeHandler The SchemeHandler for the scheme. Only requests triggered by ServiceWorker will be notified @@ -527,10 +621,11 @@ int32_t OH_ArkWeb_RegisterCustomSchemes(const char* scheme, int32_t option); */ bool OH_ArkWebServiceWorker_SetSchemeHandler(const char* scheme, ArkWeb_SchemeHandler* schemeHandler); -/* +/** * @brief Set a ArkWeb_SchemeHandler for a specific scheme to intercept requests of that scheme type. - * SchemeHandler should be set after the BrowserContext created. - * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb. + * + * SchemeHandler should be set after the BrowserContext created.\n + * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.\n * * @param scheme Scheme that need to be intercepted. * @param webTag The name of the web component. @@ -543,26 +638,27 @@ bool OH_ArkWebServiceWorker_SetSchemeHandler(const char* scheme, ArkWeb_SchemeHa */ bool OH_ArkWeb_SetSchemeHandler(const char* scheme, const char* webTag, ArkWeb_SchemeHandler* schemeHandler); -/* +/** * @brief Clear the handler registered on the specified web for service worker. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebServiceWorker_ClearSchemeHandlers(); -/* +/** * @brief Clear the handler registered on the specified web. * @param webTag The name of the web component. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWeb_ClearSchemeHandlers(const char* webTag); -/* +/** * @brief Create a SchemeHandler. * @param schemeHandler Return the created SchemeHandler. Use OH_ArkWeb_DestroySchemeHandler destroy it when donn't * need it. @@ -572,7 +668,7 @@ int32_t OH_ArkWeb_ClearSchemeHandlers(const char* webTag); */ void OH_ArkWeb_CreateSchemeHandler(ArkWeb_SchemeHandler** schemeHandler); -/* +/** * @brief Destroy a SchemeHandler. * @param The ArkWeb_SchemeHandler to be destroy. * @@ -581,18 +677,19 @@ void OH_ArkWeb_CreateSchemeHandler(ArkWeb_SchemeHandler** schemeHandler); */ void OH_ArkWeb_DestroySchemeHandler(ArkWeb_SchemeHandler* schemeHandler); -/* +/** * @brief Set a user data to ArkWeb_SchemeHandler. * @param schemeHandler The ArkWeb_SchemeHandler. * @param userData The user data to set. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebSchemeHandler_SetUserData(ArkWeb_SchemeHandler* schemeHandler, void* userData); -/* +/** * @brief Get the user data from ArkWeb_SchemeHandler. * @param schemeHandler The ArkWeb_SchemeHandler. * @return The set user data. @@ -602,11 +699,12 @@ int32_t OH_ArkWebSchemeHandler_SetUserData(ArkWeb_SchemeHandler* schemeHandler, */ void* OH_ArkWebSchemeHandler_GetUserData(const ArkWeb_SchemeHandler* schemeHandler); -/* +/** * @brief Set the OnRequestStart callback for SchemeHandler. * @param schemeHandler The SchemeHandler for the scheme. * @param onRequestStart The OnRequestStart callback. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -614,11 +712,12 @@ void* OH_ArkWebSchemeHandler_GetUserData(const ArkWeb_SchemeHandler* schemeHandl int32_t OH_ArkWebSchemeHandler_SetOnRequestStart(ArkWeb_SchemeHandler* schemeHandler, ArkWeb_OnRequestStart onRequestStart); -/* +/** * @brief Set the OnRequestStop callback for SchemeHandler. * @param schemeHandler The SchemeHandler for the scheme. * @param onRequestStop The OnRequestStop callback. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -626,16 +725,16 @@ int32_t OH_ArkWebSchemeHandler_SetOnRequestStart(ArkWeb_SchemeHandler* schemeHan int32_t OH_ArkWebSchemeHandler_SetOnRequestStop(ArkWeb_SchemeHandler* schemeHandler, ArkWeb_OnRequestStop onRequestStop); -/* +/** * @brief Create a Response for a request. - * @param Return the created Response. Use OH_ArkWeb_DestroyResponse to destroy when donn't need it. + * @param response The created Response. Use OH_ArkWeb_DestroyResponse to destroy when donn't need it. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ void OH_ArkWeb_CreateResponse(ArkWeb_Response** response); -/* +/** * @brief Destroy the Reponse. * @param response The Response needs destroy. * @@ -644,18 +743,19 @@ void OH_ArkWeb_CreateResponse(ArkWeb_Response** response); */ void OH_ArkWeb_DestroyResponse(ArkWeb_Response* response); -/* +/** * @brief Set the resolved URL after redirects or changed as a result of HSTS. * @param response The ArkWeb_Response. * @param url The resolved URL. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetUrl(ArkWeb_Response* response, const char* url); -/* +/** * @brief Get the resolved URL after redirects or changed as a result of HSTS. * @param response The ArkWeb_Response. * @param url The resolved URL. @@ -665,18 +765,19 @@ int32_t OH_ArkWebResponse_SetUrl(ArkWeb_Response* response, const char* url); */ void OH_ArkWebResponse_GetUrl(const ArkWeb_Response* response, char** url); -/* +/** * @brief Set a error code to ArkWeb_Response. * @param response The ArkWeb_Response. * @param errorCode The error code for the failed request. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetError(ArkWeb_Response* response, ArkWeb_NetError errorCode); -/* +/** * @brief Get the response's error code. * @param response The ArkWeb_Response. * @return The response's error code. @@ -686,18 +787,19 @@ int32_t OH_ArkWebResponse_SetError(ArkWeb_Response* response, ArkWeb_NetError er */ ArkWeb_NetError OH_ArkWebResponse_GetError(const ArkWeb_Response* response); -/* +/** * @brief Set a status code to ArkWebResponse. * @param response The ArkWeb_Response. * @param status The http status code for the request. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetStatus(ArkWeb_Response* response, int status); -/* +/** * @brief Get the response's status code. * @param response The ArkWeb_Response. * @return The response's http status code. -1 if response is invalid. @@ -707,18 +809,19 @@ int32_t OH_ArkWebResponse_SetStatus(ArkWeb_Response* response, int status); */ int OH_ArkWebResponse_GetStatus(const ArkWeb_Response* response); -/* +/** * @brief Set a status text to ArkWebResponse. * @param response The ArkWeb_Response. * @param statusText The status text for the request. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetStatusText(ArkWeb_Response* response, const char* statusText); -/* +/** * @brief Get the response's status text. * @param response The ArkWeb_Response. * @param statusText Return the response's statusText. This function will allocate memory for the statusText string and @@ -729,18 +832,19 @@ int32_t OH_ArkWebResponse_SetStatusText(ArkWeb_Response* response, const char* s */ void OH_ArkWebResponse_GetStatusText(const ArkWeb_Response* response, char** statusText); -/* +/** * @brief Set mime type to ArkWebResponse. * @param response The ArkWeb_Response. * @param mimeType The mime type for the request. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetMimeType(ArkWeb_Response* response, const char* mimeType); -/* +/** * @brief Get the response's mime type. * @param response The ArkWeb_Response. * @param mimeType Return the response's mime type. This function will allocate memory for the mime type string and @@ -751,18 +855,19 @@ int32_t OH_ArkWebResponse_SetMimeType(ArkWeb_Response* response, const char* mim */ void OH_ArkWebResponse_GetMimeType(const ArkWeb_Response* response, char** mimeType); -/* +/** * @brief Set charset to ArkWeb_Response. * @param response The ArkWeb_Response. * @param charset The charset for the request. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetCharset(ArkWeb_Response* response, const char* charset); -/* +/** * @brief Get the response's charset. * @param response The ArkWeb_Response. * @param charset Return the response's charset. This function will allocate memory for the charset string and caller @@ -773,13 +878,14 @@ int32_t OH_ArkWebResponse_SetCharset(ArkWeb_Response* response, const char* char */ void OH_ArkWebResponse_GetCharset(const ArkWeb_Response* response, char** charset); -/* +/** * @brief Set a header to ArkWeb_Response. * @param response The ArkWeb_Response. * @param name The name of the header. * @param value The value of the header. - * @bool overwirte If true will overwrite the exsits header, if false otherwise. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @param overwirte If true will overwrite the exsits header, if false otherwise. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -789,7 +895,7 @@ int32_t OH_ArkWebResponse_SetHeaderByName(ArkWeb_Response* response, const char* value, bool overwrite); -/* +/** * @brief Get the header from the response. * @param response The ArkWeb_Response. * @param name The name of the header. @@ -801,21 +907,23 @@ int32_t OH_ArkWebResponse_SetHeaderByName(ArkWeb_Response* response, */ void OH_ArkWebResponse_GetHeaderByName(const ArkWeb_Response* response, const char* name, char** value); -/* +/** * @brief Destroy the ArkWeb_ResourceHandler. * @param resourceHandler The ArkWeb_ResourceHandler. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResourceHandler_Destroy(const ArkWeb_ResourceHandler* resourceHandler); -/* +/** * @brief Pass response headers to intercepted requests. * @param resourceHandler The ArkWeb_ResourceHandler for the request. * @param response The ArkWeb_Response for the intercepting requests. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -823,12 +931,13 @@ int32_t OH_ArkWebResourceHandler_Destroy(const ArkWeb_ResourceHandler* resourceH int32_t OH_ArkWebResourceHandler_DidReceiveResponse(const ArkWeb_ResourceHandler* resourceHandler, const ArkWeb_Response* response); -/* +/** * @brief Pass response body data to intercepted requests. * @param resourceHandler The ArkWeb_ResourceHandler for the request. * @param buffer Buffer data to send. * @param bufLen The size of buffer. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -837,21 +946,23 @@ int32_t OH_ArkWebResourceHandler_DidReceiveData(const ArkWeb_ResourceHandler* re const uint8_t* buffer, int64_t bufLen); -/* +/** * @brief Notify the ArkWeb that this request should be finished and there is no more data available. * @param resourceHandler The ArkWeb_ResourceHandler for the request. - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResourceHandler_DidFinish(const ArkWeb_ResourceHandler* resourceHandler); -/* +/** * @brief Notify the ArkWeb that this request should be failed. * @param resourceHandler The ArkWeb_ResourceHandler for the request. - * @param errorCode The error code for this request. refer to arkweb_net_error_list.h - * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. + * @param errorCode The error code for this request. Refer to arkweb_net_error_list.h. + * @return {@link ARKWEB_NET_OK} 0 - Success. + * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -859,7 +970,7 @@ int32_t OH_ArkWebResourceHandler_DidFinish(const ArkWeb_ResourceHandler* resourc int32_t OH_ArkWebResourceHandler_DidFailWithError(const ArkWeb_ResourceHandler* resourceHandler, ArkWeb_NetError errorCode); -/* +/** * @brief Release the string acquired by native function. * @param string The string to be released. * @@ -868,7 +979,7 @@ int32_t OH_ArkWebResourceHandler_DidFailWithError(const ArkWeb_ResourceHandler* */ void OH_ArkWeb_ReleaseString(char* string); -/* +/** * @brief Release the byte array acquired by native function. * @param byteArray The byte array to be released. * -- Gitee From 8c840de70278aac07b22303db7e483d4a22ae666 Mon Sep 17 00:00:00 2001 From: xiyupeng Date: Fri, 24 May 2024 15:12:58 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Revert=20"API=E6=B3=A8=E9=87=8A=E6=95=B4?= =?UTF-8?q?=E6=94=B9"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 2366f2e0469748bd7501d1c7138f85f9597de6e9. --- .../interfaces/native/arkweb_error_code.h | 21 +- .../interfaces/native/arkweb_net_error_list.h | 1680 ++++++++++++----- .../interfaces/native/arkweb_scheme_handler.h | 459 ++--- 3 files changed, 1392 insertions(+), 768 deletions(-) diff --git a/web/webview/interfaces/native/arkweb_error_code.h b/web/webview/interfaces/native/arkweb_error_code.h index d7e0a76d2..07f274025 100644 --- a/web/webview/interfaces/native/arkweb_error_code.h +++ b/web/webview/interfaces/native/arkweb_error_code.h @@ -32,13 +32,28 @@ #define ARKWEB_ERROR_CODE_H typedef enum ArkWeb_ErrorCode { -/** @error Unknown error. */ +/* + * @brief Unknown error. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 + */ ARKWEB_ERROR_UNKNOWN = 17100100, -/** @error Invalid param. */ +/* + * @brief Invalid param. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 + */ ARKWEB_INVALID_PARAM = 17100101, -/** @error Register custom schemes should be called before create any ArkWeb. */ +/* + * @brief Register custom schemes should be called before create any ArkWeb. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 + */ ARKWEB_SCHEME_REGISTER_FAILED = 17100102, } ArkWeb_ErrorCode; diff --git a/web/webview/interfaces/native/arkweb_net_error_list.h b/web/webview/interfaces/native/arkweb_net_error_list.h index 2e0a1c16a..f8ef5b247 100644 --- a/web/webview/interfaces/native/arkweb_net_error_list.h +++ b/web/webview/interfaces/native/arkweb_net_error_list.h @@ -32,598 +32,907 @@ #define ARKWEB_NET_ERROR_LIST_H typedef enum ArkWeb_NetError { - /** - * @error Normal. + /* + * @brief Normal. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_NET_OK = 0, - /** - * @error An asynchronous IO operation is not yet complete. This usually does not + /* + * @brief An asynchronous IO operation is not yet complete. This usually does not * indicate a fatal error. Typically this error will be generated as a * notification to wait for some external notification that the IO operation * finally completed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_IO_PENDING = -1, - /** - * @error A generic failure occurred. + /* + * @brief A generic failure occurred. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FAILED = -2, - /** - * @error An operation was aborted. + /* + * @brief An operation was aborted. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ABORTED = -3, - /** - * @error An argument to the function is incorrect. + /* + * @brief An argument to the function is incorrect. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_ARGUMENT = -4, - /** - * @error The handle or file descriptor is invalid. + /* + * @brief The handle or file descriptor is invalid. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_HANDLE = -5, - /** - * @error The file or directory cannot be found. + /* + * @brief The file or directory cannot be found. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FILE_NOT_FOUND = -6, - /** - * @error An operation timed out. + /* + * @brief An operation timed out. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TIMED_OUT = -7, - /** - * @error The file is too large. + /* + * @brief The file is too large. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FILE_TOO_LARGE = -8, - /** - * @error An unexpected error. This may be caused by a programming mistake or an + /* + * @brief An unexpected error. This may be caused by a programming mistake or an * invalid assumption. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNEXPECTED = -9, - /** - * @error Permission to access a resource, other than the network, was denied. + /* + * @brief Permission to access a resource, other than the network, was denied. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ACCESS_DENIED = -10, - /** - * @error The operation failed because of unimplemented functionality. + /* + * @brief The operation failed because of unimplemented functionality. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NOT_IMPLEMENTED = -11, - /** - * @error There were not enough resources to complete the operation. + /* + * @brief There were not enough resources to complete the operation. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INSUFFICIENT_RESOURCES = -12, - /** - * @error Memory allocation failed. + /* + * @brief Memory allocation failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_OUT_OF_MEMORY = -13, - /** - * @error The file upload failed because the file's modification time was different + /* + * @brief The file upload failed because the file's modification time was different * from the expectation. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UPLOAD_FILE_CHANGED = -14, - /** - * @error The socket is not connected. + /* + * @brief The socket is not connected. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SOCKET_NOT_CONNECTED = -15, - /** - * @error The file already exists. + /* + * @brief The file already exists. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FILE_EXISTS = -16, - /** - * @error The path or file name is too long. + /* + * @brief The path or file name is too long. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FILE_PATH_TOO_LONG = -17, - /** - * @error Not enough room left on the disk. + /* + * @brief Not enough room left on the disk. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FILE_NO_SPACE = -18, - /** - * @error The file has a virus. + /* + * @brief The file has a virus. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FILE_VIRUS_INFECTED = -19, - /** - * @error The client chose to block the request. + /* + * @brief The client chose to block the request. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_BLOCKED_BY_CLIENT = -20, - /** - * @error The network changed. + /* + * @brief The network changed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NETWORK_CHANGED = -21, - /** - * @error The request was blocked by the URL block list configured by the domain + /* + * @brief The request was blocked by the URL block list configured by the domain * administrator. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_BLOCKED_BY_ADMINISTRATOR = -22, - /** - * @error The socket is already connected. + /* + * @brief The socket is already connected. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SOCKET_CONNECTED = -23, - /** - * @error The upload failed because the upload stream needed to be re-read, due to a + /* + * @brief The upload failed because the upload stream needed to be re-read, due to a * retry or a redirect, but the upload stream doesn't support that operation. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED = -25, - /** - * @error The request failed because the URLRequestContext is shutting down, or has + /* + * @brief The request failed because the URLRequestContext is shutting down, or has * been shut down. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONTEXT_SHUT_DOWN = -26, - /** - * @error The request failed because the response was delivered along with requirements + /* + * @brief The request failed because the response was delivered along with requirements * which are not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor * checks and 'Cross-Origin-Resource-Policy' for instance). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_BLOCKED_BY_RESPONSE = -27, - /** - * @error The request was blocked by system policy disallowing some or all cleartext + /* + * @brief The request was blocked by system policy disallowing some or all cleartext * requests. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CLEARTEXT_NOT_PERMITTED = -29, - /** - * @error The request was blocked by a Content Security Policy. + /* + * @brief The request was blocked by a Content Security Policy. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_BLOCKED_BY_CSP = -30, - /** - * @error The request was blocked because of no H/2 or QUIC session. + /* + * @brief The request was blocked because of no H/2 or QUIC session. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_H2_OR_QUIC_REQUIRED = -31, - /** - * @error The request was blocked by CORB or ORB. + /* + * @brief The request was blocked by CORB or ORB. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_BLOCKED_BY_ORB = -32, - /** - * @error A connection was closed (corresponding to a TCP FIN). + /* + * @brief A connection was closed (corresponding to a TCP FIN). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONNECTION_CLOSED = -100, - /** - * @error A connection was reset (corresponding to a TCP RST). + /* + * @brief A connection was reset (corresponding to a TCP RST). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONNECTION_RESET = -101, - /** - * @error A connection attempt was refused. + /* + * @brief A connection attempt was refused. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONNECTION_REFUSED = -102, - /** - * @error A connection timed out as a result of not receiving an ACK for data sent. + /* + * @brief A connection timed out as a result of not receiving an ACK for data sent. * This can include a FIN packet that did not get ACK'd. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONNECTION_ABORTED = -103, - /** - * @error A connection attempt failed. + /* + * @brief A connection attempt failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONNECTION_FAILED = -104, - /** - * @error The host name could not be resolved. + /* + * @brief The host name could not be resolved. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NAME_NOT_RESOLVED = -105, - /** - * @error The Internet connection has been lost. + /* + * @brief The Internet connection has been lost. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INTERNET_DISCONNECTED = -106, - /** - * @error An SSL protocol error occurred. + /* + * @brief An SSL protocol error occurred. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_PROTOCOL_ERROR = -107, - /** - * @error The IP address or port number is invalid (e.g., cannot connect to the IP + /* + * @brief The IP address or port number is invalid (e.g., cannot connect to the IP * address 0 or the port 0). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ADDRESS_INVALID = -108, - /** - * @error The IP address is unreachable. This usually means that there is no route to + /* + * @brief The IP address is unreachable. This usually means that there is no route to * the specified host or network. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ADDRESS_UNREACHABLE = -109, - /** - * @error The server requested a client certificate for SSL client authentication. + /* + * @brief The server requested a client certificate for SSL client authentication. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110, - /** - * @error A tunnel connection through the proxy could not be established. + /* + * @brief A tunnel connection through the proxy could not be established. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TUNNEL_CONNECTION_FAILED = -111, - /** - * @error No SSL protocol versions are enabled. + /* + * @brief No SSL protocol versions are enabled. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NO_SSL_VERSIONS_ENABLED = -112, - /** - * @error The client and server don't support a common SSL protocol version or + /* + * @brief The client and server don't support a common SSL protocol version or * cipher suite. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113, - /** - * @error The server requested a renegotiation (rehandshake). + /* + * @brief The server requested a renegotiation (rehandshake). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_RENEGOTIATION_REQUESTED = -114, - /** - * @error The proxy requested authentication (for tunnel establishment, with an + /* + * @brief The proxy requested authentication (for tunnel establishment, with an * unsupported method. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PROXY_AUTH_UNSUPPORTED = -115, - /** - * @error The SSL handshake failed because of a bad or missing client certificate. + /* + * @brief The SSL handshake failed because of a bad or missing client certificate. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_BAD_SSL_CLIENT_AUTH_CERT = -117, - /** - * @error A connection attempt timed out. + /* + * @brief A connection attempt timed out. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONNECTION_TIMED_OUT = -118, - /** - * @error There are too many pending DNS resolves, so a request in the queue was + /* + * @brief There are too many pending DNS resolves, so a request in the queue was * aborted. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HOST_RESOLVER_QUEUE_TOO_LARGE = -119, - /** - * @error Failed establishing a connection to the SOCKS proxy server for a target host. + /* + * @brief Failed establishing a connection to the SOCKS proxy server for a target host. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SOCKS_CONNECTION_FAILED = -120, - /** - * @error The SOCKS proxy server failed establishing connection to the target host + /* + * @brief The SOCKS proxy server failed establishing connection to the target host * because that host is unreachable. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SOCKS_CONNECTION_HOST_UNREACHABLE = -121, - /** - * @error The request to negotiate an alternate protocol failed. + /* + * @brief The request to negotiate an alternate protocol failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ALPN_NEGOTIATION_FAILED = -122, - /** - * @error The peer sent an SSL no_renegotiation alert message. + /* + * @brief The peer sent an SSL no_renegotiation alert message. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_NO_RENEGOTIATION = -123, - /** - * @error Winsock sometimes reports more data written than passed. This is probably + /* + * @brief Winsock sometimes reports more data written than passed. This is probably * due to a broken LSP. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES = -124, - /** - * @error An SSL peer sent us a fatal decompression_failure alert. This typically + /* + * @brief An SSL peer sent us a fatal decompression_failure alert. This typically * occurs when a peer selects DEFLATE compression in the mistaken belief that * it supports it. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_DECOMPRESSION_FAILURE_ALERT = -125, - /** - * @error An SSL peer sent us a fatal bad_record_mac alert. This has been observed + /* + * @brief An SSL peer sent us a fatal bad_record_mac alert. This has been observed * from servers with buggy DEFLATE support. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_BAD_RECORD_MAC_ALERT = -126, - /** - * @error The proxy requested authentication (for tunnel establishment). + /* + * @brief The proxy requested authentication (for tunnel establishment). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PROXY_AUTH_REQUESTED = -127, - /** - * @error Could not create a connection to the proxy server. An error occurred + /* + * @brief Could not create a connection to the proxy server. An error occurred * either in resolving its name, or in connecting a socket to it. * Note that this does NOT include failures during the actual "CONNECT" method * of an HTTP proxy. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PROXY_CONNECTION_FAILED = -130, - /** - * @error A mandatory proxy configuration could not be used. Currently this means + /* + * @brief A mandatory proxy configuration could not be used. Currently this means * that a mandatory PAC script could not be fetched, parsed or executed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_MANDATORY_PROXY_CONFIGURATION_FAILED = -131, - /** - * @error We've hit the max socket limit for the socket pool while preconnecting. We + /* + * @brief We've hit the max socket limit for the socket pool while preconnecting. We * don't bother trying to preconnect more sockets. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PRECONNECT_MAX_SOCKET_LIMIT = -133, - /** - * @error The permission to use the SSL client certificate's private key was denied. + /* + * @brief The permission to use the SSL client certificate's private key was denied. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED = -134, - /** - * @error The SSL client certificate has no private key. + /* + * @brief The SSL client certificate has no private key. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY = -135, - /** - * @error The certificate presented by the HTTPS Proxy was invalid. + /* + * @brief The certificate presented by the HTTPS Proxy was invalid. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PROXY_CERTIFICATE_INVALID = -136, - /** - * @error An error occurred when trying to do a name resolution (DNS). + /* + * @brief An error occurred when trying to do a name resolution (DNS). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NAME_RESOLUTION_FAILED = -137, - /** - * @error Permission to access the network was denied. This is used to distinguish + /* + * @brief Permission to access the network was denied. This is used to distinguish * errors that were most likely caused by a firewall from other access denied * errors. See also ERR_ACCESS_DENIED. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NETWORK_ACCESS_DENIED = -138, - /** - * @error The request throttler module cancelled this request to avoid DDOS. + /* + * @brief The request throttler module cancelled this request to avoid DDOS. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TEMPORARILY_THROTTLED = -139, - /** - * @error A request to create an SSL tunnel connection through the HTTPS proxy + /* + * @brief A request to create an SSL tunnel connection through the HTTPS proxy * received a 302 (temporary redirect, response. The response body might * include a description of why the request failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT = -140, - /** - * @error We were unable to sign the CertificateVerify data of an SSL client auth + /* + * @brief We were unable to sign the CertificateVerify data of an SSL client auth * handshake with the client certificate's private key. * Possible causes for this include the user implicitly or explicitly * denying access to the private key, the private key may not be valid for * signing, the key may be relying on a cached handle which is no longer * valid, or the CSP won't allow arbitrary data to be signed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED = -141, - /** - * @error The message was too large for the transport. (for example a UDP message + /* + * @brief The message was too large for the transport. (for example a UDP message * which exceeds size threshold). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_MSG_TOO_BIG = -142, - /** - * @error Websocket protocol error. Indicates that we are terminating the connection + /* + * @brief Websocket protocol error. Indicates that we are terminating the connection * due to a malformed frame or other protocol violation. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_WS_PROTOCOL_ERROR = -145, - /** - * @error Returned when attempting to bind an address that is already in use. + /* + * @brief Returned when attempting to bind an address that is already in use. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ADDRESS_IN_USE = -147, - /** - * @error An operation failed because the SSL handshake has not completed. + /* + * @brief An operation failed because the SSL handshake has not completed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_HANDSHAKE_NOT_COMPLETED = -148, - /** - * @error SSL peer's public key is invalid. + /* + * @brief SSL peer's public key is invalid. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_BAD_PEER_PUBLIC_KEY = -149, - /** - * @error The certificate didn't match the built-in public key pins for the host name. + /* + * @brief The certificate didn't match the built-in public key pins for the host name. * The pins are set in net/http/transport_security_state.cc and require that * one of a set of public keys exist on the path from the leaf to the root. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN = -150, - /** - * @error Server request for client certificate did not contain any types we support. + /* + * @brief Server request for client certificate did not contain any types we support. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED = -151, - /** - * @error An SSL peer sent us a fatal decrypt_error alert. This typically occurs when + /* + * @brief An SSL peer sent us a fatal decrypt_error alert. This typically occurs when * a peer could not correctly verify a signature (in CertificateVerify or * ServerKeyExchange, or validate a Finished message. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_DECRYPT_ERROR_ALERT = -153, - /** - * @error There are too many pending WebSocketJob instances, so the new job was not + /* + * @brief There are too many pending WebSocketJob instances, so the new job was not * pushed to the queue. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_WS_THROTTLE_QUEUE_TOO_LARGE = -154, - /** - * @error The SSL server certificate changed in a renegotiation. + /* + * @brief The SSL server certificate changed in a renegotiation. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_SERVER_CERT_CHANGED = -156, - /** - * @error The SSL server sent us a fatal unrecognized_name alert. + /* + * @brief The SSL server sent us a fatal unrecognized_name alert. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_UNRECOGNIZED_NAME_ALERT = -159, - /** - * @error Failed to set the socket's receive buffer size as requested. + /* + * @brief Failed to set the socket's receive buffer size as requested. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR = -160, - /** - * @error Failed to set the socket's send buffer size as requested. + /* + * @brief Failed to set the socket's send buffer size as requested. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR = -161, - /** - * @error Failed to set the socket's receive buffer size as requested, despite success + /* + * @brief Failed to set the socket's receive buffer size as requested, despite success * return code from setsockopt. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE = -162, - /** - * @error Failed to set the socket's send buffer size as requested, despite success + /* + * @brief Failed to set the socket's send buffer size as requested, despite success * return code from setsockopt. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE = -163, - /** - * @error Failed to import a client certificate from the platform store into the SSL + /* + * @brief Failed to import a client certificate from the platform store into the SSL * library. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT = -164, - /** - * @error Resolving a hostname to an IP address list included the IPv4 address + /* + * @brief Resolving a hostname to an IP address list included the IPv4 address * "127.0.53.53". This is a special IP address which ICANN has recommended to * indicate there was a name collision, and alert admins to a potential * problem. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ICANN_NAME_COLLISION = -166, - /** - * @error The SSL server presented a certificate which could not be decoded. This is + /* + * @brief The SSL server presented a certificate which could not be decoded. This is * not a certificate error code as no X509Certificate object is available. This * error is fatal. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_SERVER_CERT_BAD_FORMAT = -167, - /** - * @error Certificate Transparency: Received a signed tree head that failed to parse. + /* + * @brief Certificate Transparency: Received a signed tree head that failed to parse. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CT_STH_PARSING_FAILED = -168, - /** - * @error Certificate Transparency: Received a signed tree head whose JSON parsing was + /* + * @brief Certificate Transparency: Received a signed tree head whose JSON parsing was * OK but was missing some of the fields. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CT_STH_INCOMPLETE = -169, - /** - * @error The attempt to reuse a connection to send proxy auth credentials failed + /* + * @brief The attempt to reuse a connection to send proxy auth credentials failed * before the AuthController was used to generate credentials. The caller should * reuse the controller with a new connection. This error is only used * internally by the network stack. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH = -170, - /** - * @error Certificate Transparency: Failed to parse the received consistency proof. + /* + * @brief Certificate Transparency: Failed to parse the received consistency proof. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED = -171, - /** - * @error The SSL server required an unsupported cipher suite that has since been + /* + * @brief The SSL server required an unsupported cipher suite that has since been * removed. This error will temporarily be signaled on a fallback for one or two * releases immediately following a cipher suite's removal, after which the * fallback will be removed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_OBSOLETE_CIPHER = -172, - /** - * @error When a WebSocket handshake is done successfully and the connection has been + /* + * @brief When a WebSocket handshake is done successfully and the connection has been * upgraded, the URLRequest is cancelled with this error code. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_WS_UPGRADE = -173, - /** - * @error Socket ReadIfReady support is not implemented. This error should not be user + /* + * @brief Socket ReadIfReady support is not implemented. This error should not be user * visible, because the normal Read(, method is used as a fallback. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_READ_IF_READY_NOT_IMPLEMENTED = -174, - /** - * @error No socket buffer space is available. + /* + * @brief No socket buffer space is available. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NO_BUFFER_SPACE = -176, - /** - * @error There were no common signature algorithms between our client certificate + /* + * @brief There were no common signature algorithms between our client certificate * private key and the server's preferences. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS = -177, - /** - * @error TLS 1.3 early data was rejected by the server. This will be received before + /* + * @brief TLS 1.3 early data was rejected by the server. This will be received before * any data is returned from the socket. The request should be retried with * early data disabled. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_EARLY_DATA_REJECTED = -178, - /** - * @error TLS 1.3 early data was offered, but the server responded with TLS 1.2 or + /* + * @brief TLS 1.3 early data was offered, but the server responded with TLS 1.2 or * earlier. This is an internal error code to account for a * backwards-compatibility issue with early data and TLS 1.2. It will be * received before any data is returned from the socket. The request should be * retried with early data disabled. * See https://tools.ietf.org/html/rfc8446#appendix-D.3 for details. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_WRONG_VERSION_ON_EARLY_DATA = -179, - /** - * @error TLS 1.3 was enabled, but a lower version was negotiated and the server + /* + * @brief TLS 1.3 was enabled, but a lower version was negotiated and the server * returned a value indicating it supported TLS 1.3. This is part of a security * check in TLS 1.3, but it may also indicate the user is behind a buggy * TLS-terminating proxy which implemented TLS 1.2 incorrectly. (See * rhttps://crbug.com/boringssl/226., + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TLS13_DOWNGRADE_DETECTED = -180, - /** - * @error The server's certificate has a keyUsage extension incompatible with the + /* + * @brief The server's certificate has a keyUsage extension incompatible with the * negotiated TLS key exchange method. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_KEY_USAGE_INCOMPATIBLE = -181, - /** - * @error The ECHConfigList fetched over DNS cannot be parsed. + /* + * @brief The ECHConfigList fetched over DNS cannot be parsed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_ECH_CONFIG_LIST = -182, - /** - * @error ECH was enabled, but the server was unable to decrypt the encrypted + /* + * @brief ECH was enabled, but the server was unable to decrypt the encrypted * ClientHello. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ECH_NOT_NEGOTIATED = -183, - /** - * @error ECH was enabled, the server was unable to decrypt the encrypted ClientHello, + /* + * @brief ECH was enabled, the server was unable to decrypt the encrypted ClientHello, * and additionally did not present a certificate valid for the public name. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ECH_FALLBACK_CERTIFICATE_INVALID = -184, - /** - * @error The server responded with a certificate whose common name did not match + /* + * @brief The server responded with a certificate whose common name did not match * the host name. This could mean: * 1. An attacker has redirected our traffic to their server and is * presenting a certificate for which they know the private key. @@ -632,21 +941,27 @@ typedef enum ArkWeb_NetError { * network's login page. * 4. The OS has used a DNS search suffix and the server doesn't have * a certificate for the abbreviated name in the address bar. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_COMMON_NAME_INVALID = -200, - /** - * @error The server responded with a certificate that, by our clock, appears to + /* + * @brief The server responded with a certificate that, by our clock, appears to * either not yet be valid or to have expired. This could mean: * 1. An attacker is presenting an old certificate for which they have * managed to obtain the private key. * 2. The server is misconfigured and is not presenting a valid cert. * 3. Our clock is wrong. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_DATE_INVALID = -201, - /** - * @error The server responded with a certificate that is signed by an authority + /* + * @brief The server responded with a certificate that is signed by an authority * we don't trust. The could mean: * 1. An attacker has substituted the real certificate for a cert that * contains their public key and is signed by their cousin. @@ -654,696 +969,1074 @@ typedef enum ArkWeb_NetError { * know about, but should trust. * 3. The server is presenting a self-signed certificate, providing no * defense against active attackers (but foiling passive attackers). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_AUTHORITY_INVALID = -202, - /** - * @error The server responded with a certificate that contains errors. + /* + * @brief The server responded with a certificate that contains errors. * This error is not recoverable. * MSDN describes this error as follows: * "The SSL certificate contains errors." * NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency, * use that code instead of this one from now on. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_CONTAINS_ERRORS = -203, - /** - * @error The certificate has no mechanism for determining if it is revoked. In + /* + * @brief The certificate has no mechanism for determining if it is revoked. In * effect, this certificate cannot be revoked. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_NO_REVOCATION_MECHANISM = -204, - /** - * @error Revocation information for the security certificate for this site is not + /* + * @brief Revocation information for the security certificate for this site is not * available. This could mean: * 1. An attacker has compromised the private key in the certificate and is * blocking our attempt to find out that the cert was revoked. * 2. The certificate is unrevoked, but the revocation server is busy or * unavailable. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205, - /** - * @error The server responded with a certificate has been revoked. + /* + * @brief The server responded with a certificate has been revoked. * We have the capability to ignore this error, but it is probably not the * thing to do. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_REVOKED = -206, - /** - * @error The server responded with a certificate that is invalid. + /* + * @brief The server responded with a certificate that is invalid. * This error is not recoverable. * MSDN describes this error as follows: * "The SSL certificate is invalid." + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_INVALID = -207, - /** - * @error The server responded with a certificate that is signed using a weak + /* + * @brief The server responded with a certificate that is signed using a weak * signature algorithm. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208, - /** - * @error The host name specified in the certificate is not unique. + /* + * @brief The host name specified in the certificate is not unique. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_NON_UNIQUE_NAME = -210, - /** - * @error The server responded with a certificate that contains a weak key (e.g. + /* + * @brief The server responded with a certificate that contains a weak key (e.g. * a too-small RSA key). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_WEAK_KEY = -211, - /** - * @error The certificate claimed DNS names that are in violation of name constraints. + /* + * @brief The certificate claimed DNS names that are in violation of name constraints. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212, - /** - * @error The certificate's validity period is too long. + /* + * @brief The certificate's validity period is too long. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_VALIDITY_TOO_LONG = -213, - /** - * @error Certificate Transparency was required for this connection, but the server + /* + * @brief Certificate Transparency was required for this connection, but the server * did not provide CT information that complied with the policy. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERTIFICATE_TRANSPARENCY_REQUIRED = -214, - /** - * @error The certificate chained to a legacy Symantec root that is no longer trusted. + /* + * @brief The certificate chained to a legacy Symantec root that is no longer trusted. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_SYMANTEC_LEGACY = -215, - /** - * @error The certificate is known to be used for interception by an entity other + /* + * @brief The certificate is known to be used for interception by an entity other * the device owner. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_KNOWN_INTERCEPTION_BLOCKED = -217, - /** - * @error The connection uses an obsolete version of SSL/TLS or cipher. + /* + * @brief The connection uses an obsolete version of SSL/TLS or cipher. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SSL_OBSOLETE_VERSION_OR_CIPHER = -218, - /** - * @error The value immediately past the last certificate error code. + /* + * @brief The value immediately past the last certificate error code. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_END = -219, - /** - * @error The URL is invalid. + /* + * @brief The URL is invalid. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_URL = -300, - /** - * @error The scheme of the URL is disallowed. + /* + * @brief The scheme of the URL is disallowed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DISALLOWED_URL_SCHEME = -301, - /** - * @error The scheme of the URL is unknown. + /* + * @brief The scheme of the URL is unknown. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNKNOWN_URL_SCHEME = -302, - /** - * @error Attempting to load an URL resulted in a redirect to an invalid URL. + /* + * @brief Attempting to load an URL resulted in a redirect to an invalid URL. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_REDIRECT = -303, - /** - * @error Attempting to load an URL resulted in too many redirects. + /* + * @brief Attempting to load an URL resulted in too many redirects. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TOO_MANY_REDIRECTS = -310, - /** - * @error Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect + /* + * @brief Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect * to file:// is considered unsafe). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNSAFE_REDIRECT = -311, - /** - * @error Attempting to load an URL with an unsafe port number. + /* + * @brief Attempting to load an URL with an unsafe port number. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNSAFE_PORT = -312, - /** - * @error The server's response was invalid. + /* + * @brief The server's response was invalid. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_RESPONSE = -320, - /** - * @error Error in chunked transfer encoding. + /* + * @brief Error in chunked transfer encoding. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_CHUNKED_ENCODING = -321, - /** - * @error The server did not support the request method. + /* + * @brief The server did not support the request method. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_METHOD_UNSUPPORTED = -322, - /** - * @error The response was 407 (Proxy Authentication Required,, yet we did not send + /* + * @brief The response was 407 (Proxy Authentication Required,, yet we did not send * the request to a proxy. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNEXPECTED_PROXY_AUTH = -323, - /** - * @error The server closed the connection without sending any data. + /* + * @brief The server closed the connection without sending any data. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_EMPTY_RESPONSE = -324, - /** - * @error The headers section of the response is too large. + /* + * @brief The headers section of the response is too large. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_RESPONSE_HEADERS_TOO_BIG = -325, - /** - * @error The evaluation of the PAC script failed. + /* + * @brief The evaluation of the PAC script failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PAC_SCRIPT_FAILED = -327, - /** - * @error The response was 416 (Requested range not satisfiable, and the server cannot + /* + * @brief The response was 416 (Requested range not satisfiable, and the server cannot * satisfy the range requested. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_REQUEST_RANGE_NOT_SATISFIABLE = -328, - /** - * @error The identity used for authentication is invalid. + /* + * @brief The identity used for authentication is invalid. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_MALFORMED_IDENTITY = -329, - /** - * @error Content decoding of the response body failed. + /* + * @brief Content decoding of the response body failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONTENT_DECODING_FAILED = -330, - /** - * @error An operation could not be completed because all network IO + /* + * @brief An operation could not be completed because all network IO * is suspended. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NETWORK_IO_SUSPENDED = -331, - /** - * @error FLIP data received without receiving a SYN_REPLY on the stream. + /* + * @brief FLIP data received without receiving a SYN_REPLY on the stream. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SYN_REPLY_NOT_RECEIVED = -332, - /** - * @error Converting the response to target encoding failed. + /* + * @brief Converting the response to target encoding failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ENCODING_CONVERSION_FAILED = -333, - /** - * @error The server sent an FTP directory listing in a format we do not understand. + /* + * @brief The server sent an FTP directory listing in a format we do not understand. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT = -334, - /** - * @error There are no supported proxies in the provided list. + /* + * @brief There are no supported proxies in the provided list. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NO_SUPPORTED_PROXIES = -336, - /** - * @error There is an HTTP/2 protocol error. + /* + * @brief There is an HTTP/2 protocol error. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_PROTOCOL_ERROR = -337, - /** - * @error Credentials could not be established during HTTP Authentication. + /* + * @brief Credentials could not be established during HTTP Authentication. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_AUTH_CREDENTIALS = -338, - /** - * @error An HTTP Authentication scheme was tried which is not supported on this + /* + * @brief An HTTP Authentication scheme was tried which is not supported on this * machine. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNSUPPORTED_AUTH_SCHEME = -339, - /** - * @error Detecting the encoding of the response failed. + /* + * @brief Detecting the encoding of the response failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ENCODING_DETECTION_FAILED = -340, - /** - * @error (GSSAPI, No Kerberos credentials were available during HTTP Authentication. + /* + * @brief (GSSAPI, No Kerberos credentials were available during HTTP Authentication. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_MISSING_AUTH_CREDENTIALS = -341, - /** - * @error An unexpected, but documented, SSPI or GSSAPI status code was returned. + /* + * @brief An unexpected, but documented, SSPI or GSSAPI status code was returned. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS = -342, - /** - * @error The environment was not set up correctly for authentication (for + /* + * @brief The environment was not set up correctly for authentication (for * example, no KDC could be found or the principal is unknown. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_MISCONFIGURED_AUTH_ENVIRONMENT = -343, - /** - * @error An undocumented SSPI or GSSAPI status code was returned. + /* + * @brief An undocumented SSPI or GSSAPI status code was returned. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS = -344, - /** - * @error The HTTP response was too big to drain. + /* + * @brief The HTTP response was too big to drain. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN = -345, - /** - * @error The HTTP response contained multiple distinct Content-Length headers. + /* + * @brief The HTTP response contained multiple distinct Content-Length headers. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH = -346, - /** - * @error HTTP/2 headers have been received, but not all of them - status or version + /* + * @brief HTTP/2 headers have been received, but not all of them - status or version * headers are missing, so we're expecting additional frames to complete them. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INCOMPLETE_HTTP2_HEADERS = -347, - /** - * @error No PAC URL configuration could be retrieved from DHCP. This can indicate + /* + * @brief No PAC URL configuration could be retrieved from DHCP. This can indicate * either a failure to retrieve the DHCP configuration, or that there was no * PAC URL configured in DHCP. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PAC_NOT_IN_DHCP = -348, - /** - * @error The HTTP response contained multiple Content-Disposition headers. + /* + * @brief The HTTP response contained multiple Content-Disposition headers. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION = -349, - /** - * @error The HTTP response contained multiple Location headers. + /* + * @brief The HTTP response contained multiple Location headers. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION = -350, - /** - * @error HTTP/2 server refused the request without processing, and sent either a + /* + * @brief HTTP/2 server refused the request without processing, and sent either a * GOAWAY frame with error code NO_ERROR and Last-Stream-ID lower than the * stream id corresponding to the request indicating that this request has not * been processed yet, or a RST_STREAM frame with error code REFUSED_STREAM. * Client MAY retry (on a different connection). See RFC7540 Section 8.1.4. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_SERVER_REFUSED_STREAM = -351, - /** - * @error HTTP/2 server didn't respond to the PING message. + /* + * @brief HTTP/2 server didn't respond to the PING message. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_PING_FAILED = -352, - /** - * @error The HTTP response body transferred fewer bytes than were advertised by the + /* + * @brief The HTTP response body transferred fewer bytes than were advertised by the * Content-Length header when the connection is closed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONTENT_LENGTH_MISMATCH = -354, - /** - * @error The HTTP response body is transferred with Chunked-Encoding, but the + /* + * @brief The HTTP response body is transferred with Chunked-Encoding, but the * terminating zero-length chunk was never sent when the connection is closed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INCOMPLETE_CHUNKED_ENCODING = -355, - /** - * @error There is a QUIC protocol error. + /* + * @brief There is a QUIC protocol error. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_QUIC_PROTOCOL_ERROR = -356, - /** - * @error The HTTP headers were truncated by an EOF. + /* + * @brief The HTTP headers were truncated by an EOF. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_RESPONSE_HEADERS_TRUNCATED = -357, - /** - * @error The QUIC crypto handshake failed. This means that the server was unable + /* + * @brief The QUIC crypto handshake failed. This means that the server was unable * to read any requests sent, so they may be resent. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_QUIC_HANDSHAKE_FAILED = -358, - /** - * @error Transport security is inadequate for the HTTP/2 version. + /* + * @brief Transport security is inadequate for the HTTP/2 version. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY = -360, - /** - * @error The peer violated HTTP/2 flow control. + /* + * @brief The peer violated HTTP/2 flow control. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_FLOW_CONTROL_ERROR = -361, - /** - * @error The peer sent an improperly sized HTTP/2 frame. + /* + * @brief The peer sent an improperly sized HTTP/2 frame. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_FRAME_SIZE_ERROR = -362, - /** - * @error Decoding or encoding of compressed HTTP/2 headers failed. + /* + * @brief Decoding or encoding of compressed HTTP/2 headers failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_COMPRESSION_ERROR = -363, - /** - * @error Proxy Auth Requested without a valid Client Socket Handle. + /* + * @brief Proxy Auth Requested without a valid Client Socket Handle. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION = -364, - /** - * @error HTTP_1_1_REQUIRED error code received on HTTP/2 session. + /* + * @brief HTTP_1_1_REQUIRED error code received on HTTP/2 session. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP_1_1_REQUIRED = -365, - /** - * @error HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy. + /* + * @brief HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PROXY_HTTP_1_1_REQUIRED = -366, - /** - * @error The PAC script terminated fatally and must be reloaded. + /* + * @brief The PAC script terminated fatally and must be reloaded. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PAC_SCRIPT_TERMINATED = -367, - /** - * @error The server was expected to return an HTTP/1.x response, but did not. Rather + /* + * @brief The server was expected to return an HTTP/1.x response, but did not. Rather * than treat it as HTTP/0.9, this error is returned. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_HTTP_RESPONSE = -370, - /** - * @error Initializing content decoding failed. + /* + * @brief Initializing content decoding failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CONTENT_DECODING_INIT_FAILED = -371, - /** - * @error Received HTTP/2 RST_STREAM frame with NO_ERROR error code. This error should + /* + * @brief Received HTTP/2 RST_STREAM frame with NO_ERROR error code. This error should * be handled internally by HTTP/2 code, and should not make it above the * SpdyStream layer. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED = -372, - /** - * @error The pushed stream claimed by the request is no longer available. + /* + * @brief The pushed stream claimed by the request is no longer available. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_PUSHED_STREAM_NOT_AVAILABLE = -373, - /** - * @error A pushed stream was claimed and later reset by the server. When this happens, + /* + * @brief A pushed stream was claimed and later reset by the server. When this happens, * the request should be retried. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER = -374, - /** - * @error An HTTP transaction was retried too many times due for authentication or + /* + * @brief An HTTP transaction was retried too many times due for authentication or * invalid certificates. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TOO_MANY_RETRIES = -375, - /** - * @error Received an HTTP/2 frame on a closed stream. + /* + * @brief Received an HTTP/2 frame on a closed stream. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_STREAM_CLOSED = -376, - /** - * @error Client is refusing an HTTP/2 stream. + /* + * @brief Client is refusing an HTTP/2 stream. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_CLIENT_REFUSED_STREAM = -377, - /** - * @error A pushed HTTP/2 stream was claimed by a request based on matching URL and + /* + * @brief A pushed HTTP/2 stream was claimed by a request based on matching URL and * request headers, but the pushed response headers do not match the request. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH = -378, - /** - * @error The server returned a non-2xx HTTP response code. + /* + * @brief The server returned a non-2xx HTTP response code. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_HTTP_RESPONSE_CODE_FAILURE = -379, - /** - * @error The certificate presented on a QUIC connection does not chain to a known root + /* + * @brief The certificate presented on a QUIC connection does not chain to a known root * and the origin connected to is not on a list of domains where unknown roots * are allowed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_QUIC_UNKNOWN_CERT_ROOT = -380, - /** - * @error A GOAWAY frame has been received indicating that the request has not been + /* + * @brief A GOAWAY frame has been received indicating that the request has not been * processed and is therefore safe to retry on a different connection. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED = -381, - /** - * @error The ACCEPT_CH restart has been triggered too many times. + /* + * @brief The ACCEPT_CH restart has been triggered too many times. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TOO_MANY_ACCEPT_CH_RESTARTS = -382, - /** - * @error The IP address space of the remote endpoint differed from the previous + /* + * @brief The IP address space of the remote endpoint differed from the previous * observed value during the same request. Any cache entry for the affected * request should be invalidated. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INCONSISTENT_IP_ADDRESS_SPACE = -383, - /** - * @error The IP address space of the cached remote endpoint is blocked by local + /* + * @brief The IP address space of the cached remote endpoint is blocked by local * network access check. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_LOCAL_NETWORK_ACCESS_POLICY = -384, - /** - * @error The cache does not have the requested entry. + /* + * @brief The cache does not have the requested entry. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_MISS = -400, - /** - * @error Unable to read from the disk cache. + /* + * @brief Unable to read from the disk cache. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_READ_FAILURE = -401, - /** - * @error Unable to write to the disk cache. + /* + * @brief Unable to write to the disk cache. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_WRITE_FAILURE = -402, - /** - * @error The operation is not supported for this entry. + /* + * @brief The operation is not supported for this entry. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_OPERATION_UNSUPPORTED = -403, - /** - * @error The disk cache is unable to open this entry. + /* + * @brief The disk cache is unable to open this entry. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_OPEN_FAILURE = -404, - /** - * @error The disk cache is unable to create this entry. + /* + * @brief The disk cache is unable to create this entry. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_CREATE_FAILURE = -405, - /** - * @error Multiple transactions are racing to create disk cache entries. + /* + * @brief Multiple transactions are racing to create disk cache entries. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_RACE = -406, - /** - * @error The cache was unable to read a checksum record on an entry. + /* + * @brief The cache was unable to read a checksum record on an entry. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_CHECKSUM_READ_FAILURE = -407, - /** - * @error The cache found an entry with an invalid checksum. + /* + * @brief The cache found an entry with an invalid checksum. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_CHECKSUM_MISMATCH = -408, - /** - * @error Internal error code for the HTTP cache. + /* + * @brief Internal error code for the HTTP cache. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_LOCK_TIMEOUT = -409, - /** - * @error Received a challenge after the transaction has read some data, and the + /* + * @brief Received a challenge after the transaction has read some data, and the * credentials aren't available. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_AUTH_FAILURE_AFTER_READ = -410, - /** - * @error Internal not-quite error code for the HTTP cache. + /* + * @brief Internal not-quite error code for the HTTP cache. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_ENTRY_NOT_SUITABLE = -411, - /** - * @error The disk cache is unable to doom this entry. + /* + * @brief The disk cache is unable to doom this entry. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_DOOM_FAILURE = -412, - /** - * @error The disk cache is unable to open or create this entry. + /* + * @brief The disk cache is unable to open or create this entry. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CACHE_OPEN_OR_CREATE_FAILURE = -413, - /** - * @error The server's response was insecure (e.g. there was a cert error). + /* + * @brief The server's response was insecure (e.g. there was a cert error). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INSECURE_RESPONSE = -501, - /** - * @error An attempt to import a client certificate failed, as the user's key + /* + * @brief An attempt to import a client certificate failed, as the user's key * database lacked a corresponding private key. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_NO_PRIVATE_KEY_FOR_CERT = -502, - /** - * @error An error adding a certificate to the OS certificate database. + /* + * @brief An error adding a certificate to the OS certificate database. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_ADD_USER_CERT_FAILED = -503, - /** - * @error An error occurred while handling a signed exchange. + /* + * @brief An error occurred while handling a signed exchange. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_SIGNED_EXCHANGE = -504, - /** - * @error An error occurred while handling a Web Bundle source. + /* + * @brief An error occurred while handling a Web Bundle source. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_INVALID_WEB_BUNDLE = -505, - /** - * @error A Trust Tokens protocol operation-executing request failed for one of a + /* + * @brief A Trust Tokens protocol operation-executing request failed for one of a * number of reasons (precondition failure, internal error, bad response). + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TRUST_TOKEN_OPERATION_FAILED = -506, - /** - * @error When handling a Trust Tokens protocol operation-executing request, the system + /* + * @brief When handling a Trust Tokens protocol operation-executing request, the system * was able to execute the request's Trust Tokens operation without sending the * request to its destination. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST = -507, - /** - * @error A generic error for failed FTP control connection command. + /* + * @brief A generic error for failed FTP control connection command. * If possible, please use or add a more specific error code. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FTP_FAILED = -601, - /** - * @error The server cannot fulfill the request at this point. This is a temporary error. + /* + * @brief The server cannot fulfill the request at this point. This is a temporary error. * FTP response code 421. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FTP_SERVICE_UNAVAILABLE = -602, - /** - * @error The server has aborted the transfer. + /* + * @brief The server has aborted the transfer. * FTP response code 426. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FTP_TRANSFER_ABORTED = -603, - /** - * @error The file is busy, or some other temporary error condition on opening the file. + /* + * @brief The file is busy, or some other temporary error condition on opening the file. * FTP response code 450. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FTP_FILE_BUSY = -604, - /** - * @error Server rejected our command because of syntax errors. + /* + * @brief Server rejected our command because of syntax errors. * FTP response codes 500, 501. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FTP_SYNTAX_ERROR = -605, - /** - * @error Server does not support the command we issued. + /* + * @brief Server does not support the command we issued. * FTP response codes 502, 504. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FTP_COMMAND_UNSUPPORTED = -606, - /** - * @error Server rejected our command because we didn't issue the commands in right order. + /* + * @brief Server rejected our command because we didn't issue the commands in right order. * FTP response code 503. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_FTP_BAD_COMMAND_SEQUENCE = -607, - /** - * @error PKCS #12 import failed due to incorrect password. + /* + * @brief PKCS #12 import failed due to incorrect password. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PKCS12_IMPORT_BAD_PASSWORD = -701, - /** - * @error PKCS #12 import failed due to other error. + /* + * @brief PKCS #12 import failed due to other error. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PKCS12_IMPORT_FAILED = -702, - /** - * @error CA import failed - not a CA cert. + /* + * @brief CA import failed - not a CA cert. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_IMPORT_CA_CERT_NOT_CA = -703, - /** - * @error Import failed - certificate already exists in database. + /* + * @brief Import failed - certificate already exists in database. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_IMPORT_CERT_ALREADY_EXISTS = -704, - /** - * @error CA import failed due to some other error. + /* + * @brief CA import failed due to some other error. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_IMPORT_CA_CERT_FAILED = -705, - /** - * @error Server certificate import failed due to some internal error. + /* + * @brief Server certificate import failed due to some internal error. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_IMPORT_SERVER_CERT_FAILED = -706, - /** - * @error PKCS #12 import failed due to invalid MAC. + /* + * @brief PKCS #12 import failed due to invalid MAC. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PKCS12_IMPORT_INVALID_MAC = -707, - /** - * @error PKCS #12 import failed due to invalid/corrupt file. + /* + * @brief PKCS #12 import failed due to invalid/corrupt file. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PKCS12_IMPORT_INVALID_FILE = -708, - /** - * @error PKCS #12 import failed due to unsupported features. + /* + * @brief PKCS #12 import failed due to unsupported features. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PKCS12_IMPORT_UNSUPPORTED = -709, - /** - * @error Key generation failed. + /* + * @brief Key generation failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_KEY_GENERATION_FAILED = -710, - /** - * @error Failure to export private key. + /* + * @brief Failure to export private key. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_PRIVATE_KEY_EXPORT_FAILED = -712, - /** - * @error Self-signed certificate generation failed. + /* + * @brief Self-signed certificate generation failed. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_SELF_SIGNED_CERT_GENERATION_FAILED = -713, - /** - * @error The certificate database changed in some way. + /* + * @brief The certificate database changed in some way. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_DATABASE_CHANGED = -714, - /** - * @error The certificate verifier configuration changed in some way. + /* + * @brief The certificate verifier configuration changed in some way. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_CERT_VERIFIER_CHANGED = -716, - /** - * @error DNS resolver received a malformed response. + /* + * @brief DNS resolver received a malformed response. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_MALFORMED_RESPONSE = -800, - /** - * @error DNS server requires TCP. + /* + * @brief DNS server requires TCP. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_SERVER_REQUIRES_TCP = -801, - /** - * @error DNS server failed. This error is returned for all of the following + /* + * @brief DNS server failed. This error is returned for all of the following * error conditions: * 1 - Format error - The name server was unable to interpret the query. * 2 - Server failure - The name server was unable to process this query @@ -1352,50 +2045,77 @@ typedef enum ArkWeb_NetError { * kind of query. * 5 - Refused - The name server refuses to perform the specified * operation for policy reasons. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_SERVER_FAILED = -802, - /** - * @error DNS transaction timed out. + /* + * @brief DNS transaction timed out. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_TIMED_OUT = -803, - /** - * @error The entry was not found in cache or other local sources, for lookups where + /* + * @brief The entry was not found in cache or other local sources, for lookups where * only local sources were queried. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_CACHE_MISS = -804, - /** - * @error Suffix search list rules prevent resolution of the given host name. + /* + * @brief Suffix search list rules prevent resolution of the given host name. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_SEARCH_EMPTY = -805, - /** - * @error Failed to sort addresses according to RFC3484. + /* + * @brief Failed to sort addresses according to RFC3484. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_SORT_ERROR = -806, - /** - * @error Failed to resolve the hostname of a DNS-over-HTTPS server. + /* + * @brief Failed to resolve the hostname of a DNS-over-HTTPS server. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED = -808, - /** - * @error DNS identified the request as disallowed for insecure connection (http/ws). + /* + * @brief DNS identified the request as disallowed for insecure connection (http/ws). * Error should be handled as if an HTTP redirect was received to redirect to * https or wss. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_NAME_HTTPS_ONLY = -809, - /** - * @error All DNS requests associated with this job have been cancelled. + /* + * @brief All DNS requests associated with this job have been cancelled. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_REQUEST_CANCELED = -810, - /** - * @error The hostname resolution of HTTPS record was expected to be resolved with + /* + * @brief The hostname resolution of HTTPS record was expected to be resolved with * alpn values of supported protocols, but did not. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_ERR_DNS_NO_MATCHING_SUPPORTED_ALPN = -811, } ArkWeb_NetError; diff --git a/web/webview/interfaces/native/arkweb_scheme_handler.h b/web/webview/interfaces/native/arkweb_scheme_handler.h index 7750265cf..9de9b94b4 100644 --- a/web/webview/interfaces/native/arkweb_scheme_handler.h +++ b/web/webview/interfaces/native/arkweb_scheme_handler.h @@ -40,7 +40,7 @@ extern "C" { #endif -/** +/* * @brief Configuration information for custom schemes. * * @syscap SystemCapability.Web.Webview.Core @@ -49,133 +49,95 @@ extern "C" { typedef enum ArkWeb_CustomSchemeOption { OH_ARKWEB_SCHEME_OPTION_NONE = 0, - /** If ARKWEB_SCHEME_OPTION_STANDARD is set, the scheme will be handled as a standard scheme. The standard - * schemes need to comply with the URL normalization and parsing rules defined in Section 3.1 of RFC 1738, - * which can be found in the http://www.ietf.org/rfc/rfc1738.txt. + /* + * @brief If ARKWEB_SCHEME_OPTION_STANDARD is set the scheme will be handled as a standard scheme. The standard + * schemes needs to comply with the URL normalization and parsing rules defined in Section 3.1 of RFC 1738, + * which can be found in the http://www.ietf.org/rfc/rfc1738.txt. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_SCHEME_OPTION_STANDARD = 1 << 0, - /** If ARKWEB_SCHEME_OPTION_LOCAL is set, the same security rules as those applied to the "file" URL will be - * used to handle the scheme. + /* + * @brief If ARKWEB_SCHEME_OPTION_LOCAL is set, the same security rules as those applied to the "file" URL will be + * used to handle the scheme. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_SCHEME_OPTION_LOCAL = 1 << 1, - /** If ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED is set, then the scheme can only be displayed from other content - * hosted using the same scheme. + /* + * @brief If ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED is set, then the scheme can only be displayed from other content + * hosted using the same scheme. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED = 1 << 2, - /** If ARKWEB_SCHEME_OPTION_SECURE is set, the same security rules as those applied to the "https" URL will be - * used to handle the scheme. + /* + * @brief If ARKWEB_SCHEME_OPTION_SECURE is set, the same security rules as those applied to the "https" URL will be + * used to handle the scheme. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_SCHEME_OPTION_SECURE = 1 << 3, - /** If ARKWEB_SCHEME_OPTION_CORS_ENABLED is set, then the scheme can be sent CORS requests. In most cases this - * value should be set when ARKWEB_SCHEME_OPTION_STANDARD is set. + /* + * @brief If ARKWEB_SCHEME_OPTION_CORS_ENABLED is set, then the scheme can be sent CORS requests. In most case this + * value should be set when ARKWEB_SCHEME_OPTION_STANDARD is set. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_SCHEME_OPTION_CORS_ENABLED = 1 << 4, - /** If ARKWEB_SCHEME_OPTION_CSP_BYPASSING is set, then this scheme can bypass Content Security Policy (CSP) - * checks. In most cases, this value should not be set when ARKWEB_SCHEME_OPTION_STANDARD is set. + /* + * @brief If ARKWEB_SCHEME_OPTION_CSP_BYPASSING is set, then this scheme can bypass Content Security Policy (CSP) + * checks. In most cases, this value should not be set when ARKWEB_SCHEME_OPTION_STANDARD is set. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 */ ARKWEB_SCHEME_OPTION_CSP_BYPASSING = 1 << 5, - /** If ARKWEB_SCHEME_OPTION_FETCH_ENABLED is set, then this scheme can perform FETCH API requests. */ + /* + * @brief If ARKWEB_SCHEME_OPTION_FETCH_ENABLED is set, then this scheme can perform FETCH API requests. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 + */ ARKWEB_SCHEME_OPTION_FETCH_ENABLED = 1 << 6, - /** If ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED is set, then the js of this scheme can generate code cache. */ + /* + * @brief If ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED is set, then the js of this scheme can generate code cache. + * + * @syscap SystemCapability.Web.Webview.Core + * @since 12 + */ ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED = 1 << 7, } ArkWeb_CustomSchemeOption; -/** - * @brief Resource type for a request. - * - * These constants match their equivalents in Chromium's ResourceType and should not be renumbered.\n - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 - */ -typedef enum ArkWeb_ResourceType { - /** Top level page. */ - MAIN_FRAME = 0, - - /** Frame or Iframe. */ - SUB_FRAME = 1, - - /** CSS stylesheet. */ - STYLE_SHEET = 2, - - /** External script. */ - SCRIPT = 3, - - /** Image(jpg/gif/png/etc). */ - IMAGE = 4, - - /** Font. */ - FONT_RESOURCE = 5, - - /** Some other subresource. This is the default type if the actual type is unknown. */ - SUB_RESOURCE = 6, - - /** Object (or embed) tag for a plugin, or a resource that a plugin requested. */ - OBJECT = 7, - - /** Media resource. */ - MEDIA = 8, - - /** Main resource of a dedicated worker. */ - WORKER = 9, - - /** Main resource of a shared worker. */ - SHARED_WORKER = 10, - - /** Explicitly requested prefetch. */ - PREFETCH = 11, - - /** Favicon. */ - FAVICON = 12, - - /** XMLHttpRequest. */ - XHR = 13, - - /** Ping request for /sendBeacon. */ - PING = 14, - - /** The main resource of a service worker. */ - SERVICE_WORKER = 15, - - /** Report of Content Security Policy violations. */ - CSP_REPORT = 16, - - /** Resource that a plugin requested. */ - PLUGIN_RESOURCE = 17, - - /** A main-frame service worker navigation preload request. */ - NAVIGATION_PRELOAD_MAIN_FRAME = 19, - - /** A sub-frame service worker navigation preload request. */ - NAVIGATION_PRELOAD_SUB_FRAME = 20, -} ArkWeb_ResourceType; - -/** - * @brief This class is used to intercept requests for a specified scheme. +/* + * @brief This class is used to intercept requests for a specified scheme. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ typedef struct ArkWeb_SchemeHandler_ ArkWeb_SchemeHandler; -/** - * @brief Used to intercept url requests. - * - * Response headers and body can be sent through ArkWeb_ResourceHandler.\n +/* + * @brief Used to intercept url requests. Response headers and body can be sent through ArkWeb_ResourceHandler. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ typedef struct ArkWeb_ResourceHandler_ ArkWeb_ResourceHandler; -/** +/* * @brief The response of the intercepted request. * * @syscap SystemCapability.Web.Webview.Core @@ -183,17 +145,16 @@ typedef struct ArkWeb_ResourceHandler_ ArkWeb_ResourceHandler; */ typedef struct ArkWeb_Response_ ArkWeb_Response; -/** - * @brief The info of the request. - * - * You can obtain the requested URL, method, post data, and other information through OH_ArkWeb_ResourceRequest.\n +/* + * @brief The info of the request. You can obtain the requested URL, method, post data, and other information through + * OH_ArkWeb_ResourceRequest. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ typedef struct ArkWeb_ResourceRequest_ ArkWeb_ResourceRequest; -/** +/* * @brief The request headers of the request. * * @syscap SystemCapability.Web.Webview.Core @@ -201,10 +162,8 @@ typedef struct ArkWeb_ResourceRequest_ ArkWeb_ResourceRequest; */ typedef struct ArkWeb_RequestHeaderList_ ArkWeb_RequestHeaderList; -/** - * @brief The http body of the request. - * - * Use OH_ArkWebHttpBodyStream_* interface to read the body.\n +/* + * @brief The http body of the request. Use OH_ArkWebHttpBodyStream_* interface to read the body. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -212,11 +171,9 @@ typedef struct ArkWeb_RequestHeaderList_ ArkWeb_RequestHeaderList; typedef struct ArkWeb_HttpBodyStream_ ArkWeb_HttpBodyStream; -/** - * @brief Callback for handling the request. - * - * This will be called on the IO thread.\n - * +/* + * @brief Callback for handling the request. This will called on the IO thread. should not use resourceHandler in the + * function. * @param schemeHandler The ArkWeb_SchemeHandler. * @param resourceRequest Obtain request's information through this. * @param resourceHandler The ArkWeb_ResourceHandler for the request. It should not be used if intercept is set to @@ -231,13 +188,10 @@ typedef void (*ArkWeb_OnRequestStart)(const ArkWeb_SchemeHandler* schemeHandler, const ArkWeb_ResourceHandler* resourceHandler, bool* intercept); -/** - * @brief Callback when the request is completed. - * - * This will be called on the IO thread.\n - * Should destory the resourceRequest by ArkWeb_ResourceRequest_Destroy and use ArkWeb_ResourceHandler_Destroy\n - * destroy the ArkWeb_ResourceHandler received in ArkWeb_OnRequestStart.\n - * +/* + * @brief Callback when the request is completed. This will called on the IO thread. + * Should destory the resourceRequest by ArkWeb_ResourceRequest_Destroy and use ArkWeb_ResourceHandler_Destroy + * destroy the ArkWeb_ResourceHandler received in ArkWeb_OnRequestStart. * @param schemeHandler The ArkWeb_SchemeHandler. * @param resourceRequest The ArkWeb_ResourceRequest. * @@ -247,7 +201,7 @@ typedef void (*ArkWeb_OnRequestStart)(const ArkWeb_SchemeHandler* schemeHandler, typedef void (*ArkWeb_OnRequestStop)(const ArkWeb_SchemeHandler* schemeHandler, const ArkWeb_ResourceRequest* resourceRequest); -/** +/* * @brief Callback when the read operation done. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param buffer The buffer to receive data. @@ -262,17 +216,17 @@ typedef void (*ArkWeb_HttpBodyStreamReadCallback)(const ArkWeb_HttpBodyStream* h uint8_t* buffer, int bytesRead); -/** +/* * @brief Callback when the init operation done. * @param httpBodyStream The ArkWeb_HttpBodyStream. - * @param result {@link ARKWEB_NET_OK} on success otherwise refer to arkweb_net_error_list.h. + * @param result ARKWEB_NET_OK on success otherwise refer to ARKWEB_NET_ERROR. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ typedef void (*ArkWeb_HttpBodyStreamInitCallback)(const ArkWeb_HttpBodyStream* httpBodyStream, ArkWeb_NetError result); -/** +/* * @brief Destroy the ArkWeb_RequestHeaderList. * @param requestHeaderList The ArkWeb_RequestHeaderList to be destroyed. * @@ -281,7 +235,7 @@ typedef void (*ArkWeb_HttpBodyStreamInitCallback)(const ArkWeb_HttpBodyStream* h */ void OH_ArkWebRequestHeaderList_Destroy(ArkWeb_RequestHeaderList* requestHeaderList); -/** +/* * @brief Get the request headers size. * @param requestHeaderList The list of request header. * @return The size of request headers. -1 if requestHeaderList is invalid. @@ -291,7 +245,7 @@ void OH_ArkWebRequestHeaderList_Destroy(ArkWeb_RequestHeaderList* requestHeaderL */ int32_t OH_ArkWebRequestHeaderList_GetSize(const ArkWeb_RequestHeaderList* requestHeaderList); -/** +/* * @brief Get the specified request header. * @param requestHeaderList The list of request header. * @param index The index of request header. @@ -306,19 +260,18 @@ void OH_ArkWebRequestHeaderList_GetHeader(const ArkWeb_RequestHeaderList* reques char** key, char** value); -/** +/* * @brief Set a user data to ArkWeb_ResourceRequest. * @param resourceRequest The ArkWeb_ResourceRequest. * @param userData The user data to set. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResourceRequest_SetUserData(ArkWeb_ResourceRequest* resourceRequest, void* userData); -/** +/* * @brief Get the user data from ArkWeb_ResourceRequest. * @param resourceRequest The ArkWeb_ResourceRequest. * @return The set user data. @@ -328,7 +281,7 @@ int32_t OH_ArkWebResourceRequest_SetUserData(ArkWeb_ResourceRequest* resourceReq */ void* OH_ArkWebResourceRequest_GetUserData(const ArkWeb_ResourceRequest* resourceRequest); -/** +/* * @brief Get the method of request. * @param resourceRequest The ArkWeb_ResourceRequest. * @param method The request's http method. This function will allocate memory for the method string and caller must @@ -339,7 +292,7 @@ void* OH_ArkWebResourceRequest_GetUserData(const ArkWeb_ResourceRequest* resourc */ void OH_ArkWebResourceRequest_GetMethod(const ArkWeb_ResourceRequest* resourceRequest, char** method); -/** +/* * @brief Get the url of request. * @param resourceRequest The ArkWeb_ResourceRequest. * @param url The request's url. This function will allocate memory for the url string and caller must release the @@ -350,7 +303,7 @@ void OH_ArkWebResourceRequest_GetMethod(const ArkWeb_ResourceRequest* resourceRe */ void OH_ArkWebResourceRequest_GetUrl(const ArkWeb_ResourceRequest* resourceRequest, char** url); -/** +/* * @brief Create a ArkWeb_HttpBodyStream which used to read the http body. * @param resourceRequest The ArkWeb_ResourceRequest. * @param httpBodyStream The request's http body. This function will allocate memory for the http body stream and @@ -362,7 +315,7 @@ void OH_ArkWebResourceRequest_GetUrl(const ArkWeb_ResourceRequest* resourceReque void OH_ArkWebResourceRequest_GetHttpBodyStream(const ArkWeb_ResourceRequest* resourceRequest, ArkWeb_HttpBodyStream** httpBodyStream); -/** +/* * @brief Destroy the http body stream. * @param httpBodyStream The httpBodyStream to be destroyed. * @@ -371,40 +324,18 @@ void OH_ArkWebResourceRequest_GetHttpBodyStream(const ArkWeb_ResourceRequest* re */ void OH_ArkWebResourceRequest_DestroyHttpBodyStream(ArkWeb_HttpBodyStream* httpBodyStream); -/** - * @brief Get the resource type of request. - * @param resourceRequest The ArkWeb_ResourceRequest. - * @return The resource type of request. -1 if resourceRequest is invalid. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 - */ -int32_t OH_ArkWebResourceRequest_GetResourceType(const ArkWeb_ResourceRequest* resourceRequest); - -/** - * @brief Get the url of frame which trigger this request. - * @param resourceRequest The ArkWeb_ResourceRequest. - * @param frameUrl The url of frame which trigger this request. This function will allocate memory for the url string - * and caller must release the string by OH_ArkWeb_ReleaseString. - * - * @syscap SystemCapability.Web.Webview.Core - * @since 12 - */ -void OH_ArkWebResourceRequest_GetFrameUrl(const ArkWeb_ResourceRequest* resourceRequest, char** frameUrl); - -/** +/* * @brief Set a user data to ArkWeb_HttpBodyStream. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param userData The user data to set. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebHttpBodyStream_SetUserData(ArkWeb_HttpBodyStream* httpBodyStream, void* userData); -/** +/* * @brief Get the user data from ArkWeb_HttpBodyStream. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return The set user data. @@ -414,16 +345,13 @@ int32_t OH_ArkWebHttpBodyStream_SetUserData(ArkWeb_HttpBodyStream* httpBodyStrea */ void* OH_ArkWebHttpBodyStream_GetUserData(const ArkWeb_HttpBodyStream* httpBodyStream); -/** - * @brief Set the callback for OH_ArkWebHttpBodyStream_Read. - * - * The result of OH_ArkWebHttpBodyStream_Read will be notified to caller through the readCallback.\n - * The callback will run in the same thread as OH_ArkWebHttpBodyStream_Read.\n - * +/* + * @brief Set the callback for OH_ArkWebHttpBodyStream_Read, the result of OH_ArkWebHttpBodyStream_Read will be + * notified to caller through the readCallback. The callback will runs in the same thread as + * OH_ArkWebHttpBodyStream_Read. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param readCallback The callback of read function. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -431,15 +359,11 @@ void* OH_ArkWebHttpBodyStream_GetUserData(const ArkWeb_HttpBodyStream* httpBodyS int32_t OH_ArkWebHttpBodyStream_SetReadCallback(ArkWeb_HttpBodyStream* httpBodyStream, ArkWeb_HttpBodyStreamReadCallback readCallback); -/** - * @brief Init the http body stream. - * - * This function must be called before calling any other functions.\n - * +/* + * @brief Init the http body stream. This function must be called before calling any other functions. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param initCallback The callback of init. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -447,12 +371,10 @@ int32_t OH_ArkWebHttpBodyStream_SetReadCallback(ArkWeb_HttpBodyStream* httpBodyS int32_t OH_ArkWebHttpBodyStream_Init(ArkWeb_HttpBodyStream* httpBodyStream, ArkWeb_HttpBodyStreamInitCallback initCallback); -/** - * @brief Read the http body to the buffer. - * - * The buffer must be larger than the bufLen. We will be reading data from a worker thread to the buffer,\n - * so should not use the buffer in other threads before the callback to avoid concurrency issues.\n - * +/* + * @brief Read the http body to the buffer. The buffer must be larger than the bufLen. We will be reading data from a + * worker thread to the buffer, so should not use the buffer in other threads before the callback to avoid + * concurrency issues. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @param buffer The buffer to receive data. * @param bufLen The size of bytes to read. @@ -462,11 +384,9 @@ int32_t OH_ArkWebHttpBodyStream_Init(ArkWeb_HttpBodyStream* httpBodyStream, */ void OH_ArkWebHttpBodyStream_Read(const ArkWeb_HttpBodyStream* httpBodyStream, uint8_t* buffer, int bufLen); -/** +/* * @brief Get the total size of the data stream. - * - * When data is chunked or httpBodyStream is invalid, always return zero.\n - * + * When data is chunked or httpBodyStream is invalid, always return zero. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return The size of data stream. * @@ -475,7 +395,7 @@ void OH_ArkWebHttpBodyStream_Read(const ArkWeb_HttpBodyStream* httpBodyStream, u */ uint64_t OH_ArkWebHttpBodyStream_GetSize(const ArkWeb_HttpBodyStream* httpBodyStream); -/** +/* * @brief Get the current position of the data stream. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return The current position of data stream. 0 if httpBodyStream is invalid. @@ -485,7 +405,7 @@ uint64_t OH_ArkWebHttpBodyStream_GetSize(const ArkWeb_HttpBodyStream* httpBodySt */ uint64_t OH_ArkWebHttpBodyStream_GetPosition(const ArkWeb_HttpBodyStream* httpBodyStream); -/** +/* * @brief Get if the data stream is chunked. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return True if is chunked; false otherwise. @@ -496,11 +416,9 @@ uint64_t OH_ArkWebHttpBodyStream_GetPosition(const ArkWeb_HttpBodyStream* httpBo bool OH_ArkWebHttpBodyStream_IsChunked(const ArkWeb_HttpBodyStream* httpBodyStream); -/** - * @brief Returns true if all data has been consumed from this upload data stream. - * - * For chunked uploads, returns false until the first read attempt.\n - * +/* + * @brief Returns true if all data has been consumed from this upload data stream. For chunked uploads, returns false + * until the first read attempt. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return True if all data has been consumed; false otherwise. * @@ -509,12 +427,9 @@ bool OH_ArkWebHttpBodyStream_IsChunked(const ArkWeb_HttpBodyStream* httpBodyStre */ bool OH_ArkWebHttpBodyStream_IsEof(const ArkWeb_HttpBodyStream* httpBodyStream); -/** - * @brief Returns true if the upload data in the stream is entirely in memory, - * and all read requests will succeed synchronously. - * - * Expected to return false for chunked requests.\n - * +/* + * @brief Returns true if the upload data in the stream is entirely in memory, and all read requests will succeed + * synchronously. Expected to return false for chunked requests. * @param httpBodyStream The ArkWeb_HttpBodyStream. * @return True if the upload data is in memory; false otherwise. * @@ -523,18 +438,17 @@ bool OH_ArkWebHttpBodyStream_IsEof(const ArkWeb_HttpBodyStream* httpBodyStream); */ bool OH_ArkWebHttpBodyStream_IsInMemory(const ArkWeb_HttpBodyStream* httpBodyStream); -/** +/* * @brief Destroy the ArkWeb_ResourceRequest. * @param resourceRequest The ArkWeb_ResourceRequest. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResourceRequest_Destroy(const ArkWeb_ResourceRequest* resourceRequest); -/** +/* * @brief Get the referrer of request. * @param resourceRequest The ArkWeb_ResourceRequest. * @param referrer The request's referrer. This function will allocate memory for the post data string and caller @@ -545,7 +459,7 @@ int32_t OH_ArkWebResourceRequest_Destroy(const ArkWeb_ResourceRequest* resourceR */ void OH_ArkWebResourceRequest_GetReferrer(const ArkWeb_ResourceRequest* resourceRequest, char** referrer); -/** +/* * @brief Get the OH_ArkWeb_RequestHeaderList of the request. * @param resourceRequest The ArkWeb_ResourceRequest. * @param requestHeaderList The RequestHeaderList of request. @@ -556,7 +470,7 @@ void OH_ArkWebResourceRequest_GetReferrer(const ArkWeb_ResourceRequest* resource void OH_ArkWebResourceRequest_GetRequestHeaders(const ArkWeb_ResourceRequest* resourceRequest, ArkWeb_RequestHeaderList** requestHeaderList); -/** +/* * @brief Get if this is a redirect request. * @param resourceRequest The ArkWeb_ResourceRequest. * @return True if this is a redirect; false otherwise. @@ -566,7 +480,7 @@ void OH_ArkWebResourceRequest_GetRequestHeaders(const ArkWeb_ResourceRequest* re */ bool OH_ArkWebResourceRequest_IsRedirect(const ArkWeb_ResourceRequest* resourceRequest); -/** +/* * @brief Get if this is a request from main frame. * @param resourceRequest The ArkWeb_ResourceRequest. * @return True if this is from main frame; false otherwise. @@ -576,7 +490,7 @@ bool OH_ArkWebResourceRequest_IsRedirect(const ArkWeb_ResourceRequest* resourceR */ bool OH_ArkWebResourceRequest_IsMainFrame(const ArkWeb_ResourceRequest* resourceRequest); -/** +/* * @brief Get if this is a request is triggered by user gesutre. * @param resourceRequest The ArkWeb_ResourceRequest. * @return True if this is triggered by user gesture; false otherwise. @@ -586,30 +500,22 @@ bool OH_ArkWebResourceRequest_IsMainFrame(const ArkWeb_ResourceRequest* resource */ bool OH_ArkWebResourceRequest_HasGesture(const ArkWeb_ResourceRequest* resourceRequest); -/** - * @brief Register custom scheme to the ArkWeb. - * - * Should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.\n - * This function should be called on main thread.\n - * +/* + * @brief Register custom scheme to the ArkWeb. Should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT and + * DATA schemes. This function should be called on main thread. * @param scheme The scheme to regist. * @param option The configuration of the scheme. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_ERROR_UNKNOWN} 17100100 - Unknown error. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. - * {@link ARKWEB_SCHEME_REGISTER_FAILED} 17100102 - Register custom schemes should be called - * before create any ArkWeb. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWeb_RegisterCustomSchemes(const char* scheme, int32_t option); -/** +/* * @brief Set a ArkWeb_SchemeHandler for a specific scheme to intercept requests of that scheme type. - * - * SchemeHandler should be set after the BrowserContext created.\n - * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.\n + * SchemeHandler should be set after the BrowserContext created. + * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb. * * @param scheme Scheme that need to be intercepted. * @param schemeHandler The SchemeHandler for the scheme. Only requests triggered by ServiceWorker will be notified @@ -621,11 +527,10 @@ int32_t OH_ArkWeb_RegisterCustomSchemes(const char* scheme, int32_t option); */ bool OH_ArkWebServiceWorker_SetSchemeHandler(const char* scheme, ArkWeb_SchemeHandler* schemeHandler); -/** +/* * @brief Set a ArkWeb_SchemeHandler for a specific scheme to intercept requests of that scheme type. - * - * SchemeHandler should be set after the BrowserContext created.\n - * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.\n + * SchemeHandler should be set after the BrowserContext created. + * Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb. * * @param scheme Scheme that need to be intercepted. * @param webTag The name of the web component. @@ -638,27 +543,26 @@ bool OH_ArkWebServiceWorker_SetSchemeHandler(const char* scheme, ArkWeb_SchemeHa */ bool OH_ArkWeb_SetSchemeHandler(const char* scheme, const char* webTag, ArkWeb_SchemeHandler* schemeHandler); -/** +/* * @brief Clear the handler registered on the specified web for service worker. - * @return {@link ARKWEB_NET_OK} 0 - Success. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebServiceWorker_ClearSchemeHandlers(); -/** +/* * @brief Clear the handler registered on the specified web. * @param webTag The name of the web component. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWeb_ClearSchemeHandlers(const char* webTag); -/** +/* * @brief Create a SchemeHandler. * @param schemeHandler Return the created SchemeHandler. Use OH_ArkWeb_DestroySchemeHandler destroy it when donn't * need it. @@ -668,7 +572,7 @@ int32_t OH_ArkWeb_ClearSchemeHandlers(const char* webTag); */ void OH_ArkWeb_CreateSchemeHandler(ArkWeb_SchemeHandler** schemeHandler); -/** +/* * @brief Destroy a SchemeHandler. * @param The ArkWeb_SchemeHandler to be destroy. * @@ -677,19 +581,18 @@ void OH_ArkWeb_CreateSchemeHandler(ArkWeb_SchemeHandler** schemeHandler); */ void OH_ArkWeb_DestroySchemeHandler(ArkWeb_SchemeHandler* schemeHandler); -/** +/* * @brief Set a user data to ArkWeb_SchemeHandler. * @param schemeHandler The ArkWeb_SchemeHandler. * @param userData The user data to set. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebSchemeHandler_SetUserData(ArkWeb_SchemeHandler* schemeHandler, void* userData); -/** +/* * @brief Get the user data from ArkWeb_SchemeHandler. * @param schemeHandler The ArkWeb_SchemeHandler. * @return The set user data. @@ -699,12 +602,11 @@ int32_t OH_ArkWebSchemeHandler_SetUserData(ArkWeb_SchemeHandler* schemeHandler, */ void* OH_ArkWebSchemeHandler_GetUserData(const ArkWeb_SchemeHandler* schemeHandler); -/** +/* * @brief Set the OnRequestStart callback for SchemeHandler. * @param schemeHandler The SchemeHandler for the scheme. * @param onRequestStart The OnRequestStart callback. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -712,12 +614,11 @@ void* OH_ArkWebSchemeHandler_GetUserData(const ArkWeb_SchemeHandler* schemeHandl int32_t OH_ArkWebSchemeHandler_SetOnRequestStart(ArkWeb_SchemeHandler* schemeHandler, ArkWeb_OnRequestStart onRequestStart); -/** +/* * @brief Set the OnRequestStop callback for SchemeHandler. * @param schemeHandler The SchemeHandler for the scheme. * @param onRequestStop The OnRequestStop callback. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -725,16 +626,16 @@ int32_t OH_ArkWebSchemeHandler_SetOnRequestStart(ArkWeb_SchemeHandler* schemeHan int32_t OH_ArkWebSchemeHandler_SetOnRequestStop(ArkWeb_SchemeHandler* schemeHandler, ArkWeb_OnRequestStop onRequestStop); -/** +/* * @brief Create a Response for a request. - * @param response The created Response. Use OH_ArkWeb_DestroyResponse to destroy when donn't need it. + * @param Return the created Response. Use OH_ArkWeb_DestroyResponse to destroy when donn't need it. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ void OH_ArkWeb_CreateResponse(ArkWeb_Response** response); -/** +/* * @brief Destroy the Reponse. * @param response The Response needs destroy. * @@ -743,19 +644,18 @@ void OH_ArkWeb_CreateResponse(ArkWeb_Response** response); */ void OH_ArkWeb_DestroyResponse(ArkWeb_Response* response); -/** +/* * @brief Set the resolved URL after redirects or changed as a result of HSTS. * @param response The ArkWeb_Response. * @param url The resolved URL. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetUrl(ArkWeb_Response* response, const char* url); -/** +/* * @brief Get the resolved URL after redirects or changed as a result of HSTS. * @param response The ArkWeb_Response. * @param url The resolved URL. @@ -765,19 +665,18 @@ int32_t OH_ArkWebResponse_SetUrl(ArkWeb_Response* response, const char* url); */ void OH_ArkWebResponse_GetUrl(const ArkWeb_Response* response, char** url); -/** +/* * @brief Set a error code to ArkWeb_Response. * @param response The ArkWeb_Response. * @param errorCode The error code for the failed request. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetError(ArkWeb_Response* response, ArkWeb_NetError errorCode); -/** +/* * @brief Get the response's error code. * @param response The ArkWeb_Response. * @return The response's error code. @@ -787,19 +686,18 @@ int32_t OH_ArkWebResponse_SetError(ArkWeb_Response* response, ArkWeb_NetError er */ ArkWeb_NetError OH_ArkWebResponse_GetError(const ArkWeb_Response* response); -/** +/* * @brief Set a status code to ArkWebResponse. * @param response The ArkWeb_Response. * @param status The http status code for the request. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetStatus(ArkWeb_Response* response, int status); -/** +/* * @brief Get the response's status code. * @param response The ArkWeb_Response. * @return The response's http status code. -1 if response is invalid. @@ -809,19 +707,18 @@ int32_t OH_ArkWebResponse_SetStatus(ArkWeb_Response* response, int status); */ int OH_ArkWebResponse_GetStatus(const ArkWeb_Response* response); -/** +/* * @brief Set a status text to ArkWebResponse. * @param response The ArkWeb_Response. * @param statusText The status text for the request. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetStatusText(ArkWeb_Response* response, const char* statusText); -/** +/* * @brief Get the response's status text. * @param response The ArkWeb_Response. * @param statusText Return the response's statusText. This function will allocate memory for the statusText string and @@ -832,19 +729,18 @@ int32_t OH_ArkWebResponse_SetStatusText(ArkWeb_Response* response, const char* s */ void OH_ArkWebResponse_GetStatusText(const ArkWeb_Response* response, char** statusText); -/** +/* * @brief Set mime type to ArkWebResponse. * @param response The ArkWeb_Response. * @param mimeType The mime type for the request. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetMimeType(ArkWeb_Response* response, const char* mimeType); -/** +/* * @brief Get the response's mime type. * @param response The ArkWeb_Response. * @param mimeType Return the response's mime type. This function will allocate memory for the mime type string and @@ -855,19 +751,18 @@ int32_t OH_ArkWebResponse_SetMimeType(ArkWeb_Response* response, const char* mim */ void OH_ArkWebResponse_GetMimeType(const ArkWeb_Response* response, char** mimeType); -/** +/* * @brief Set charset to ArkWeb_Response. * @param response The ArkWeb_Response. * @param charset The charset for the request. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResponse_SetCharset(ArkWeb_Response* response, const char* charset); -/** +/* * @brief Get the response's charset. * @param response The ArkWeb_Response. * @param charset Return the response's charset. This function will allocate memory for the charset string and caller @@ -878,14 +773,13 @@ int32_t OH_ArkWebResponse_SetCharset(ArkWeb_Response* response, const char* char */ void OH_ArkWebResponse_GetCharset(const ArkWeb_Response* response, char** charset); -/** +/* * @brief Set a header to ArkWeb_Response. * @param response The ArkWeb_Response. * @param name The name of the header. * @param value The value of the header. - * @param overwirte If true will overwrite the exsits header, if false otherwise. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @bool overwirte If true will overwrite the exsits header, if false otherwise. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -895,7 +789,7 @@ int32_t OH_ArkWebResponse_SetHeaderByName(ArkWeb_Response* response, const char* value, bool overwrite); -/** +/* * @brief Get the header from the response. * @param response The ArkWeb_Response. * @param name The name of the header. @@ -907,23 +801,21 @@ int32_t OH_ArkWebResponse_SetHeaderByName(ArkWeb_Response* response, */ void OH_ArkWebResponse_GetHeaderByName(const ArkWeb_Response* response, const char* name, char** value); -/** +/* * @brief Destroy the ArkWeb_ResourceHandler. * @param resourceHandler The ArkWeb_ResourceHandler. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResourceHandler_Destroy(const ArkWeb_ResourceHandler* resourceHandler); -/** +/* * @brief Pass response headers to intercepted requests. * @param resourceHandler The ArkWeb_ResourceHandler for the request. * @param response The ArkWeb_Response for the intercepting requests. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -931,13 +823,12 @@ int32_t OH_ArkWebResourceHandler_Destroy(const ArkWeb_ResourceHandler* resourceH int32_t OH_ArkWebResourceHandler_DidReceiveResponse(const ArkWeb_ResourceHandler* resourceHandler, const ArkWeb_Response* response); -/** +/* * @brief Pass response body data to intercepted requests. * @param resourceHandler The ArkWeb_ResourceHandler for the request. * @param buffer Buffer data to send. * @param bufLen The size of buffer. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -946,23 +837,21 @@ int32_t OH_ArkWebResourceHandler_DidReceiveData(const ArkWeb_ResourceHandler* re const uint8_t* buffer, int64_t bufLen); -/** +/* * @brief Notify the ArkWeb that this request should be finished and there is no more data available. * @param resourceHandler The ArkWeb_ResourceHandler for the request. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 */ int32_t OH_ArkWebResourceHandler_DidFinish(const ArkWeb_ResourceHandler* resourceHandler); -/** +/* * @brief Notify the ArkWeb that this request should be failed. * @param resourceHandler The ArkWeb_ResourceHandler for the request. - * @param errorCode The error code for this request. Refer to arkweb_net_error_list.h. - * @return {@link ARKWEB_NET_OK} 0 - Success. - * {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param. + * @param errorCode The error code for this request. refer to arkweb_net_error_list.h + * @return 0 if success; otherwise if fail. refer to arkweb_error_code.h. * * @syscap SystemCapability.Web.Webview.Core * @since 12 @@ -970,7 +859,7 @@ int32_t OH_ArkWebResourceHandler_DidFinish(const ArkWeb_ResourceHandler* resourc int32_t OH_ArkWebResourceHandler_DidFailWithError(const ArkWeb_ResourceHandler* resourceHandler, ArkWeb_NetError errorCode); -/** +/* * @brief Release the string acquired by native function. * @param string The string to be released. * @@ -979,7 +868,7 @@ int32_t OH_ArkWebResourceHandler_DidFailWithError(const ArkWeb_ResourceHandler* */ void OH_ArkWeb_ReleaseString(char* string); -/** +/* * @brief Release the byte array acquired by native function. * @param byteArray The byte array to be released. * -- Gitee