1/* 2 * Copyright (c) 2002-2010 Apple Computer, Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23 24/*! 25 * @header IOPSKeys.h 26 * 27 * @discussion 28 * IOPSKeys.h defines C strings for use accessing power source data in IOPowerSource 29 * CFDictionaries, as returned by <code>@link //apple_ref/c/func/IOPSGetPowerSourceDescription IOPSGetPowerSourceDescription @/link</code> 30 * Note that all of these C strings must be converted to CFStrings before use. You can wrap 31 * them with the CFSTR() macro, or create a CFStringRef (that you must later CFRelease()) using CFStringCreateWithCString(). 32 */ 33 34#ifndef _IOPSKEYS_H_ 35#define _IOPSKEYS_H_ 36 37/*! 38 * @group IOPSPowerAdapter Keys 39 * 40 * @discussion 41 * Use these kIOPSPowerAdapter keys to decipher the dictionary returned 42 * by @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link 43 */ 44 45/*! 46 * @define kIOPSPowerAdapterIDKey 47 * 48 * @abstract This key refers to the attached external AC power adapter's ID. 49 * The value associated with this key is a CFNumberRef kCFNumberIntType integer. 50 * 51 * @discussion This key may be present in the dictionary returned from 52 * @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link 53 * This key might not be defined in the adapter details dictionary. 54 */ 55#define kIOPSPowerAdapterIDKey "AdapterID" 56 57/*! 58 * @define kIOPSPowerAdapterWattsKey 59 * 60 * @abstract This key refers to the wattage of the external AC power adapter attached to a portable. 61 * The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of watts. 62 * 63 * @discussion This key may be present in the dictionary returned from 64 * @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link 65 * This key might not be defined in the adapter details dictionary. 66 */ 67#define kIOPSPowerAdapterWattsKey "Watts" 68 69/*! 70 * @define kIOPSPowerAdapterRevisionKey 71 * 72 * @abstract The power adapter's revision. 73 * The value associated with this key is a CFNumberRef kCFNumberIntType integer value 74 * 75 * @discussion This key may be present in the dictionary returned from 76 * @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link 77 * This key might not be defined in the adapter details dictionary. 78 */ 79#define kIOPSPowerAdapterRevisionKey "AdapterRevision" 80 81/*! 82 * @define kIOPSPowerAdapterSerialNumberKey 83 * 84 * @abstract The power adapter's serial number. 85 * The value associated with this key is a CFNumberRef kCFNumberIntType integer value 86 * 87 * @discussion This key may be present in the dictionary returned from 88 * @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link 89 * This key might not be defined in the adapter details dictionary. 90 */ 91#define kIOPSPowerAdapterSerialNumberKey "SerialNumber" 92 93/*! 94 * @define kIOPSPowerAdapterFamilyKey 95 * 96 * @abstract The power adapter's family code. 97 * The value associated with this key is a CFNumberRef kCFNumberIntType integer value 98 * 99 * @discussion This key may be present in the dictionary returned from 100 * @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link 101 * This key might not be defined in the adapter details dictionary. 102 */ 103#define kIOPSPowerAdapterFamilyKey "FamilyCode" 104 105/*! 106 * @define kIOPSPowerAdapterCurrentKey 107 * 108 * @abstract This key refers to the current of the external AC power adapter attached to a portable. 109 * The value associated with this key is a CFNumberRef kCFNumberIntType integer value, in units of mAmps. 110 * 111 * @discussion This key may be present in the dictionary returned from 112 * @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link 113 * This key might not be defined in the adapter details dictionary. 114 */ 115#define kIOPSPowerAdapterCurrentKey "Current" 116 117/*! 118 * @define kIOPSPowerAdapterSourceKey 119 * 120 * @abstract This key refers to the source of the power. 121 * The value associated with this key is a CFNumberRef kCFNumberIntType integer value. 122 * 123 * @discussion This key may be present in the dictionary returned from 124 * @link //apple_ref/c/func/IOPSCopyExternalPowerAdapterDetails IOPSCopyExternalPowerAdapterDetails @/link 125 * This key might not be defined in the adapter details dictionary. 126 */ 127#define kIOPSPowerAdapterSourceKey "Source" 128 129 130/*! 131 * @group Internal Keys 132 * 133 */ 134 135/*! 136 * @define kIOPSUPSManagementClaimed 137 * 138 * @abstract Claims UPS management for a third-party driver. 139 * @discussion kIOPSUPSManagementClaimed is obsolete. Do not use. 140 * @deprecated Unsupported in OS X 10.5 and later. 141 */ 142#define kIOPSUPSManagementClaimed "/IOKit/UPSPowerManagementClaimed" 143 144/*! 145 * @define kIOPSLowWarnLevelKey 146 * 147 * @abstract Key for the "Warning" UPS low power trigger-level. Default is 50%. 148*/ 149#define kIOPSLowWarnLevelKey "Low Warn Level" 150 151/*! 152 * @define kIOPSDeadWarnLevelKey 153 * 154 * @abstract Key for the "Shutdown System" low power trigger-level. Default is 20%. 155 */ 156#define kIOPSDeadWarnLevelKey "Shutdown Level" 157 158 159/*! 160 * @define kIOPSDynamicStorePath 161 * 162 * @abstract This is only used for internal bookkeeping, and should be ignored. 163 */ 164#define kIOPSDynamicStorePath "/IOKit/PowerSources" 165 166 167/*! 168 * @group Power Source Commands (UPS) 169 * 170 */ 171 172/*! 173 * @define kIOPSCommandDelayedRemovePowerKey 174 * 175 * @abstract Command to give a UPS when it should remove power from its AC plugs in a specified amount of time 176 * @discussion 177 * <ul> 178 * <li>The matching argument should be a CFNumber of kCFNumberIntType specifying when the UPS should 179 * <li>remove power from its AC power ports. 180 * </ul> 181 */ 182#define kIOPSCommandDelayedRemovePowerKey "Delayed Remove Power" 183 184/*! 185 * @define kIOPSCommandEnableAudibleAlarmKey 186 * 187 * @abstract Command to give a UPS when it should either enable or disable the audible alarm. 188 * @discussion 189 * <ul> 190 * <li>The matching argument should be a CFBooleanRef where kCFBooleanTrue enables the alarm and 191 * <li>kCFBooleanFalse diables the alarm 192 * </ul> 193 */ 194 195#define kIOPSCommandEnableAudibleAlarmKey "Enable Audible Alarm" 196 197/*! 198 * @define kIOPSCommandStartupDelayKey 199 * 200 * @abstract Tell UPS how long it should wait for 201 * @discussion 202 * <ul> 203 * <li>The matching argument should be a CFNumber of kCFNumberIntType specifying when the UPS should 204 * <li>remove power from its AC power ports. 205 * </ul> 206 */ 207#define kIOPSCommandStartupDelayKey "Startup Delay" 208 209 210/*! 211 * @group Power Source data keys 212 * 213 */ 214 215/* These keys specify the values in a dictionary of PowerSource details. 216 * Use these keys in conjunction with the dictionary returned by 217 * <code>@link //apple_ref/c/func/IOPSGetPowerSourceDescription IOPSGetPowerSourceDescription @/link</code> 218 * 219 * Clients of <code>@link //apple_ref/c/func/IOPSCreatePowerSource IOPSCreatePowerSource @/link</code> 220 * must specify these keys in their power source dictionaries. 221 * Each key is labelled with one of these labels that indicate what information is REQUIRED. to 222 * represent a power source in OS X. 223 * 224 * <ul> 225 * <li> For power source creators: Providing this key is REQUIRED. 226 * <li> For power source creators: Providing this key is RECOMMENDED. 227 * <li> For power source creators: Providing this key is OPTIONAL. 228 * <li> This key is DEPRECATED, do not provide it. 229 * </ul> 230 * 231 */ 232 233/*! 234 * @define kIOPSPowerSourceIDKey 235 * 236 * @abstract CFNumber key uniquely identifying a UPS attached to the system. 237 * 238 * @discussion 239 * <ul> 240 * <li> Apple UPS power sources will publish this key. 241 * <li> Callers should not set this key; OS X power management will publish this key for UPS's. 242 * <li> Type CFNumber, kCFNumberIntType, uniquely identifying an attached UPS. 243 * </ul> 244 */ 245 246#define kIOPSPowerSourceIDKey "Power Source ID" 247 248 249/*! 250 * @define kIOPSPowerSourceStateKey 251 * 252 * @abstract CFDictionary key for the current source of power. 253 * 254 * @discussion 255 * <ul> 256 * <li> Apple-defined power sources will publish this key. 257 * <li> For power source creators: Providing this key is REQUIRED. 258 * <li> <code>@link kIOPSBatteryPowerValue @/link</code> indicates power source is drawing internal power; 259 * <code>@link kIOPSACPowerValue@/link</code> indicates power source is connected to an external power source. 260 * <li> Type CFString, value is <code>@link kIOPSACPowerValue@/link</code>, <code>@link kIOPSBatteryPowerValue@/link</code>, or <code>@link kIOPSOffLineValue@/link</code>. 261 * </ul> 262 */ 263 264#define kIOPSPowerSourceStateKey "Power Source State" 265 266/*! 267 * @define kIOPSCurrentCapacityKey 268 * @abstract CFDictionary key for the current power source's capacity. 269 * 270 * @discussion 271 * <ul> 272 * <li> Apple-defined power sources will publish this key in units of percent. 273 * <li> The power source's software may specify the units for this key. 274 * The units must be consistent for all capacities reported by this power source. 275 * The power source will usually define this number in units of percent, or mAh. 276 * <li> Clients may derive a percentage of power source battery remaining by dividing "Current Capacity" by "Max Capacity" 277 * <li> For power source creators: Providing this key is REQUIRED. 278 * <li> Type CFNumber kCFNumberIntType (signed integer) 279 * </ul> 280 */ 281 282#define kIOPSCurrentCapacityKey "Current Capacity" 283 284/*! 285 * @define kIOPSMaxCapacityKey 286 * @abstract CFDictionary key for the current power source's maximum or "Full Charge Capacity" 287 * @discussion 288 * <ul> 289 * <li> Apple-defined power sources will publish this key in units of percent. The value is usually 100%. 290 * <li> The power source's software may specify the units for this key. The units must be consistent for all capacities reported by this power source. 291 * <li> For power source creators: Providing this key is REQUIRED. 292 * <li> Type CFNumber kCFNumberIntType (signed integer) 293 * </ul> 294 */ 295 296#define kIOPSMaxCapacityKey "Max Capacity" 297 298/*! 299 * @define kIOPSDesignCapacityKey 300 * @abstract CFDictionary key for the current power source's design capacity 301 * @discussion 302 * <ul> 303 * <li> Apple-defined power sources might not publish this key. 304 * <li> The power source's software may specify the units for this key. The units must be consistent for all capacities reported by this power source. 305 * <li> For power source creators: Providing this key is RECOMMENDED. 306 * <li> Type CFNumber kCFNumberIntType (signed integer) 307 * </ul> 308 */ 309 310#define kIOPSDesignCapacityKey "DesignCapacity" 311 312/*! 313 * @define kIOPSTimeToEmptyKey 314 * @abstract CFDictionary key for the current power source's time remaining until empty. 315 * @discussion 316 * Only valid if the power source is running off its own power. That's when the 317 * <code>@link kIOPSPowerSourceStateKey @/link</code> has value <code>@link kIOPSBatteryPowerValue @/link</code> 318 * and the value of <code>@link kIOPSIsChargingKey @/link</code> is kCFBooleanFalse. 319 * <ul> 320 * <li> Apple-defined power sources will publish this key. 321 * <li> For power source creators: Providing this key is RECOMMENDED. 322 * <li> Type CFNumber kCFNumberIntType (signed integer), units are minutes 323 * <li> A value of -1 indicates "Still Calculating the Time", otherwise estimated minutes left on the battery. 324 * </ul> 325 */ 326 327 328#define kIOPSTimeToEmptyKey "Time to Empty" 329 330/*! 331 * @define kIOPSTimeToFullChargeKey 332 * @abstract CFDictionary key for the current power source's time remaining until empty. 333 * @discussion 334 * Only valid if the value of <code>@link kIOPSIsChargingKey @/link</code> is kCFBooleanTrue. 335 * <ul> 336 * <li> Apple-defined power sources will publish this key. 337 * <li> For power source creators: Providing this key is RECOMMENDED. 338 * <li> Type CFNumber kCFNumberIntType (signed integer), units are minutes 339 * <li>A value of -1 indicates "Still Calculating the Time", otherwise estimated minutes until fully charged. 340 * </ul> 341 */ 342 343#define kIOPSTimeToFullChargeKey "Time to Full Charge" 344 345/*! 346 * @define kIOPSIsChargingKey 347 * @abstract CFDictionary key for the current power source's charging state 348 * @discussion 349 * <ul> 350 * <li> Apple-defined power sources will publish this key. 351 * <li> For power source creators: Providing this key is REQUIRED. 352 * <li> Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse 353 * </ul> 354 */ 355 356#define kIOPSIsChargingKey "Is Charging" 357 358/*! 359 * @define kIOPSIsPresentKey 360 * @abstract CFDictionary key for the current power source's presence. 361 * @discussion 362 * <ul> 363 * <li> Apple-defined power sources will publish this key. 364 * <li> For instance, a portable with the capacity for two batteries but 365 * with only one present would show two power source dictionaries, 366 * but kIOPSIsPresentKey would have the value kCFBooleanFalse in one of them. 367 * <li> For power source creators: Providing this key is REQUIRED. 368 * <li> Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse 369 * </ul> 370 */ 371 372#define kIOPSIsPresentKey "Is Present" 373 374/*! 375 * @define kIOPSVoltageKey 376 * @abstract CFDictionary key for the current power source's electrical voltage. 377 * @discussion 378 * <ul> 379 * <li> Apple-defined power sources will publish this key. 380 * <li> For power source creators: Providing this key is RECOMMENDED. 381 * <li> Type CFNumber kCFNumberIntType (signed integer) - units are mV 382 * </ul> 383 */ 384 385#define kIOPSVoltageKey "Voltage" 386 387/*! 388 * @define kIOPSCurrentKey 389 * @abstract CFDictionary key for the current power source's electrical current. 390 * @discussion 391 * <ul> 392 * <li> Apple-defined power sources will publish this key. 393 * <li> For power source creators: Providing this key is RECOMMENDED. 394 * <li> Type CFNumber kCFNumberIntType (signed integer) - units are mA 395 * </ul> 396 */ 397 398#define kIOPSCurrentKey "Current" 399 400/*! 401 * @define kIOPSNameKey 402 * @abstract CFDictionary key for the current power source's name. 403 * @discussion 404 * <ul> 405 * <li> Apple-defined power sources will publish this key. 406 * <li> For power source creators: Providing this key is REQUIRED. 407 * <li> Type CFStringRef 408 * </ul> 409 */ 410 411#define kIOPSNameKey "Name" 412 413 414/*! 415 * @define kIOPSTypeKey 416 * @abstract CFDictionary key for the type of the power source 417 * @discussion 418 * <ul> 419 * <li> Apple-defined power sources will publish this key. 420 * <li> For power source creators: Providing this key is REQUIRED. 421 * <li> Type CFStringRef. Valid transport types are kIOPSUPSType or kIOPSInternalBatteryType. 422 * </ul> 423 */ 424 425#define kIOPSTypeKey "Type" 426 427 428/*! 429 * @define kIOPSTransportTypeKey 430 * @abstract CFDictionary key for the current power source's data transport type (e.g. the means that the power source conveys power source data to the OS X machine). 431 * @discussion 432 * <ul> 433 * <li> Apple-defined power sources will publish this key. 434 * <li> A value of <code>@link kIOPSInternalType @/link</code> describes an internal power source. 435 * <li> <code>@link kIOPSUSBTransportType @/link</code>, <code>@link kIOPSNetworkTransportType @/link</code>, and <code>@link kIOPSSerialTransportType @/link</code> usually describe UPS's. 436 * <li> For power source creators: Providing this key is REQUIRED. 437 * <li> Type CFStringRef. Valid transport types are kIOPSSerialTransportType, 438 * kIOPSUSBTransportType, kIOPSNetworkTransportType, kIOPSInternalType 439 * </ul> 440 */ 441 442#define kIOPSTransportTypeKey "Transport Type" 443 444/*! 445 * @define kIOPSVendorDataKey 446 * @abstract CFDictionary key for arbitrary vendor data. 447 * @discussion 448 * <ul> 449 * <li> Apple-defined power sources are not required to publish this key. 450 * <li> For power source creators: Providing this key is OPTIONAL. 451 * <li>CFDictionary; contents determined by the power source software. OS X will not look at this data. 452 * </ul> 453 */ 454 455#define kIOPSVendorDataKey "Vendor Specific Data" 456 457/*! 458 * @define kIOPSBatteryHealthKey 459 * @abstract CFDictionary key for the current power source's "health" estimate. 460 * @discussion 461 * <ul> 462 * <li> Apple-defined battery power sources will publish this key. 463 * <li> Use value <code>@link kIOPSGoodValue @/link</code> to describe a well-performing power source, 464 * <li> Use <code>@link kIOPSFairValue @/link</code> to describe a functional power source with limited capacity 465 * <li> And use <code>@link kIOPSPoorValue @/link</code> to describe a power source that's not capable of Providing power. 466 * <li> For power source creators: Providing this key is OPTIONAL. 467 * <li> Type CFStringRef 468 * </ul> 469 */ 470 471#define kIOPSBatteryHealthKey "BatteryHealth" 472 473/*! 474 * @define kIOPSBatteryHealthConditionKey 475 * @abstract kIOPSBatteryHealthConditionKey broadly describes the battery's health. 476 * @discussion 477 * <ul> 478 * <li> Apple-defined power sources will publish this key. 479 * <li> Value is one of the "Battery Health Condition Values" strings described in this file. 480 * <li> For power source creators: Providing this key is OPTIONAL - these keys have values only used by Apple power sources. 481 * <li> Type CFStringRef 482 * </ul> 483 */ 484 485#define kIOPSBatteryHealthConditionKey "BatteryHealthCondition" 486 487/*! 488 * @define kIOPSBatteryFailureModesKey 489 * @abstract Enumerates a battery's failures and error conditions. 490 * @discussion 491 * Various battery failures will be listed here. A battery may suffer from more than one 492 * type of failure simultaneously, so this key has a CFArray value. 493 * 494 * If BatteryFailureModesKey is not defined (or is set to an empty dictionary), 495 * then the battery has no detectable failures. 496 * 497 * Each entry in the array should be a short descriptive string describing the error. 498 * <li> Apple-defined power sources will publish this key if any battery errors exist. 499 * <li> For power source creators: Providing this key is RECOMMENDED. 500 * <li> Type CFArrayRef 501 * </ul> 502 */ 503#define kIOPSBatteryFailureModesKey "BatteryFailureModes" 504 505/*! 506 * @define kIOPSHealthConfidenceKey 507 * @abstract CFDictionary key for our confidence in the accuracy of our 508 * power source's "health" estimate. 509 * @deprecated In OS X 10.6 and later. 510 * @discussion 511 * <ul> 512 * <li> Apple-defined power sources will no longer publish this key. 513 * <li> Power source creators should not publish this key. 514 * <li> For power source creators: This key is DEPRECATED, do not implement it. 515 * <li> Type CFStringRef 516 * </ul> 517 */ 518 519#define kIOPSHealthConfidenceKey "HealthConfidence" 520 521 522/*! 523 * @define kIOPSMaxErrKey 524 * @abstract CFDictionary key for the current power source's percentage error in capacity reporting. 525 * @discussion 526 * In internal batteries, this refers to the battery pack's estimated percentage error. 527 * <ul> 528 * <li> Apple-defined battery power sources will publish this key, but only if it's defined for the battery. 529 * <li> For power source creators: Providing this key is OPTIONAL. 530 * <li> Type CFNumberRef kCFNumberIntType, non-negative integer 531 * </ul> 532 */ 533 534#define kIOPSMaxErrKey "MaxErr" 535 536/*! 537 * @define kIOPSIsChargedKey 538 * @abstract CFDictionary key indicates whether the battery is charged. 539 * @discussion 540 * A battery must be plugged in to an external power source in order to be fully charged. 541 * Note that a battery may validly be plugged in, not charging, and <100% charge. 542 * e.g. A battery with capacity >= 95% and not charging, is defined as charged. 543 * <ul> 544 * <li> Apple-defined power sources will publish this key. 545 * <li> For power source creators: Providing this key is REQUIRED. 546 * <li> Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse 547 * </ul> 548 */ 549 550#define kIOPSIsChargedKey "Is Charged" 551 552/*! 553 * @define kIOPSIsFinishingChargeKey 554 * @abstract CFDictionary key indicates whether the battery is finishing off its charge. 555 * @discussion 556 * When this is true, the system UI should indicate that the battery is "Finishing Charge." 557 * Some batteries may continue charging after they report 100% capacity. 558 * <ul> 559 * <li> Apple-defined battery power sources will publish this key. 560 * <li> For power source creators: Providing this key is RECOMMENDED. 561 * <li> Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse 562 * </ul> 563 */ 564 565#define kIOPSIsFinishingChargeKey "Is Finishing Charge" 566 567/*! 568 * @define kIOPSHardwareSerialNumberKey 569 * @abstract A unique serial number that identifies the power source. 570 * @discussion For Apple-manufactured batteries, this is an alphanumeric string generated 571 * during the battery manufacturing process. 572 * <ul> 573 * <li> Apple-defined power sources will publish this key if the hardware provides the serial number. 574 * <li> For power source creators: Providing this key is RECOMMENDED. 575 * <li> Type CFStringRef 576 * </ul> 577 */ 578 579 580#define kIOPSHardwareSerialNumberKey "Hardware Serial Number" 581 582 583 584/* 585 * @group Transport types 586 * @abstract Possible values for <code>@link kIOPSTransportTypeKey @/link</code> 587 */ 588/*! 589 * @define kIOPSSerialTransportType 590 * @abstract Value for key <code>@link kIOPSTransportTypeKey @/link</code>. 591 * @discussion Indicates the power source is a UPS attached over a serial connection. 592 */ 593#define kIOPSSerialTransportType "Serial" 594 595/*! 596 * @define kIOPSUSBTransportType 597 * @abstract Value for key <code>@link kIOPSTransportTypeKey @/link</code>. 598 * @discussion Indicates the power source is a UPS attached over a USB connection. 599 */ 600#define kIOPSUSBTransportType "USB" 601 602/*! 603 * @define kIOPSNetworkTransportType 604 * @abstract Value for key <code>@link kIOPSTransportTypeKey @/link</code>. 605 * @discussion Indicates the power source is a UPS attached over a network connection (and it may be managing several computers). 606 */ 607#define kIOPSNetworkTransportType "Ethernet" 608 609/*! 610 * @define kIOPSInternalType 611 * @abstract Value for key <code>@link kIOPSTransportTypeKey @/link</code>. Indicates the power source is an internal battery. 612*/ 613#define kIOPSInternalType "Internal" 614 615 616/* 617 * @group PowerSource Types 618 * @discussion 619 * A string that broadly describes the type of power source. One of these strings must be passed 620 * as an argument to IOPSCreatePowerSource() when defining a new system power source. 621 */ 622 623/*! 624 * @define kIOPSInternalBatteryType 625 * 626 * @abstract Represents a battery residing inside a Mac. 627 */ 628#define kIOPSInternalBatteryType "InternalBattery" 629 630/*! 631 * @define kIOPSUPSType 632 * 633 * @abstract Represents an external attached UPS. 634 */ 635#define kIOPSUPSType "UPS" 636 637/* 638 * PS state 639 */ 640/*! 641 * @define kIOPSOffLineValue 642 * @abstract Value for key kIOPSPowerSourceStateKey. Power source is off-line or no longer connected. 643*/ 644#define kIOPSOffLineValue "Off Line" 645 646/*! 647 * @define kIOPSACPowerValue 648 * @abstract Value for key kIOPSPowerSourceStateKey. Power source is connected to external or AC power, and is not draining the internal battery. 649*/ 650#define kIOPSACPowerValue "AC Power" 651 652/*! 653 * @define kIOPSBatteryPowerValue 654 * @abstract Value for key kIOPSPowerSourceStateKey. Power source is currently using the internal battery. 655*/ 656#define kIOPSBatteryPowerValue "Battery Power" 657 658 659 660/*! 661 * @group Battery Health values 662 */ 663/*! 664 * @define kIOPSPoorValue 665 * @abstract Value for key <code>@link kIOPSBatteryHealthKey @/link</code>. 666*/ 667#define kIOPSPoorValue "Poor" 668 669/*! 670 * @define kIOPSFairValue 671 * @abstract Value for key <code>@link kIOPSBatteryHealthKey @/link</code>. 672*/ 673#define kIOPSFairValue "Fair" 674 675/*! 676 * @define kIOPSGoodValue 677 * @abstract Value for key <code>@link kIOPSBatteryHealthKey @/link</code>. 678*/ 679#define kIOPSGoodValue "Good" 680 681 682 683/* 684 * @group Battery Health Condition values 685 */ 686/*! 687 * @define kIOPSCheckBatteryValue 688 * 689 * @abstract Value for key <code>@link kIOPSBatteryHealthConditionKey @/link</code> 690 * 691 * @discussion This value indicates that the battery should be checked out by a licensed Mac repair service. 692 */ 693#define kIOPSCheckBatteryValue "Check Battery" 694 695/*! 696 * @define kIOPSPermanentFailureValue 697 * 698 * @abstract Value for key <code>@link kIOPSBatteryHealthConditionKey @/link</code> 699 * 700 * @discussion Indicates the battery needs replacement. 701 */ 702#define kIOPSPermanentFailureValue "Permanent Battery Failure" 703 704 705/*! 706 * @group Battery Failure Mode values 707 */ 708 709/*! 710 * @define kIOPSFailureExternalInput 711 * 712 * @abstract Value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 713 */ 714#define kIOPSFailureExternalInput "Externally Indicated Failure" 715/*! 716 * @define kIOPSFailureSafetyOverVoltage 717 * 718 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 719 */ 720#define kIOPSFailureSafetyOverVoltage "Safety Over-Voltage" 721/*! 722 * @define kIOPSFailureChargeOverTemp 723 * 724 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 725 */ 726#define kIOPSFailureChargeOverTemp "Charge Over-Temperature" 727/*! 728 * @define kIOPSFailureDischargeOverTemp 729 * 730 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 731 */ 732#define kIOPSFailureDischargeOverTemp "Discharge Over-Temperature" 733/*! 734 * @define kIOPSFailureCellImbalance 735 * 736 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 737 */ 738#define kIOPSFailureCellImbalance "Cell Imbalance" 739/*! 740 * @define kIOPSFailureChargeFET 741 * 742 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 743 */ 744#define kIOPSFailureChargeFET "Charge FET" 745/*! 746 * @define kIOPSFailureDischargeFET 747 * 748 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 749 */ 750#define kIOPSFailureDischargeFET "Discharge FET" 751/*! 752 * @define kIOPSFailureDataFlushFault 753 * 754 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 755 */ 756#define kIOPSFailureDataFlushFault "Data Flush Fault" 757/*! 758 * @define kIOPSFailurePermanentAFEComms 759 * 760 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 761 */ 762#define kIOPSFailurePermanentAFEComms "Permanent AFE Comms" 763/*! 764 * @define kIOPSFailurePeriodicAFEComms 765 * 766 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 767 */ 768#define kIOPSFailurePeriodicAFEComms "Periodic AFE Comms" 769/*! 770 * @define kIOPSFailureChargeOverCurrent 771 * 772 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 773 */ 774#define kIOPSFailureChargeOverCurrent "Charge Over-Current" 775/*! 776 * @define kIOPSFailureDischargeOverCurrent 777 * 778 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 779 */ 780#define kIOPSFailureDischargeOverCurrent "Discharge Over-Current" 781/*! 782 * @define kIOPSFailureOpenThermistor 783 * 784 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 785 */ 786#define kIOPSFailureOpenThermistor "Open Thermistor" 787/*! 788 * @define kIOPSFailureFuseBlown 789 * 790 * @abstract Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code> 791 */ 792#define kIOPSFailureFuseBlown "Fuse Blown" 793 794 795#endif 796