Platforms to show: All Mac Windows Linux Cross-Platform
IOPMAssertionMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Power | MBS MacOSX Plugin | 13.2 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
You use this class to block a Mac from sleeping display, disk or whole machine.
- 10 properties
- property Details as String
- property Handle as Integer
- property HumanReadableReason as String
- property Level as Integer
- property LocalizationBundlePath as String
- property Name as String
- property RetainCount as Integer
- property Timeout as Double
- property TimeoutAction as String
- property Type as String
- 3 methods
- method Constructor(type as string, level as Integer, name as string)
- method Properties as Dictionary
- method SetProperty(key as string, value as Variant) as boolean
- 7 shared methods
- shared method AssertionsByProcess as Dictionary
- shared method AssertionsStatus as Dictionary
- shared method CreateWithDescription(AssertionType as string, Name as string, Details as string = "", HumanReadableReason as string = "", LocalizationBundlePath as string = "", Timeout as Double = 0, TimeoutAction as string = "") as IOPMAssertionMBS
- shared method CreateWithHandle(Handle as Integer) as IOPMAssertionMBS
- shared method CreateWithName(type as string, level as Integer, name as string) as IOPMAssertionMBS
- shared method CreateWithProperties(AssertionProperties as Dictionary) as IOPMAssertionMBS
- shared method DeclareUserActivity(AssertionName as string, userType as Integer, byref AssertionID as Integer) as Integer
- 22 constants
Constants
Constant | Value | Description |
---|---|---|
kIOPMAssertionDetailsKey | "Details" | One of the keys for the properties dictionary. 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. more |
kIOPMAssertionFrameworkIDKey | "FrameworkBundleID" | One of the keys for the properties dictionary. |
kIOPMAssertionHumanReadableReasonKey | "HumanReadableReason" | One of the keys for the properties dictionary. Optional key that provides a localizable string for OS X to display PM Assertions in the GUI. more |
kIOPMAssertionLevelKey | "AssertLevel" | One of the keys for the properties dictionary. The Dictionary key for assertion level in an assertion info dictionary. more |
kIOPMAssertionLevelOff | 0 | Level for a disabled assertion, passed as an argument to Create. |
kIOPMAssertionLevelOn | 255 | Level for an enabled assertion, passed as an argument to Create. Example |
kIOPMAssertionLocalizationBundlePathKey | "BundlePath" |
One of the keys for the properties dictionary.
Refers to a string, identifying the path to the caller's bundle, which contains localization info. |
kIOPMAssertionNameKey | "AssertName" | One of the keys for the properties dictionary. The Dictionary key for assertion name. Setting this key is required when you're creating an assertion. more |
kIOPMAssertionPlugInIDKey | "PlugInBundleID" | One of the keys for the properties dictionary. |
kIOPMAssertionRetainCountKey | "RetainCount" |
One of the keys for the properties dictionary.
The retain count of the object. |
kIOPMAssertionTimeoutActionKey | "TimeoutAction" | One of the keys for the properties dictionary. Specifies the action to take upon timeout expiration. more |
kIOPMAssertionTimeoutActionLog | "TimeoutActionLog" |
One of the values for kIOPMAssertionTimeoutActionKey.
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. |
kIOPMAssertionTimeoutActionRelease | "TimeoutActionRelease" |
One of the values for kIOPMAssertionTimeoutActionKey.
When a timeout expires with this action, Power Management will log the timeout event, and will release the assertion. |
kIOPMAssertionTimeoutActionTurnOff | "TimeoutActionTurnOff" |
One of the values for kIOPMAssertionTimeoutActionKey.
When a timeout expires with this action, Power Management will log the timeout event, and will set the assertion's level to kIOPMAssertionLevelOff. |
kIOPMAssertionTimeoutKey | "TimeoutSeconds" | One of the keys for the properties dictionary. Specifies an outer bound, in seconds, that this assertion should be asserted. more |
kIOPMAssertionTypeKey | "AssertType" | One of the keys for the properties dictionary. The dictionary key for assertion type in an assertion info dictionary. more |
kIOPMAssertionTypePreventSystemSleep | "PreventSystemSleep" | One of the assertion types. Prevents the system from sleeping and allows the system to reside in Dark Wake for an arbitrary length of time. more |
kIOPMAssertionTypePreventUserIdleDisplaySleep | "PreventUserIdleDisplaySleep" | One of the assertion types. Prevents the display from dimming automatically. more |
kIOPMAssertionTypePreventUserIdleSystemSleep | "PreventUserIdleSystemSleep" | One of the assertion types. Prevents the system from sleeping automatically due to a lack of user activity. more |
kIOPMAssertPreventDiskIdle | "PreventDiskIdle" | One of the assertion types. Prevent attached disks from idling into lower power states. more |
User Activity Constants
Constant | Value | Description |
---|---|---|
kIOPMUserActiveLocal | 0 |
User is local on the system |
kIOPMUserActiveRemote | 1 |
Remote User connected to the system. |
This class has no sub classes.
Some examples using this class:
Blog Entries
The items on this page are in the following plugins: MBS MacOSX Plugin.
IOBluetoothServiceBrowserControllerMBS - IOPMMBS