ohos-basic-services-kit-sys 0.1.0

Raw bindings to the BasicServicesKit NDK 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(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
impl TimeService_ErrCode {
    /// Success.
    pub const TIMESERVICE_ERR_OK: TimeService_ErrCode = TimeService_ErrCode(0);
    /// Failed to obtain system parameters.
    pub const TIMESERVICE_ERR_INTERNAL_ERROR: TimeService_ErrCode = TimeService_ErrCode(13000001);
    /// Invalid parameter.
    pub const TIMESERVICE_ERR_INVALID_PARAMETER: TimeService_ErrCode =
        TimeService_ErrCode(13000002);
}
#[repr(transparent)]
/// Enumerates the error codes.
///
///
/// Available since API-level: 12
#[cfg(feature = "api-12")]
#[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct TimeService_ErrCode(pub ::core::ffi::c_uint);
extern "C" {
    /// Obtains the current system time zone.
    ///
    /// # Arguments
    ///
    /// * `timeZone` - Pointer to an array of characters indicating the time zone ID. On success, the string indicates the
    /// current system time zone ID. On failure, the string is empty. The string is terminated using '
    /// * `len` - Size of the memory allocated for the time zone ID character array. There is no upper limit for the length
    /// of the time zone ID. It is recommended to allocate sufficient memory, at least not less than 31 bytes.
    ///
    /// # Returns
    ///
    /// * Returns [`TIMESERVICE_ERR_OK`] if the operation is successful.
    /// Returns [`TIMESERVICE_ERR_INTERNAL_ERROR`] if obtaining the system parameters fails.
    /// Returns [`TIMESERVICE_ERR_INVALID_PARAMETER`] if <b>timeZone</b> is a null pointer or the length of the
    /// time zone ID (excluding the terminating character ('is greater than or equal to <b>len</b>.
    ///
    /// Required System Capabilities: SystemCapability.MiscServices.Time
    ///
    /// Available since API-level: 12
    #[cfg(feature = "api-12")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-12")))]
    pub fn OH_TimeService_GetTimeZone(
        timeZone: *mut ::core::ffi::c_char,
        len: u32,
    ) -> TimeService_ErrCode;
}