use std::os::raw::c_char;
#[non_exhaustive]
pub enum Compatibility {
V5Plus,
V6Plus,
V8Plus,
V12Plus,
V13Plus,
V14Plus,
V15Plus,
}
#[cfg(any(feature = "pa_v15", all(doc, not(feature = "pa_v6"))))]
mod actual {
pub const COMPATIBILITY: super::Compatibility = super::Compatibility::V15Plus;
pub const TARGET_VERSION_STRING: &str = "15.0.0";
pub const TARGET_VERSION: (u8, u8) = (15, 0);
pub const PA_PROTOCOL_VERSION: u16 = 35;
}
#[cfg(all(feature = "pa_v14", not(feature = "pa_v15")))]
mod actual {
pub const COMPATIBILITY: super::Compatibility = super::Compatibility::V14Plus;
pub const TARGET_VERSION_STRING: &str = "14.0.0";
pub const TARGET_VERSION: (u8, u8) = (14, 0);
pub const PA_PROTOCOL_VERSION: u16 = 34;
}
#[cfg(all(feature = "pa_v13", not(feature = "pa_v14")))]
mod actual {
pub const COMPATIBILITY: super::Compatibility = super::Compatibility::V13Plus;
pub const TARGET_VERSION_STRING: &str = "13.0.0";
pub const TARGET_VERSION: (u8, u8) = (13, 0);
pub const PA_PROTOCOL_VERSION: u16 = 33;
}
#[cfg(all(feature = "pa_v12", not(feature = "pa_v13")))]
mod actual {
pub const COMPATIBILITY: super::Compatibility = super::Compatibility::V12Plus;
pub const TARGET_VERSION_STRING: &str = "12.0.0";
pub const TARGET_VERSION: (u8, u8) = (12, 0);
pub const PA_PROTOCOL_VERSION: u16 = 32;
}
#[cfg(all(feature = "pa_v8", not(feature = "pa_v12")))]
mod actual {
pub const COMPATIBILITY: super::Compatibility = super::Compatibility::V8Plus;
pub const TARGET_VERSION_STRING: &str = "8.0.0";
pub const TARGET_VERSION: (u8, u8) = (8, 0);
pub const PA_PROTOCOL_VERSION: u16 = 30;
}
#[cfg(all(feature = "pa_v6", not(feature = "pa_v8")))]
mod actual {
pub const COMPATIBILITY: super::Compatibility = super::Compatibility::V6Plus;
pub const TARGET_VERSION_STRING: &str = "6.0.0";
pub const TARGET_VERSION: (u8, u8) = (6, 0);
pub const PA_PROTOCOL_VERSION: u16 = 30;
}
#[cfg(all(not(doc), not(feature = "pa_v6")))]
mod actual {
pub const COMPATIBILITY: super::Compatibility = super::Compatibility::V5Plus;
pub const TARGET_VERSION_STRING: &str = "5.0.0";
pub const TARGET_VERSION: (u8, u8) = (5, 0);
pub const PA_PROTOCOL_VERSION: u16 = 29;
}
pub const TARGET_VERSION_STRING: &str = actual::TARGET_VERSION_STRING;
pub const TARGET_VERSION: (u8, u8) = actual::TARGET_VERSION;
pub const PA_PROTOCOL_VERSION: u16 = actual::PA_PROTOCOL_VERSION;
pub const PA_API_VERSION: u8 = 12;
#[inline(always)]
pub const fn get_compatibility() -> Compatibility {
actual::COMPATIBILITY
}
#[link(name = "pulse")]
extern "C" {
pub fn pa_get_library_version() -> *const c_char;
}