/*
* Copyright (c) 2002-2010 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
/*!
* @header IOPSKeys.h
*
* @discussion
* IOPSKeys.h defines C strings for use accessing power source data in IOPowerSource
* CFDictionaries, as returned by <code>@link //apple_ref/c/func/IOPSGetPowerSourceDescription IOPSGetPowerSourceDescription @/link</code>
* Note that all of these C strings must be converted to CFStrings before use. You can wrap
* them with the CFSTR() macro, or create a CFStringRef (that you must later CFRelease()) using CFStringCreateWithCString().
*/
#ifndef _IOPSKEYS_H_
#define _IOPSKEYS_H_
/*!
* @group IOPSPowerAdapter Keys
*
* @discussion
* Use these kIOPSPowerAdapter keys to decipher the dictionary returned
* by @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
*/
/*!
* @define kIOPSPowerAdapterIDKey
*
* @abstract This key refers to the attached external AC power adapter's ID.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer.
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterIDKey "AdapterID"
/*!
* @define kIOPSPowerAdapterWattsKey
*
* @abstract This key refers to the wattage of the external AC power adapter attached to a portable.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of watts.
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterWattsKey "Watts"
/*!
* @define kIOPSPowerAdapterRevisionKey
*
* @abstract The power adapter's revision.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterRevisionKey "AdapterRevision"
/*!
* @define kIOPSPowerAdapterSerialNumberKey
*
* @abstract The power adapter's serial number.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterSerialNumberKey "SerialNumber"
/*!
* @define kIOPSPowerAdapterFamilyKey
*
* @abstract The power adapter's family code.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterFamilyKey "FamilyCode"
/*!
* @define kIOPSPowerAdapterCurrentKey
*
* @abstract This key refers to the current of the external AC power adapter attached to a portable.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of mAmps.
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterCurrentKey "Current"
/*!
* @define kIOPSPowerAdapterSourceKey
*
* @abstract This key refers to the source of the power.
* The value associated with this key is a CFNumberRef kCFNumberIntType integer value.
*
* @discussion This key may be present in the dictionary returned from
* @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link
* This key might not be defined in the adapter details dictionary.
*/
#define kIOPSPowerAdapterSourceKey "Source"
/*!
* @group Internal Keys
*
*/
/*!
* @define kIOPSUPSManagementClaimed
*
* @abstract Claims UPS management for a third-party driver.
* @discussion kIOPSUPSManagementClaimed is obsolete. Do not use.
* @deprecated Unsupported in OS X 10.5 and later.
*/
#define kIOPSUPSManagementClaimed "/IOKit/UPSPowerManagementClaimed"
/*!
* @define kIOPSLowWarnLevelKey
*
* @abstract Key for the "Warning" UPS low power trigger-level. Default is 50%.
*/
#define kIOPSLowWarnLevelKey "Low Warn Level"
/*!
* @define kIOPSDeadWarnLevelKey
*
* @abstract Key for the "Shutdown System" low power trigger-level. Default is 20%.
*/
#define kIOPSDeadWarnLevelKey "Shutdown Level"
/*!
* @define kIOPSDynamicStorePath
*
* @abstract This is only used for internal bookkeeping, and should be ignored.
*/
#define kIOPSDynamicStorePath "/IOKit/PowerSources"
/*!
* @group Power Source Commands (UPS)
*
*/
/*!
* @define kIOPSCommandDelayedRemovePowerKey
*
* @abstract Command to give a UPS when it should remove power from its AC plugs in a specified amount of time
* @discussion
* <ul>
* <li>The matching argument should be a CFNumber of kCFNumberIntType specifying when the UPS should
* <li>remove power from its AC power ports.
* </ul>
*/
#define kIOPSCommandDelayedRemovePowerKey "Delayed Remove Power"
/*!
* @define kIOPSCommandEnableAudibleAlarmKey
*
* @abstract Command to give a UPS when it should either enable or disable the audible alarm.
* @discussion
* <ul>
* <li>The matching argument should be a CFBooleanRef where kCFBooleanTrue enables the alarm and
* <li>kCFBooleanFalse diables the alarm
* </ul>
*/
#define kIOPSCommandEnableAudibleAlarmKey "Enable Audible Alarm"
/*!
* @define kIOPSCommandStartupDelayKey
*
* @abstract Tell UPS how long it should wait for
* @discussion
* <ul>
* <li>The matching argument should be a CFNumber of kCFNumberIntType specifying when the UPS should
*
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
batteryLevelTest-master.zip (25个子文件)
batteryLevelTest-master
batteryLevelTest
main.m 340B
IOPSKeys.h 31KB
batteryLevelTest-Prefix.pch 344B
AppDelegate.h 280B
AppDelegate.m 2KB
batteryLevelTest-Info.plist 1KB
Base.lproj
Main.storyboard 2KB
ViewController.h 218B
IOKit 1.78MB
Images.xcassets
AppIcon.appiconset
Contents.json 333B
LaunchImage.launchimage
Contents.json 442B
IOPowerSources.h 17KB
ViewController.m 2KB
en.lproj
InfoPlist.strings 45B
batteryLevelTestTests
batteryLevelTestTests-Info.plist 683B
en.lproj
InfoPlist.strings 45B
batteryLevelTestTests.m 666B
.DS_Store 6KB
batteryLevelTest.xcodeproj
project.xcworkspace
contents.xcworkspacedata 161B
xcuserdata
guorongzhang.xcuserdatad
UserInterfaceState.xcuserstate 9KB
project.pbxproj 21KB
xcuserdata
apple.xcuserdatad
xcschemes
xcschememanagement.plist 578B
batteryLevelTest.xcscheme 4KB
guorongzhang.xcuserdatad
xcschemes
xcschememanagement.plist 578B
batteryLevelTest.xcscheme 4KB
共 25 条
- 1
资源评论
- LookPotato2017-11-27很好用,赞一个
维庆
- 粉丝: 27
- 资源: 23
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功