use std::ffi::CStr;
use crate::cf::{CFArrayRef, CFDictionaryRef, CFStringRef, CFTypeRef};
#[link(name = "IOKit", kind = "framework")]
extern "C" {
pub fn IOPSCopyPowerSourcesInfo() -> CFTypeRef;
pub fn IOPSCopyPowerSourcesList(blob: CFTypeRef) -> CFArrayRef;
pub fn IOPSGetPowerSourceDescription(blob: CFTypeRef, ps: CFTypeRef) -> CFDictionaryRef;
pub fn IOPSGetProvidingPowerSourceType(snapshot: CFTypeRef) -> CFStringRef;
pub fn IOPMCopyActivePMPreferences() -> CFDictionaryRef;
}
pub const kIOPSCurrentCapacityKey: &CStr = c"Current Capacity";
pub const kIOPSMaxCapacityKey: &CStr = c"Max Capacity";
pub const kIOPSACPowerValue: &str = "AC Power";
pub const kIOPSBatteryPowerValue: &str = "Battery Power";
pub const kIOPMLowPowerModeKey: &CStr = c"LowPowerMode";