ohos-rawfile-sys 0.1.3

Raw Bindings to the rawfile API of OpenHarmony
Documentation
// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#[cfg(doc)]
use crate::raw_file_manager::{OH_ResourceManager_OpenRawDir, OH_ResourceManager_OpenRawFile};

/// Provides access to a raw file directory.
///
///
///
///
/// Available since API-level: 8
///
/// Version: 1.0
#[repr(C)]
pub struct RawDir {
    _unused: [u8; 0],
}
extern "C" {
    /// Obtains the name of the file according to the index.
    ///
    /// You can use this method to traverse a raw file directory.
    ///
    /// # Arguments
    ///
    /// * `rawDir` - Indicates the pointer to [`RawDir`].
    ///
    /// * `index` - Indicates the file index in [`RawDir`].
    ///
    /// # Returns
    ///
    /// * Returns the name of the file according to the index,
    /// which can be passed to [`OH_ResourceManager_OpenRawFile`] as an input parameter;
    /// returns <b>NULL</b> if all files are returned.
    /// [`OH_ResourceManager_OpenRawFile`]
    /// Available since API-level: 8
    ///
    /// Version: 1.0
    pub fn OH_ResourceManager_GetRawFileName(
        rawDir: *mut RawDir,
        index: ::core::ffi::c_int,
    ) -> *const ::core::ffi::c_char;
    /// get the count of the raw files in [`RawDir`].
    ///
    /// You can use this method to get the valid index of [`OH_ResourceManager_GetRawFileName`].
    ///
    /// # Arguments
    ///
    /// * `rawDir` - Indicates the pointer to [`RawDir`].
    /// [`OH_ResourceManager_GetRawFileName`]
    /// Available since API-level: 8
    ///
    /// Version: 1.0
    pub fn OH_ResourceManager_GetRawFileCount(rawDir: *mut RawDir) -> ::core::ffi::c_int;
    /// Closes an opened [`RawDir`] and releases all associated resources.
    ///
    ///
    ///
    /// # Arguments
    ///
    /// * `rawDir` - Indicates the pointer to [`RawDir`].
    /// [`OH_ResourceManager_OpenRawDir`]
    /// Available since API-level: 8
    ///
    /// Version: 1.0
    pub fn OH_ResourceManager_CloseRawDir(rawDir: *mut RawDir);
}