1/* 2 * 3 * @APPLE_LICENSE_HEADER_START@ 4 * 5 * This file contains Original Code and/or Modifications of Original Code 6 * as defined in and that are subject to the Apple Public Source License 7 * Version 2.0 (the 'License'). You may not use this file except in 8 * compliance with the License. Please obtain a copy of the License at 9 * http://www.opensource.apple.com/apsl/ and read it before using this 10 * file. 11 * 12 * The Original Code and all software distributed under the License are 13 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 16 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 17 * Please see the License for the specific language governing rights and 18 * limitations under the License. 19 * 20 * @APPLE_LICENSE_HEADER_END@ 21 */ 22 23#ifndef _IOKIT_PM_IOUPSPRIVATE_H 24#define _IOKIT_PM_IOUPSPRIVATE_H 25 26#include <CoreFoundation/CoreFoundation.h> 27#include <mach/mach_types.h> 28#include <mach/mach_init.h> 29#include <IOKit/IOReturn.h> 30 31/*! 32 @defined kIOUPSDeviceKey 33 @abstract Key for IOService object that denotes a UPS device. 34 @discussion It is expected that every IOService module that contains 35 a IOUPSCFPlugIn will at least define this key in it property table. 36*/ 37#define kIOUPSDeviceKey "UPSDevice" 38#define kIOPowerDeviceUsageKey 0x84 39#define kIOBatterySystemUsageKey 0x85 40 41/*! 42 @defined kIOUPSPlugInServerName 43 @abstract Key for UPS Mig server. 44 @discussion Used for identifying UPS mig server. 45*/ 46#define kIOUPSPlugInServerName "com.apple.IOUPSPlugInServer" 47 48 49Boolean IOUPSMIGServerIsRunning(mach_port_t * bootstrap_port_ref, mach_port_t * upsd_port_ref); 50 51IOReturn IOUPSSendCommand(mach_port_t connect, int upsID, CFDictionaryRef command); 52 53IOReturn IOUPSGetEvent(mach_port_t connect, int upsID, CFDictionaryRef *event); 54 55IOReturn IOUPSGetCapabilities(mach_port_t connect, int upsID, CFSetRef *capabilities); 56 57#endif /* !_IOKIT_PM_IOUPSPRIVATE_H */ 58