lingxia_platform/traits/location.rs
1use crate::error::PlatformError;
2
3#[derive(Debug, Clone, Default)]
4pub struct LocationRequestConfig {
5 pub is_high_accuracy: bool,
6 pub high_accuracy_expire_time: Option<u32>,
7 pub include_altitude: bool,
8}
9
10pub trait Location: Send + Sync + 'static {
11 fn is_location_enabled(&self) -> Result<bool, PlatformError>;
12 fn request_location(
13 &self,
14 callback_id: u64,
15 config: LocationRequestConfig,
16 ) -> Result<(), PlatformError>;
17}