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      kIOPSTemperatureKey
402 * @abstract    CFDictionary key for the current power source's temperature.
403 * @discussion
404 *              <ul>
405 *              <li> Apple-defined power sources will publish this key.
406 *              <li> For power source creators: Providing this key is RECOMMENDED.
407 *              <li> Type CFNumber kCFNumberIntType (signed integer) - units are C
408 *              </ul>
409 */
410#define kIOPSTemperatureKey                         "Temperature"
411
412/*!
413 * @define      kIOPSNameKey
414 * @abstract    CFDictionary key for the current power source's name.
415 * @discussion
416 *              <ul>
417 *              <li> Apple-defined power sources will publish this key.
418 *              <li> For power source creators: Providing this key is REQUIRED.
419 *              <li> Type CFStringRef
420 *              </ul>
421 */
422
423#define kIOPSNameKey                   "Name"
424
425
426/*!
427 * @define      kIOPSTypeKey
428 * @abstract    CFDictionary key for the type of the power source
429 * @discussion
430 *              <ul>
431 *              <li> Apple-defined power sources will publish this key.
432 *              <li> For power source creators: Providing this key is REQUIRED.
433 *              <li> Type CFStringRef. Valid transport types are kIOPSUPSType or kIOPSInternalBatteryType.
434 *              </ul>
435 */
436
437#define kIOPSTypeKey          "Type"
438
439
440/*!
441 * @define      kIOPSTransportTypeKey
442 * @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).
443 * @discussion
444 *              <ul>
445 *              <li> Apple-defined power sources will publish this key.
446 *              <li> A value of <code>@link kIOPSInternalType @/link</code> describes an internal power source.
447 *              <li> <code>@link kIOPSUSBTransportType @/link</code>, <code>@link kIOPSNetworkTransportType @/link</code>, and <code>@link kIOPSSerialTransportType @/link</code> usually describe UPS's.
448 *              <li> For power source creators: Providing this key is REQUIRED.
449 *              <li> Type CFStringRef. Valid transport types are kIOPSSerialTransportType,
450 *                  kIOPSUSBTransportType, kIOPSNetworkTransportType, kIOPSInternalType
451 *              </ul>
452 */
453
454#define kIOPSTransportTypeKey          "Transport Type"
455
456/*!
457 * @define      kIOPSVendorDataKey
458 * @abstract    CFDictionary key for arbitrary vendor data.
459 * @discussion
460 *              <ul>
461 *              <li> Apple-defined power sources are not required to publish this key.
462 *              <li> For power source creators: Providing this key is OPTIONAL.
463 *              <li>CFDictionary; contents determined by the power source software. OS X will not look at this data.
464 *              </ul>
465 */
466
467#define kIOPSVendorDataKey          "Vendor Specific Data"
468
469/*!
470 * @define      kIOPSBatteryHealthKey
471 * @abstract    CFDictionary key for the current power source's "health" estimate.
472 * @discussion
473 *              <ul>
474 *              <li> Apple-defined battery power sources will publish this key.
475 *              <li> Use value <code>@link kIOPSGoodValue @/link</code> to describe a well-performing power source,
476 *              <li> Use <code>@link kIOPSFairValue @/link</code> to describe a functional power source with limited capacity
477 *              <li> And use  <code>@link kIOPSPoorValue @/link</code> to describe a power source that's not capable of Providing power.
478 *              <li> For power source creators: Providing this key is OPTIONAL.
479 *              <li> Type CFStringRef
480 *              </ul>
481 */
482
483#define kIOPSBatteryHealthKey       "BatteryHealth"
484
485/*!
486 * @define      kIOPSBatteryHealthConditionKey
487 * @abstract    kIOPSBatteryHealthConditionKey broadly describes the battery's health.
488 * @discussion
489 *              <ul>
490 *              <li> Apple-defined power sources will publish this key.
491 *              <li> Value is one of the "Battery Health Condition Values" strings described in this file.
492 *              <li> For power source creators: Providing this key is OPTIONAL - these keys have values only used by Apple power sources.
493 *              <li> Type CFStringRef
494 *              </ul>
495 */
496
497#define kIOPSBatteryHealthConditionKey       "BatteryHealthCondition"
498
499/*!
500 * @define      kIOPSBatteryFailureModesKey
501 * @abstract    Enumerates a battery's failures and error conditions.
502 * @discussion
503 *              Various battery failures will be listed here. A battery may suffer from more than one
504 *              type of failure simultaneously, so this key has a CFArray value.
505 *
506 *              If BatteryFailureModesKey is not defined (or is set to an empty dictionary),
507 *                  then the battery has no detectable failures.
508 *
509 *              Each entry in the array should be a short descriptive string describing the error.
510 *              <li> Apple-defined power sources will publish this key if any battery errors exist.
511 *              <li> For power source creators: Providing this key is RECOMMENDED.
512 *              <li> Type CFArrayRef
513 *              </ul>
514 */
515#define kIOPSBatteryFailureModesKey          "BatteryFailureModes"
516
517/*!
518 * @define      kIOPSHealthConfidenceKey
519 * @abstract    CFDictionary key for our confidence in the accuracy of our
520 *              power source's "health" estimate.
521 * @deprecated  In OS X 10.6 and later.
522 * @discussion
523 *              <ul>
524 *              <li> Apple-defined power sources will no longer publish this key.
525 *              <li> Power source creators should not publish this key.
526 *              <li> For power source creators: This key is DEPRECATED, do not implement it.
527 *              <li> Type CFStringRef
528 *              </ul>
529 */
530
531#define kIOPSHealthConfidenceKey    "HealthConfidence"
532
533
534/*!
535 * @define      kIOPSMaxErrKey
536 * @abstract    CFDictionary key for the current power source's percentage error in capacity reporting.
537 * @discussion
538 *              In internal batteries, this refers to the battery pack's estimated percentage error.
539 *              <ul>
540 *              <li> Apple-defined battery power sources will publish this key, but only if it's defined for the battery.
541 *              <li> For power source creators: Providing this key is OPTIONAL.
542 *              <li> Type CFNumberRef kCFNumberIntType, non-negative integer
543 *              </ul>
544 */
545
546#define kIOPSMaxErrKey              "MaxErr"
547
548/*!
549 * @define      kIOPSIsChargedKey
550 * @abstract    CFDictionary key indicates whether the battery is charged.
551 * @discussion
552 *              A battery must be plugged in to an external power source in order to be fully charged.
553 *              Note that a battery may validly be plugged in, not charging, and <100% charge.
554 *              e.g. A battery with capacity >= 95% and not charging, is defined as charged.
555 *              <ul>
556 *                  <li> Apple-defined power sources will publish this key.
557 *                  <li> For power source creators: Providing this key is REQUIRED.
558 *                  <li> Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse
559 *              </ul>
560 */
561
562#define kIOPSIsChargedKey                   "Is Charged"
563
564/*!
565 * @define      kIOPSIsFinishingChargeKey
566 * @abstract    CFDictionary key indicates whether the battery is finishing off its charge.
567 * @discussion
568 *              When this is true, the system UI should indicate that the battery is "Finishing Charge."
569 *              Some batteries may continue charging after they report 100% capacity.
570 *              <ul>
571 *              <li> Apple-defined battery power sources will publish this key.
572 *              <li> For power source creators: Providing this key is RECOMMENDED.
573 *              <li> Type CFBoolean - kCFBooleanTrue or kCFBooleanFalse
574 *              </ul>
575 */
576
577#define kIOPSIsFinishingChargeKey              "Is Finishing Charge"
578
579/*!
580 * @define      kIOPSHardwareSerialNumberKey
581 * @abstract    A unique serial number that identifies the power source.
582 * @discussion  For Apple-manufactured batteries, this is an alphanumeric string generated
583 *                  during the battery manufacturing process.
584 *              <ul>
585 *              <li> Apple-defined power sources will publish this key if the hardware provides the serial number.
586 *              <li> For power source creators: Providing this key is RECOMMENDED.
587 *              <li> Type CFStringRef
588 *              </ul>
589 */
590
591
592#define kIOPSHardwareSerialNumberKey            "Hardware Serial Number"
593
594
595
596/*
597 * @group       Transport types
598 * @abstract    Possible values for <code>@link kIOPSTransportTypeKey @/link</code>
599 */
600/*!
601 * @define      kIOPSSerialTransportType
602 * @abstract    Value for key <code>@link kIOPSTransportTypeKey @/link</code>.
603 * @discussion  Indicates the power source is a UPS attached over a serial connection.
604 */
605#define kIOPSSerialTransportType       "Serial"
606
607/*!
608 * @define      kIOPSUSBTransportType
609 * @abstract    Value for key <code>@link kIOPSTransportTypeKey @/link</code>.
610 * @discussion  Indicates the power source is a UPS attached over a USB connection.
611 */
612#define kIOPSUSBTransportType          "USB"
613
614/*!
615 * @define      kIOPSNetworkTransportType
616 * @abstract    Value for key <code>@link kIOPSTransportTypeKey @/link</code>.
617 * @discussion  Indicates the power source is a UPS attached over a network connection (and it may be managing several computers).
618 */
619#define kIOPSNetworkTransportType      "Ethernet"
620
621/*!
622 * @define      kIOPSInternalType
623 * @abstract    Value for key <code>@link kIOPSTransportTypeKey @/link</code>. Indicates the power source is an internal battery.
624*/
625#define kIOPSInternalType              "Internal"
626
627
628/*
629 * @group       PowerSource Types
630 * @discussion
631 * A string that broadly describes the type of power source. One of these strings must be passed
632 * as an argument to IOPSCreatePowerSource() when defining a new system power source.
633 */
634
635/*!
636 * @define      kIOPSInternalBatteryType
637 *
638 * @abstract    Represents a battery residing inside a Mac.
639 */
640#define kIOPSInternalBatteryType    "InternalBattery"
641
642/*!
643 * @define      kIOPSUPSType
644 *
645 * @abstract    Represents an external attached UPS.
646 */
647#define kIOPSUPSType                "UPS"
648
649/*
650 * PS state
651 */
652/*!
653 * @define      kIOPSOffLineValue
654 * @abstract    Value for key kIOPSPowerSourceStateKey. Power source is off-line or no longer connected.
655*/
656#define kIOPSOffLineValue              "Off Line"
657
658/*!
659 * @define      kIOPSACPowerValue
660 * @abstract    Value for key kIOPSPowerSourceStateKey. Power source is connected to external or AC power, and is not draining the internal battery.
661*/
662#define kIOPSACPowerValue              "AC Power"
663
664/*!
665 * @define      kIOPSBatteryPowerValue
666 * @abstract    Value for key kIOPSPowerSourceStateKey. Power source is currently using the internal battery.
667*/
668#define kIOPSBatteryPowerValue         "Battery Power"
669
670
671
672/*!
673 * @group Battery Health values
674 */
675/*!
676 * @define      kIOPSPoorValue
677 * @abstract    Value for key <code>@link kIOPSBatteryHealthKey @/link</code>.
678*/
679#define kIOPSPoorValue                  "Poor"
680
681/*!
682 * @define      kIOPSFairValue
683 * @abstract    Value for key <code>@link kIOPSBatteryHealthKey @/link</code>.
684*/
685#define kIOPSFairValue                  "Fair"
686
687/*!
688 * @define      kIOPSGoodValue
689 * @abstract    Value for key <code>@link kIOPSBatteryHealthKey @/link</code>.
690*/
691#define kIOPSGoodValue                  "Good"
692
693
694
695/*
696 * @group       Battery Health Condition values
697 */
698/*!
699 * @define      kIOPSCheckBatteryValue
700 *
701 * @abstract    Value for key <code>@link kIOPSBatteryHealthConditionKey @/link</code>
702 *
703 * @discussion  This value indicates that the battery should be checked out by a licensed Mac repair service.
704 */
705#define kIOPSCheckBatteryValue                      "Check Battery"
706
707/*!
708 * @define      kIOPSPermanentFailureValue
709 *
710 * @abstract    Value for key <code>@link kIOPSBatteryHealthConditionKey @/link</code>
711 *
712 * @discussion  Indicates the battery needs replacement.
713 */
714#define kIOPSPermanentFailureValue                  "Permanent Battery Failure"
715
716
717/*!
718 * @group       Battery Failure Mode values
719 */
720
721/*!
722 * @define      kIOPSFailureExternalInput
723 *
724 * @abstract    Value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
725 */
726#define kIOPSFailureExternalInput                   "Externally Indicated Failure"
727/*!
728 *  @define     kIOPSFailureSafetyOverVoltage
729 *
730 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
731 */
732#define kIOPSFailureSafetyOverVoltage               "Safety Over-Voltage"
733/*!
734 *  @define     kIOPSFailureChargeOverTemp
735 *
736 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
737 */
738#define kIOPSFailureChargeOverTemp                  "Charge Over-Temperature"
739/*!
740 *  @define     kIOPSFailureDischargeOverTemp
741 *
742 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
743 */
744#define kIOPSFailureDischargeOverTemp               "Discharge Over-Temperature"
745/*!
746 *  @define     kIOPSFailureCellImbalance
747 *
748 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
749 */
750#define kIOPSFailureCellImbalance                   "Cell Imbalance"
751/*!
752 *  @define     kIOPSFailureChargeFET
753 *
754 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
755 */
756#define kIOPSFailureChargeFET                       "Charge FET"
757/*!
758 *  @define     kIOPSFailureDischargeFET
759 *
760 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
761 */
762#define kIOPSFailureDischargeFET                    "Discharge FET"
763/*!
764 *  @define     kIOPSFailureDataFlushFault
765 *
766 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
767 */
768#define kIOPSFailureDataFlushFault                  "Data Flush Fault"
769/*!
770 *  @define     kIOPSFailurePermanentAFEComms
771 *
772 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
773 */
774#define kIOPSFailurePermanentAFEComms               "Permanent AFE Comms"
775/*!
776 *  @define     kIOPSFailurePeriodicAFEComms
777 *
778 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
779 */
780#define kIOPSFailurePeriodicAFEComms                "Periodic AFE Comms"
781/*!
782 *  @define     kIOPSFailureChargeOverCurrent
783 *
784 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
785 */
786#define kIOPSFailureChargeOverCurrent               "Charge Over-Current"
787/*!
788 *  @define     kIOPSFailureDischargeOverCurrent
789 *
790 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
791 */
792#define kIOPSFailureDischargeOverCurrent            "Discharge Over-Current"
793/*!
794 *  @define     kIOPSFailureOpenThermistor
795 *
796 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
797 */
798#define kIOPSFailureOpenThermistor                  "Open Thermistor"
799/*!
800 *  @define     kIOPSFailureFuseBlown
801 *
802 *  @abstract   Potential value for key <code>@link kIOPSBatteryFailureModesKey@/link</code>
803 */
804#define kIOPSFailureFuseBlown                       "Fuse Blown"
805
806#endif
807