Name

warning period, notifications.warningperiod, kPMRPCNotificationsWarningPeriod, kPMObserveNotificationsWarningPeriod — Seconds to display warnings.

Synopsis

integer notifications.warningperiod( );

Description

Seconds to display warnings.

Seconds before a host affecting action that a warning should be presented.

The warning is designed to provide the user with a reason for the shut down, sleep, or log out action that is taking place. It is not designed to replace the pending notification.

Returns

warning period is an integer. If warning period is omitted, the default 3 is used. warning period must be between 2 and 60, inclusive.

Observable

Changes to warning period can be observed, without polling, using notifications.warningperiod, kPMObserveNotificationsWarningPeriod.

Security

warning period can be requested by any authenticated client.

Unauthenticated clients are authorized using the uk.co.dssw.powermanager.notifications.warningperiod right. By default, any local process can request warning period.

Availablility

pmdctl

Examples

Example 88. C: notifications.warningperiod

CFMutableDictionaryRef myRequest = PMRequestCreate(kCFAllocatorDefault,kPMRPCNotificationsWarningPeriod);


Example 89. Objective-C: notifications.warningperiod

DSSWPMRequest* myRequest = [DSSWPMRequest requestWithRequest:kPMRPCNotificationsWarningPeriod];


Example 90. AppleScript: notifications.warningperiod

tell application "Power Manager Scripting"
    set myResult to warning period of Notifications
end tell


Example 91. Shell: notifications.warningperiod

./pmctl notifications.warningperiod