diff --git a/IOKit/mod.rs b/IOKit/mod.rs index 4a0fe62a9..b37aa0b9e 100644 --- a/IOKit/mod.rs +++ b/IOKit/mod.rs @@ -33,6 +33,9 @@ mod __hidsystem; #[cfg(feature = "network")] #[path = "network.rs"] mod __network; +#[cfg(feature = "ps")] +#[path = "ps.rs"] +mod __ps; #[cfg(feature = "pwr_mgt")] #[path = "pwr_mgt.rs"] mod __pwr_mgt; @@ -7799,6 +7802,204 @@ pub use self::__network::IONetworkStats; pub use self::__network::IONetworkWriteData; #[cfg(feature = "network")] pub use self::__network::IOOutputQueueStats; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPMACPowerKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPMBatteryPowerKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPMUPSPowerKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSACPowerValue; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSBatteryFailureModesKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSBatteryHealthConditionKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSBatteryHealthKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSBatteryPowerValue; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCheckBatteryValue; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCommandDelayedRemovePowerKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCommandEnableAudibleAlarmKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCommandSendCurrentStateOfCharge; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCommandSendCurrentTemperature; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCommandSetCurrentLimitKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCommandSetRequiredVoltageKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCommandStartupDelayKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCurrentCapacityKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSCurrentKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSDeadWarnLevelKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSDesignCapacityKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSDynamicStorePath; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureCellImbalance; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureChargeFET; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureChargeOverCurrent; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureChargeOverTemp; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureDataFlushFault; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureDischargeFET; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureDischargeOverCurrent; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureDischargeOverTemp; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureExternalInput; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureFuseBlown; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureOpenThermistor; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailurePeriodicAFEComms; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailurePermanentAFEComms; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFailureSafetyOverVoltage; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSFairValue; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSGoodValue; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSHardwareSerialNumberKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSHealthConfidenceKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSInternalBatteryType; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSInternalFailureKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSInternalType; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSIsChargedKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSIsChargingKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSIsFinishingChargeKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSIsPresentKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSLowWarnLevelKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSMaxCapacityKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSMaxErrKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSNameKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSNetworkTransportType; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSNominalCapacityKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSNotifyAnyPowerSource; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSNotifyAttach; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSNotifyLowBattery; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSNotifyPowerSource; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSNotifyTimeRemaining; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSOffLineValue; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPermanentFailureValue; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPoorValue; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerAdapterCurrentKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerAdapterFamilyKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerAdapterIDKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerAdapterRevisionKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerAdapterSerialNumberKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerAdapterSourceKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerAdapterWattsKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerSourceIDKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSPowerSourceStateKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSProductIDKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSSerialTransportType; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSTemperatureKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSTimeRemainingNotificationKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSTimeRemainingUnknown; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSTimeRemainingUnlimited; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSTimeToEmptyKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSTimeToFullChargeKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSTransportTypeKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSTypeKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSUPSManagementClaimed; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSUPSType; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSUSBTransportType; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSVendorDataKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSVendorIDKey; +#[cfg(feature = "ps")] +pub use self::__ps::kIOPSVoltageKey; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSCopyExternalPowerAdapterDetails; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSCopyPowerSourcesInfo; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSCopyPowerSourcesList; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSCreateLimitedPowerNotification; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSGetBatteryWarningLevel; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSGetPowerSourceDescription; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSGetProvidingPowerSourceType; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSGetTimeRemainingEstimate; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSLowBatteryWarningLevel; +#[cfg(feature = "ps")] +pub use self::__ps::IOPSNotificationCreateRunLoopSource; +#[cfg(feature = "ps")] +pub use self::__ps::IOPowerSourceCallbackType; +#[cfg(feature = "ps")] +pub use self::__ps::IOUPSEventCallbackFunction; +#[cfg(feature = "ps")] +pub use self::__ps::IOUPSPlugInInterface; +#[cfg(feature = "ps")] +pub use self::__ps::IOUPSPlugInInterface_v140; #[cfg(feature = "pwr_mgt")] pub use self::__pwr_mgt::kAppleClamshellCausesSleepKey; #[cfg(feature = "pwr_mgt")] diff --git a/IOKit/ps.rs b/IOKit/ps.rs new file mode 100644 index 000000000..d8fd43282 --- /dev/null +++ b/IOKit/ps.rs @@ -0,0 +1,736 @@ +//! This file has been automatically generated by `objc2`'s `header-translator`. +//! DO NOT EDIT +use core::ffi::*; +use core::ptr::NonNull; +#[cfg(feature = "objc2")] +use objc2::__framework_prelude::*; +use objc2_core_foundation::*; + +use crate::*; + +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspoweradapteridkey?language=objc) +pub const kIOPSPowerAdapterIDKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"AdapterID\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspoweradapterwattskey?language=objc) +pub const kIOPSPowerAdapterWattsKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Watts\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspoweradapterrevisionkey?language=objc) +pub const kIOPSPowerAdapterRevisionKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"AdapterRevision\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspoweradapterserialnumberkey?language=objc) +pub const kIOPSPowerAdapterSerialNumberKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"SerialNumber\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspoweradapterfamilykey?language=objc) +pub const kIOPSPowerAdapterFamilyKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"FamilyCode\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspoweradaptercurrentkey?language=objc) +pub const kIOPSPowerAdapterCurrentKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Current\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspoweradaptersourcekey?language=objc) +pub const kIOPSPowerAdapterSourceKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Source\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsupsmanagementclaimed?language=objc) +pub const kIOPSUPSManagementClaimed: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"/IOKit/UPSPowerManagementClaimed\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopslowwarnlevelkey?language=objc) +pub const kIOPSLowWarnLevelKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Low Warn Level\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsdeadwarnlevelkey?language=objc) +pub const kIOPSDeadWarnLevelKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Shutdown Level\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsdynamicstorepath?language=objc) +pub const kIOPSDynamicStorePath: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"/IOKit/PowerSources\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscommanddelayedremovepowerkey?language=objc) +pub const kIOPSCommandDelayedRemovePowerKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Delayed Remove Power\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscommandenableaudiblealarmkey?language=objc) +pub const kIOPSCommandEnableAudibleAlarmKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Enable Audible Alarm\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscommandstartupdelaykey?language=objc) +pub const kIOPSCommandStartupDelayKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Startup Delay\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscommandsetcurrentlimitkey?language=objc) +pub const kIOPSCommandSetCurrentLimitKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Set Current Limit\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscommandsetrequiredvoltagekey?language=objc) +pub const kIOPSCommandSetRequiredVoltageKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Set Required Voltage\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscommandsendcurrentstateofcharge?language=objc) +pub const kIOPSCommandSendCurrentStateOfCharge: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Send Current State of Charge\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscommandsendcurrenttemperature?language=objc) +pub const kIOPSCommandSendCurrentTemperature: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Send Current Temperature\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspowersourceidkey?language=objc) +pub const kIOPSPowerSourceIDKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Power Source ID\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspowersourcestatekey?language=objc) +pub const kIOPSPowerSourceStateKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Power Source State\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscurrentcapacitykey?language=objc) +pub const kIOPSCurrentCapacityKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Current Capacity\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsmaxcapacitykey?language=objc) +pub const kIOPSMaxCapacityKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Max Capacity\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsdesigncapacitykey?language=objc) +pub const kIOPSDesignCapacityKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"DesignCapacity\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsnominalcapacitykey?language=objc) +pub const kIOPSNominalCapacityKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Nominal Capacity\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopstimetoemptykey?language=objc) +pub const kIOPSTimeToEmptyKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Time to Empty\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopstimetofullchargekey?language=objc) +pub const kIOPSTimeToFullChargeKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Time to Full Charge\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsischargingkey?language=objc) +pub const kIOPSIsChargingKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Is Charging\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsinternalfailurekey?language=objc) +pub const kIOPSInternalFailureKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Internal Failure\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsispresentkey?language=objc) +pub const kIOPSIsPresentKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Is Present\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsvoltagekey?language=objc) +pub const kIOPSVoltageKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Voltage\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscurrentkey?language=objc) +pub const kIOPSCurrentKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Current\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopstemperaturekey?language=objc) +pub const kIOPSTemperatureKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Temperature\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsnamekey?language=objc) +pub const kIOPSNameKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Name\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopstypekey?language=objc) +pub const kIOPSTypeKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Type\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopstransporttypekey?language=objc) +pub const kIOPSTransportTypeKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Transport Type\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsvendoridkey?language=objc) +pub const kIOPSVendorIDKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Vendor ID\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsproductidkey?language=objc) +pub const kIOPSProductIDKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Product ID\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsvendordatakey?language=objc) +pub const kIOPSVendorDataKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Vendor Specific Data\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsbatteryhealthkey?language=objc) +pub const kIOPSBatteryHealthKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"BatteryHealth\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsbatteryhealthconditionkey?language=objc) +pub const kIOPSBatteryHealthConditionKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"BatteryHealthCondition\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsbatteryfailuremodeskey?language=objc) +pub const kIOPSBatteryFailureModesKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"BatteryFailureModes\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopshealthconfidencekey?language=objc) +pub const kIOPSHealthConfidenceKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"HealthConfidence\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsmaxerrkey?language=objc) +pub const kIOPSMaxErrKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"MaxErr\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsischargedkey?language=objc) +pub const kIOPSIsChargedKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Is Charged\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsisfinishingchargekey?language=objc) +pub const kIOPSIsFinishingChargeKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Is Finishing Charge\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopshardwareserialnumberkey?language=objc) +pub const kIOPSHardwareSerialNumberKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Hardware Serial Number\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsserialtransporttype?language=objc) +pub const kIOPSSerialTransportType: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Serial\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsusbtransporttype?language=objc) +pub const kIOPSUSBTransportType: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"USB\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsnetworktransporttype?language=objc) +pub const kIOPSNetworkTransportType: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Ethernet\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsinternaltype?language=objc) +pub const kIOPSInternalType: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Internal\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsinternalbatterytype?language=objc) +pub const kIOPSInternalBatteryType: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"InternalBattery\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsupstype?language=objc) +pub const kIOPSUPSType: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"UPS\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsofflinevalue?language=objc) +pub const kIOPSOffLineValue: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Off Line\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsacpowervalue?language=objc) +pub const kIOPSACPowerValue: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"AC Power\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsbatterypowervalue?language=objc) +pub const kIOPSBatteryPowerValue: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Battery Power\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspoorvalue?language=objc) +pub const kIOPSPoorValue: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Poor\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfairvalue?language=objc) +pub const kIOPSFairValue: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Fair\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsgoodvalue?language=objc) +pub const kIOPSGoodValue: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"Good\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopscheckbatteryvalue?language=objc) +pub const kIOPSCheckBatteryValue: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Check Battery\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopspermanentfailurevalue?language=objc) +pub const kIOPSPermanentFailureValue: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Permanent Battery Failure\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailureexternalinput?language=objc) +pub const kIOPSFailureExternalInput: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Externally Indicated Failure\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailuresafetyovervoltage?language=objc) +pub const kIOPSFailureSafetyOverVoltage: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Safety Over-Voltage\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailurechargeovertemp?language=objc) +pub const kIOPSFailureChargeOverTemp: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Charge Over-Temperature\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailuredischargeovertemp?language=objc) +pub const kIOPSFailureDischargeOverTemp: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Discharge Over-Temperature\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailurecellimbalance?language=objc) +pub const kIOPSFailureCellImbalance: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Cell Imbalance\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailurechargefet?language=objc) +pub const kIOPSFailureChargeFET: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Charge FET\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailuredischargefet?language=objc) +pub const kIOPSFailureDischargeFET: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Discharge FET\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailuredataflushfault?language=objc) +pub const kIOPSFailureDataFlushFault: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Data Flush Fault\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailurepermanentafecomms?language=objc) +pub const kIOPSFailurePermanentAFEComms: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Permanent AFE Comms\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailureperiodicafecomms?language=objc) +pub const kIOPSFailurePeriodicAFEComms: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Periodic AFE Comms\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailurechargeovercurrent?language=objc) +pub const kIOPSFailureChargeOverCurrent: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Charge Over-Current\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailuredischargeovercurrent?language=objc) +pub const kIOPSFailureDischargeOverCurrent: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Discharge Over-Current\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailureopenthermistor?language=objc) +pub const kIOPSFailureOpenThermistor: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Open Thermistor\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsfailurefuseblown?language=objc) +pub const kIOPSFailureFuseBlown: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Fuse Blown\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsnotifylowbattery?language=objc) +pub const kIOPSNotifyLowBattery: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"com.apple.system.powersources.lowbattery\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsnotifytimeremaining?language=objc) +pub const kIOPSNotifyTimeRemaining: &CStr = unsafe { + CStr::from_bytes_with_nul_unchecked(b"com.apple.system.powersources.timeremaining\0") +}; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopstimeremainingnotificationkey?language=objc) +pub const kIOPSTimeRemainingNotificationKey: &CStr = kIOPSNotifyTimeRemaining; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsnotifypowersource?language=objc) +pub const kIOPSNotifyPowerSource: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"com.apple.system.powersources.source\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsnotifyattach?language=objc) +pub const kIOPSNotifyAttach: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"com.apple.system.powersources.attach\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopsnotifyanypowersource?language=objc) +pub const kIOPSNotifyAnyPowerSource: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"com.apple.system.powersources\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopstimeremainingunknown?language=objc) +pub const kIOPSTimeRemainingUnknown: CFTimeInterval = -1.0; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopstimeremainingunlimited?language=objc) +pub const kIOPSTimeRemainingUnlimited: CFTimeInterval = -2.0; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopmupspowerkey?language=objc) +pub const kIOPMUPSPowerKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"UPS Power\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopmbatterypowerkey?language=objc) +pub const kIOPMBatteryPowerKey: &CStr = + unsafe { CStr::from_bytes_with_nul_unchecked(b"Battery Power\0") }; +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/kiopmacpowerkey?language=objc) +pub const kIOPMACPowerKey: &CStr = unsafe { CStr::from_bytes_with_nul_unchecked(b"AC Power\0") }; +/// Possible return values from +/// +/// +/// ```text +/// IOPSGetBatteryWarningLevel +/// ``` +/// +/// +/// +/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/iopslowbatterywarninglevel?language=objc) +#[repr(transparent)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub struct IOPSLowBatteryWarningLevel(pub c_uint); +impl IOPSLowBatteryWarningLevel { + /// The system is not in a low battery situation, or is on drawing from an external power source. + /// + /// + /// The system displays no low power warnings; neither should application clients of this + /// API. + #[doc(alias = "kIOPSLowBatteryWarningNone")] + pub const None: Self = Self(1); + /// The battery can provide no more than 20 minutes of runtime. + /// + /// + /// OS X makes no guarantees that the system shall remain in Early Warning for 20 minutes. + /// Batteries are frequently calibrated differently and may provide runtime + /// for more, or less, than the estimated 20 minutes. + /// OS X alerts the user by changing the color of BatteryMonitor to red. + /// Warning the user is optional for full screen apps. + #[doc(alias = "kIOPSLowBatteryWarningEarly")] + pub const Early: Self = Self(2); + /// The battery can provide no more than 10 minutes of runtime. + /// + /// + /// OS X makes no guarantees that the system shall remain in Final Warning for 10 minutes. + /// Batteries are frequently calibrated differently and may provide runtime + /// for more, or less, than the estimated 10 minutes. + #[doc(alias = "kIOPSLowBatteryWarningFinal")] + pub const Final: Self = Self(3); +} + +#[cfg(feature = "objc2")] +unsafe impl Encode for IOPSLowBatteryWarningLevel { + const ENCODING: Encoding = c_uint::ENCODING; +} + +#[cfg(feature = "objc2")] +unsafe impl RefEncode for IOPSLowBatteryWarningLevel { + const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); +} + +extern "C-unwind" { + /// Indicates whether the system is at a low battery warning level. + /// + /// + /// If your app runs in full screen mode and occludes OS X's battery monitor's low + /// battery warnings, you should alert the user at least when the system + /// is in kIOPSLowBatteryWarnFinal. + pub fn IOPSGetBatteryWarningLevel() -> IOPSLowBatteryWarningLevel; +} + +extern "C-unwind" { + /// Returns the estimated minutes remaining until all power sources + /// (battery and/or UPS's) are empty, or returns + /// + /// + /// ```text + /// kIOPSTimeRemainingUnlimited + /// ``` + /// + /// + /// if attached to an unlimited power source. + /// + /// + /// If attached to an "Unlimited" power source, like AC power or any external source, the + /// return value is + /// + /// + /// ```text + /// kIOPSTimeRemainingUnlimited + /// ``` + /// + /// + /// + /// If the system is on "Limited" power, like a battery or UPS, + /// but is still calculating the time remaining, which may + /// take several seconds after each system power event + /// (e.g. waking from sleep, or unplugging AC Power), the return value is + /// + /// + /// ```text + /// kIOPSTimeRemainingUnknown + /// ``` + /// + /// + /// + /// Otherwise, if the system is on "Limited" power and the system has an accurate time + /// remaining estimate, the system returns a CFTimeInterval estimate of the time + /// remaining until the system is out of battery power. + /// + /// If you require more detailed battery information, use + /// + /// + /// ```text + /// IOPSCopyPowerSourcesInfo + /// ``` + /// + /// > + /// + /// and + /// + /// + /// ```text + /// IOPSGetPowerSourceDescription + /// ``` + /// + /// > + /// + /// . + /// + /// + /// Returns: Returns + /// + /// + /// ```text + /// kIOPSTimeRemainingUnknown + /// ``` + /// + /// + /// if the + /// OS cannot determine the time remaining. + /// + /// Returns + /// + /// + /// ```text + /// kIOPSTimeRemainingUnlimited + /// ``` + /// + /// + /// if the + /// system has an unlimited power source. + /// + /// Otherwise returns a positive number of type CFTimeInterval, indicating the time + /// remaining in seconds until all power sources are depleted. + pub fn IOPSGetTimeRemainingEstimate() -> CFTimeInterval; +} + +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/iopowersourcecallbacktype?language=objc) +pub type IOPowerSourceCallbackType = Option; + +/// Returns a blob of Power Source information in an opaque CFTypeRef. +/// +/// +/// Clients should not directly access data in the returned CFTypeRef - +/// they should use the accessor functions IOPSCopyPowerSourcesList and +/// IOPSGetPowerSourceDescription, instead. +/// +/// +/// Returns: NULL if errors were encountered, a CFTypeRef otherwise. +/// Caller must CFRelease() the return value when done accessing it. +#[inline] +pub unsafe extern "C-unwind" fn IOPSCopyPowerSourcesInfo() -> Option> { + extern "C-unwind" { + fn IOPSCopyPowerSourcesInfo() -> Option>; + } + let ret = unsafe { IOPSCopyPowerSourcesInfo() }; + ret.map(|ret| unsafe { CFRetained::from_raw(ret) }) +} + +/// Returns a CFArray of Power Source handles, each of type CFTypeRef. +/// +/// +/// The caller shouldn't directly access the CFTypeRefs, but should use +/// IOPSGetPowerSourceDescription on each member of the CFArrayRef. +/// +/// +/// Parameter `blob`: Takes the CFTypeRef returned by IOPSCopyPowerSourcesInfo() +/// +/// +/// Returns: Returns NULL if errors were encountered, otherwise a CFArray of CFTypeRefs. +/// Caller must CFRelease() the returned CFArrayRef. +#[inline] +pub unsafe extern "C-unwind" fn IOPSCopyPowerSourcesList( + blob: Option<&CFType>, +) -> Option> { + extern "C-unwind" { + fn IOPSCopyPowerSourcesList(blob: Option<&CFType>) -> Option>; + } + let ret = unsafe { IOPSCopyPowerSourcesList(blob) }; + ret.map(|ret| unsafe { CFRetained::from_raw(ret) }) +} + +/// Returns a CFDictionary with readable information about the specific power source. +/// +/// +/// See the C-strings defined in IOPSKeys.h for specific keys into the dictionary. +/// Don't expect all keys to be present in any dictionary. Some power sources, for example, +/// may not support the "Time Remaining To Empty" key and it will not be present in their dictionaries. +/// +/// +/// Parameter `blob`: The CFTypeRef returned by IOPSCopyPowerSourcesInfo() +/// +/// +/// Parameter `ps`: One of the CFTypeRefs in the CFArray returned by IOPSCopyPowerSourcesList() +/// +/// +/// Returns: Returns NULL if an error was encountered, otherwise a CFDictionary. Caller should +/// NOT release the returned CFDictionary - it will be released as part of the CFTypeRef returned by +/// IOPSCopyPowerSourcesInfo(). +#[inline] +pub unsafe extern "C-unwind" fn IOPSGetPowerSourceDescription( + blob: Option<&CFType>, + ps: Option<&CFType>, +) -> Option> { + extern "C-unwind" { + fn IOPSGetPowerSourceDescription( + blob: Option<&CFType>, + ps: Option<&CFType>, + ) -> Option>; + } + let ret = unsafe { IOPSGetPowerSourceDescription(blob, ps) }; + ret.map(|ret| unsafe { CFRetained::retain(ret) }) +} + +/// Indicates the power source the computer is currently drawing from. +/// +/// +/// Determines which power source is providing power. +/// +/// +/// Parameter `snapshot`: The CFTypeRef returned by IOPSCopyPowerSourcesInfo() +/// +/// +/// Returns: One of: CFSTR(kIOPMACPowerKey), CFSTR(kIOPMBatteryPowerKey), CFSTR(kIOPMUPSPowerKey) +#[inline] +pub unsafe extern "C-unwind" fn IOPSGetProvidingPowerSourceType( + snapshot: Option<&CFType>, +) -> Option> { + extern "C-unwind" { + fn IOPSGetProvidingPowerSourceType(snapshot: Option<&CFType>) -> Option>; + } + let ret = unsafe { IOPSGetProvidingPowerSourceType(snapshot) }; + ret.map(|ret| unsafe { CFRetained::retain(ret) }) +} + +/// Returns a CFRunLoopSourceRef that notifies the caller when power source +/// information changes. +/// +/// +/// Returns a CFRunLoopSourceRef for scheduling with your CFRunLoop. +/// If your project does not use a CFRunLoop, you can alternatively +/// receive notifications via mach port, dispatch, or signal, via +/// +/// notify.h +/// +/// using the name +/// +/// +/// ```text +/// kIOPSTimeRemainingNotificationKey +/// ``` +/// +/// +/// . +/// +/// IOKit delivers this notification when percent remaining or time remaining changes. +/// Thus it fires fairly frequently while discharging or charging the battery; +/// please consider using: +/// +/// +/// ```text +/// IOPSCreateLimitedPowerNotification +/// ``` +/// +/// +/// if you only require +/// notifications when the power source type changes from limited to unlimited. +/// +/// +/// Parameter `callback`: A function to be called whenever any power source is added, removed, or changes. +/// +/// +/// Parameter `context`: Any user-defined pointer, passed to the IOPowerSource callback. +/// +/// +/// Returns: Returns NULL if an error was encountered, otherwise a CFRunLoopSource. Caller must +/// release the CFRunLoopSource. +#[inline] +pub unsafe extern "C-unwind" fn IOPSNotificationCreateRunLoopSource( + callback: IOPowerSourceCallbackType, + context: *mut c_void, +) -> Option> { + extern "C-unwind" { + fn IOPSNotificationCreateRunLoopSource( + callback: IOPowerSourceCallbackType, + context: *mut c_void, + ) -> Option>; + } + let ret = unsafe { IOPSNotificationCreateRunLoopSource(callback, context) }; + ret.map(|ret| unsafe { CFRetained::from_raw(ret) }) +} + +/// Returns a CFRunLoopSourceRef that notifies the caller when power source +/// changes from an unlimited power source (like attached to wall, car, or airplane power), to a limited +/// power source (like a battery or UPS). +/// +/// +/// Returns a CFRunLoopSourceRef for scheduling with your CFRunLoop. +/// If your project does not use a CFRunLoop, you can alternatively +/// receive this notification via +/// +/// notify.h +/// +/// using the name +/// +/// +/// ```text +/// kIOPSNotifyPowerSource +/// ``` +/// +/// +/// +/// +/// Parameter `callback`: A function to be called whenever the power source changes from AC to DC.. +/// +/// +/// Parameter `context`: Any user-defined pointer, passed to the IOPowerSource callback. +/// +/// +/// Returns: Returns NULL if an error was encountered, otherwise a CFRunLoopSource. Caller must +/// release the CFRunLoopSource. +#[inline] +pub unsafe extern "C-unwind" fn IOPSCreateLimitedPowerNotification( + callback: IOPowerSourceCallbackType, + context: *mut c_void, +) -> Option> { + extern "C-unwind" { + fn IOPSCreateLimitedPowerNotification( + callback: IOPowerSourceCallbackType, + context: *mut c_void, + ) -> Option>; + } + let ret = unsafe { IOPSCreateLimitedPowerNotification(callback, context) }; + ret.map(|ret| unsafe { CFRetained::from_raw(ret) }) +} + +/// Returns a CFDictionary that describes the attached (AC) external +/// power adapter (if any external power adapter is attached. +/// +/// +/// Use the kIOPSPowerAdapter... keys described in IOPSKeys.h +/// to interpret the returned CFDictionary. +/// +/// +/// Returns: Returns a CFDictionary on success. Caller must release the returned +/// dictionary. If no adapter is attached, or if there's an error, returns NULL. +#[inline] +pub unsafe extern "C-unwind" fn IOPSCopyExternalPowerAdapterDetails( +) -> Option> { + extern "C-unwind" { + fn IOPSCopyExternalPowerAdapterDetails() -> Option>; + } + let ret = unsafe { IOPSCopyExternalPowerAdapterDetails() }; + ret.map(|ret| unsafe { CFRetained::from_raw(ret) }) +} + +/// Type and arguments of callout C function that is used when a +/// completion routine is called. This function pointer is set +/// via setEventCallback and is called when an event is available +/// from the UPS. +/// +/// Parameter `target`: void * pointer to your data, often a pointer to an object. +/// +/// Parameter `result`: Completion result of desired operation. +/// +/// Parameter `refcon`: void * pointer to more data. +/// +/// Parameter `sender`: Interface instance sending the completion routine. +/// +/// Parameter `event`: CFDictionaryRef containing event data. +/// +/// See also [Apple's documentation](https://developer.apple.com/documentation/iokit/ioupseventcallbackfunction?language=objc) +pub type IOUPSEventCallbackFunction = Option< + unsafe extern "C-unwind" fn( + *mut c_void, + IOReturn, + *mut c_void, + *mut c_void, + *const CFDictionary, + ), +>; + +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioupsplugininterface?language=objc) +#[repr(C)] +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct IOUPSPlugInInterface { + pub(crate) _reserved: *mut c_void, + pub QueryInterface: + Option HRESULT>, + pub AddRef: Option ULONG>, + pub Release: Option ULONG>, + pub getProperties: + Option IOReturn>, + pub getCapabilities: + Option IOReturn>, + pub getEvent: + Option IOReturn>, + pub setEventCallback: Option< + unsafe extern "C-unwind" fn( + *mut c_void, + IOUPSEventCallbackFunction, + *mut c_void, + *mut c_void, + ) -> IOReturn, + >, + pub sendCommand: + Option IOReturn>, +} + +#[cfg(feature = "objc2")] +unsafe impl Encode for IOUPSPlugInInterface { + const ENCODING: Encoding = Encoding::Struct("IOUPSPlugInInterface", &[ + <*mut c_void>::ENCODING, + HRESULT>>::ENCODING, + ULONG>>::ENCODING, + ULONG>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + ]); +} + +#[cfg(feature = "objc2")] +unsafe impl RefEncode for IOUPSPlugInInterface { + const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); +} + +/// [Apple's documentation](https://developer.apple.com/documentation/iokit/ioupsplugininterface_v140?language=objc) +#[repr(C)] +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct IOUPSPlugInInterface_v140 { + pub(crate) _reserved: *mut c_void, + pub QueryInterface: + Option HRESULT>, + pub AddRef: Option ULONG>, + pub Release: Option ULONG>, + pub getProperties: + Option IOReturn>, + pub getCapabilities: + Option IOReturn>, + pub getEvent: + Option IOReturn>, + pub setEventCallback: Option< + unsafe extern "C-unwind" fn( + *mut c_void, + IOUPSEventCallbackFunction, + *mut c_void, + *mut c_void, + ) -> IOReturn, + >, + pub sendCommand: + Option IOReturn>, + pub createAsyncEventSource: + Option IOReturn>, +} + +#[cfg(feature = "objc2")] +unsafe impl Encode for IOUPSPlugInInterface_v140 { + const ENCODING: Encoding = Encoding::Struct("IOUPSPlugInInterface_v140", &[ + <*mut c_void>::ENCODING, + HRESULT>>::ENCODING, + ULONG>>::ENCODING, + ULONG>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + IOReturn>>::ENCODING, + ]); +} + +#[cfg(feature = "objc2")] +unsafe impl RefEncode for IOUPSPlugInInterface_v140 { + const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); +}