// automatically generated by rust-bindgen 0.71.1

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
use crate::location_type::*;

extern "C" {
    /// Check whether the location switch is enabled.
    ///
    /// # Arguments
    ///
    /// * `enabled` - - It is a boolean pointer used to receive location switch status values.
    ///
    /// Equal to true indicates that the location switch is turned on, false indicates that
    ///
    /// the location switch is turned off.
    ///
    /// The caller needs to pass in a non empty boolean pointer, otherwise an error will be returned.
    ///
    ///
    /// # Returns
    ///
    /// * Location functions result code.
    ///
    /// For a detailed definition, please refer to [`Location_ResultCode`].
    ///
    /// [`LOCAION_SUCCESS`] Successfully obtained the location switch status.
    ///
    /// [`LOCATION_INVALID_PARAM`] The input parameter enabled is a null pointer.
    ///
    /// [`LOCATION_SERVICE_UNAVAILABLE`] Abnormal startup of location services.
    ///
    ///
    /// Available since API-level: 13
    #[cfg(feature = "api-13")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
    pub fn OH_Location_IsLocatingEnabled(enabled: *mut bool) -> Location_ResultCode;
    /// Start locating and subscribe location changed.
    ///
    /// # Arguments
    ///
    /// * `requestConfig` - - Pointer to the locating request parameters.
    ///
    /// For details, see [`Location_RequestConfig`].
    ///
    /// You can use [`OH_Location_CreateRequestConfig`] to create an instance.
    ///
    ///
    /// # Returns
    ///
    /// * Location functions result code.
    ///
    /// For a detailed definition, please refer to [`Location_ResultCode`].
    ///
    /// [`LOCAION_SUCCESS`] Successfully start locating.
    ///
    /// [`LOCATION_INVALID_PARAM`] The input parameter requestConfig is a null pointer.
    ///
    /// [`LOCATION_PERMISSION_DENIED`] Permission verification failed. The application does not have the
    ///
    /// permission required to call the API.
    ///
    /// [`LOCATION_NOT_SUPPORTED`] Capability not supported.
    ///
    /// Failed to call function due to limited device capabilities.
    ///
    /// [`LOCATION_SERVICE_UNAVAILABLE`] Abnormal startup of location services.
    ///
    /// [`LOCATION_SWITCH_OFF`] The location switch is off.
    ///
    /// ohos.permission.APPROXIMATELY_LOCATION
    ///
    /// Available since API-level: 13
    #[cfg(feature = "api-13")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
    pub fn OH_Location_StartLocating(
        requestConfig: *const Location_RequestConfig,
    ) -> Location_ResultCode;
    /// Stop locating and unsubscribe location changed.
    ///
    /// # Arguments
    ///
    /// * `requestConfig` - - Pointer to the locating request parameters.
    ///
    /// For details, see [`Location_RequestConfig`].
    ///
    /// This parameter needs to be the same as the requestConfig pointer passed in
    ///
    /// [`OH_Location_StartLocating`].
    ///
    ///
    /// # Returns
    ///
    /// * Location functions result code.
    ///
    /// For a detailed definition, please refer to [`Location_ResultCode`].
    ///
    /// [`LOCAION_SUCCESS`] Successfully stop locationg.
    ///
    /// [`LOCATION_INVALID_PARAM`] 1.The input parameter is a null pointer.
    ///
    /// 2.Different from the requestConfig pointer passed from [`OH_Location_StartLocating`].
    ///
    /// [`LOCATION_PERMISSION_DENIED`] Permission verification failed. The application does not have the
    ///
    /// permission required to call the API.
    ///
    /// [`LOCATION_NOT_SUPPORTED`] Capability not supported.
    ///
    /// Failed to call function due to limited device capabilities.
    ///
    /// [`LOCATION_SERVICE_UNAVAILABLE`] Possible reasons: 1. Abnormal startup of location services.
    ///
    /// [`LOCATION_SWITCH_OFF`] The location switch is off.
    ///
    /// ohos.permission.APPROXIMATELY_LOCATION
    ///
    /// Available since API-level: 13
    #[cfg(feature = "api-13")]
    #[cfg_attr(docsrs, doc(cfg(feature = "api-13")))]
    pub fn OH_Location_StopLocating(
        requestConfig: *const Location_RequestConfig,
    ) -> Location_ResultCode;
}
