1#![allow(non_snake_case)]
4#![allow(non_upper_case_globals)]
5#![allow(non_camel_case_types)]
6#![allow(clippy::missing_safety_doc)]
7
8#[link(name = "ohweb")]
9unsafe extern "C" {}
10
11#[doc = " @error Success."]
12pub const ArkWeb_ErrorCode_ARKWEB_SUCCESS: ArkWeb_ErrorCode = 0;
13#[doc = " @error Init error."]
14pub const ArkWeb_ErrorCode_ARKWEB_INIT_ERROR: ArkWeb_ErrorCode = 17100001;
15#[doc = " @error Unknown error."]
16pub const ArkWeb_ErrorCode_ARKWEB_ERROR_UNKNOWN: ArkWeb_ErrorCode = 17100100;
17#[doc = " @error Invalid param."]
18pub const ArkWeb_ErrorCode_ARKWEB_INVALID_PARAM: ArkWeb_ErrorCode = 17100101;
19#[doc = " @error Register custom schemes should be called before create any ArkWeb."]
20pub const ArkWeb_ErrorCode_ARKWEB_SCHEME_REGISTER_FAILED: ArkWeb_ErrorCode = 17100102;
21#[doc = " @error Invalid url."]
22pub const ArkWeb_ErrorCode_ARKWEB_INVALID_URL: ArkWeb_ErrorCode = 17100103;
23#[doc = " @error Invalid cookie value."]
24pub const ArkWeb_ErrorCode_ARKWEB_INVALID_COOKIE_VALUE: ArkWeb_ErrorCode = 17100104;
25pub const ArkWeb_ErrorCode_ARKWEB_LIBRARY_OPEN_FAILURE: ArkWeb_ErrorCode = 17100105;
26pub const ArkWeb_ErrorCode_ARKWEB_LIBRARY_SYMBOL_NOT_FOUND: ArkWeb_ErrorCode = 17100106;
27#[doc = " @brief The CookieManager not initialized.\n\n @since 20"]
28#[cfg(feature = "api-20")]
29pub const ArkWeb_ErrorCode_ARKWEB_COOKIE_MANAGER_NOT_INITIALIZED: ArkWeb_ErrorCode = 17100107;
30#[doc = " @brief The CookieManager initialize failed.\n\n @since 20"]
31#[cfg(feature = "api-20")]
32pub const ArkWeb_ErrorCode_ARKWEB_COOKIE_MANAGER_INITIALIZE_FAILED: ArkWeb_ErrorCode = 17100108;
33#[doc = " @brief Save cookie failed.\n\n @since 20"]
34#[cfg(feature = "api-20")]
35pub const ArkWeb_ErrorCode_ARKWEB_COOKIE_SAVE_FAILED: ArkWeb_ErrorCode = 17100109;
36pub type ArkWeb_ErrorCode = u32;
37#[doc = " @error The operation is successful."]
38#[cfg(feature = "api-20")]
39pub const ArkWeb_BlanklessErrorCode_ARKWEB_BLANKLESS_SUCCESS: ArkWeb_BlanklessErrorCode = 0;
40#[doc = " @error Unidentified error."]
41#[cfg(feature = "api-20")]
42pub const ArkWeb_BlanklessErrorCode_ARKWEB_BLANKLESS_ERR_UNKNOWN: ArkWeb_BlanklessErrorCode = -1;
43#[doc = " @error Invalid parameter."]
44#[cfg(feature = "api-20")]
45pub const ArkWeb_BlanklessErrorCode_ARKWEB_BLANKLESS_ERR_INVALID_ARGS: ArkWeb_BlanklessErrorCode =
46 -2;
47#[doc = " @error The web controller is not bound to a component."]
48#[cfg(feature = "api-20")]
49pub const ArkWeb_BlanklessErrorCode_ARKWEB_BLANKLESS_ERR_CONTROLLER_NOT_INITED:
50 ArkWeb_BlanklessErrorCode = -3;
51#[doc = " @error The key value is not matched. The OH_NativeArkWeb_SetBlanklessLoadingWithKey\n and OH_NativeArkWeb_GetBlanklessInfoWithKey APIs must be used in pair and use the same key value."]
52#[cfg(feature = "api-20")]
53pub const ArkWeb_BlanklessErrorCode_ARKWEB_BLANKLESS_ERR_KEY_NOT_MATCH: ArkWeb_BlanklessErrorCode =
54 -4;
55#[doc = " @error If the similarity is low, the system determines that the change is too large.\n As a result, the OH_NativeArkWeb_SetBlanklessLoadingWithKey API fails to enable frame interpolation."]
56#[cfg(feature = "api-20")]
57pub const ArkWeb_BlanklessErrorCode_ARKWEB_BLANKLESS_ERR_SIGNIFICANT_CHANGE:
58 ArkWeb_BlanklessErrorCode = -5;
59#[doc = " @error The device does not support this feature."]
60#[cfg(feature = "api-20")]
61pub const ArkWeb_BlanklessErrorCode_ARKWEB_BLANKLESS_ERR_DEVICE_NOT_SUPPORT:
62 ArkWeb_BlanklessErrorCode = 801;
63#[doc = " @brief Defines an enum for the error codes of the white screen optimization solution.\n\n @since 20"]
64#[cfg(feature = "api-20")]
65pub type ArkWeb_BlanklessErrorCode = i32;
66#[doc = " @brief Defines the javascript bridge data type.\n\n @since 12"]
67#[repr(C)]
68#[derive(Debug, Copy, Clone)]
69pub struct ArkWeb_JavaScriptBridgeData {
70 #[doc = " A buffer that contains data."]
71 pub buffer: *const u8,
72 #[doc = " The size of the buffer."]
73 pub size: usize,
74}
75#[doc = " Represent error data"]
76pub const ArkWeb_WebMessageType_ARKWEB_NONE: ArkWeb_WebMessageType = 0;
77#[doc = " The data carried in the ArkWeb_WebMessage is string."]
78pub const ArkWeb_WebMessageType_ARKWEB_STRING: ArkWeb_WebMessageType = 1;
79#[doc = " The data carried in the ArkWeb_WebMessage is buffer(uint8_t)."]
80pub const ArkWeb_WebMessageType_ARKWEB_BUFFER: ArkWeb_WebMessageType = 2;
81#[doc = " @brief Defines the data type carried in a ArkWeb_WebMessage.\n\n @since 12"]
82pub type ArkWeb_WebMessageType = u32;
83#[doc = " Represent error data"]
84#[cfg(feature = "api-18")]
85pub const ArkWeb_JavaScriptValueType_ARKWEB_JAVASCRIPT_NONE: ArkWeb_JavaScriptValueType = 0;
86#[doc = " The data carried in the ArkWeb_JavaScriptValue is string."]
87#[cfg(feature = "api-18")]
88pub const ArkWeb_JavaScriptValueType_ARKWEB_JAVASCRIPT_STRING: ArkWeb_JavaScriptValueType = 1;
89#[doc = " The data carried in the ArkWeb_JavaScriptValue is bool."]
90#[cfg(feature = "api-18")]
91pub const ArkWeb_JavaScriptValueType_ARKWEB_JAVASCRIPT_BOOL: ArkWeb_JavaScriptValueType = 2;
92#[doc = " @brief Defines the data type carried in a ArkWeb_JavaScriptValue.\n\n @since 18"]
93#[cfg(feature = "api-18")]
94pub type ArkWeb_JavaScriptValueType = u32;
95#[repr(C)]
96#[derive(Debug, Copy, Clone)]
97pub struct ArkWeb_WebMessage {
98 _unused: [u8; 0],
99}
100#[doc = " @brief Defines the ArkWeb_WebMessage.\n\n @since 12"]
101pub type ArkWeb_WebMessagePtr = *mut ArkWeb_WebMessage;
102#[repr(C)]
103#[derive(Debug, Copy, Clone)]
104pub struct ArkWeb_JavaScriptValue {
105 _unused: [u8; 0],
106}
107#[doc = " @brief Defines the ArkWeb_JavaScriptValuePtr.\n\n @since 18"]
108#[cfg(feature = "api-18")]
109pub type ArkWeb_JavaScriptValuePtr = *mut ArkWeb_JavaScriptValue;
110#[doc = " @brief Defines the javascript callback of the native ArkWeb.\n\n @since 12"]
111pub type ArkWeb_OnJavaScriptCallback = ::std::option::Option<
112 unsafe extern "C" fn(
113 webTag: *const ::std::os::raw::c_char,
114 data: *const ArkWeb_JavaScriptBridgeData,
115 userData: *mut ::std::os::raw::c_void,
116 ),
117>;
118#[doc = " @brief Defines the javascript proxy callback of the native ArkWeb.\n\n @since 12"]
119pub type ArkWeb_OnJavaScriptProxyCallback = ::std::option::Option<
120 unsafe extern "C" fn(
121 webTag: *const ::std::os::raw::c_char,
122 dataArray: *const ArkWeb_JavaScriptBridgeData,
123 arraySize: usize,
124 userData: *mut ::std::os::raw::c_void,
125 ),
126>;
127#[doc = " @brief Defines the JavaScript proxy callback of the native ArkWeb.\n\n @param webTag The name of the web component.\n @param dataArray The JavaScript bridge data array from HTML.\n @param arraySize The number of elements in the array.\n @param userData The data set by user.\n\n @since 18"]
128#[cfg(feature = "api-18")]
129pub type ArkWeb_OnJavaScriptProxyCallbackWithResult = ::std::option::Option<
130 unsafe extern "C" fn(
131 webTag: *const ::std::os::raw::c_char,
132 dataArray: *const ArkWeb_JavaScriptBridgeData,
133 arraySize: usize,
134 userData: *mut ::std::os::raw::c_void,
135 ) -> ArkWeb_JavaScriptValuePtr,
136>;
137#[doc = " @brief Defines the component callback of the native ArkWeb.\n\n @since 12"]
138pub type ArkWeb_OnComponentCallback = ::std::option::Option<
139 unsafe extern "C" fn(
140 webTag: *const ::std::os::raw::c_char,
141 userData: *mut ::std::os::raw::c_void,
142 ),
143>;
144#[doc = " @brief Defines the scroll callback of the native ArkWeb.\n\n @param webTag The name of the web component.\n @param userData The data set by user.\n @param x X-axis scrolling offset.\n @param y Y-axis scrolling offset.\n\n @since 18"]
145#[cfg(feature = "api-18")]
146pub type ArkWeb_OnScrollCallback = ::std::option::Option<
147 unsafe extern "C" fn(
148 webTag: *const ::std::os::raw::c_char,
149 userData: *mut ::std::os::raw::c_void,
150 x: f64,
151 y: f64,
152 ),
153>;
154#[repr(C)]
155#[derive(Debug, Copy, Clone)]
156pub struct ArkWeb_WebMessagePort {
157 _unused: [u8; 0],
158}
159#[doc = " @brief Defines the ArkWeb_WebMessagePort that represent a HTML5 message port.\n\n @since 12"]
160pub type ArkWeb_WebMessagePortPtr = *mut ArkWeb_WebMessagePort;
161#[doc = " @brief Defines the callback to receive message from HTML.\n\n @param webTag The name of the web component.\n @param port The ArkWeb_WebMessagePort for registering the ArkWeb_OnMessageEventHandler.\n @param message The received ArkWeb_WebMessage.\n @param userData The data set by user.\n\n @since 12"]
162pub type ArkWeb_OnMessageEventHandler = ::std::option::Option<
163 unsafe extern "C" fn(
164 webTag: *const ::std::os::raw::c_char,
165 port: ArkWeb_WebMessagePortPtr,
166 message: ArkWeb_WebMessagePtr,
167 userData: *mut ::std::os::raw::c_void,
168 ),
169>;
170#[doc = " @brief Defines the javascript object.\n\n @since 12"]
171#[repr(C)]
172#[derive(Debug, Copy, Clone)]
173pub struct ArkWeb_JavaScriptObject {
174 #[doc = " A piece of javascript code."]
175 pub buffer: *const u8,
176 #[doc = " The size of the javascript code."]
177 pub size: usize,
178 #[doc = " Callbacks execute JavaScript script results."]
179 pub callback: ArkWeb_OnJavaScriptCallback,
180 #[doc = " The user data to set."]
181 pub userData: *mut ::std::os::raw::c_void,
182}
183#[doc = " @brief Defines the javascript proxy registered method object.\n\n @since 12"]
184#[repr(C)]
185#[derive(Debug, Copy, Clone)]
186pub struct ArkWeb_ProxyMethod {
187 #[doc = " The method of the application side JavaScript object participating in the registration."]
188 pub methodName: *const ::std::os::raw::c_char,
189 #[doc = " The callback function registered by developer is called back when HTML side uses."]
190 pub callback: ArkWeb_OnJavaScriptProxyCallback,
191 #[doc = " The user data to set."]
192 pub userData: *mut ::std::os::raw::c_void,
193}
194#[doc = " @brief Defines the JavaScript proxy method with a return value.\n\n @since 18"]
195#[cfg(feature = "api-18")]
196#[repr(C)]
197#[derive(Debug, Copy, Clone)]
198pub struct ArkWeb_ProxyMethodWithResult {
199 #[doc = " The method of the application side JavaScript object participating in the registration."]
200 pub methodName: *const ::std::os::raw::c_char,
201 #[doc = " The callback function with a return value registered by developer is called back when HTML side uses."]
202 pub callback: ArkWeb_OnJavaScriptProxyCallbackWithResult,
203 #[doc = " The user data to set."]
204 pub userData: *mut ::std::os::raw::c_void,
205}
206#[doc = " @brief Defines the javascript proxy registered object.\n\n @since 12"]
207#[repr(C)]
208#[derive(Debug, Copy, Clone)]
209pub struct ArkWeb_ProxyObject {
210 #[doc = " The name of the registered object."]
211 pub objName: *const ::std::os::raw::c_char,
212 #[doc = " The javascript proxy registered method object list"]
213 pub methodList: *const ArkWeb_ProxyMethod,
214 #[doc = " The size of the methodList."]
215 pub size: usize,
216}
217#[doc = " @brief Defines the JavaScript proxy registered object with methodList that has a return value.\n\n @since 18"]
218#[cfg(feature = "api-18")]
219#[repr(C)]
220#[derive(Debug, Copy, Clone)]
221pub struct ArkWeb_ProxyObjectWithResult {
222 #[doc = " The name of the registered object."]
223 pub objName: *const ::std::os::raw::c_char,
224 #[doc = " The JavaScript proxy registered method object list with a callback function that has a return value"]
225 pub methodList: *const ArkWeb_ProxyMethodWithResult,
226 #[doc = " The size of the methodList."]
227 pub size: usize,
228}
229#[doc = " @brief Defines the controller API for native ArkWeb.\n Before invoking an API, you are advised to use ARKWEB_MEMBER_MISSING to check\n whether the function structure has a corresponding function pointer to avoid crash\n caused by mismatch between the SDK and the device ROM.\n Use OH_ArkWeb_GetNativeAPI in the UI thread to obtain the Controller-related interface cluster.\n\n @since 12"]
230#[repr(C)]
231#[derive(Debug, Copy, Clone)]
232pub struct ArkWeb_ControllerAPI {
233 #[doc = " The ArkWeb_ControllerAPI struct size."]
234 pub size: usize,
235 #[doc = " Load a piece of code and execute JS code in the context of the currently displayed page."]
236 pub runJavaScript: ::std::option::Option<
237 unsafe extern "C" fn(
238 webTag: *const ::std::os::raw::c_char,
239 javascriptObject: *const ArkWeb_JavaScriptObject,
240 ),
241 >,
242 #[doc = " Register the JavaScript object and method list."]
243 pub registerJavaScriptProxy: ::std::option::Option<
244 unsafe extern "C" fn(
245 webTag: *const ::std::os::raw::c_char,
246 proxyObject: *const ArkWeb_ProxyObject,
247 ),
248 >,
249 #[doc = " Deletes the registered object which th given name."]
250 pub deleteJavaScriptRegister: ::std::option::Option<
251 unsafe extern "C" fn(
252 webTag: *const ::std::os::raw::c_char,
253 objName: *const ::std::os::raw::c_char,
254 ),
255 >,
256 #[doc = " Refresh the current web page."]
257 pub refresh: ::std::option::Option<unsafe extern "C" fn(webTag: *const ::std::os::raw::c_char)>,
258 #[doc = " Register the JavaScript object and async method list."]
259 pub registerAsyncJavaScriptProxy: ::std::option::Option<
260 unsafe extern "C" fn(
261 webTag: *const ::std::os::raw::c_char,
262 proxyObject: *const ArkWeb_ProxyObject,
263 ),
264 >,
265 #[doc = " @brief Creates a message channel to communicate with HTML and returns\n the message ports representing the message channel endpoints.\n\n @param webTag The name of the web component.\n @param size The quantity of message ports."]
266 pub createWebMessagePorts: ::std::option::Option<
267 unsafe extern "C" fn(
268 webTag: *const ::std::os::raw::c_char,
269 size: *mut usize,
270 ) -> *mut ArkWeb_WebMessagePortPtr,
271 >,
272 #[doc = " @brief Destroy message ports.\n\n @param ports Address of the message ports array pointer.\n @param size The quantity of message ports."]
273 pub destroyWebMessagePorts: ::std::option::Option<
274 unsafe extern "C" fn(ports: *mut *mut ArkWeb_WebMessagePortPtr, size: usize),
275 >,
276 #[doc = " @brief Post message ports to main frame.\n\n @param webTag The name of the web component.\n @param name Name of the message to be sent.\n @param size The quantity of message ports.\n @param url Indicates the URI for receiving the message.\n @return Post web message result code.\n {@link ARKWEB_SUCCESS} post web message success.\n {@link ARKWEB_INVALID_PARAM} the parameter verification fails.\n {@link ARKWEB_INIT_ERROR} no web associated with this webTag."]
277 pub postWebMessage: ::std::option::Option<
278 unsafe extern "C" fn(
279 webTag: *const ::std::os::raw::c_char,
280 name: *const ::std::os::raw::c_char,
281 webMessagePorts: *mut ArkWeb_WebMessagePortPtr,
282 size: usize,
283 url: *const ::std::os::raw::c_char,
284 ) -> ArkWeb_ErrorCode,
285 >,
286 #[doc = " @brief Get the url of the last frame that calls the JavaScriptProxy.\n This should be call on the thread which JavaScriptProxy called.\n\n @return The url of the last frame that calls the JavaScriptProxy.\n @since 14"]
287 #[cfg(feature = "api-14")]
288 pub getLastJavascriptProxyCallingFrameUrl:
289 ::std::option::Option<unsafe extern "C" fn() -> *const ::std::os::raw::c_char>,
290 #[doc = " @brief Register the JavaScript object and method list, the method is callback function that has a return value.\n\n @param webTag The name of the web component.\n @param proxyObject The JavaScript object to register, the object has callback functions with return value.\n @param permission The JSON string, which defaults to null, is used to configure the permission control for\n JSBridge, allowing for the definition of URL whitelists at the object and method levels.\n\n @since 18"]
291 #[cfg(feature = "api-18")]
292 pub registerJavaScriptProxyEx: ::std::option::Option<
293 unsafe extern "C" fn(
294 webTag: *const ::std::os::raw::c_char,
295 proxyObject: *const ArkWeb_ProxyObjectWithResult,
296 permission: *const ::std::os::raw::c_char,
297 ),
298 >,
299 #[doc = " @brief Register the JavaScript object and async method list.\n\n @param webTag The name of the web component.\n @param proxyObject The JavaScript object to register.\n @param permission The JSON string, which defaults to null, is used to configure the permission control\n for JSBridge, allowing for the definition of URL whitelists at the object and method levels.\n\n @since 18"]
300 #[cfg(feature = "api-18")]
301 pub registerAsyncJavaScriptProxyEx: ::std::option::Option<
302 unsafe extern "C" fn(
303 webTag: *const ::std::os::raw::c_char,
304 proxyObject: *const ArkWeb_ProxyObject,
305 permission: *const ::std::os::raw::c_char,
306 ),
307 >,
308}
309#[doc = " @brief Defines the component API for native ArkWeb.\n\n @since 12"]
310#[repr(C)]
311#[derive(Debug, Copy, Clone)]
312pub struct ArkWeb_ComponentAPI {
313 #[doc = " The ArkWeb_ComponentAPI struct size."]
314 pub size: usize,
315 #[doc = " Register the OnControllerAttached callback."]
316 pub onControllerAttached: ::std::option::Option<
317 unsafe extern "C" fn(
318 webTag: *const ::std::os::raw::c_char,
319 callback: ArkWeb_OnComponentCallback,
320 userData: *mut ::std::os::raw::c_void,
321 ),
322 >,
323 #[doc = " Register the OnPageBegin callback."]
324 pub onPageBegin: ::std::option::Option<
325 unsafe extern "C" fn(
326 webTag: *const ::std::os::raw::c_char,
327 callback: ArkWeb_OnComponentCallback,
328 userData: *mut ::std::os::raw::c_void,
329 ),
330 >,
331 #[doc = " Register the OnPageEnd callback."]
332 pub onPageEnd: ::std::option::Option<
333 unsafe extern "C" fn(
334 webTag: *const ::std::os::raw::c_char,
335 callback: ArkWeb_OnComponentCallback,
336 userData: *mut ::std::os::raw::c_void,
337 ),
338 >,
339 #[doc = " Register the OnDestroy callback."]
340 pub onDestroy: ::std::option::Option<
341 unsafe extern "C" fn(
342 webTag: *const ::std::os::raw::c_char,
343 callback: ArkWeb_OnComponentCallback,
344 userData: *mut ::std::os::raw::c_void,
345 ),
346 >,
347}
348#[doc = " @brief Defines the web message API for native ArkWeb.\n Before invoking an API, you are advised to use ARKWEB_MEMBER_MISSING to check\n whether the function structure has a corresponding function pointer to avoid crash\n caused by mismatch between the SDK and the device ROM.\n Use OH_ArkWeb_GetNativeAPI in the UI thread to obtain the WebMessagePort-related interface cluster.\n\n @since 12"]
349#[repr(C)]
350#[derive(Debug, Copy, Clone)]
351pub struct ArkWeb_WebMessagePortAPI {
352 #[doc = " The ArkWeb_WebMessagePortAPI struct size."]
353 pub size: usize,
354 #[doc = " @brief Post message to HTML.\n\n @param webMessagePort The ArkWeb_WebMessagePort.\n @param webTag The name of the web component.\n @param webMessage The ArkWeb_WebMessage to send.\n @return Post message result code.\n {@link ARKWEB_SUCCESS} post message success.\n {@link ARKWEB_INVALID_PARAM} the parameter verification fails.\n {@link ARKWEB_INIT_ERROR} no web associated with this webTag."]
355 pub postMessage: ::std::option::Option<
356 unsafe extern "C" fn(
357 webMessagePort: ArkWeb_WebMessagePortPtr,
358 webTag: *const ::std::os::raw::c_char,
359 webMessage: ArkWeb_WebMessagePtr,
360 ) -> ArkWeb_ErrorCode,
361 >,
362 #[doc = " @brief Close the message port.\n\n @param webMessagePort The ArkWeb_WebMessagePort.\n @param webTag The name of the web component."]
363 pub close: ::std::option::Option<
364 unsafe extern "C" fn(
365 webMessagePort: ArkWeb_WebMessagePortPtr,
366 webTag: *const ::std::os::raw::c_char,
367 ),
368 >,
369 #[doc = " @brief Set a callback to receive message from HTML.\n\n @param webMessagePort The ArkWeb_WebMessagePort.\n @param webTag The name of the web component.\n @param messageEventHandler The handler to receive message from HTML.\n @param userData The data set by user."]
370 pub setMessageEventHandler: ::std::option::Option<
371 unsafe extern "C" fn(
372 webMessagePort: ArkWeb_WebMessagePortPtr,
373 webTag: *const ::std::os::raw::c_char,
374 messageEventHandler: ArkWeb_OnMessageEventHandler,
375 userData: *mut ::std::os::raw::c_void,
376 ),
377 >,
378}
379#[doc = " @brief Defines the web message data API for native ArkWeb.\n Before invoking an API, you are advised to use ARKWEB_MEMBER_MISSING to check\n whether the function structure has a corresponding function pointer to avoid crash\n caused by mismatch between the SDK and the device ROM.\n Use OH_ArkWeb_GetNativeAPI in the UI thread to obtain the WebMessage-related interface cluster.\n\n @since 12"]
380#[repr(C)]
381#[derive(Debug, Copy, Clone)]
382pub struct ArkWeb_WebMessageAPI {
383 #[doc = " The ArkWeb_WebMessageAPI struct size."]
384 pub size: usize,
385 #[doc = " @brief Used to create a ArkWeb_WebMessage.\n\n @return The created ArkWeb_WebMessage, destroy it through\n destroyWebMessage after it is no longer used."]
386 pub createWebMessage: ::std::option::Option<unsafe extern "C" fn() -> ArkWeb_WebMessagePtr>,
387 #[doc = " @brief Used to destroy a ArkWeb_WebMessage.\n\n @param webMessage The ArkWeb_WebMessage to destroy."]
388 pub destroyWebMessage:
389 ::std::option::Option<unsafe extern "C" fn(webMessage: *mut ArkWeb_WebMessagePtr)>,
390 #[doc = " @brief Set the type of ArkWeb_WebMessage.\n\n @param webMessage The ArkWeb_WebMessage.\n @param type The type of ArkWeb_WebMessage."]
391 pub setType: ::std::option::Option<
392 unsafe extern "C" fn(webMessage: ArkWeb_WebMessagePtr, type_: ArkWeb_WebMessageType),
393 >,
394 #[doc = " @brief Get the type of ArkWeb_WebMessage.\n\n @param webMessage The ArkWeb_WebMessage.\n @return The type of ArkWeb_WebMessage."]
395 pub getType: ::std::option::Option<
396 unsafe extern "C" fn(webMessage: ArkWeb_WebMessagePtr) -> ArkWeb_WebMessageType,
397 >,
398 #[doc = " @brief Set the data of ArkWeb_WebMessage.\n\n @param webMessage The ArkWeb_WebMessage.\n @param data The data of ArkWeb_WebMessage.\n @param dataLength The length of data."]
399 pub setData: ::std::option::Option<
400 unsafe extern "C" fn(
401 webMessage: ArkWeb_WebMessagePtr,
402 data: *mut ::std::os::raw::c_void,
403 dataLength: usize,
404 ),
405 >,
406 #[doc = " @brief Get the data of ArkWeb_WebMessage.\n\n @param webMessage The ArkWeb_WebMessage.\n @param dataLength The length of data.\n @return The data of ArkWeb_WebMessage."]
407 pub getData: ::std::option::Option<
408 unsafe extern "C" fn(
409 webMessage: ArkWeb_WebMessagePtr,
410 dataLength: *mut usize,
411 ) -> *mut ::std::os::raw::c_void,
412 >,
413}
414#[doc = " @brief Defines the native CookieManager API for ArkWeb.\n Before invoking an API, you are advised to use ARKWEB_MEMBER_MISSING to check\n whether the function structure has a corresponding function pointer to avoid crash\n caused by mismatch between the SDK and the device ROM.\n Use OH_ArkWeb_GetNativeAPI in the UI thread to obtain the CookieManager-related interface cluster.\n\n @since 12"]
415#[repr(C)]
416#[derive(Debug, Copy, Clone)]
417pub struct ArkWeb_CookieManagerAPI {
418 #[doc = " The ArkWeb_CookieManagerAPI struct size."]
419 pub size: usize,
420 #[doc = " @brief Obtains the cookie value corresponding to a specified URL.\n\n @param url URL to which the cookie to be obtained belongs. A complete URL is recommended.\n @param incognito True indicates that the memory cookies of the webview in privacy mode are obtained,\n and false indicates that cookies in non-privacy mode are obtained.\n @param includeHttpOnly If true HTTP-only cookies will also be included in the cookieValue.\n @param cookieValue Get the cookie value corresponding to the URL.\n @return Fetch cookie result code.\n {@link ARKWEB_SUCCESS} fetch cookie success.\n {@link ARKWEB_INVALID_URL} invalid url.\n {@link ARKWEB_INVALID_PARAM} cookieValue is nullptr."]
421 pub fetchCookieSync: ::std::option::Option<
422 unsafe extern "C" fn(
423 url: *const ::std::os::raw::c_char,
424 incognito: bool,
425 includeHttpOnly: bool,
426 cookieValue: *mut *mut ::std::os::raw::c_char,
427 ) -> ArkWeb_ErrorCode,
428 >,
429 #[doc = " @brief Sets the cookie value for a specified URL.\n\n @param url Specifies the URL to which the cookie belongs. A complete URL is recommended.\n @param cookieValue The value of the cookie to be set.\n @param incognito True indicates that cookies of the corresponding URL are set in privacy mode,\n and false indicates that cookies of the corresponding URL are set in non-privacy mode.\n @param includeHttpOnly If true, HTTP-only cookies can also be overwritten.\n @return Config cookie result code.\n {@link ARKWEB_SUCCESS} config cookie success.\n {@link ARKWEB_INVALID_URL} invalid url.\n {@link ARKWEB_INVALID_COOKIE_VALUE} invalid cookie value."]
430 pub configCookieSync: ::std::option::Option<
431 unsafe extern "C" fn(
432 url: *const ::std::os::raw::c_char,
433 cookieValue: *const ::std::os::raw::c_char,
434 incognito: bool,
435 includeHttpOnly: bool,
436 ) -> ArkWeb_ErrorCode,
437 >,
438 #[doc = " @brief Check whether cookies exist.\n\n @param incognito True indicates whether cookies exist in privacy mode,\n and false indicates whether cookies exist in non-privacy mode.\n @return True indicates that the cookie exists, and false indicates that the cookie does not exist."]
439 pub existCookies: ::std::option::Option<unsafe extern "C" fn(incognito: bool) -> bool>,
440 #[doc = " @brief Clear all cookies.\n\n @param incognito True indicates that all memory cookies of the webview are cleared in privacy mode,\n and false indicates that persistent cookies in non-privacy mode are cleared."]
441 pub clearAllCookiesSync: ::std::option::Option<unsafe extern "C" fn(incognito: bool)>,
442 #[doc = " @brief Clear all session cookies."]
443 pub clearSessionCookiesSync: ::std::option::Option<unsafe extern "C" fn()>,
444}
445#[doc = " @brief Defines the native JavaScriptValue API for ArkWeb.\n Before invoking an API, you are advised to use ARKWEB_MEMBER_MISSING to check\n whether the function structure has a corresponding function pointer to avoid crash\n caused by mismatch between the SDK and the device ROM.\n\n @since 18"]
446#[cfg(feature = "api-18")]
447#[repr(C)]
448#[derive(Debug, Copy, Clone)]
449pub struct ArkWeb_JavaScriptValueAPI {
450 #[doc = " The ArkWeb_JavaScriptValueAPI struct size."]
451 pub size: usize,
452 #[doc = " @brief Create the JavaScript value responding to HTML.\n\n @param type The type of ArkWeb_JavaScriptValue.\n @param data The data buffer of ArkWeb_JavaScriptValue.\n @param dataLength The length of data buffer.\n @return ArkWeb_JavaScriptValuePtr created by ArkWeb, the memory of ArkWeb_JavaScriptValue\n is managed by ArkWeb itself."]
453 pub createJavaScriptValue: ::std::option::Option<
454 unsafe extern "C" fn(
455 type_: ArkWeb_JavaScriptValueType,
456 data: *mut ::std::os::raw::c_void,
457 dataLength: usize,
458 ) -> ArkWeb_JavaScriptValuePtr,
459 >,
460}
461#[doc = " @brief Defines the native API type of any size.\n\n @since 12"]
462#[repr(C)]
463#[derive(Debug, Copy, Clone)]
464pub struct ArkWeb_AnyNativeAPI {
465 #[doc = " Defines the size information of the native API set."]
466 pub size: usize,
467}
468#[doc = " API type related to ArkWeb component."]
469pub const ArkWeb_NativeAPIVariantKind_ARKWEB_NATIVE_COMPONENT: ArkWeb_NativeAPIVariantKind = 0;
470#[doc = " API type related to ArkWeb controller."]
471pub const ArkWeb_NativeAPIVariantKind_ARKWEB_NATIVE_CONTROLLER: ArkWeb_NativeAPIVariantKind = 1;
472#[doc = " API type related to ArkWeb WebMessagePort."]
473pub const ArkWeb_NativeAPIVariantKind_ARKWEB_NATIVE_WEB_MESSAGE_PORT: ArkWeb_NativeAPIVariantKind =
474 2;
475#[doc = " API type related to ArkWeb WebMessage."]
476pub const ArkWeb_NativeAPIVariantKind_ARKWEB_NATIVE_WEB_MESSAGE: ArkWeb_NativeAPIVariantKind = 3;
477#[doc = " API type related to ArkWeb cookie manager."]
478pub const ArkWeb_NativeAPIVariantKind_ARKWEB_NATIVE_COOKIE_MANAGER: ArkWeb_NativeAPIVariantKind = 4;
479#[doc = " @brief API type related to ArkWeb JavaScript value.\n\n @since 18"]
480#[cfg(feature = "api-18")]
481pub const ArkWeb_NativeAPIVariantKind_ARKWEB_NATIVE_JAVASCRIPT_VALUE: ArkWeb_NativeAPIVariantKind =
482 5;
483#[doc = " @brief Defines the native API set type.\n\n @since 12"]
484pub type ArkWeb_NativeAPIVariantKind = u32;
485extern "C" {
486 #[doc = " @brief Obtains the native API set of a specified type.\n @param type Indicates the type of the native API set provided by ArkWeb.\n @return Return the pointer to the native API abstract object that carries the size.\n If the type is incorrect, a null pointer is returned.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
487 pub fn OH_ArkWeb_GetNativeAPI(type_: ArkWeb_NativeAPIVariantKind) -> *mut ArkWeb_AnyNativeAPI;
488}
489extern "C" {
490 #[doc = " @brief Register a scrolling event callback.\n @param webTag The name of the web component.\n @param callback The ArkWeb scrolling callback.\n @param userData The data set by user.\n @return Returns whether the registration was successful, false indicates failure.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 18"]
491 #[cfg(feature = "api-18")]
492 pub fn OH_ArkWeb_RegisterScrollCallback(
493 webTag: *const ::std::os::raw::c_char,
494 callback: ArkWeb_OnScrollCallback,
495 userData: *mut ::std::os::raw::c_void,
496 ) -> bool;
497}
498#[doc = " @error Normal."]
499pub const ArkWeb_NetError_ARKWEB_NET_OK: ArkWeb_NetError = 0;
500#[doc = " @error An asynchronous IO operation is not yet complete. This usually does not\n indicate a fatal error. Typically this error will be generated as a\n notification to wait for some external notification that the IO operation\n finally completed."]
501pub const ArkWeb_NetError_ARKWEB_ERR_IO_PENDING: ArkWeb_NetError = -1;
502#[doc = " @error A generic failure occurred."]
503pub const ArkWeb_NetError_ARKWEB_ERR_FAILED: ArkWeb_NetError = -2;
504#[doc = " @error An operation was aborted."]
505pub const ArkWeb_NetError_ARKWEB_ERR_ABORTED: ArkWeb_NetError = -3;
506#[doc = " @error An argument to the function is incorrect."]
507pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_ARGUMENT: ArkWeb_NetError = -4;
508#[doc = " @error The handle or file descriptor is invalid."]
509pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_HANDLE: ArkWeb_NetError = -5;
510#[doc = " @error The file or directory cannot be found."]
511pub const ArkWeb_NetError_ARKWEB_ERR_FILE_NOT_FOUND: ArkWeb_NetError = -6;
512#[doc = " @error An operation timed out."]
513pub const ArkWeb_NetError_ARKWEB_ERR_TIMED_OUT: ArkWeb_NetError = -7;
514#[doc = " @error The file is too large."]
515pub const ArkWeb_NetError_ARKWEB_ERR_FILE_TOO_LARGE: ArkWeb_NetError = -8;
516#[doc = " @error An unexpected error. This may be caused by a programming mistake or an\n invalid assumption."]
517pub const ArkWeb_NetError_ARKWEB_ERR_UNEXPECTED: ArkWeb_NetError = -9;
518#[doc = " @error Permission to access a resource, other than the network, was denied."]
519pub const ArkWeb_NetError_ARKWEB_ERR_ACCESS_DENIED: ArkWeb_NetError = -10;
520#[doc = " @error The operation failed because of unimplemented functionality."]
521pub const ArkWeb_NetError_ARKWEB_ERR_NOT_IMPLEMENTED: ArkWeb_NetError = -11;
522#[doc = " @error There were not enough resources to complete the operation."]
523pub const ArkWeb_NetError_ARKWEB_ERR_INSUFFICIENT_RESOURCES: ArkWeb_NetError = -12;
524#[doc = " @error Memory allocation failed."]
525pub const ArkWeb_NetError_ARKWEB_ERR_OUT_OF_MEMORY: ArkWeb_NetError = -13;
526#[doc = " @error The file upload failed because the file's modification time was different\n from the expectation."]
527pub const ArkWeb_NetError_ARKWEB_ERR_UPLOAD_FILE_CHANGED: ArkWeb_NetError = -14;
528#[doc = " @error The socket is not connected."]
529pub const ArkWeb_NetError_ARKWEB_ERR_SOCKET_NOT_CONNECTED: ArkWeb_NetError = -15;
530#[doc = " @error The file already exists."]
531pub const ArkWeb_NetError_ARKWEB_ERR_FILE_EXISTS: ArkWeb_NetError = -16;
532#[doc = " @error The path or file name is too long."]
533pub const ArkWeb_NetError_ARKWEB_ERR_FILE_PATH_TOO_LONG: ArkWeb_NetError = -17;
534#[doc = " @error Not enough room left on the disk."]
535pub const ArkWeb_NetError_ARKWEB_ERR_FILE_NO_SPACE: ArkWeb_NetError = -18;
536#[doc = " @error The file has a virus."]
537pub const ArkWeb_NetError_ARKWEB_ERR_FILE_VIRUS_INFECTED: ArkWeb_NetError = -19;
538#[doc = " @error The client chose to block the request."]
539pub const ArkWeb_NetError_ARKWEB_ERR_BLOCKED_BY_CLIENT: ArkWeb_NetError = -20;
540#[doc = " @error The network changed."]
541pub const ArkWeb_NetError_ARKWEB_ERR_NETWORK_CHANGED: ArkWeb_NetError = -21;
542#[doc = " @error The request was blocked by the URL block list configured by the domain\n administrator."]
543pub const ArkWeb_NetError_ARKWEB_ERR_BLOCKED_BY_ADMINISTRATOR: ArkWeb_NetError = -22;
544#[doc = " @error The socket is already connected."]
545pub const ArkWeb_NetError_ARKWEB_ERR_SOCKET_CONNECTED: ArkWeb_NetError = -23;
546#[doc = " @error The upload failed because the upload stream needed to be re-read, due to a\n retry or a redirect, but the upload stream doesn't support that operation."]
547pub const ArkWeb_NetError_ARKWEB_ERR_UPLOAD_STREAM_REWIND_NOT_SUPPORTED: ArkWeb_NetError = -25;
548#[doc = " @error The request failed because the URLRequestContext is shutting down, or has\n been shut down."]
549pub const ArkWeb_NetError_ARKWEB_ERR_CONTEXT_SHUT_DOWN: ArkWeb_NetError = -26;
550#[doc = " @error The request failed because the response was delivered along with requirements\n which are not met ('X-Frame-Options' and 'Content-Security-Policy' ancestor\n checks and 'Cross-Origin-Resource-Policy' for instance)."]
551pub const ArkWeb_NetError_ARKWEB_ERR_BLOCKED_BY_RESPONSE: ArkWeb_NetError = -27;
552#[doc = " @error The request was blocked by system policy disallowing some or all cleartext\n requests."]
553pub const ArkWeb_NetError_ARKWEB_ERR_CLEARTEXT_NOT_PERMITTED: ArkWeb_NetError = -29;
554#[doc = " @error The request was blocked by a Content Security Policy."]
555pub const ArkWeb_NetError_ARKWEB_ERR_BLOCKED_BY_CSP: ArkWeb_NetError = -30;
556#[doc = " @error The request was blocked because of no H/2 or QUIC session."]
557pub const ArkWeb_NetError_ARKWEB_ERR_H2_OR_QUIC_REQUIRED: ArkWeb_NetError = -31;
558#[doc = " @error The request was blocked by CORB or ORB."]
559pub const ArkWeb_NetError_ARKWEB_ERR_BLOCKED_BY_ORB: ArkWeb_NetError = -32;
560#[doc = " @error A connection was closed (corresponding to a TCP FIN)."]
561pub const ArkWeb_NetError_ARKWEB_ERR_CONNECTION_CLOSED: ArkWeb_NetError = -100;
562#[doc = " @error A connection was reset (corresponding to a TCP RST)."]
563pub const ArkWeb_NetError_ARKWEB_ERR_CONNECTION_RESET: ArkWeb_NetError = -101;
564#[doc = " @error A connection attempt was refused."]
565pub const ArkWeb_NetError_ARKWEB_ERR_CONNECTION_REFUSED: ArkWeb_NetError = -102;
566#[doc = " @error A connection timed out as a result of not receiving an ACK for data sent.\n This can include a FIN packet that did not get ACK'd."]
567pub const ArkWeb_NetError_ARKWEB_ERR_CONNECTION_ABORTED: ArkWeb_NetError = -103;
568#[doc = " @error A connection attempt failed."]
569pub const ArkWeb_NetError_ARKWEB_ERR_CONNECTION_FAILED: ArkWeb_NetError = -104;
570#[doc = " @error The host name could not be resolved."]
571pub const ArkWeb_NetError_ARKWEB_ERR_NAME_NOT_RESOLVED: ArkWeb_NetError = -105;
572#[doc = " @error The Internet connection has been lost."]
573pub const ArkWeb_NetError_ARKWEB_ERR_INTERNET_DISCONNECTED: ArkWeb_NetError = -106;
574#[doc = " @error An SSL protocol error occurred."]
575pub const ArkWeb_NetError_ARKWEB_ERR_SSL_PROTOCOL_ERROR: ArkWeb_NetError = -107;
576#[doc = " @error The IP address or port number is invalid (e.g., cannot connect to the IP\n address 0 or the port 0)."]
577pub const ArkWeb_NetError_ARKWEB_ERR_ADDRESS_INVALID: ArkWeb_NetError = -108;
578#[doc = " @error The IP address is unreachable. This usually means that there is no route to\n the specified host or network."]
579pub const ArkWeb_NetError_ARKWEB_ERR_ADDRESS_UNREACHABLE: ArkWeb_NetError = -109;
580#[doc = " @error The server requested a client certificate for SSL client authentication."]
581pub const ArkWeb_NetError_ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NEEDED: ArkWeb_NetError = -110;
582#[doc = " @error A tunnel connection through the proxy could not be established."]
583pub const ArkWeb_NetError_ARKWEB_ERR_TUNNEL_CONNECTION_FAILED: ArkWeb_NetError = -111;
584#[doc = " @error No SSL protocol versions are enabled."]
585pub const ArkWeb_NetError_ARKWEB_ERR_NO_SSL_VERSIONS_ENABLED: ArkWeb_NetError = -112;
586#[doc = " @error The client and server don't support a common SSL protocol version or\n cipher suite."]
587pub const ArkWeb_NetError_ARKWEB_ERR_SSL_VERSION_OR_CIPHER_MISMATCH: ArkWeb_NetError = -113;
588#[doc = " @error The server requested a renegotiation (rehandshake)."]
589pub const ArkWeb_NetError_ARKWEB_ERR_SSL_RENEGOTIATION_REQUESTED: ArkWeb_NetError = -114;
590#[doc = " @error The proxy requested authentication (for tunnel establishment, with an\n unsupported method."]
591pub const ArkWeb_NetError_ARKWEB_ERR_PROXY_AUTH_UNSUPPORTED: ArkWeb_NetError = -115;
592#[doc = " @error The SSL handshake failed because of a bad or missing client certificate."]
593pub const ArkWeb_NetError_ARKWEB_ERR_BAD_SSL_CLIENT_AUTH_CERT: ArkWeb_NetError = -117;
594#[doc = " @error A connection attempt timed out."]
595pub const ArkWeb_NetError_ARKWEB_ERR_CONNECTION_TIMED_OUT: ArkWeb_NetError = -118;
596#[doc = " @error There are too many pending DNS resolves, so a request in the queue was\n aborted."]
597pub const ArkWeb_NetError_ARKWEB_ERR_HOST_RESOLVER_QUEUE_TOO_LARGE: ArkWeb_NetError = -119;
598#[doc = " @error Failed establishing a connection to the SOCKS proxy server for a target host."]
599pub const ArkWeb_NetError_ARKWEB_ERR_SOCKS_CONNECTION_FAILED: ArkWeb_NetError = -120;
600#[doc = " @error The SOCKS proxy server failed establishing connection to the target host\n because that host is unreachable."]
601pub const ArkWeb_NetError_ARKWEB_ERR_SOCKS_CONNECTION_HOST_UNREACHABLE: ArkWeb_NetError = -121;
602#[doc = " @error The request to negotiate an alternate protocol failed."]
603pub const ArkWeb_NetError_ARKWEB_ERR_ALPN_NEGOTIATION_FAILED: ArkWeb_NetError = -122;
604#[doc = " @error The peer sent an SSL no_renegotiation alert message."]
605pub const ArkWeb_NetError_ARKWEB_ERR_SSL_NO_RENEGOTIATION: ArkWeb_NetError = -123;
606#[doc = " @error Winsock sometimes reports more data written than passed. This is probably\n due to a broken LSP."]
607pub const ArkWeb_NetError_ARKWEB_ERR_WINSOCK_UNEXPECTED_WRITTEN_BYTES: ArkWeb_NetError = -124;
608#[doc = " @error An SSL peer sent us a fatal decompression_failure alert. This typically\n occurs when a peer selects DEFLATE compression in the mistaken belief that\n it supports it."]
609pub const ArkWeb_NetError_ARKWEB_ERR_SSL_DECOMPRESSION_FAILURE_ALERT: ArkWeb_NetError = -125;
610#[doc = " @error An SSL peer sent us a fatal bad_record_mac alert. This has been observed\n from servers with buggy DEFLATE support."]
611pub const ArkWeb_NetError_ARKWEB_ERR_SSL_BAD_RECORD_MAC_ALERT: ArkWeb_NetError = -126;
612#[doc = " @error The proxy requested authentication (for tunnel establishment)."]
613pub const ArkWeb_NetError_ARKWEB_ERR_PROXY_AUTH_REQUESTED: ArkWeb_NetError = -127;
614#[doc = " @error Could not create a connection to the proxy server. An error occurred\n either in resolving its name, or in connecting a socket to it.\n Note that this does NOT include failures during the actual \"CONNECT\" method\n of an HTTP proxy."]
615pub const ArkWeb_NetError_ARKWEB_ERR_PROXY_CONNECTION_FAILED: ArkWeb_NetError = -130;
616#[doc = " @error A mandatory proxy configuration could not be used. Currently this means\n that a mandatory PAC script could not be fetched, parsed or executed."]
617pub const ArkWeb_NetError_ARKWEB_ERR_MANDATORY_PROXY_CONFIGURATION_FAILED: ArkWeb_NetError = -131;
618#[doc = " @error We've hit the max socket limit for the socket pool while preconnecting. We\n don't bother trying to preconnect more sockets."]
619pub const ArkWeb_NetError_ARKWEB_ERR_PRECONNECT_MAX_SOCKET_LIMIT: ArkWeb_NetError = -133;
620#[doc = " @error The permission to use the SSL client certificate's private key was denied."]
621pub const ArkWeb_NetError_ARKWEB_ERR_SSL_CLIENT_AUTH_PRIVATE_KEY_ACCESS_DENIED: ArkWeb_NetError =
622 -134;
623#[doc = " @error The SSL client certificate has no private key."]
624pub const ArkWeb_NetError_ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY: ArkWeb_NetError = -135;
625#[doc = " @error The certificate presented by the HTTPS Proxy was invalid."]
626pub const ArkWeb_NetError_ARKWEB_ERR_PROXY_CERTIFICATE_INVALID: ArkWeb_NetError = -136;
627#[doc = " @error An error occurred when trying to do a name resolution (DNS)."]
628pub const ArkWeb_NetError_ARKWEB_ERR_NAME_RESOLUTION_FAILED: ArkWeb_NetError = -137;
629#[doc = " @error Permission to access the network was denied. This is used to distinguish\n errors that were most likely caused by a firewall from other access denied\n errors. See also ERR_ACCESS_DENIED."]
630pub const ArkWeb_NetError_ARKWEB_ERR_NETWORK_ACCESS_DENIED: ArkWeb_NetError = -138;
631#[doc = " @error The request throttler module cancelled this request to avoid DDOS."]
632pub const ArkWeb_NetError_ARKWEB_ERR_TEMPORARILY_THROTTLED: ArkWeb_NetError = -139;
633#[doc = " @error A request to create an SSL tunnel connection through the HTTPS proxy\n received a 302 (temporary redirect, response. The response body might\n include a description of why the request failed."]
634pub const ArkWeb_NetError_ARKWEB_ERR_HTTPS_PROXY_TUNNEL_RESPONSE_REDIRECT: ArkWeb_NetError = -140;
635#[doc = " @error We were unable to sign the CertificateVerify data of an SSL client auth\n handshake with the client certificate's private key.\n Possible causes for this include the user implicitly or explicitly\n denying access to the private key, the private key may not be valid for\n signing, the key may be relying on a cached handle which is no longer\n valid, or the CSP won't allow arbitrary data to be signed."]
636pub const ArkWeb_NetError_ARKWEB_ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED: ArkWeb_NetError = -141;
637#[doc = " @error The message was too large for the transport. (for example a UDP message\n which exceeds size threshold)."]
638pub const ArkWeb_NetError_ARKWEB_ERR_MSG_TOO_BIG: ArkWeb_NetError = -142;
639#[doc = " @error Websocket protocol error. Indicates that we are terminating the connection\n due to a malformed frame or other protocol violation."]
640pub const ArkWeb_NetError_ARKWEB_ERR_WS_PROTOCOL_ERROR: ArkWeb_NetError = -145;
641#[doc = " @error Returned when attempting to bind an address that is already in use."]
642pub const ArkWeb_NetError_ARKWEB_ERR_ADDRESS_IN_USE: ArkWeb_NetError = -147;
643#[doc = " @error An operation failed because the SSL handshake has not completed."]
644pub const ArkWeb_NetError_ARKWEB_ERR_SSL_HANDSHAKE_NOT_COMPLETED: ArkWeb_NetError = -148;
645#[doc = " @error SSL peer's public key is invalid."]
646pub const ArkWeb_NetError_ARKWEB_ERR_SSL_BAD_PEER_PUBLIC_KEY: ArkWeb_NetError = -149;
647#[doc = " @error The certificate didn't match the built-in public key pins for the host name.\n The pins are set in net/http/transport_security_state.cc and require that\n one of a set of public keys exist on the path from the leaf to the root."]
648pub const ArkWeb_NetError_ARKWEB_ERR_SSL_PINNED_KEY_NOT_IN_CERT_CHAIN: ArkWeb_NetError = -150;
649#[doc = " @error Server request for client certificate did not contain any types we support."]
650pub const ArkWeb_NetError_ARKWEB_ERR_CLIENT_AUTH_CERT_TYPE_UNSUPPORTED: ArkWeb_NetError = -151;
651#[doc = " @error An SSL peer sent us a fatal decrypt_error alert. This typically occurs when\n a peer could not correctly verify a signature (in CertificateVerify or\n ServerKeyExchange, or validate a Finished message."]
652pub const ArkWeb_NetError_ARKWEB_ERR_SSL_DECRYPT_ERROR_ALERT: ArkWeb_NetError = -153;
653#[doc = " @error There are too many pending WebSocketJob instances, so the new job was not\n pushed to the queue."]
654pub const ArkWeb_NetError_ARKWEB_ERR_WS_THROTTLE_QUEUE_TOO_LARGE: ArkWeb_NetError = -154;
655#[doc = " @error The SSL server certificate changed in a renegotiation."]
656pub const ArkWeb_NetError_ARKWEB_ERR_SSL_SERVER_CERT_CHANGED: ArkWeb_NetError = -156;
657#[doc = " @error The SSL server sent us a fatal unrecognized_name alert."]
658pub const ArkWeb_NetError_ARKWEB_ERR_SSL_UNRECOGNIZED_NAME_ALERT: ArkWeb_NetError = -159;
659#[doc = " @error Failed to set the socket's receive buffer size as requested."]
660pub const ArkWeb_NetError_ARKWEB_ERR_SOCKET_SET_RECEIVE_BUFFER_SIZE_ERROR: ArkWeb_NetError = -160;
661#[doc = " @error Failed to set the socket's send buffer size as requested."]
662pub const ArkWeb_NetError_ARKWEB_ERR_SOCKET_SET_SEND_BUFFER_SIZE_ERROR: ArkWeb_NetError = -161;
663#[doc = " @error Failed to set the socket's receive buffer size as requested, despite success\n return code from setsockopt."]
664pub const ArkWeb_NetError_ARKWEB_ERR_SOCKET_RECEIVE_BUFFER_SIZE_UNCHANGEABLE: ArkWeb_NetError =
665 -162;
666#[doc = " @error Failed to set the socket's send buffer size as requested, despite success\n return code from setsockopt."]
667pub const ArkWeb_NetError_ARKWEB_ERR_SOCKET_SEND_BUFFER_SIZE_UNCHANGEABLE: ArkWeb_NetError = -163;
668#[doc = " @error Failed to import a client certificate from the platform store into the SSL\n library."]
669pub const ArkWeb_NetError_ARKWEB_ERR_SSL_CLIENT_AUTH_CERT_BAD_FORMAT: ArkWeb_NetError = -164;
670#[doc = " @error Resolving a hostname to an IP address list included the IPv4 address\n \"127.0.53.53\". This is a special IP address which ICANN has recommended to\n indicate there was a name collision, and alert admins to a potential\n problem."]
671pub const ArkWeb_NetError_ARKWEB_ERR_ICANN_NAME_COLLISION: ArkWeb_NetError = -166;
672#[doc = " @error The SSL server presented a certificate which could not be decoded. This is\n not a certificate error code as no X509Certificate object is available. This\n error is fatal."]
673pub const ArkWeb_NetError_ARKWEB_ERR_SSL_SERVER_CERT_BAD_FORMAT: ArkWeb_NetError = -167;
674#[doc = " @error Certificate Transparency: Received a signed tree head that failed to parse."]
675pub const ArkWeb_NetError_ARKWEB_ERR_CT_STH_PARSING_FAILED: ArkWeb_NetError = -168;
676#[doc = " @error Certificate Transparency: Received a signed tree head whose JSON parsing was\n OK but was missing some of the fields."]
677pub const ArkWeb_NetError_ARKWEB_ERR_CT_STH_INCOMPLETE: ArkWeb_NetError = -169;
678#[doc = " @error The attempt to reuse a connection to send proxy auth credentials failed\n before the AuthController was used to generate credentials. The caller should\n reuse the controller with a new connection. This error is only used\n internally by the network stack."]
679pub const ArkWeb_NetError_ARKWEB_ERR_UNABLE_TO_REUSE_CONNECTION_FOR_PROXY_AUTH: ArkWeb_NetError =
680 -170;
681#[doc = " @error Certificate Transparency: Failed to parse the received consistency proof."]
682pub const ArkWeb_NetError_ARKWEB_ERR_CT_CONSISTENCY_PROOF_PARSING_FAILED: ArkWeb_NetError = -171;
683#[doc = " @error The SSL server required an unsupported cipher suite that has since been\n removed. This error will temporarily be signaled on a fallback for one or two\n releases immediately following a cipher suite's removal, after which the\n fallback will be removed."]
684pub const ArkWeb_NetError_ARKWEB_ERR_SSL_OBSOLETE_CIPHER: ArkWeb_NetError = -172;
685#[doc = " @error When a WebSocket handshake is done successfully and the connection has been\n upgraded, the URLRequest is cancelled with this error code."]
686pub const ArkWeb_NetError_ARKWEB_ERR_WS_UPGRADE: ArkWeb_NetError = -173;
687#[doc = " @error Socket ReadIfReady support is not implemented. This error should not be user\n visible, because the normal Read(, method is used as a fallback."]
688pub const ArkWeb_NetError_ARKWEB_ERR_READ_IF_READY_NOT_IMPLEMENTED: ArkWeb_NetError = -174;
689#[doc = " @error No socket buffer space is available."]
690pub const ArkWeb_NetError_ARKWEB_ERR_NO_BUFFER_SPACE: ArkWeb_NetError = -176;
691#[doc = " @error There were no common signature algorithms between our client certificate\n private key and the server's preferences."]
692pub const ArkWeb_NetError_ARKWEB_ERR_SSL_CLIENT_AUTH_NO_COMMON_ALGORITHMS: ArkWeb_NetError = -177;
693#[doc = " @error TLS 1.3 early data was rejected by the server. This will be received before\n any data is returned from the socket. The request should be retried with\n early data disabled."]
694pub const ArkWeb_NetError_ARKWEB_ERR_EARLY_DATA_REJECTED: ArkWeb_NetError = -178;
695#[doc = " @error TLS 1.3 early data was offered, but the server responded with TLS 1.2 or\n earlier. This is an internal error code to account for a\n backwards-compatibility issue with early data and TLS 1.2. It will be\n received before any data is returned from the socket. The request should be\n retried with early data disabled.\n See https://tools.ietf.org/html/rfc8446#appendix-D.3 for details."]
696pub const ArkWeb_NetError_ARKWEB_ERR_WRONG_VERSION_ON_EARLY_DATA: ArkWeb_NetError = -179;
697#[doc = " @error TLS 1.3 was enabled, but a lower version was negotiated and the server\n returned a value indicating it supported TLS 1.3. This is part of a security\n check in TLS 1.3, but it may also indicate the user is behind a buggy\n TLS-terminating proxy which implemented TLS 1.2 incorrectly. (See\n rhttps://crbug.com/boringssl/226.,"]
698pub const ArkWeb_NetError_ARKWEB_ERR_TLS13_DOWNGRADE_DETECTED: ArkWeb_NetError = -180;
699#[doc = " @error The server's certificate has a keyUsage extension incompatible with the\n negotiated TLS key exchange method."]
700pub const ArkWeb_NetError_ARKWEB_ERR_SSL_KEY_USAGE_INCOMPATIBLE: ArkWeb_NetError = -181;
701#[doc = " @error The ECHConfigList fetched over DNS cannot be parsed."]
702pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_ECH_CONFIG_LIST: ArkWeb_NetError = -182;
703#[doc = " @error ECH was enabled, but the server was unable to decrypt the encrypted\n ClientHello."]
704pub const ArkWeb_NetError_ARKWEB_ERR_ECH_NOT_NEGOTIATED: ArkWeb_NetError = -183;
705#[doc = " @error ECH was enabled, the server was unable to decrypt the encrypted ClientHello,\n and additionally did not present a certificate valid for the public name."]
706pub const ArkWeb_NetError_ARKWEB_ERR_ECH_FALLBACK_CERTIFICATE_INVALID: ArkWeb_NetError = -184;
707#[doc = " @error The server responded with a certificate whose common name did not match\n the host name. This could mean:\n 1. An attacker has redirected our traffic to their server and is\n presenting a certificate for which they know the private key.\n 2. The server is misconfigured and responding with the wrong cert.\n 3. The user is on a wireless network and is being redirected to the\n network's login page.\n 4. The OS has used a DNS search suffix and the server doesn't have\n a certificate for the abbreviated name in the address bar."]
708pub const ArkWeb_NetError_ARKWEB_ERR_CERT_COMMON_NAME_INVALID: ArkWeb_NetError = -200;
709#[doc = " @error The server responded with a certificate that, by our clock, appears to\n either not yet be valid or to have expired. This could mean:\n 1. An attacker is presenting an old certificate for which they have\n managed to obtain the private key.\n 2. The server is misconfigured and is not presenting a valid cert.\n 3. Our clock is wrong."]
710pub const ArkWeb_NetError_ARKWEB_ERR_CERT_DATE_INVALID: ArkWeb_NetError = -201;
711#[doc = " @error The server responded with a certificate that is signed by an authority\n we don't trust. The could mean:\n 1. An attacker has substituted the real certificate for a cert that\n contains their public key and is signed by their cousin.\n 2. The server operator has a legitimate certificate from a CA we don't\n know about, but should trust.\n 3. The server is presenting a self-signed certificate, providing no\n defense against active attackers (but foiling passive attackers)."]
712pub const ArkWeb_NetError_ARKWEB_ERR_CERT_AUTHORITY_INVALID: ArkWeb_NetError = -202;
713#[doc = " @error The server responded with a certificate that contains errors.\n This error is not recoverable.\n MSDN describes this error as follows:\n \"The SSL certificate contains errors.\"\n NOTE: It's unclear how this differs from ERR_CERT_INVALID. For consistency,\n use that code instead of this one from now on."]
714pub const ArkWeb_NetError_ARKWEB_ERR_CERT_CONTAINS_ERRORS: ArkWeb_NetError = -203;
715#[doc = " @error The certificate has no mechanism for determining if it is revoked. In\n effect, this certificate cannot be revoked."]
716pub const ArkWeb_NetError_ARKWEB_ERR_CERT_NO_REVOCATION_MECHANISM: ArkWeb_NetError = -204;
717#[doc = " @error Revocation information for the security certificate for this site is not\n available. This could mean:\n 1. An attacker has compromised the private key in the certificate and is\n blocking our attempt to find out that the cert was revoked.\n 2. The certificate is unrevoked, but the revocation server is busy or\n unavailable."]
718pub const ArkWeb_NetError_ARKWEB_ERR_CERT_UNABLE_TO_CHECK_REVOCATION: ArkWeb_NetError = -205;
719#[doc = " @error The server responded with a certificate has been revoked.\n We have the capability to ignore this error, but it is probably not the\n thing to do."]
720pub const ArkWeb_NetError_ARKWEB_ERR_CERT_REVOKED: ArkWeb_NetError = -206;
721#[doc = " @error The server responded with a certificate that is invalid.\n This error is not recoverable.\n MSDN describes this error as follows:\n \"The SSL certificate is invalid.\""]
722pub const ArkWeb_NetError_ARKWEB_ERR_CERT_INVALID: ArkWeb_NetError = -207;
723#[doc = " @error The server responded with a certificate that is signed using a weak\n signature algorithm."]
724pub const ArkWeb_NetError_ARKWEB_ERR_CERT_WEAK_SIGNATURE_ALGORITHM: ArkWeb_NetError = -208;
725#[doc = " @error The host name specified in the certificate is not unique."]
726pub const ArkWeb_NetError_ARKWEB_ERR_CERT_NON_UNIQUE_NAME: ArkWeb_NetError = -210;
727#[doc = " @error The server responded with a certificate that contains a weak key (e.g.\n a too-small RSA key)."]
728pub const ArkWeb_NetError_ARKWEB_ERR_CERT_WEAK_KEY: ArkWeb_NetError = -211;
729#[doc = " @error The certificate claimed DNS names that are in violation of name constraints."]
730pub const ArkWeb_NetError_ARKWEB_ERR_CERT_NAME_CONSTRAINT_VIOLATION: ArkWeb_NetError = -212;
731#[doc = " @error The certificate's validity period is too long."]
732pub const ArkWeb_NetError_ARKWEB_ERR_CERT_VALIDITY_TOO_LONG: ArkWeb_NetError = -213;
733#[doc = " @error Certificate Transparency was required for this connection, but the server\n did not provide CT information that complied with the policy."]
734pub const ArkWeb_NetError_ARKWEB_ERR_CERTIFICATE_TRANSPARENCY_REQUIRED: ArkWeb_NetError = -214;
735#[doc = " @error The certificate chained to a legacy Symantec root that is no longer trusted."]
736pub const ArkWeb_NetError_ARKWEB_ERR_CERT_SYMANTEC_LEGACY: ArkWeb_NetError = -215;
737#[doc = " @error The certificate is known to be used for interception by an entity other\n the device owner."]
738pub const ArkWeb_NetError_ARKWEB_ERR_CERT_KNOWN_INTERCEPTION_BLOCKED: ArkWeb_NetError = -217;
739#[doc = " @error The connection uses an obsolete version of SSL/TLS or cipher."]
740pub const ArkWeb_NetError_ARKWEB_ERR_SSL_OBSOLETE_VERSION_OR_CIPHER: ArkWeb_NetError = -218;
741#[doc = " @error The value immediately past the last certificate error code."]
742pub const ArkWeb_NetError_ARKWEB_ERR_CERT_END: ArkWeb_NetError = -219;
743#[doc = " @error The URL is invalid."]
744pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_URL: ArkWeb_NetError = -300;
745#[doc = " @error The scheme of the URL is disallowed."]
746pub const ArkWeb_NetError_ARKWEB_ERR_DISALLOWED_URL_SCHEME: ArkWeb_NetError = -301;
747#[doc = " @error The scheme of the URL is unknown."]
748pub const ArkWeb_NetError_ARKWEB_ERR_UNKNOWN_URL_SCHEME: ArkWeb_NetError = -302;
749#[doc = " @error Attempting to load an URL resulted in a redirect to an invalid URL."]
750pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_REDIRECT: ArkWeb_NetError = -303;
751#[doc = " @error Attempting to load an URL resulted in too many redirects."]
752pub const ArkWeb_NetError_ARKWEB_ERR_TOO_MANY_REDIRECTS: ArkWeb_NetError = -310;
753#[doc = " @error Attempting to load an URL resulted in an unsafe redirect (e.g., a redirect\n to file:// is considered unsafe)."]
754pub const ArkWeb_NetError_ARKWEB_ERR_UNSAFE_REDIRECT: ArkWeb_NetError = -311;
755#[doc = " @error Attempting to load an URL with an unsafe port number."]
756pub const ArkWeb_NetError_ARKWEB_ERR_UNSAFE_PORT: ArkWeb_NetError = -312;
757#[doc = " @error The server's response was invalid."]
758pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_RESPONSE: ArkWeb_NetError = -320;
759#[doc = " @error Error in chunked transfer encoding."]
760pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_CHUNKED_ENCODING: ArkWeb_NetError = -321;
761#[doc = " @error The server did not support the request method."]
762pub const ArkWeb_NetError_ARKWEB_ERR_METHOD_UNSUPPORTED: ArkWeb_NetError = -322;
763#[doc = " @error The response was 407 (Proxy Authentication Required,, yet we did not send\n the request to a proxy."]
764pub const ArkWeb_NetError_ARKWEB_ERR_UNEXPECTED_PROXY_AUTH: ArkWeb_NetError = -323;
765#[doc = " @error The server closed the connection without sending any data."]
766pub const ArkWeb_NetError_ARKWEB_ERR_EMPTY_RESPONSE: ArkWeb_NetError = -324;
767#[doc = " @error The headers section of the response is too large."]
768pub const ArkWeb_NetError_ARKWEB_ERR_RESPONSE_HEADERS_TOO_BIG: ArkWeb_NetError = -325;
769#[doc = " @error The evaluation of the PAC script failed."]
770pub const ArkWeb_NetError_ARKWEB_ERR_PAC_SCRIPT_FAILED: ArkWeb_NetError = -327;
771#[doc = " @error The response was 416 (Requested range not satisfiable, and the server cannot\n satisfy the range requested."]
772pub const ArkWeb_NetError_ARKWEB_ERR_REQUEST_RANGE_NOT_SATISFIABLE: ArkWeb_NetError = -328;
773#[doc = " @error The identity used for authentication is invalid."]
774pub const ArkWeb_NetError_ARKWEB_ERR_MALFORMED_IDENTITY: ArkWeb_NetError = -329;
775#[doc = " @error Content decoding of the response body failed."]
776pub const ArkWeb_NetError_ARKWEB_ERR_CONTENT_DECODING_FAILED: ArkWeb_NetError = -330;
777#[doc = " @error An operation could not be completed because all network IO\n is suspended."]
778pub const ArkWeb_NetError_ARKWEB_ERR_NETWORK_IO_SUSPENDED: ArkWeb_NetError = -331;
779#[doc = " @error FLIP data received without receiving a SYN_REPLY on the stream."]
780pub const ArkWeb_NetError_ARKWEB_ERR_SYN_REPLY_NOT_RECEIVED: ArkWeb_NetError = -332;
781#[doc = " @error Converting the response to target encoding failed."]
782pub const ArkWeb_NetError_ARKWEB_ERR_ENCODING_CONVERSION_FAILED: ArkWeb_NetError = -333;
783#[doc = " @error The server sent an FTP directory listing in a format we do not understand."]
784pub const ArkWeb_NetError_ARKWEB_ERR_UNRECOGNIZED_FTP_DIRECTORY_LISTING_FORMAT: ArkWeb_NetError =
785 -334;
786#[doc = " @error There are no supported proxies in the provided list."]
787pub const ArkWeb_NetError_ARKWEB_ERR_NO_SUPPORTED_PROXIES: ArkWeb_NetError = -336;
788#[doc = " @error There is an HTTP/2 protocol error."]
789pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_PROTOCOL_ERROR: ArkWeb_NetError = -337;
790#[doc = " @error Credentials could not be established during HTTP Authentication."]
791pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_AUTH_CREDENTIALS: ArkWeb_NetError = -338;
792#[doc = " @error An HTTP Authentication scheme was tried which is not supported on this\n machine."]
793pub const ArkWeb_NetError_ARKWEB_ERR_UNSUPPORTED_AUTH_SCHEME: ArkWeb_NetError = -339;
794#[doc = " @error Detecting the encoding of the response failed."]
795pub const ArkWeb_NetError_ARKWEB_ERR_ENCODING_DETECTION_FAILED: ArkWeb_NetError = -340;
796#[doc = " @error (GSSAPI, No Kerberos credentials were available during HTTP Authentication."]
797pub const ArkWeb_NetError_ARKWEB_ERR_MISSING_AUTH_CREDENTIALS: ArkWeb_NetError = -341;
798#[doc = " @error An unexpected, but documented, SSPI or GSSAPI status code was returned."]
799pub const ArkWeb_NetError_ARKWEB_ERR_UNEXPECTED_SECURITY_LIBRARY_STATUS: ArkWeb_NetError = -342;
800#[doc = " @error The environment was not set up correctly for authentication (for\n example, no KDC could be found or the principal is unknown."]
801pub const ArkWeb_NetError_ARKWEB_ERR_MISCONFIGURED_AUTH_ENVIRONMENT: ArkWeb_NetError = -343;
802#[doc = " @error An undocumented SSPI or GSSAPI status code was returned."]
803pub const ArkWeb_NetError_ARKWEB_ERR_UNDOCUMENTED_SECURITY_LIBRARY_STATUS: ArkWeb_NetError = -344;
804#[doc = " @error The HTTP response was too big to drain."]
805pub const ArkWeb_NetError_ARKWEB_ERR_RESPONSE_BODY_TOO_BIG_TO_DRAIN: ArkWeb_NetError = -345;
806#[doc = " @error The HTTP response contained multiple distinct Content-Length headers."]
807pub const ArkWeb_NetError_ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_LENGTH: ArkWeb_NetError =
808 -346;
809#[doc = " @error HTTP/2 headers have been received, but not all of them - status or version\n headers are missing, so we're expecting additional frames to complete them."]
810pub const ArkWeb_NetError_ARKWEB_ERR_INCOMPLETE_HTTP2_HEADERS: ArkWeb_NetError = -347;
811#[doc = " @error No PAC URL configuration could be retrieved from DHCP. This can indicate\n either a failure to retrieve the DHCP configuration, or that there was no\n PAC URL configured in DHCP."]
812pub const ArkWeb_NetError_ARKWEB_ERR_PAC_NOT_IN_DHCP: ArkWeb_NetError = -348;
813#[doc = " @error The HTTP response contained multiple Content-Disposition headers."]
814pub const ArkWeb_NetError_ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION:
815 ArkWeb_NetError = -349;
816#[doc = " @error The HTTP response contained multiple Location headers."]
817pub const ArkWeb_NetError_ARKWEB_ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION: ArkWeb_NetError = -350;
818#[doc = " @error HTTP/2 server refused the request without processing, and sent either a\n GOAWAY frame with error code NO_ERROR and Last-Stream-ID lower than the\n stream id corresponding to the request indicating that this request has not\n been processed yet, or a RST_STREAM frame with error code REFUSED_STREAM.\n Client MAY retry (on a different connection). See RFC7540 Section 8.1.4."]
819pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_SERVER_REFUSED_STREAM: ArkWeb_NetError = -351;
820#[doc = " @error HTTP/2 server didn't respond to the PING message."]
821pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_PING_FAILED: ArkWeb_NetError = -352;
822#[doc = " @error The HTTP response body transferred fewer bytes than were advertised by the\n Content-Length header when the connection is closed."]
823pub const ArkWeb_NetError_ARKWEB_ERR_CONTENT_LENGTH_MISMATCH: ArkWeb_NetError = -354;
824#[doc = " @error The HTTP response body is transferred with Chunked-Encoding, but the\n terminating zero-length chunk was never sent when the connection is closed."]
825pub const ArkWeb_NetError_ARKWEB_ERR_INCOMPLETE_CHUNKED_ENCODING: ArkWeb_NetError = -355;
826#[doc = " @error There is a QUIC protocol error."]
827pub const ArkWeb_NetError_ARKWEB_ERR_QUIC_PROTOCOL_ERROR: ArkWeb_NetError = -356;
828#[doc = " @error The HTTP headers were truncated by an EOF."]
829pub const ArkWeb_NetError_ARKWEB_ERR_RESPONSE_HEADERS_TRUNCATED: ArkWeb_NetError = -357;
830#[doc = " @error The QUIC crypto handshake failed. This means that the server was unable\n to read any requests sent, so they may be resent."]
831pub const ArkWeb_NetError_ARKWEB_ERR_QUIC_HANDSHAKE_FAILED: ArkWeb_NetError = -358;
832#[doc = " @error Transport security is inadequate for the HTTP/2 version."]
833pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_INADEQUATE_TRANSPORT_SECURITY: ArkWeb_NetError = -360;
834#[doc = " @error The peer violated HTTP/2 flow control."]
835pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_FLOW_CONTROL_ERROR: ArkWeb_NetError = -361;
836#[doc = " @error The peer sent an improperly sized HTTP/2 frame."]
837pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_FRAME_SIZE_ERROR: ArkWeb_NetError = -362;
838#[doc = " @error Decoding or encoding of compressed HTTP/2 headers failed."]
839pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_COMPRESSION_ERROR: ArkWeb_NetError = -363;
840#[doc = " @error Proxy Auth Requested without a valid Client Socket Handle."]
841pub const ArkWeb_NetError_ARKWEB_ERR_PROXY_AUTH_REQUESTED_WITH_NO_CONNECTION: ArkWeb_NetError =
842 -364;
843#[doc = " @error HTTP_1_1_REQUIRED error code received on HTTP/2 session."]
844pub const ArkWeb_NetError_ARKWEB_ERR_HTTP_1_1_REQUIRED: ArkWeb_NetError = -365;
845#[doc = " @error HTTP_1_1_REQUIRED error code received on HTTP/2 session to proxy."]
846pub const ArkWeb_NetError_ARKWEB_ERR_PROXY_HTTP_1_1_REQUIRED: ArkWeb_NetError = -366;
847#[doc = " @error The PAC script terminated fatally and must be reloaded."]
848pub const ArkWeb_NetError_ARKWEB_ERR_PAC_SCRIPT_TERMINATED: ArkWeb_NetError = -367;
849#[doc = " @error The server was expected to return an HTTP/1.x response, but did not. Rather\n than treat it as HTTP/0.9, this error is returned."]
850pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_HTTP_RESPONSE: ArkWeb_NetError = -370;
851#[doc = " @error Initializing content decoding failed."]
852pub const ArkWeb_NetError_ARKWEB_ERR_CONTENT_DECODING_INIT_FAILED: ArkWeb_NetError = -371;
853#[doc = " @error Received HTTP/2 RST_STREAM frame with NO_ERROR error code. This error should\n be handled internally by HTTP/2 code, and should not make it above the\n SpdyStream layer."]
854pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_RST_STREAM_NO_ERROR_RECEIVED: ArkWeb_NetError = -372;
855#[doc = " @error The pushed stream claimed by the request is no longer available."]
856pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_PUSHED_STREAM_NOT_AVAILABLE: ArkWeb_NetError = -373;
857#[doc = " @error A pushed stream was claimed and later reset by the server. When this happens,\n the request should be retried."]
858pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_CLAIMED_PUSHED_STREAM_RESET_BY_SERVER: ArkWeb_NetError =
859 -374;
860#[doc = " @error An HTTP transaction was retried too many times due for authentication or\n invalid certificates."]
861pub const ArkWeb_NetError_ARKWEB_ERR_TOO_MANY_RETRIES: ArkWeb_NetError = -375;
862#[doc = " @error Received an HTTP/2 frame on a closed stream."]
863pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_STREAM_CLOSED: ArkWeb_NetError = -376;
864#[doc = " @error Client is refusing an HTTP/2 stream."]
865pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_CLIENT_REFUSED_STREAM: ArkWeb_NetError = -377;
866#[doc = " @error A pushed HTTP/2 stream was claimed by a request based on matching URL and\n request headers, but the pushed response headers do not match the request."]
867pub const ArkWeb_NetError_ARKWEB_ERR_HTTP2_PUSHED_RESPONSE_DOES_NOT_MATCH: ArkWeb_NetError = -378;
868#[doc = " @error The server returned a non-2xx HTTP response code."]
869pub const ArkWeb_NetError_ARKWEB_ERR_HTTP_RESPONSE_CODE_FAILURE: ArkWeb_NetError = -379;
870#[doc = " @error The certificate presented on a QUIC connection does not chain to a known root\n and the origin connected to is not on a list of domains where unknown roots\n are allowed."]
871pub const ArkWeb_NetError_ARKWEB_ERR_QUIC_UNKNOWN_CERT_ROOT: ArkWeb_NetError = -380;
872#[doc = " @error A GOAWAY frame has been received indicating that the request has not been\n processed and is therefore safe to retry on a different connection."]
873pub const ArkWeb_NetError_ARKWEB_ERR_QUIC_GOAWAY_REQUEST_CAN_BE_RETRIED: ArkWeb_NetError = -381;
874#[doc = " @error The ACCEPT_CH restart has been triggered too many times."]
875pub const ArkWeb_NetError_ARKWEB_ERR_TOO_MANY_ACCEPT_CH_RESTARTS: ArkWeb_NetError = -382;
876#[doc = " @error The IP address space of the remote endpoint differed from the previous\n observed value during the same request. Any cache entry for the affected\n request should be invalidated."]
877pub const ArkWeb_NetError_ARKWEB_ERR_INCONSISTENT_IP_ADDRESS_SPACE: ArkWeb_NetError = -383;
878#[doc = " @error The IP address space of the cached remote endpoint is blocked by local\n network access check."]
879pub const ArkWeb_NetError_ARKWEB_ERR_CACHED_IP_ADDRESS_SPACE_BLOCKED_BY_LOCAL_NETWORK_ACCESS_POLICY : ArkWeb_NetError = - 384 ;
880#[doc = " @error The cache does not have the requested entry."]
881pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_MISS: ArkWeb_NetError = -400;
882#[doc = " @error Unable to read from the disk cache."]
883pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_READ_FAILURE: ArkWeb_NetError = -401;
884#[doc = " @error Unable to write to the disk cache."]
885pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_WRITE_FAILURE: ArkWeb_NetError = -402;
886#[doc = " @error The operation is not supported for this entry."]
887pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_OPERATION_UNSUPPORTED: ArkWeb_NetError = -403;
888#[doc = " @error The disk cache is unable to open this entry."]
889pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_OPEN_FAILURE: ArkWeb_NetError = -404;
890#[doc = " @error The disk cache is unable to create this entry."]
891pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_CREATE_FAILURE: ArkWeb_NetError = -405;
892#[doc = " @error Multiple transactions are racing to create disk cache entries."]
893pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_RACE: ArkWeb_NetError = -406;
894#[doc = " @error The cache was unable to read a checksum record on an entry."]
895pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_CHECKSUM_READ_FAILURE: ArkWeb_NetError = -407;
896#[doc = " @error The cache found an entry with an invalid checksum."]
897pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_CHECKSUM_MISMATCH: ArkWeb_NetError = -408;
898#[doc = " @error Internal error code for the HTTP cache."]
899pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_LOCK_TIMEOUT: ArkWeb_NetError = -409;
900#[doc = " @error Received a challenge after the transaction has read some data, and the\n credentials aren't available."]
901pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_AUTH_FAILURE_AFTER_READ: ArkWeb_NetError = -410;
902#[doc = " @error Internal not-quite error code for the HTTP cache."]
903pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_ENTRY_NOT_SUITABLE: ArkWeb_NetError = -411;
904#[doc = " @error The disk cache is unable to doom this entry."]
905pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_DOOM_FAILURE: ArkWeb_NetError = -412;
906#[doc = " @error The disk cache is unable to open or create this entry."]
907pub const ArkWeb_NetError_ARKWEB_ERR_CACHE_OPEN_OR_CREATE_FAILURE: ArkWeb_NetError = -413;
908#[doc = " @error The server's response was insecure (e.g. there was a cert error)."]
909pub const ArkWeb_NetError_ARKWEB_ERR_INSECURE_RESPONSE: ArkWeb_NetError = -501;
910#[doc = " @error An attempt to import a client certificate failed, as the user's key\n database lacked a corresponding private key."]
911pub const ArkWeb_NetError_ARKWEB_ERR_NO_PRIVATE_KEY_FOR_CERT: ArkWeb_NetError = -502;
912#[doc = " @error An error adding a certificate to the OS certificate database."]
913pub const ArkWeb_NetError_ARKWEB_ERR_ADD_USER_CERT_FAILED: ArkWeb_NetError = -503;
914#[doc = " @error An error occurred while handling a signed exchange."]
915pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_SIGNED_EXCHANGE: ArkWeb_NetError = -504;
916#[doc = " @error An error occurred while handling a Web Bundle source."]
917pub const ArkWeb_NetError_ARKWEB_ERR_INVALID_WEB_BUNDLE: ArkWeb_NetError = -505;
918#[doc = " @error A Trust Tokens protocol operation-executing request failed for one of a\n number of reasons (precondition failure, internal error, bad response)."]
919pub const ArkWeb_NetError_ARKWEB_ERR_TRUST_TOKEN_OPERATION_FAILED: ArkWeb_NetError = -506;
920#[doc = " @error When handling a Trust Tokens protocol operation-executing request, the system\n was able to execute the request's Trust Tokens operation without sending the\n request to its destination."]
921pub const ArkWeb_NetError_ARKWEB_ERR_TRUST_TOKEN_OPERATION_SUCCESS_WITHOUT_SENDING_REQUEST:
922 ArkWeb_NetError = -507;
923#[doc = " @error A generic error for failed FTP control connection command.\n If possible, please use or add a more specific error code."]
924pub const ArkWeb_NetError_ARKWEB_ERR_FTP_FAILED: ArkWeb_NetError = -601;
925#[doc = " @error The server cannot fulfill the request at this point. This is a temporary error.\n FTP response code 421."]
926pub const ArkWeb_NetError_ARKWEB_ERR_FTP_SERVICE_UNAVAILABLE: ArkWeb_NetError = -602;
927#[doc = " @error The server has aborted the transfer.\n FTP response code 426."]
928pub const ArkWeb_NetError_ARKWEB_ERR_FTP_TRANSFER_ABORTED: ArkWeb_NetError = -603;
929#[doc = " @error The file is busy, or some other temporary error condition on opening the file.\n FTP response code 450."]
930pub const ArkWeb_NetError_ARKWEB_ERR_FTP_FILE_BUSY: ArkWeb_NetError = -604;
931#[doc = " @error Server rejected our command because of syntax errors.\n FTP response codes 500, 501."]
932pub const ArkWeb_NetError_ARKWEB_ERR_FTP_SYNTAX_ERROR: ArkWeb_NetError = -605;
933#[doc = " @error Server does not support the command we issued.\n FTP response codes 502, 504."]
934pub const ArkWeb_NetError_ARKWEB_ERR_FTP_COMMAND_UNSUPPORTED: ArkWeb_NetError = -606;
935#[doc = " @error Server rejected our command because we didn't issue the commands in right order.\n FTP response code 503."]
936pub const ArkWeb_NetError_ARKWEB_ERR_FTP_BAD_COMMAND_SEQUENCE: ArkWeb_NetError = -607;
937#[doc = " @error PKCS #12 import failed due to incorrect password."]
938pub const ArkWeb_NetError_ARKWEB_ERR_PKCS12_IMPORT_BAD_PASSWORD: ArkWeb_NetError = -701;
939#[doc = " @error PKCS #12 import failed due to other error."]
940pub const ArkWeb_NetError_ARKWEB_ERR_PKCS12_IMPORT_FAILED: ArkWeb_NetError = -702;
941#[doc = " @error CA import failed - not a CA cert."]
942pub const ArkWeb_NetError_ARKWEB_ERR_IMPORT_CA_CERT_NOT_CA: ArkWeb_NetError = -703;
943#[doc = " @error Import failed - certificate already exists in database."]
944pub const ArkWeb_NetError_ARKWEB_ERR_IMPORT_CERT_ALREADY_EXISTS: ArkWeb_NetError = -704;
945#[doc = " @error CA import failed due to some other error."]
946pub const ArkWeb_NetError_ARKWEB_ERR_IMPORT_CA_CERT_FAILED: ArkWeb_NetError = -705;
947#[doc = " @error Server certificate import failed due to some internal error."]
948pub const ArkWeb_NetError_ARKWEB_ERR_IMPORT_SERVER_CERT_FAILED: ArkWeb_NetError = -706;
949#[doc = " @error PKCS #12 import failed due to invalid MAC."]
950pub const ArkWeb_NetError_ARKWEB_ERR_PKCS12_IMPORT_INVALID_MAC: ArkWeb_NetError = -707;
951#[doc = " @error PKCS #12 import failed due to invalid/corrupt file."]
952pub const ArkWeb_NetError_ARKWEB_ERR_PKCS12_IMPORT_INVALID_FILE: ArkWeb_NetError = -708;
953#[doc = " @error PKCS #12 import failed due to unsupported features."]
954pub const ArkWeb_NetError_ARKWEB_ERR_PKCS12_IMPORT_UNSUPPORTED: ArkWeb_NetError = -709;
955#[doc = " @error Key generation failed."]
956pub const ArkWeb_NetError_ARKWEB_ERR_KEY_GENERATION_FAILED: ArkWeb_NetError = -710;
957#[doc = " @error Failure to export private key."]
958pub const ArkWeb_NetError_ARKWEB_ERR_PRIVATE_KEY_EXPORT_FAILED: ArkWeb_NetError = -712;
959#[doc = " @error Self-signed certificate generation failed."]
960pub const ArkWeb_NetError_ARKWEB_ERR_SELF_SIGNED_CERT_GENERATION_FAILED: ArkWeb_NetError = -713;
961#[doc = " @error The certificate database changed in some way."]
962pub const ArkWeb_NetError_ARKWEB_ERR_CERT_DATABASE_CHANGED: ArkWeb_NetError = -714;
963#[doc = " @error The certificate verifier configuration changed in some way."]
964pub const ArkWeb_NetError_ARKWEB_ERR_CERT_VERIFIER_CHANGED: ArkWeb_NetError = -716;
965#[doc = " @error DNS resolver received a malformed response."]
966pub const ArkWeb_NetError_ARKWEB_ERR_DNS_MALFORMED_RESPONSE: ArkWeb_NetError = -800;
967#[doc = " @error DNS server requires TCP."]
968pub const ArkWeb_NetError_ARKWEB_ERR_DNS_SERVER_REQUIRES_TCP: ArkWeb_NetError = -801;
969#[doc = " @error DNS server failed. This error is returned for all of the following\n error conditions:\n 1 - Format error - The name server was unable to interpret the query.\n 2 - Server failure - The name server was unable to process this query\n due to a problem with the name server.\n 4 - Not Implemented - The name server does not support the requested\n kind of query.\n 5 - Refused - The name server refuses to perform the specified\n operation for policy reasons."]
970pub const ArkWeb_NetError_ARKWEB_ERR_DNS_SERVER_FAILED: ArkWeb_NetError = -802;
971#[doc = " @error DNS transaction timed out."]
972pub const ArkWeb_NetError_ARKWEB_ERR_DNS_TIMED_OUT: ArkWeb_NetError = -803;
973#[doc = " @error The entry was not found in cache or other local sources, for lookups where\n only local sources were queried."]
974pub const ArkWeb_NetError_ARKWEB_ERR_DNS_CACHE_MISS: ArkWeb_NetError = -804;
975#[doc = " @error Suffix search list rules prevent resolution of the given host name."]
976pub const ArkWeb_NetError_ARKWEB_ERR_DNS_SEARCH_EMPTY: ArkWeb_NetError = -805;
977#[doc = " @error Failed to sort addresses according to RFC3484."]
978pub const ArkWeb_NetError_ARKWEB_ERR_DNS_SORT_ERROR: ArkWeb_NetError = -806;
979#[doc = " @error Failed to resolve the hostname of a DNS-over-HTTPS server."]
980pub const ArkWeb_NetError_ARKWEB_ERR_DNS_SECURE_RESOLVER_HOSTNAME_RESOLUTION_FAILED:
981 ArkWeb_NetError = -808;
982#[doc = " @error DNS identified the request as disallowed for insecure connection (http/ws).\n Error should be handled as if an HTTP redirect was received to redirect to\n https or wss."]
983pub const ArkWeb_NetError_ARKWEB_ERR_DNS_NAME_HTTPS_ONLY: ArkWeb_NetError = -809;
984#[doc = " @error All DNS requests associated with this job have been cancelled."]
985pub const ArkWeb_NetError_ARKWEB_ERR_DNS_REQUEST_CANCELED: ArkWeb_NetError = -810;
986#[doc = " @error The hostname resolution of HTTPS record was expected to be resolved with\n alpn values of supported protocols, but did not."]
987pub const ArkWeb_NetError_ARKWEB_ERR_DNS_NO_MATCHING_SUPPORTED_ALPN: ArkWeb_NetError = -811;
988pub type ArkWeb_NetError = i32;
989pub const ArkWeb_CustomSchemeOption_OH_ARKWEB_SCHEME_OPTION_NONE: ArkWeb_CustomSchemeOption = 0;
990#[doc = " If ARKWEB_SCHEME_OPTION_STANDARD is set, the scheme will be handled as a standard scheme. The standard\n schemes need to comply with the URL normalization and parsing rules defined in Section 3.1 of RFC 1738,\n which can be found in the http://www.ietf.org/rfc/rfc1738.txt."]
991pub const ArkWeb_CustomSchemeOption_ARKWEB_SCHEME_OPTION_STANDARD: ArkWeb_CustomSchemeOption = 1;
992#[doc = " If ARKWEB_SCHEME_OPTION_LOCAL is set, the same security rules as those applied to the \"file\" URL will be\n used to handle the scheme."]
993pub const ArkWeb_CustomSchemeOption_ARKWEB_SCHEME_OPTION_LOCAL: ArkWeb_CustomSchemeOption = 2;
994#[doc = " If ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED is set, then the scheme can only be displayed from other content\n hosted using the same scheme."]
995pub const ArkWeb_CustomSchemeOption_ARKWEB_SCHEME_OPTION_DISPLAY_ISOLATED:
996 ArkWeb_CustomSchemeOption = 4;
997#[doc = " If ARKWEB_SCHEME_OPTION_SECURE is set, the same security rules as those applied to the \"https\" URL will be\n used to handle the scheme."]
998pub const ArkWeb_CustomSchemeOption_ARKWEB_SCHEME_OPTION_SECURE: ArkWeb_CustomSchemeOption = 8;
999#[doc = " If ARKWEB_SCHEME_OPTION_CORS_ENABLED is set, then the scheme can be sent CORS requests. In most cases this\n value should be set when ARKWEB_SCHEME_OPTION_STANDARD is set."]
1000pub const ArkWeb_CustomSchemeOption_ARKWEB_SCHEME_OPTION_CORS_ENABLED: ArkWeb_CustomSchemeOption =
1001 16;
1002#[doc = " If ARKWEB_SCHEME_OPTION_CSP_BYPASSING is set, then this scheme can bypass Content Security Policy (CSP)\n checks. In most cases, this value should not be set when ARKWEB_SCHEME_OPTION_STANDARD is set."]
1003pub const ArkWeb_CustomSchemeOption_ARKWEB_SCHEME_OPTION_CSP_BYPASSING: ArkWeb_CustomSchemeOption =
1004 32;
1005#[doc = " If ARKWEB_SCHEME_OPTION_FETCH_ENABLED is set, then this scheme can perform FETCH API requests."]
1006pub const ArkWeb_CustomSchemeOption_ARKWEB_SCHEME_OPTION_FETCH_ENABLED: ArkWeb_CustomSchemeOption =
1007 64;
1008#[doc = " If ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED is set, then the js of this scheme can generate code cache."]
1009pub const ArkWeb_CustomSchemeOption_ARKWEB_SCHEME_OPTION_CODE_CACHE_ENABLED:
1010 ArkWeb_CustomSchemeOption = 128;
1011#[doc = " @brief Configuration information for custom schemes.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1012pub type ArkWeb_CustomSchemeOption = u32;
1013#[doc = " Top level page."]
1014pub const ArkWeb_ResourceType_MAIN_FRAME: ArkWeb_ResourceType = 0;
1015#[doc = " Frame or Iframe."]
1016pub const ArkWeb_ResourceType_SUB_FRAME: ArkWeb_ResourceType = 1;
1017#[doc = " CSS stylesheet."]
1018pub const ArkWeb_ResourceType_STYLE_SHEET: ArkWeb_ResourceType = 2;
1019#[doc = " External script."]
1020pub const ArkWeb_ResourceType_SCRIPT: ArkWeb_ResourceType = 3;
1021#[doc = " Image(jpg/gif/png/etc)."]
1022pub const ArkWeb_ResourceType_IMAGE: ArkWeb_ResourceType = 4;
1023#[doc = " Font."]
1024pub const ArkWeb_ResourceType_FONT_RESOURCE: ArkWeb_ResourceType = 5;
1025#[doc = " Some other subresource. This is the default type if the actual type is unknown."]
1026pub const ArkWeb_ResourceType_SUB_RESOURCE: ArkWeb_ResourceType = 6;
1027#[doc = " Object (or embed) tag for a plugin, or a resource that a plugin requested."]
1028pub const ArkWeb_ResourceType_OBJECT: ArkWeb_ResourceType = 7;
1029#[doc = " Media resource."]
1030pub const ArkWeb_ResourceType_MEDIA: ArkWeb_ResourceType = 8;
1031#[doc = " Main resource of a dedicated worker."]
1032pub const ArkWeb_ResourceType_WORKER: ArkWeb_ResourceType = 9;
1033#[doc = " Main resource of a shared worker."]
1034pub const ArkWeb_ResourceType_SHARED_WORKER: ArkWeb_ResourceType = 10;
1035#[doc = " Explicitly requested prefetch."]
1036pub const ArkWeb_ResourceType_PREFETCH: ArkWeb_ResourceType = 11;
1037#[doc = " Favicon."]
1038pub const ArkWeb_ResourceType_FAVICON: ArkWeb_ResourceType = 12;
1039#[doc = " XMLHttpRequest."]
1040pub const ArkWeb_ResourceType_XHR: ArkWeb_ResourceType = 13;
1041#[doc = " Ping request for <a ping>/sendBeacon."]
1042pub const ArkWeb_ResourceType_PING: ArkWeb_ResourceType = 14;
1043#[doc = " The main resource of a service worker."]
1044pub const ArkWeb_ResourceType_SERVICE_WORKER: ArkWeb_ResourceType = 15;
1045#[doc = " Report of Content Security Policy violations."]
1046pub const ArkWeb_ResourceType_CSP_REPORT: ArkWeb_ResourceType = 16;
1047#[doc = " Resource that a plugin requested."]
1048pub const ArkWeb_ResourceType_PLUGIN_RESOURCE: ArkWeb_ResourceType = 17;
1049#[doc = " A main-frame service worker navigation preload request."]
1050pub const ArkWeb_ResourceType_NAVIGATION_PRELOAD_MAIN_FRAME: ArkWeb_ResourceType = 19;
1051#[doc = " A sub-frame service worker navigation preload request."]
1052pub const ArkWeb_ResourceType_NAVIGATION_PRELOAD_SUB_FRAME: ArkWeb_ResourceType = 20;
1053#[doc = " @brief Resource type for a request.\n\n These constants match their equivalents in Chromium's ResourceType and should not be renumbered.\\n\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1054pub type ArkWeb_ResourceType = u32;
1055#[repr(C)]
1056#[derive(Debug, Copy, Clone)]
1057pub struct ArkWeb_SchemeHandler_ {
1058 _unused: [u8; 0],
1059}
1060#[doc = " @brief This class is used to intercept requests for a specified scheme.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1061pub type ArkWeb_SchemeHandler = ArkWeb_SchemeHandler_;
1062#[repr(C)]
1063#[derive(Debug, Copy, Clone)]
1064pub struct ArkWeb_ResourceHandler_ {
1065 _unused: [u8; 0],
1066}
1067#[doc = " @brief Used to intercept url requests.\n\n Response headers and body can be sent through ArkWeb_ResourceHandler.\\n\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1068pub type ArkWeb_ResourceHandler = ArkWeb_ResourceHandler_;
1069#[repr(C)]
1070#[derive(Debug, Copy, Clone)]
1071pub struct ArkWeb_Response_ {
1072 _unused: [u8; 0],
1073}
1074#[doc = " @brief The response of the intercepted request.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1075pub type ArkWeb_Response = ArkWeb_Response_;
1076#[repr(C)]
1077#[derive(Debug, Copy, Clone)]
1078pub struct ArkWeb_ResourceRequest_ {
1079 _unused: [u8; 0],
1080}
1081#[doc = " @brief The info of the request.\n\n You can obtain the requested URL, method, post data, and other information through OH_ArkWeb_ResourceRequest.\\n\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1082pub type ArkWeb_ResourceRequest = ArkWeb_ResourceRequest_;
1083#[repr(C)]
1084#[derive(Debug, Copy, Clone)]
1085pub struct ArkWeb_RequestHeaderList_ {
1086 _unused: [u8; 0],
1087}
1088#[doc = " @brief The request headers of the request.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1089pub type ArkWeb_RequestHeaderList = ArkWeb_RequestHeaderList_;
1090#[repr(C)]
1091#[derive(Debug, Copy, Clone)]
1092pub struct ArkWeb_HttpBodyStream_ {
1093 _unused: [u8; 0],
1094}
1095#[doc = " @brief The http body of the request.\n\n Use OH_ArkWebHttpBodyStream_* interface to read the body.\\n\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1096pub type ArkWeb_HttpBodyStream = ArkWeb_HttpBodyStream_;
1097#[doc = " @brief Callback for handling the request.\n\n This will be called on the IO thread.\\n\n\n @param schemeHandler The ArkWeb_SchemeHandler.\n @param resourceRequest Obtain request's information through this.\n @param resourceHandler The ArkWeb_ResourceHandler for the request. It should not be used if intercept is set to\n false.\n @param intercept If true will intercept the request, if false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1098pub type ArkWeb_OnRequestStart = ::std::option::Option<
1099 unsafe extern "C" fn(
1100 schemeHandler: *const ArkWeb_SchemeHandler,
1101 resourceRequest: *mut ArkWeb_ResourceRequest,
1102 resourceHandler: *const ArkWeb_ResourceHandler,
1103 intercept: *mut bool,
1104 ),
1105>;
1106#[doc = " @brief Callback when the request is completed.\n\n This will be called on the IO thread.\\n\n Should destory the resourceRequest by ArkWeb_ResourceRequest_Destroy and use ArkWeb_ResourceHandler_Destroy\\n\n destroy the ArkWeb_ResourceHandler received in ArkWeb_OnRequestStart.\\n\n\n @param schemeHandler The ArkWeb_SchemeHandler.\n @param resourceRequest The ArkWeb_ResourceRequest.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1107pub type ArkWeb_OnRequestStop = ::std::option::Option<
1108 unsafe extern "C" fn(
1109 schemeHandler: *const ArkWeb_SchemeHandler,
1110 resourceRequest: *const ArkWeb_ResourceRequest,
1111 ),
1112>;
1113#[doc = " @brief Callback when the read operation done.\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param buffer The buffer to receive data.\n @param bytesRead Callback after OH_ArkWebHttpBodyStream_Read. bytesRead greater than 0 means that the buffer is\n filled with data of bytesRead size. Caller can read from the buffer, and if\n OH_ArkWebHttpBodyStream_IsEOF is false, caller can continue to read the remaining data.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1114pub type ArkWeb_HttpBodyStreamReadCallback = ::std::option::Option<
1115 unsafe extern "C" fn(
1116 httpBodyStream: *const ArkWeb_HttpBodyStream,
1117 buffer: *mut u8,
1118 bytesRead: ::std::os::raw::c_int,
1119 ),
1120>;
1121#[doc = " @brief Callback when the read operation done.\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param buffer The buffer to receive data.\n @param bytesRead Callback after OH_ArkWebHttpBodyStream_AsyncRead. bytesRead greater than 0 means that\n the buffer is filled with data of bytesRead size. Caller can read from the buffer, and if\n OH_ArkWebHttpBodyStream_IsEOF is false, caller can continue to read the remaining data.\n\n @since 20"]
1122#[cfg(feature = "api-20")]
1123pub type ArkWeb_HttpBodyStreamAsyncReadCallback = ::std::option::Option<
1124 unsafe extern "C" fn(
1125 httpBodyStream: *const ArkWeb_HttpBodyStream,
1126 buffer: *mut u8,
1127 bytesRead: ::std::os::raw::c_int,
1128 ),
1129>;
1130#[doc = " @brief Callback when the init operation done.\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param result {@link ARKWEB_NET_OK} on success otherwise refer to arkweb_net_error_list.h.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1131pub type ArkWeb_HttpBodyStreamInitCallback = ::std::option::Option<
1132 unsafe extern "C" fn(httpBodyStream: *const ArkWeb_HttpBodyStream, result: ArkWeb_NetError),
1133>;
1134extern "C" {
1135 #[doc = " @brief Destroy the ArkWeb_RequestHeaderList.\n @param requestHeaderList The ArkWeb_RequestHeaderList to be destroyed.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1136 pub fn OH_ArkWebRequestHeaderList_Destroy(requestHeaderList: *mut ArkWeb_RequestHeaderList);
1137}
1138extern "C" {
1139 #[doc = " @brief Get the request headers size.\n @param requestHeaderList The list of request header.\n @return The size of request headers. -1 if requestHeaderList is invalid.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1140 pub fn OH_ArkWebRequestHeaderList_GetSize(
1141 requestHeaderList: *const ArkWeb_RequestHeaderList,
1142 ) -> i32;
1143}
1144extern "C" {
1145 #[doc = " @brief Get the specified request header.\n @param requestHeaderList The list of request header.\n @param index The index of request header.\n @param key The header key. Caller must release the string by OH_ArkWeb_ReleaseString.\n @param value The header value. Caller must release the string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1146 pub fn OH_ArkWebRequestHeaderList_GetHeader(
1147 requestHeaderList: *const ArkWeb_RequestHeaderList,
1148 index: i32,
1149 key: *mut *mut ::std::os::raw::c_char,
1150 value: *mut *mut ::std::os::raw::c_char,
1151 );
1152}
1153extern "C" {
1154 #[doc = " @brief Set a user data to ArkWeb_ResourceRequest.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @param userData The user data to set.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1155 pub fn OH_ArkWebResourceRequest_SetUserData(
1156 resourceRequest: *mut ArkWeb_ResourceRequest,
1157 userData: *mut ::std::os::raw::c_void,
1158 ) -> i32;
1159}
1160extern "C" {
1161 #[doc = " @brief Get the user data from ArkWeb_ResourceRequest.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @return The set user data.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1162 pub fn OH_ArkWebResourceRequest_GetUserData(
1163 resourceRequest: *const ArkWeb_ResourceRequest,
1164 ) -> *mut ::std::os::raw::c_void;
1165}
1166extern "C" {
1167 #[doc = " @brief Get the method of request.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @param method The request's http method. This function will allocate memory for the method string and caller must\n release the string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1168 pub fn OH_ArkWebResourceRequest_GetMethod(
1169 resourceRequest: *const ArkWeb_ResourceRequest,
1170 method: *mut *mut ::std::os::raw::c_char,
1171 );
1172}
1173extern "C" {
1174 #[doc = " @brief Get the url of request.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @param url The request's url. This function will allocate memory for the url string and caller must release the\n string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1175 pub fn OH_ArkWebResourceRequest_GetUrl(
1176 resourceRequest: *const ArkWeb_ResourceRequest,
1177 url: *mut *mut ::std::os::raw::c_char,
1178 );
1179}
1180extern "C" {
1181 #[doc = " @brief Create a ArkWeb_HttpBodyStream which used to read the http body.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @param httpBodyStream The request's http body. This function will allocate memory for the http body stream and\n caller must release the httpBodyStream by OH_ArkWebResourceRequest_DestroyHttpBodyStream.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1182 pub fn OH_ArkWebResourceRequest_GetHttpBodyStream(
1183 resourceRequest: *const ArkWeb_ResourceRequest,
1184 httpBodyStream: *mut *mut ArkWeb_HttpBodyStream,
1185 );
1186}
1187extern "C" {
1188 #[doc = " @brief Destroy the http body stream.\n @param httpBodyStream The httpBodyStream to be destroyed.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1189 pub fn OH_ArkWebResourceRequest_DestroyHttpBodyStream(
1190 httpBodyStream: *mut ArkWeb_HttpBodyStream,
1191 );
1192}
1193extern "C" {
1194 #[doc = " @brief Get the resource type of request.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @return The resource type of request. -1 if resourceRequest is invalid.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1195 pub fn OH_ArkWebResourceRequest_GetResourceType(
1196 resourceRequest: *const ArkWeb_ResourceRequest,
1197 ) -> i32;
1198}
1199extern "C" {
1200 #[doc = " @brief Get the url of frame which trigger this request.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @param frameUrl The url of frame which trigger this request. This function will allocate memory for the url string\n and caller must release the string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1201 pub fn OH_ArkWebResourceRequest_GetFrameUrl(
1202 resourceRequest: *const ArkWeb_ResourceRequest,
1203 frameUrl: *mut *mut ::std::os::raw::c_char,
1204 );
1205}
1206extern "C" {
1207 #[doc = " @brief Set a user data to ArkWeb_HttpBodyStream.\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param userData The user data to set.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1208 pub fn OH_ArkWebHttpBodyStream_SetUserData(
1209 httpBodyStream: *mut ArkWeb_HttpBodyStream,
1210 userData: *mut ::std::os::raw::c_void,
1211 ) -> i32;
1212}
1213extern "C" {
1214 #[doc = " @brief Get the user data from ArkWeb_HttpBodyStream.\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @return The set user data.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1215 pub fn OH_ArkWebHttpBodyStream_GetUserData(
1216 httpBodyStream: *const ArkWeb_HttpBodyStream,
1217 ) -> *mut ::std::os::raw::c_void;
1218}
1219extern "C" {
1220 #[doc = " @brief Set the callback for OH_ArkWebHttpBodyStream_Read.\n\n The result of OH_ArkWebHttpBodyStream_Read will be notified to caller through the readCallback.\\n\n The callback will run in the same thread as OH_ArkWebHttpBodyStream_Read.\\n\n\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param readCallback The callback of read function.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1221 pub fn OH_ArkWebHttpBodyStream_SetReadCallback(
1222 httpBodyStream: *mut ArkWeb_HttpBodyStream,
1223 readCallback: ArkWeb_HttpBodyStreamReadCallback,
1224 ) -> i32;
1225}
1226extern "C" {
1227 #[doc = " @brief Set the callback for OH_ArkWebHttpBodyStream_AsyncRead.\n\n The result of OH_ArkWebHttpBodyStream_AsyncRead will be notified to caller through the\\n\n readCallback. The callback will runs in the ArkWeb worker thread.\\n\n\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param readCallback The callback of read function.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @since 20"]
1228 #[cfg(feature = "api-20")]
1229 pub fn OH_ArkWebHttpBodyStream_SetAsyncReadCallback(
1230 httpBodyStream: *mut ArkWeb_HttpBodyStream,
1231 readCallback: ArkWeb_HttpBodyStreamAsyncReadCallback,
1232 ) -> i32;
1233}
1234extern "C" {
1235 #[doc = " @brief Init the http body stream.\n\n This function must be called before calling any other functions.\\n\n\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param initCallback The callback of init.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1236 pub fn OH_ArkWebHttpBodyStream_Init(
1237 httpBodyStream: *mut ArkWeb_HttpBodyStream,
1238 initCallback: ArkWeb_HttpBodyStreamInitCallback,
1239 ) -> i32;
1240}
1241extern "C" {
1242 #[doc = " @brief Read the http body to the buffer.\n\n The buffer must be larger than the bufLen. We will be reading data from a worker thread to the buffer,\\n\n so should not use the buffer in other threads before the callback to avoid concurrency issues.\\n\n\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param buffer The buffer to receive data.\n @param bufLen The size of bytes to read.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1243 pub fn OH_ArkWebHttpBodyStream_Read(
1244 httpBodyStream: *const ArkWeb_HttpBodyStream,
1245 buffer: *mut u8,
1246 bufLen: ::std::os::raw::c_int,
1247 );
1248}
1249extern "C" {
1250 #[doc = " @brief Read the http body to the buffer.\n\n The buffer must be larger than the bufLen. We will read data from a worker thread to the buffer,\\n\n so should not use the buffer in other threads before the callback to avoid concurrency issues.\\n\n\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @param buffer The buffer to receive data.\n @param bufLen The size of bytes to read.\n\n @since 20"]
1251 #[cfg(feature = "api-20")]
1252 pub fn OH_ArkWebHttpBodyStream_AsyncRead(
1253 httpBodyStream: *const ArkWeb_HttpBodyStream,
1254 buffer: *mut u8,
1255 bufLen: ::std::os::raw::c_int,
1256 );
1257}
1258extern "C" {
1259 #[doc = " @brief Get the total size of the data stream.\n\n When data is chunked or httpBodyStream is invalid, always return zero.\\n\n\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @return The size of data stream.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1260 pub fn OH_ArkWebHttpBodyStream_GetSize(httpBodyStream: *const ArkWeb_HttpBodyStream) -> u64;
1261}
1262extern "C" {
1263 #[doc = " @brief Get the current position of the data stream.\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @return The current position of data stream. 0 if httpBodyStream is invalid.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1264 pub fn OH_ArkWebHttpBodyStream_GetPosition(httpBodyStream: *const ArkWeb_HttpBodyStream)
1265 -> u64;
1266}
1267extern "C" {
1268 #[doc = " @brief Get if the data stream is chunked.\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @return True if is chunked; false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1269 pub fn OH_ArkWebHttpBodyStream_IsChunked(httpBodyStream: *const ArkWeb_HttpBodyStream) -> bool;
1270}
1271extern "C" {
1272 #[doc = " @brief Returns true if all data has been consumed from this upload data stream.\n\n For chunked uploads, returns false until the first read attempt.\\n\n\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @return True if all data has been consumed; false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1273 pub fn OH_ArkWebHttpBodyStream_IsEof(httpBodyStream: *const ArkWeb_HttpBodyStream) -> bool;
1274}
1275extern "C" {
1276 #[doc = " @brief Returns true if the upload data in the stream is entirely in memory,\n and all read requests will succeed synchronously.\n\n Expected to return false for chunked requests.\\n\n\n @param httpBodyStream The ArkWeb_HttpBodyStream.\n @return True if the upload data is in memory; false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1277 pub fn OH_ArkWebHttpBodyStream_IsInMemory(httpBodyStream: *const ArkWeb_HttpBodyStream)
1278 -> bool;
1279}
1280extern "C" {
1281 #[doc = " @brief Destroy the ArkWeb_ResourceRequest.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1282 pub fn OH_ArkWebResourceRequest_Destroy(resourceRequest: *const ArkWeb_ResourceRequest) -> i32;
1283}
1284extern "C" {
1285 #[doc = " @brief Get the referrer of request.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @param referrer The request's referrer. This function will allocate memory for the post data string and caller\n must release the string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1286 pub fn OH_ArkWebResourceRequest_GetReferrer(
1287 resourceRequest: *const ArkWeb_ResourceRequest,
1288 referrer: *mut *mut ::std::os::raw::c_char,
1289 );
1290}
1291extern "C" {
1292 #[doc = " @brief Get the OH_ArkWeb_RequestHeaderList of the request.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @param requestHeaderList The RequestHeaderList of request.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1293 pub fn OH_ArkWebResourceRequest_GetRequestHeaders(
1294 resourceRequest: *const ArkWeb_ResourceRequest,
1295 requestHeaderList: *mut *mut ArkWeb_RequestHeaderList,
1296 );
1297}
1298extern "C" {
1299 #[doc = " @brief Get if this is a redirect request.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @return True if this is a redirect; false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1300 pub fn OH_ArkWebResourceRequest_IsRedirect(
1301 resourceRequest: *const ArkWeb_ResourceRequest,
1302 ) -> bool;
1303}
1304extern "C" {
1305 #[doc = " @brief Get if this is a request from main frame.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @return True if this is from main frame; false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1306 pub fn OH_ArkWebResourceRequest_IsMainFrame(
1307 resourceRequest: *const ArkWeb_ResourceRequest,
1308 ) -> bool;
1309}
1310extern "C" {
1311 #[doc = " @brief Get if this is a request is triggered by user gesutre.\n @param resourceRequest The ArkWeb_ResourceRequest.\n @return True if this is triggered by user gesture; false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1312 pub fn OH_ArkWebResourceRequest_HasGesture(
1313 resourceRequest: *const ArkWeb_ResourceRequest,
1314 ) -> bool;
1315}
1316extern "C" {
1317 #[doc = " @brief Register custom scheme to the ArkWeb.\n\n Should not be called for built-in HTTP, HTTPS, FILE, FTP, ABOUT and DATA schemes.\\n\n This function should be called on main thread.\\n\n\n @param scheme The scheme to regist.\n @param option The configuration of the scheme.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_ERROR_UNKNOWN} 17100100 - Unknown error.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n {@link ARKWEB_SCHEME_REGISTER_FAILED} 17100102 - Register custom schemes should be called\n before create any ArkWeb.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1318 pub fn OH_ArkWeb_RegisterCustomSchemes(
1319 scheme: *const ::std::os::raw::c_char,
1320 option: i32,
1321 ) -> i32;
1322}
1323extern "C" {
1324 #[doc = " @brief Set a ArkWeb_SchemeHandler for a specific scheme to intercept requests of that scheme type.\n\n SchemeHandler should be set after the BrowserContext created.\\n\n Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.\\n\n\n @param scheme Scheme that need to be intercepted.\n @param schemeHandler The SchemeHandler for the scheme. Only requests triggered by ServiceWorker will be notified\n through this handler.\n @return Return true if set SchemeHandler for specific scheme successful, return false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1325 pub fn OH_ArkWebServiceWorker_SetSchemeHandler(
1326 scheme: *const ::std::os::raw::c_char,
1327 schemeHandler: *mut ArkWeb_SchemeHandler,
1328 ) -> bool;
1329}
1330extern "C" {
1331 #[doc = " @brief Set a ArkWeb_SchemeHandler for a specific scheme to intercept requests of that scheme type.\n\n SchemeHandler should be set after the BrowserContext created.\\n\n Use WebviewController.initializeWebEngine to initialize the BrowserContext without create a ArkWeb.\\n\n\n @param scheme Scheme that need to be intercepted.\n @param webTag The name of the web component.\n @param schemeHandler The SchemeHandler for the scheme. Only requests triggered from the specified web will be\n notified through this handler.\n @return Return true if set SchemeHandler for specific scheme successful, return false otherwise.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1332 pub fn OH_ArkWeb_SetSchemeHandler(
1333 scheme: *const ::std::os::raw::c_char,
1334 webTag: *const ::std::os::raw::c_char,
1335 schemeHandler: *mut ArkWeb_SchemeHandler,
1336 ) -> bool;
1337}
1338extern "C" {
1339 #[doc = " @brief Clear the handler registered on the specified web for service worker.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1340 pub fn OH_ArkWebServiceWorker_ClearSchemeHandlers() -> i32;
1341}
1342extern "C" {
1343 #[doc = " @brief Clear the handler registered on the specified web.\n @param webTag The name of the web component.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1344 pub fn OH_ArkWeb_ClearSchemeHandlers(webTag: *const ::std::os::raw::c_char) -> i32;
1345}
1346extern "C" {
1347 #[doc = " @brief Create a SchemeHandler.\n @param schemeHandler Return the created SchemeHandler. Use OH_ArkWeb_DestroySchemeHandler destroy it when donn't\n need it.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1348 pub fn OH_ArkWeb_CreateSchemeHandler(schemeHandler: *mut *mut ArkWeb_SchemeHandler);
1349}
1350extern "C" {
1351 #[doc = " @brief Destroy a SchemeHandler.\n @param schemeHandler The ArkWeb_SchemeHandler to be destroy.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1352 pub fn OH_ArkWeb_DestroySchemeHandler(schemeHandler: *mut ArkWeb_SchemeHandler);
1353}
1354extern "C" {
1355 #[doc = " @brief Set a user data to ArkWeb_SchemeHandler.\n @param schemeHandler The ArkWeb_SchemeHandler.\n @param userData The user data to set.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1356 pub fn OH_ArkWebSchemeHandler_SetUserData(
1357 schemeHandler: *mut ArkWeb_SchemeHandler,
1358 userData: *mut ::std::os::raw::c_void,
1359 ) -> i32;
1360}
1361extern "C" {
1362 #[doc = " @brief Get the user data from ArkWeb_SchemeHandler.\n @param schemeHandler The ArkWeb_SchemeHandler.\n @return The set user data.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1363 pub fn OH_ArkWebSchemeHandler_GetUserData(
1364 schemeHandler: *const ArkWeb_SchemeHandler,
1365 ) -> *mut ::std::os::raw::c_void;
1366}
1367extern "C" {
1368 #[doc = " @brief Set the OnRequestStart callback for SchemeHandler.\n @param schemeHandler The SchemeHandler for the scheme.\n @param onRequestStart The OnRequestStart callback.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1369 pub fn OH_ArkWebSchemeHandler_SetOnRequestStart(
1370 schemeHandler: *mut ArkWeb_SchemeHandler,
1371 onRequestStart: ArkWeb_OnRequestStart,
1372 ) -> i32;
1373}
1374extern "C" {
1375 #[doc = " @brief Set the OnRequestStop callback for SchemeHandler.\n @param schemeHandler The SchemeHandler for the scheme.\n @param onRequestStop The OnRequestStop callback.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1376 pub fn OH_ArkWebSchemeHandler_SetOnRequestStop(
1377 schemeHandler: *mut ArkWeb_SchemeHandler,
1378 onRequestStop: ArkWeb_OnRequestStop,
1379 ) -> i32;
1380}
1381extern "C" {
1382 #[doc = " @brief Create a Response for a request.\n @param response The created Response. Use OH_ArkWeb_DestroyResponse to destroy when donn't need it.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1383 pub fn OH_ArkWeb_CreateResponse(response: *mut *mut ArkWeb_Response);
1384}
1385extern "C" {
1386 #[doc = " @brief Destroy the Reponse.\n @param response The Response needs destroy.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1387 pub fn OH_ArkWeb_DestroyResponse(response: *mut ArkWeb_Response);
1388}
1389extern "C" {
1390 #[doc = " @brief Set the resolved URL after redirects or changed as a result of HSTS.\n @param response The ArkWeb_Response.\n @param url The resolved URL.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1391 pub fn OH_ArkWebResponse_SetUrl(
1392 response: *mut ArkWeb_Response,
1393 url: *const ::std::os::raw::c_char,
1394 ) -> i32;
1395}
1396extern "C" {
1397 #[doc = " @brief Get the resolved URL after redirects or changed as a result of HSTS.\n @param response The ArkWeb_Response.\n @param url The resolved URL.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1398 pub fn OH_ArkWebResponse_GetUrl(
1399 response: *const ArkWeb_Response,
1400 url: *mut *mut ::std::os::raw::c_char,
1401 );
1402}
1403extern "C" {
1404 #[doc = " @brief Set a error code to ArkWeb_Response.\n @param response The ArkWeb_Response.\n @param errorCode The error code for the failed request.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1405 pub fn OH_ArkWebResponse_SetError(
1406 response: *mut ArkWeb_Response,
1407 errorCode: ArkWeb_NetError,
1408 ) -> i32;
1409}
1410extern "C" {
1411 #[doc = " @brief Get the response's error code.\n @param response The ArkWeb_Response.\n @return The response's error code.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1412 pub fn OH_ArkWebResponse_GetError(response: *const ArkWeb_Response) -> ArkWeb_NetError;
1413}
1414extern "C" {
1415 #[doc = " @brief Set a status code to ArkWebResponse.\n @param response The ArkWeb_Response.\n @param status The http status code for the request.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1416 pub fn OH_ArkWebResponse_SetStatus(
1417 response: *mut ArkWeb_Response,
1418 status: ::std::os::raw::c_int,
1419 ) -> i32;
1420}
1421extern "C" {
1422 #[doc = " @brief Get the response's status code.\n @param response The ArkWeb_Response.\n @return The response's http status code. -1 if response is invalid.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1423 pub fn OH_ArkWebResponse_GetStatus(response: *const ArkWeb_Response) -> ::std::os::raw::c_int;
1424}
1425extern "C" {
1426 #[doc = " @brief Set a status text to ArkWebResponse.\n @param response The ArkWeb_Response.\n @param statusText The status text for the request.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1427 pub fn OH_ArkWebResponse_SetStatusText(
1428 response: *mut ArkWeb_Response,
1429 statusText: *const ::std::os::raw::c_char,
1430 ) -> i32;
1431}
1432extern "C" {
1433 #[doc = " @brief Get the response's status text.\n @param response The ArkWeb_Response.\n @param statusText Return the response's statusText. This function will allocate memory for the statusText string and\n caller must release the string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1434 pub fn OH_ArkWebResponse_GetStatusText(
1435 response: *const ArkWeb_Response,
1436 statusText: *mut *mut ::std::os::raw::c_char,
1437 );
1438}
1439extern "C" {
1440 #[doc = " @brief Set mime type to ArkWebResponse.\n @param response The ArkWeb_Response.\n @param mimeType The mime type for the request.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1441 pub fn OH_ArkWebResponse_SetMimeType(
1442 response: *mut ArkWeb_Response,
1443 mimeType: *const ::std::os::raw::c_char,
1444 ) -> i32;
1445}
1446extern "C" {
1447 #[doc = " @brief Get the response's mime type.\n @param response The ArkWeb_Response.\n @param mimeType Return the response's mime type. This function will allocate memory for the mime type string and\n caller must release the string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1448 pub fn OH_ArkWebResponse_GetMimeType(
1449 response: *const ArkWeb_Response,
1450 mimeType: *mut *mut ::std::os::raw::c_char,
1451 );
1452}
1453extern "C" {
1454 #[doc = " @brief Set charset to ArkWeb_Response.\n @param response The ArkWeb_Response.\n @param charset The charset for the request.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1455 pub fn OH_ArkWebResponse_SetCharset(
1456 response: *mut ArkWeb_Response,
1457 charset: *const ::std::os::raw::c_char,
1458 ) -> i32;
1459}
1460extern "C" {
1461 #[doc = " @brief Get the response's charset.\n @param response The ArkWeb_Response.\n @param charset Return the response's charset. This function will allocate memory for the charset string and caller\n must release the string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1462 pub fn OH_ArkWebResponse_GetCharset(
1463 response: *const ArkWeb_Response,
1464 charset: *mut *mut ::std::os::raw::c_char,
1465 );
1466}
1467extern "C" {
1468 #[doc = " @brief Set a header to ArkWeb_Response.\n @param response The ArkWeb_Response.\n @param name The name of the header.\n @param value The value of the header.\n @param overwirte If true will overwrite the exsits header, if false otherwise.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1469 pub fn OH_ArkWebResponse_SetHeaderByName(
1470 response: *mut ArkWeb_Response,
1471 name: *const ::std::os::raw::c_char,
1472 value: *const ::std::os::raw::c_char,
1473 overwrite: bool,
1474 ) -> i32;
1475}
1476extern "C" {
1477 #[doc = " @brief Get the header from the response.\n @param response The ArkWeb_Response.\n @param name The name of the header.\n @param value Return the header's value. This function will allocate memory for the value string and caller must\n release the string by OH_ArkWeb_ReleaseString.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1478 pub fn OH_ArkWebResponse_GetHeaderByName(
1479 response: *const ArkWeb_Response,
1480 name: *const ::std::os::raw::c_char,
1481 value: *mut *mut ::std::os::raw::c_char,
1482 );
1483}
1484extern "C" {
1485 #[doc = " @brief Destroy the ArkWeb_ResourceHandler.\n @param resourceHandler The ArkWeb_ResourceHandler.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1486 pub fn OH_ArkWebResourceHandler_Destroy(resourceHandler: *const ArkWeb_ResourceHandler) -> i32;
1487}
1488extern "C" {
1489 #[doc = " @brief Pass response headers to intercepted requests.\n @param resourceHandler The ArkWeb_ResourceHandler for the request.\n @param response The ArkWeb_Response for the intercepting requests.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1490 pub fn OH_ArkWebResourceHandler_DidReceiveResponse(
1491 resourceHandler: *const ArkWeb_ResourceHandler,
1492 response: *const ArkWeb_Response,
1493 ) -> i32;
1494}
1495extern "C" {
1496 #[doc = " @brief Pass response body data to intercepted requests.\n @param resourceHandler The ArkWeb_ResourceHandler for the request.\n @param buffer Buffer data to send.\n @param bufLen The size of buffer.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1497 pub fn OH_ArkWebResourceHandler_DidReceiveData(
1498 resourceHandler: *const ArkWeb_ResourceHandler,
1499 buffer: *const u8,
1500 bufLen: i64,
1501 ) -> i32;
1502}
1503extern "C" {
1504 #[doc = " @brief Notify the ArkWeb that this request should be finished and there is no more data available.\n @param resourceHandler The ArkWeb_ResourceHandler for the request.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1505 pub fn OH_ArkWebResourceHandler_DidFinish(
1506 resourceHandler: *const ArkWeb_ResourceHandler,
1507 ) -> i32;
1508}
1509extern "C" {
1510 #[doc = " @brief Notify the ArkWeb that this request should be failed.\n @param resourceHandler The ArkWeb_ResourceHandler for the request.\n @param errorCode The error code for this request. Refer to arkweb_net_error_list.h.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1511 pub fn OH_ArkWebResourceHandler_DidFailWithError(
1512 resourceHandler: *const ArkWeb_ResourceHandler,
1513 errorCode: ArkWeb_NetError,
1514 ) -> i32;
1515}
1516extern "C" {
1517 #[doc = " @brief Notify the ArkWeb that this request should be failed.\n @param resourceHandler The ArkWeb_ResourceHandler for the request.\n @param errorCode The error code for this request. Refer to arkweb_net_error_list.h.\n @param completeIfNoResponse If completeIfNoResponse is true, when DidFailWithErrorV2 is called,\n if DidReceiveResponse has not been called,\n a response is automatically constructed and the current request is terminated.\n @return {@link ARKWEB_NET_OK} 0 - Success.\n {@link ARKWEB_INVALID_PARAM} 17100101 - Invalid param, the resourceHandler is nullptr.\n @since 20"]
1518 #[cfg(feature = "api-20")]
1519 pub fn OH_ArkWebResourceHandler_DidFailWithErrorV2(
1520 resourceHandler: *const ArkWeb_ResourceHandler,
1521 errorCode: ArkWeb_NetError,
1522 completeIfNoResponse: bool,
1523 ) -> i32;
1524}
1525extern "C" {
1526 #[doc = " @brief Release the string acquired by native function.\n @param string The string to be released.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1527 pub fn OH_ArkWeb_ReleaseString(string: *mut ::std::os::raw::c_char);
1528}
1529extern "C" {
1530 #[doc = " @brief Release the byte array acquired by native function.\n @param byteArray The byte array to be released.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 12"]
1531 pub fn OH_ArkWeb_ReleaseByteArray(byteArray: *mut u8);
1532}
1533#[doc = " @brief Defines the javascript callback of the web component.\n\n @since 11"]
1534pub type NativeArkWeb_OnJavaScriptCallback =
1535 ::std::option::Option<unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char)>;
1536#[doc = " @brief Defines the javascript proxy callback of the web component.\n\n @since 11"]
1537pub type NativeArkWeb_OnJavaScriptProxyCallback = ::std::option::Option<
1538 unsafe extern "C" fn(
1539 argv: *mut *const ::std::os::raw::c_char,
1540 argc: i32,
1541 ) -> *mut ::std::os::raw::c_char,
1542>;
1543#[doc = " @brief Defines the valid callback of the web component.\n\n @since 11"]
1544pub type NativeArkWeb_OnValidCallback =
1545 ::std::option::Option<unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char)>;
1546#[doc = " @brief Defines the destroy callback of the web component.\n\n @since 11"]
1547pub type NativeArkWeb_OnDestroyCallback =
1548 ::std::option::Option<unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char)>;
1549#[doc = " @brief Defines the callback of save cookie.\n @param errorCode {@link ARKWEB_SUCCESS} Save cookie success.\n {@link ARKWEB_COOKIE_MANAGER_INITIALIZE_FAILED} Cookie manager initialize failed.\n {@link ARKWEB_COOKIE_SAVE_FAILED} Save cookie failed.\n @since 20"]
1550#[cfg(feature = "api-20")]
1551pub type OH_ArkWeb_OnCookieSaveCallback =
1552 ::std::option::Option<unsafe extern "C" fn(errorCode: ArkWeb_ErrorCode)>;
1553#[doc = " @brief Defines the blankless information.\n\n @since 20"]
1554#[cfg(feature = "api-20")]
1555#[repr(C)]
1556#[derive(Debug, Copy, Clone)]
1557pub struct ArkWeb_BlanklessInfo {
1558 #[doc = " The errCode of the blankless."]
1559 pub errCode: ArkWeb_BlanklessErrorCode,
1560 #[doc = " The estimated similarity of the history snapshots."]
1561 pub similarity: f64,
1562 #[doc = " The loadingTime of the history loading."]
1563 pub loadingTime: i32,
1564}
1565#[doc = " the system default ArkWeb engine.\n @since 20"]
1566#[cfg(feature = "api-20")]
1567pub const ArkWebEngineVersion_SYSTEM_DEFAULT: ArkWebEngineVersion = 0;
1568#[doc = " ArkWeb M114 version.\n @since 20"]
1569#[cfg(feature = "api-20")]
1570pub const ArkWebEngineVersion_ARKWEB_M114: ArkWebEngineVersion = 1;
1571#[doc = " ArkWeb M132 version.\n @since 20"]
1572#[cfg(feature = "api-20")]
1573pub const ArkWebEngineVersion_ARKWEB_M132: ArkWebEngineVersion = 2;
1574#[doc = " ArkWeb auto use the newest ArkWeb Engine version.\n Evergreen Web Engine.\n @since 23"]
1575#[cfg(feature = "api-23")]
1576pub const ArkWebEngineVersion_ARKWEB_EVERGREEN: ArkWebEngineVersion = 99999;
1577#[doc = " @brief ArkWeb Engine Version.\n\n <strong>ArkWeb Dual Web Engine Versioning Convention</strong>:\n <p>See [ArkWeb Dual Web Engine Versioning Convention] for switching between Legacy and Evergreen Web Engine.\n\n @since 20"]
1578#[cfg(feature = "api-20")]
1579pub type ArkWebEngineVersion = u32;
1580extern "C" {
1581 #[doc = " @brief Loads a piece of code and execute JS code in the context of the currently displayed page.\n\n @param webTag The name of the web component.\n @param jsCode a piece of javascript code.\n @param callback Callbacks execute JavaScript script results.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 11"]
1582 pub fn OH_NativeArkWeb_RunJavaScript(
1583 webTag: *const ::std::os::raw::c_char,
1584 jsCode: *const ::std::os::raw::c_char,
1585 callback: NativeArkWeb_OnJavaScriptCallback,
1586 );
1587}
1588extern "C" {
1589 #[doc = " @brief Registers the JavaScript object and method list.\n\n @param webTag The name of the web component.\n @param objName The name of the registered object.\n @param methodList The method of the application side JavaScript object participating in the registration.\n @param callback The callback function registered by developer is called back when HTML side uses.\n @param size The size of the callback.\n @param needRefresh if web need refresh.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 11"]
1590 pub fn OH_NativeArkWeb_RegisterJavaScriptProxy(
1591 webTag: *const ::std::os::raw::c_char,
1592 objName: *const ::std::os::raw::c_char,
1593 methodList: *mut *const ::std::os::raw::c_char,
1594 callback: *mut NativeArkWeb_OnJavaScriptProxyCallback,
1595 size: i32,
1596 needRefresh: bool,
1597 );
1598}
1599extern "C" {
1600 #[doc = " @brief Deletes the registered object which th given name.\n\n @param webTag The name of the web component.\n @param objName The name of the registered object.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 11"]
1601 pub fn OH_NativeArkWeb_UnregisterJavaScriptProxy(
1602 webTag: *const ::std::os::raw::c_char,
1603 objName: *const ::std::os::raw::c_char,
1604 );
1605}
1606extern "C" {
1607 #[doc = " @brief Registers the valid callback.\n\n @param webTag The name of the web component.\n @param callback The callback in which we can register object.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 11"]
1608 pub fn OH_NativeArkWeb_SetJavaScriptProxyValidCallback(
1609 webTag: *const ::std::os::raw::c_char,
1610 callback: NativeArkWeb_OnValidCallback,
1611 );
1612}
1613extern "C" {
1614 #[doc = " @brief Get the valid callback.\n\n @param webTag The name of the web component.\n @return Return the valid callback function registered. If the valid callback function\n specified by the parameter webTag is not set, a null pointer is returned.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 11"]
1615 pub fn OH_NativeArkWeb_GetJavaScriptProxyValidCallback(
1616 webTag: *const ::std::os::raw::c_char,
1617 ) -> NativeArkWeb_OnValidCallback;
1618}
1619extern "C" {
1620 #[doc = " @brief Registers the destroy callback.\n\n @param webTag The name of the web component.\n @param callback the destroy callback.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 11"]
1621 pub fn OH_NativeArkWeb_SetDestroyCallback(
1622 webTag: *const ::std::os::raw::c_char,
1623 callback: NativeArkWeb_OnDestroyCallback,
1624 );
1625}
1626extern "C" {
1627 #[doc = " @brief Get the destroy callback.\n\n @param webTag The name of the web component.\n @return Return the destroy callback function registered. If the destroy callback\n function specified by the parameter webTag is not set,\n a null pointer is returned.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 11"]
1628 pub fn OH_NativeArkWeb_GetDestroyCallback(
1629 webTag: *const ::std::os::raw::c_char,
1630 ) -> NativeArkWeb_OnDestroyCallback;
1631}
1632extern "C" {
1633 #[doc = " @brief Loads the data or URL.\n This function should be called on main thread.\n\n @param webTag The name of the web component.\n @param data A string encoded according to \"Base64\" or \"URL\", should not be NULL.\n @param mimeType Media type. For example: \"text/html\", should not be NULL.\n @param encoding Encoding type. For example: \"UTF-8\", should not be NULL.\n @param baseUrl A specified URL path (\"http\"/\"https\"/\"data\" protocol),\n which is assigned to window.origin by the Web component.\n @param historyUrl History URL. When it is not empty, it can be managed by\n history records to realize the back and forth function.\n @return LoadData result code.\n {@link ARKWEB_SUCCESS} load data success.\n {@link ARKWEB_INVALID_PARAM} Mandatory parameters are left unspecified or\n Incorrect parameter types or Parameter verification failed.\n {@link ARKWEB_INIT_ERROR} Initialization error, can't get a valid Web for the webTag.\n {@link ARKWEB_LIBRARY_OPEN_FAILURE} Failed to open the library.\n {@link ARKWEB_LIBRARY_SYMBOL_NOT_FOUND} The required symbol was not found in the library.\n\n @syscap SystemCapability.Web.Webview.Core\n @since 15"]
1634 #[cfg(feature = "api-15")]
1635 pub fn OH_NativeArkWeb_LoadData(
1636 webTag: *const ::std::os::raw::c_char,
1637 data: *const ::std::os::raw::c_char,
1638 mimeType: *const ::std::os::raw::c_char,
1639 encoding: *const ::std::os::raw::c_char,
1640 baseUrl: *const ::std::os::raw::c_char,
1641 historyUrl: *const ::std::os::raw::c_char,
1642 ) -> ArkWeb_ErrorCode;
1643}
1644extern "C" {
1645 #[doc = " @brief Registers a JavaScript object with callback methods, which may return values. This object will be injected\n into all frames of the current page, including all iframes, and will be accessible using the specified\n name in ArkWeb_ProxyObjectWithResult. The object will only be available in JavaScript after the next\n load or reload.\n These methods will be executed in the ArkWeb worker thread.\n\n @param webTag Name of the web component.\n @param proxyObject JavaScript object to register, the object has callback functions with return value.\n @param permission Optional JSON string(default is null) for JSBridge permission control,\n allowing URL whitelist configuration at object-level and method-level.\n @syscap SystemCapability.Web.Webview.Core\n @since 20"]
1646 #[cfg(feature = "api-20")]
1647 pub fn OH_NativeArkWeb_RegisterAsyncThreadJavaScriptProxy(
1648 webTag: *const ::std::os::raw::c_char,
1649 proxyObject: *const ArkWeb_ProxyObjectWithResult,
1650 permission: *const ::std::os::raw::c_char,
1651 );
1652}
1653extern "C" {
1654 #[doc = " @brief Sets whether to enable blankless page loading. This API must be used in pair with the\n OH_NativeArkWeb_GetBlanklessInfoWithKey API.\n\n @permission ohos.permission.INTERNET and ohos.permission.GET_NETWORK_INFO\n @param webTag webTag used when the webviewController is created.\n @param key Key value that uniquely identifies the current page. It must be the same as the key value of the\n OH_NativeArkWeb_GetBlanklessInfoWithKey API.\n @param isStarted Whether to enable frame interpolation. The value true indicates to enable frame\n interpolation, and the value false indicates the opposite.\n The default value is false.\n The value can be true or false.\n Action for setting an invalid value: N/A.\n @return Whether the API is successfully called. For details, see ArkWeb_BlanklessErrorCode.\n @since 20"]
1655 #[cfg(feature = "api-20")]
1656 pub fn OH_NativeArkWeb_SetBlanklessLoadingWithKey(
1657 webTag: *const ::std::os::raw::c_char,
1658 key: *const ::std::os::raw::c_char,
1659 isStarted: bool,
1660 ) -> ArkWeb_BlanklessErrorCode;
1661}
1662extern "C" {
1663 #[doc = " @brief Clears the blankless loading cache of the page with a specified key value.\n\n @param key The list of key values of pages cached in the blankless loading solution. These key values are\n specified in OH_NativeArkWeb_GetBlanklessInfoWithKey.\n The default value is the list of key values of all pages cached in the blankless loading solution.\n The key length cannot exceed 2048 characters, and the number of keys must be less than or equal to 100. The\n URL is the same as that input to the Web component during page loading.\n When the key length exceeds 2048 characters, the key does not take effect. When the number of keys exceeds\n 100, the first 100 keys are used. If this parameter is set to NULL, the default value is used.\n @param size Size of the key list.\n @since 20"]
1664 #[cfg(feature = "api-20")]
1665 pub fn OH_NativeArkWeb_ClearBlanklessLoadingCache(
1666 key: *mut *const ::std::os::raw::c_char,
1667 size: u32,
1668 );
1669}
1670extern "C" {
1671 #[doc = " @brief Obtains the prediction information about the blankless loading solution and enables the generation\n of the transition frame for the current loading. The application determines whether to enable the blankless\n loading solution based on the information.\n This API applies to pages in an applet or web application whose URLs are not fixed or cannot be uniquely\n identified.\n\n @permission ohos.permission.INTERNET and ohos.permission.GET_NETWORK_INFO\n @param webTag webTag used when the webviewController is created.\n Default value: N/A.\n The value cannot be empty.\n When an invalid value is set, the error code is returned, and the API does not take effect.\n @param key Key value that uniquely identifies the current page.\n @return Return value of the ArkWeb_BlanklessInfo type.\n @since 20"]
1672 #[cfg(feature = "api-20")]
1673 pub fn OH_NativeArkWeb_GetBlanklessInfoWithKey(
1674 webTag: *const ::std::os::raw::c_char,
1675 key: *const ::std::os::raw::c_char,
1676 ) -> ArkWeb_BlanklessInfo;
1677}
1678extern "C" {
1679 #[doc = " @brief Sets the cache capacity of the blankless loading solution and returns the value that takes effect.\n\n @param capacity Cache capacity, in MB. The maximum value is 100 MB.\n The default value is 30 MB.\n The value ranges from 0 to 100. If this parameter is set to 0, no cache capacity is available and the\n functionality is disabled globally.\n When the value is set to a number smaller than 0, the value 0 takes effect. When the value is set to a\n number greater than 100, the value 100 takes effect.\n @return The effective value that ranges from 0 MB to 100 MB.\n @since 20"]
1680 #[cfg(feature = "api-20")]
1681 pub fn OH_NativeArkWeb_SetBlanklessLoadingCacheCapacity(capacity: u32) -> u32;
1682}
1683extern "C" {
1684 #[doc = " @brief Ensure that all cookies currently accessible via the CookieManager API have been persisted to disk.\n If you want to use this interface in a non-UI thread, you need to initialize the CookieManager interface\n using OH_ArkWeb_GetNativeAPI first.\n @return Save cookie result code.\n {@link ARKWEB_SUCCESS} Save cookie success.\n {@link ARKWEB_COOKIE_SAVE_FAILED} Save cookie failed.\n {@link ARKWEB_COOKIE_MANAGER_INITIALIZE_FAILED} The CookieManager initialize failed.\n {@link ARKWEB_COOKIE_MANAGER_NOT_INITIALIZED} It is not allowed to call on a non-UI thread without\n initializing the CookieManager interface. please\n \t\t\t\t\t\t\t\t\t\t\t\t\t initialize the CookieManager interface using\n \t\t\t\t\t\t\t\t\t\t\t\t\t OH_ArkWeb_GetNativeAPI first.\n @since 20"]
1685 #[cfg(feature = "api-20")]
1686 pub fn OH_ArkWebCookieManager_SaveCookieSync() -> ArkWeb_ErrorCode;
1687}
1688extern "C" {
1689 #[doc = " @brief Ensure that all cookies currently accessible via the CookieManager API have been persisted to disk.\n Without initializing the CookieManager interface, this call will automatically be executed on the UI thread.\n @param callback Callback execute when save cookie done.\n @since 20"]
1690 #[cfg(feature = "api-20")]
1691 pub fn OH_ArkWebCookieManager_SaveCookieAsync(callback: OH_ArkWeb_OnCookieSaveCallback);
1692}
1693extern "C" {
1694 #[doc = " Set active ArkWeb engine version.\n If the system does not support the specified version, it will not take effect.\n\n This is a global static API that must be called before initializeWebEngine, and it will have no effect if any\n Web components are loaded.\n\n <strong>Legacy Web Engine Compatibility Note</strong>:\n <p>When using legacy ArkWeb Engine, some ArkWeb newly created API will not take effect,<br>\n see [Compatible with Legacy Web Engine in release note] for compatibility guidelines.\n </p>\n\n @param { ArkWebEngineVersion } webEngineVersion - the ArkWebEngineVersion\n @since 20"]
1695 #[cfg(feature = "api-20")]
1696 pub fn OH_NativeArkWeb_SetActiveWebEngineVersion(webEngineVersion: ArkWebEngineVersion);
1697}
1698extern "C" {
1699 #[doc = " Get currently active ArkWeb engine version.\n @return { ArkWebEngineVersion } Active ArkWeb Engine version as defined by ArkWebEngineVersion\n @since 20"]
1700 #[cfg(feature = "api-20")]
1701 pub fn OH_NativeArkWeb_GetActiveWebEngineVersion() -> ArkWebEngineVersion;
1702}
1703extern "C" {
1704 #[doc = " Delays the initialization of the web engine. By default, the web engine is initialized when the CookieManager\n interface is called. By setting the 'lazy' parameter to true, the web engine will not be initialized when the\n CookieManager interface is called. Instead, the web engine will be initialized either when the web component is\n created or when initializeWebEngine is called.\n @param { bool } lazy - Controls whether to delay the initialization of the web engine.\n @since 22"]
1705 #[cfg(feature = "api-22")]
1706 pub fn OH_NativeArkWeb_LazyInitializeWebEngineInCookieManager(lazy: bool);
1707}
1708extern "C" {
1709 #[doc = " Check if the currently active ArkWeb engine is Evergreen.\n @return { bool } true means the application is using the Evergreen Web Engine, false means not.\n @since 23"]
1710 #[cfg(feature = "api-23")]
1711 pub fn OH_NativeArkWeb_IsActiveWebEngineEvergreen() -> bool;
1712}