The sysevent_subscribe_event() function registers the caller's interest in event notifications belonging to the class event_class and the subclasses contained in event_subclass_list. The subscriber handle sysevent_hdl
is updated with the new subscription and the calling process receives event notifications from the event handler specified in sysevent_bind_handle.
System events matching event_class and a subclass contained in event_subclass_list published after the caller returns from sysevent_subscribe_event() are guaranteed to be delivered to the calling process. Matching system events published
and queued prior to a call to sysevent_subscribe_event() may be delivered to the process's event handler.
The num_subclasses argument provides the number of subclass string elements in event_subclass_list.
A caller can use the event class SE_ALL_CLASSES to subscribe to all event classes and subclasses. The event class SE_ALL_SUBCLASSES can be used to subscribe to all subclasses within a given event class.
Subsequent calls to sysevent_subscribe_event() are allowed to add additional classes or subclasses. To remove an existing subscription, sysevent_unsubscribe_event() must be used to remove the subscription.
The sysevent_unsubscribe_event() function removes the subscription described by event_class for sysevent_hdl. Event notifications matching event_class will not be delivered to the calling process upon return.
A caller can use the event class SE_ALL_CLASSES to remove all subscriptions for sysevent_hdl.
The library manages all subscription resources.
|