Name

action notification, actionnotification, kPMActionActionNotification — Post a notification.

Synopsis

action notification structure { type, scope, notification, context };
type : string, choice
scope : string, choice, default, optional
notification : string, length 1..1024
context : dictionary, default, optional

Description

Post a notification.

Posts a notification to either the engine or the host. Notifications can be used to easily integrate the engine into other solutions.

Fields

type. Type of action to perform.

type is a string. type must be notification, kPMActionType_Notification.

scope. Who can observe the notification.

A notification can be posted within a scope. The scope determines what processes can observe it. If the scope is engine wide, only the posting instance of the engine can observe the notification. This is particularly useful for chaining triggers to performing actions.

If the scope is host wide, every process on the host can observe the notification.

scope is a string. If scope is omitted, the default host is used. scope is optional. scope must be one of the following two constants:

  • engine, kPMActionScope_Engine.
  • host, kPMActionScope_Host.

notification. The notification to post.

The notification should be formatted in reverse domain name format to avoid namespace collisions.

notification is a string. notification must be between 1 and 1024 characters long, inclusive.

context. Context to associate with notification.

The context must contain string keys and and CFPropertyList valid values.

context is a dictionary. If context is omitted, a default is created. context is optional.