arkweb-sys 0.1.0

Raw Bindings to the Web module 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)]

pub type ArkWeb_ErrorCode = Result<(), ArkWeb_ErrorCodeError>;
impl ArkWeb_ErrorCodeError {
    /// Init error.
    pub const INIT_ERROR: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100001).unwrap() });
    /// Unknown error.
    pub const ERROR_UNKNOWN: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100100).unwrap() });
    /// Invalid param.
    pub const INVALID_PARAM: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100101).unwrap() });
    /// Register custom schemes should be called before create any ArkWeb.
    pub const SCHEME_REGISTER_FAILED: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100102).unwrap() });
    /// Invalid url.
    pub const INVALID_URL: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100103).unwrap() });
    /// Invalid cookie value.
    pub const INVALID_COOKIE_VALUE: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100104).unwrap() });
    pub const LIBRARY_OPEN_FAILURE: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100105).unwrap() });
    pub const LIBRARY_SYMBOL_NOT_FOUND: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100106).unwrap() });
    /// The CookieManager not initialized.
    ///
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const COOKIE_MANAGER_NOT_INITIALIZED: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100107).unwrap() });
    /// The CookieManager initialize failed.
    ///
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const COOKIE_MANAGER_INITIALIZE_FAILED: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100108).unwrap() });
    /// Save cookie failed.
    ///
    ///
    /// Available since API-level: 20
    #[cfg(feature = "api-20")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
    pub const COOKIE_SAVE_FAILED: ArkWeb_ErrorCodeError =
        ArkWeb_ErrorCodeError(const { core::num::NonZero::new(17100109).unwrap() });
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkWeb_ErrorCodeError(pub core::num::NonZero<::core::ffi::c_uint>);
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
impl ArkWeb_BlanklessErrorCode {
    /// The operation is successful.
    pub const ARKWEB_BLANKLESS_SUCCESS: ArkWeb_BlanklessErrorCode = ArkWeb_BlanklessErrorCode(0);
    /// Unidentified error.
    pub const ARKWEB_BLANKLESS_ERR_UNKNOWN: ArkWeb_BlanklessErrorCode =
        ArkWeb_BlanklessErrorCode(-1);
    /// Invalid parameter.
    pub const ARKWEB_BLANKLESS_ERR_INVALID_ARGS: ArkWeb_BlanklessErrorCode =
        ArkWeb_BlanklessErrorCode(-2);
    /// The web controller is not bound to a component.
    pub const ARKWEB_BLANKLESS_ERR_CONTROLLER_NOT_INITED: ArkWeb_BlanklessErrorCode =
        ArkWeb_BlanklessErrorCode(-3);
    /// The key value is not matched. The OH_NativeArkWeb_SetBlanklessLoadingWithKey
    /// and OH_NativeArkWeb_GetBlanklessInfoWithKey APIs must be used in pair and use the same key value.
    pub const ARKWEB_BLANKLESS_ERR_KEY_NOT_MATCH: ArkWeb_BlanklessErrorCode =
        ArkWeb_BlanklessErrorCode(-4);
    /// If the similarity is low, the system determines that the change is too large.
    /// As a result, the OH_NativeArkWeb_SetBlanklessLoadingWithKey API fails to enable frame interpolation.
    pub const ARKWEB_BLANKLESS_ERR_SIGNIFICANT_CHANGE: ArkWeb_BlanklessErrorCode =
        ArkWeb_BlanklessErrorCode(-5);
    /// The device does not support this feature.
    pub const ARKWEB_BLANKLESS_ERR_DEVICE_NOT_SUPPORT: ArkWeb_BlanklessErrorCode =
        ArkWeb_BlanklessErrorCode(801);
}
#[repr(transparent)]
/// Defines an enum for the error codes of the white screen optimization solution.
///
///
/// Available since API-level: 20
#[cfg(feature = "api-20")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-20")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ArkWeb_BlanklessErrorCode(pub ::core::ffi::c_int);