Skip to main content

OH_ArkWeb_RegisterCustomSchemes

Function OH_ArkWeb_RegisterCustomSchemes 

Source
pub unsafe extern "C" fn OH_ArkWeb_RegisterCustomSchemes(
    scheme: *const c_char,
    option: i32,
) -> i32
Expand description

@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 {@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