#![allow(non_camel_case_types, dead_code, unused)]
use core_foundation::base::{mach_port_t, CFAllocatorRef};
use core_foundation::dictionary::{CFDictionaryRef, CFMutableDictionaryRef};
use libc::c_char;
use mach::{boolean, kern_return};
pub type io_object_t = mach_port_t;
pub type io_registry_entry_t = io_object_t;
pub type io_service_t = io_object_t;
pub type io_iterator_t = io_object_t;
pub type IOOptionBits = u32;
pub const IOPM_SERVICE_NAME: *const c_char = b"IOPMPowerSource\0".as_ptr() as *const c_char;
extern "C" {
pub static kIOMasterPortDefault: mach_port_t;
pub fn IOMasterPort(bootstrapPort: mach_port_t, masterPort: *mut mach_port_t) -> kern_return::kern_return_t;
pub fn IOServiceMatching(name: *const c_char) -> CFMutableDictionaryRef;
pub fn IOServiceGetMatchingServices(
masterPort: mach_port_t,
matching: CFDictionaryRef,
existing: *mut io_iterator_t,
) -> kern_return::kern_return_t;
pub fn IORegistryEntryCreateCFProperties(
entry: io_registry_entry_t,
properties: *mut CFMutableDictionaryRef,
allocator: CFAllocatorRef,
options: IOOptionBits,
) -> kern_return::kern_return_t;
pub fn IOIteratorNext(iterator: io_iterator_t) -> io_object_t;
pub fn IOIteratorIsValid(iterator: io_iterator_t) -> boolean::boolean_t;
pub fn IOObjectRelease(object: io_object_t) -> kern_return::kern_return_t;
}