Skip to main content

OH_ArkWebHttpBodyStream_SetReadCallback

Function OH_ArkWebHttpBodyStream_SetReadCallback 

Source
pub unsafe extern "C" fn OH_ArkWebHttpBodyStream_SetReadCallback(
    httpBodyStream: *mut ArkWeb_HttpBodyStream,
    readCallback: ArkWeb_HttpBodyStreamReadCallback,
) -> i32
Available on crate features api-11 and api-12 only.
Expand description

Set the callback for OH_ArkWebHttpBodyStream_Read.

The result of OH_ArkWebHttpBodyStream_Read will be notified to caller through the readCallback.

The callback will run in the same thread as OH_ArkWebHttpBodyStream_Read.

§Arguments

  • httpBodyStream - The ArkWeb_HttpBodyStream.

  • readCallback - The callback of read function.

§Returns

  • [ARKWEB_NET_OK] 0 - Success. [ARKWEB_INVALID_PARAM] 17100101 - Invalid param.

Required System Capabilities: SystemCapability.Web.Webview.Core

Available since API-level: 12