Name

perform, ondemand.perform, kPMRPCOnDemandPerform — Perform an event's actions.

Synopsis

void ondemand.perform( unique ID,
apply criteria);
unique ID : string, length 1..255;
apply criteria : boolean, default;

Description

Perform an event's actions.

perform immediately performs an event's actions. The event must support the on demand behaviour, and not be constrained. Constraints include a single instance only event that is already running. The event must appear in the on demand variable's contents.

Parameters

unique ID. Unique ID of an event. unique ID is a string. unique ID must be between 1 and 255 characters long, inclusive.

apply criteria. Should the event's criteria be enforced. apply criteria is a boolean. If apply criteria is omitted, the default true is used.

Security

perform can be requested by any authenticated client.

Unauthenticated clients are authorized using the uk.co.dssw.powermanager.ondemand.perform right. By default, only local processes belonging to administrator can send a perform request.

Availablility

pmdctl

Examples

Example 102. C: Minimal ondemand.perform

CFStringRef myUniqueID = NULL;

...
CFMutableDictionaryRef myRequest = PMRequestCreateWithParameters(kCFAllocatorDefault, kPMRPCOnDemandPerform, kPMRPCParameterUniqueID, myUniqueID, nil);