Platforms to show: All Mac Windows Linux Cross-Platform
Back to IOPMAssertionMBS class.
IOPMAssertionMBS.kIOPMAssertionDetailsKey = "Details"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
You may provide extra, contextual information about an assertion for admins and for debugging in this key. Setting this key in an assertion dictionary is optional.
Please name your assertion something unique with kIOPMAssertionNameKey first.
If you have more data to describe this assertion, put it here as a String.
Example: OS X creates an assertion named com.apple.powermanagement.tty to prevent sleep for remote-logged in users. To identify the cause for these assertions, OS X sets kIOPMAssertionDetailsKey to the String device path of the active remote session(s), e.g. "/dev/ttys000" or "/dev/ttys004"
The String you associate with this key does not have to be localizable (OS X will not attempt to localize it.)
Describe your assertion as thoroughly as possible. See these other keys that can you can set to add explanation to an assertion:
- Optional kIOPMAssertionNameKey
- Optional kIOPMAssertionHumanReadableReasonKey
- Optional kIOPMAssertionLocalizationBundlePathKey
IOPMAssertionMBS.kIOPMAssertionFrameworkIDKey = "FrameworkBundleID"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
IOPMAssertionMBS.kIOPMAssertionHumanReadableReasonKey = "HumanReadableReason"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
Optional key that provides a localizable string for OS X to display PM Assertions in the GUI.
The caller should specify this string in CreateWithProperties.
If present, OS X may display this string, localized to the user's language, to explain changes in system behavior caused by the assertion.
If set, the caller must also specify a bundle path for the key kIOPMAssertionLocalizationBundlePathKey.
The bundle at that path should contain localization info for the specified string.
This key may be specified in the dictionary passed to CreateWithProperties.
This key may be present in the dictionary returned from Properties.
Describe your assertion as thoroughly as possible. See these other keys that can you can set to add explanation to an assertion:
- Required kIOPMAssertionNameKey
- Optional kIOPMAssertionDetailsKey
IOPMAssertionMBS.kIOPMAssertionLevelKey = "AssertLevel"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
The Dictionary key for assertion level in an assertion info dictionary.
The value for this key will be an integer with value kIOPMAssertionLevelOff or kIOPMAssertionLevelOn.
The level reflects the assertion's level set at creation, or adjusted via IOPMAssertionSetLevel.
IOPMAssertionMBS.kIOPMAssertionLevelOff = 0
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
IOPMAssertionMBS.kIOPMAssertionLevelOn = 255
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
IOPMAssertionMBS.kIOPMAssertionLocalizationBundlePathKey = "BundlePath"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
Refers to a string, identifying the path to the caller's bundle, which contains localization info.
IOPMAssertionMBS.kIOPMAssertionNameKey = "AssertName"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
The Dictionary key for assertion name. Setting this key is required when you're creating an assertion.
kIOPMAssertionNameKey describes the the activity the assertion is protecting. The creator should specify a String value for this key in the dictionary passed to CreateWithProperties.
The assertion name is separate from the assertion type's behavior - specify a String like "Checking mail" or "Compiling" that describes the task that this assertion protects.
The String you associate with this key does not have to be localizable (OS X will not attempt to localize it.)
Describe your assertion as thoroughly as possible. See these other keys that can you can also set to add explanation to an assertion:
- Optional kIOPMAssertionDetailsKey
- Optional kIOPMAssertionHumanReadableReasonKey
- Optional kIOPMAssertionLocalizationBundlePathKey
IOPMAssertionMBS.kIOPMAssertionPlugInIDKey = "PlugInBundleID"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
IOPMAssertionMBS.kIOPMAssertionRetainCountKey = "RetainCount"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
The retain count of the object.
IOPMAssertionMBS.kIOPMAssertionTimeoutActionKey = "TimeoutAction"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
Specifies the action to take upon timeout expiration.
Specifying the timeout action only has meaning if you also specify an kIOPMAssertionTimeoutKey
If the caller does not specify a timeout action, the default action is kIOPMAssertionTimeoutActionTurnOff
This key may be specified in the dictionary passed to CreateWithProperties.
This key may be present in the dictionary returned from Properties.
IOPMAssertionMBS.kIOPMAssertionTimeoutActionLog = "TimeoutActionLog"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
When this timeout action is specified, PM will log the timeout event but will not turn off or affect the setting of the assertion in any way.
IOPMAssertionMBS.kIOPMAssertionTimeoutActionRelease = "TimeoutActionRelease"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
When a timeout expires with this action, Power Management will log the timeout event, and will release the assertion.
IOPMAssertionMBS.kIOPMAssertionTimeoutActionTurnOff = "TimeoutActionTurnOff"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
When a timeout expires with this action, Power Management will log the timeout event, and will set the assertion's level to kIOPMAssertionLevelOff.
IOPMAssertionMBS.kIOPMAssertionTimeoutKey = "TimeoutSeconds"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
Specifies an outer bound, in seconds, that this assertion should be asserted.
If your application hangs, or is unable to complete its assertion task in a reasonable amount of time, specifying a timeout allows PM to disable your assertion so the system can resume normal activity.
Once a timeout with the kIOPMAssertionTimeoutActionTurnOff assertion fires, the level will be set to kIOPMAssertionTimeoutActionTurnOff. The assertion may be re-armed by calling IOPMAssertionSetLevel.
This key may be specified in the dictionary passed to CreateWithProperties.
This key may be present in the dictionary returned from Properties.
IOPMAssertionMBS.kIOPMAssertionTypeKey = "AssertType"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
The dictionary key for assertion type in an assertion info dictionary.
The value for this key will be a CFStringRef, with the value of the assertion type specified at creation time.
Note that OS X may substitute a support assertion type string if the caller specifies a deprecated assertion type; in that case the value for this key could differ from the caller-provided assertion type.
IOPMAssertionMBS.kIOPMAssertionTypePreventSystemSleep = "PreventSystemSleep"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
Prevents the system from sleeping and allows the system to reside in Dark Wake for an arbitrary length of time.
When asserted and set to level kIOPMAssertionLevelOn, the system will prefer to enter the Dark Wake state, or remain in Dark Wake if already there, rather than go to sleep.
Assertions are just suggestions to the OS, and the OS can only honor them to the best of its ability. In the case of low power or a thermal emergency, the system may sleep anyway despite the assertion.
An assertion must publish the AssertionType in its assertion properties dictionary.
The AssertionType should be a key in the properties dictionary, with a value of a CFNumber containing the kCFNumberIntegerType value kIOPMAssertionLevelOff or kIOPMAssertionLevelOn.
IOPMAssertionMBS.kIOPMAssertionTypePreventUserIdleDisplaySleep = "PreventUserIdleDisplaySleep"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
Prevents the display from dimming automatically.
When asserted and set to level kIOPMAssertionLevelOn, will prevent the display from turning off due to a period of idle user activity. Note that the display may still sleep from other reasons, like a user closing a portable's lid or the machine sleeping. If the display is already off, this assertion does not light up the display. If display needs to be turned on, then consider calling function IOPMAssertionDeclareUserActivity.
While the display is prevented from dimming, the system cannot go into idle sleep.
This assertion has no effect if the system is in Dark Wake.
IOPMAssertionMBS.kIOPMAssertionTypePreventUserIdleSystemSleep = "PreventUserIdleSystemSleep"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
Prevents the system from sleeping automatically due to a lack of user activity.
When asserted and set to level kIOPMAssertionLevelOn, will prevent the system from sleeping due to a period of idle user activity.
The display may dim and idle sleep while kIOPMAssertionTypePreventUserIdleSystemSleep is enabled, but the system may not idle sleep. The system may still sleep for lid close, Apple menu, low battery, or other sleep reasons.
This assertion has no effect if the system is in Dark Wake.
IOPMAssertionMBS.kIOPMAssertPreventDiskIdle = "PreventDiskIdle"
Type | Topic | Plugin | Version |
const | Power | MBS MacOSX Plugin | 13.2 |
Prevent attached disks from idling into lower power states.
When asserted and set to level kIOPMAssertionLevelOn, will prevent attached disks and optical media from idling into lower power states.
Apps who rely on real-time access to disks should create this assertion to avoid latencies caused by disks changing power states. For example, audio and video performance or recording apps may benefit from this assertion. Most Apps should not take this assertion; preventing disk idle consumes battery life, and most apps don't require the low latency disk access that this provides.
This assertion doesn't increase a disk's power state (it just prevents that device from idling). After creating this assertion, the caller should perform disk I/O on the necessary drives to ensure that they're in a usable power state.
The system may still sleep while this assertion is active. Callers should also take kIOPMAssertionTypePreventUserIdleSystemSleep if necessary, to prevent idle system sleep.
The items on this page are in the following plugins: MBS MacOSX Plugin.