OH_ArkUI_GetRouterPagePath

Function OH_ArkUI_GetRouterPagePath 

Source
pub unsafe extern "C" fn OH_ArkUI_GetRouterPagePath(
    node: ArkUI_NodeHandle,
    buffer: *mut c_char,
    bufferSize: i32,
    writeLength: *mut i32,
) -> ArkUiResult
Available on crate feature api-12 only.
Expand description

Obtain the path of the page where the node is located.

§Arguments

  • node - The node.

  • buffer - The buffer to which page path writes to the memory, memory space needs to be allocated by the developer.

  • bufferSize - The buffer size

  • writeLength - Indicates the string length actually written to the buffer when returning [ARKUI_ERROR_CODE_NO_ERROR]. Indicates the minimum buffer size that can accommodate the target when [ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR] is returned.

§Returns

  • The error code. [ARKUI_ERROR_CODE_NO_ERROR] if the operation is successful. [ARKUI_ERROR_CODE_PARAM_INVALID] if the node, buffer or writeLength is null. [ARKUI_ERROR_CODE_GET_INFO_FAILED] if query information failed, this may be because the node is not in RouterPage. [ARKUI_ERROR_CODE_BUFFER_SIZE_ERROR] If the buffer size is less than the minimum buffer size.

Available since API-level: 12