Name

current, notifications.current, kPMRPCNotificationsCurrent, kPMObserveNotificationsCurrent — Notifying date and time based triggers with events.

Synopsis

array of queued trigger structures notifications.current( );

Description

Notifying date and time based triggers with events.

current queued triggers include all triggers for which can appear in pending, and have entered the notification period.

current queued triggers should be presented to the user immediately upon appearing in the list. These triggers and their events are going to trigger soon, and the user needs to be kept informed. Typically the notification takes the form of a discrete dialog box or menu bar item update.

current handles the work of calculating the notification period for each trigger and event. It is possible individual triggers and events can have differing notification periods. You should not attempt to calculate when specific triggers need notifying. Instead observe current and present notifications as queued triggers appear.

A separate notification should be displayed to each user. If a user logs in within a notification period, and they have not previously seen the notification, immediately notify the user.

Returns

current is an array of queued trigger structures. Each item in current must be unique.

Observable

Changes to current can be observed, without polling, using notifications.current, kPMObserveNotificationsCurrent.

Security

current can be requested by any authenticated client.

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

Availablility

pmdctl

Examples

Example 80. C: notifications.current

CFMutableDictionaryRef myRequest = PMRequestCreate(kCFAllocatorDefault,kPMRPCNotificationsCurrent);


Example 81. Objective-C: notifications.current

DSSWPMRequest* myRequest = [DSSWPMRequest requestWithRequest:kPMRPCNotificationsCurrent];


Example 82. AppleScript: notifications.current

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


Example 83. Shell: notifications.current

./pmctl notifications.current