//! Per-OS permission backends.

use super::{Context, Domain, PermissionError, PermissionStatus};

#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "macos")]
use macos as imp;

#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "linux")]
use linux as imp;

#[cfg(target_os = "windows")]
mod windows;
#[cfg(target_os = "windows")]
use windows as imp;

#[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]
mod stub;
#[cfg(not(any(target_os = "macos", target_os = "linux", target_os = "windows")))]
use stub as imp;

pub fn status_with(d: Domain, ctx: &Context) -> Result<PermissionStatus, PermissionError> {
    imp::status_with(d, ctx)
}
pub fn request_with(d: Domain, ctx: &Context) -> Result<PermissionStatus, PermissionError> {
    imp::request_with(d, ctx)
}
pub fn describe(d: Domain, s: PermissionStatus) -> (String, Option<String>) {
    imp::describe(d, s)
}
