Skip to main content

ArkWeb_HttpBodyStreamReadCallback

Type Alias ArkWeb_HttpBodyStreamReadCallback 

Source
pub type ArkWeb_HttpBodyStreamReadCallback = Option<unsafe extern "C" fn(httpBodyStream: *const ArkWeb_HttpBodyStream, buffer: *mut u8, bytesRead: c_int)>;
Expand description

@brief Callback when the read operation done. @param httpBodyStream The ArkWeb_HttpBodyStream. @param buffer The buffer to receive data. @param bytesRead Callback after OH_ArkWebHttpBodyStream_Read. bytesRead greater than 0 means that the buffer is filled with data of bytesRead size. Caller can read from the buffer, and if OH_ArkWebHttpBodyStream_IsEOF is false, caller can continue to read the remaining data.

@syscap SystemCapability.Web.Webview.Core @since 12

Aliased Type§

pub enum ArkWeb_HttpBodyStreamReadCallback {
    None,
    Some(unsafe extern "C" fn(*const ArkWeb_HttpBodyStream_, *mut u8, i32)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*const ArkWeb_HttpBodyStream_, *mut u8, i32))

Some value of type T.