Using Notify
Functions Introduced:
The function ProNotificationSet() sets up a notification by specifying the type of event and the pointer to the callback function. The event is specified as a value of the enumerated type ProNotifyType. The argument for the callback function has the type ProFunction; for consistency, each callback function returns a ProError status, even in cases where the status is ignored by . The callback functions have different arguments, so each callback type has its own typedef that defines its arguments and their types. When calling ProNotificationSet(), you must cast the callback function pointer to ProFunction.
Note:
 
If you call ProNotificationSet() more than once with the same event type, the existing callback is overwritten with the one supplied in the later call.
When notifications are set in applications, every time an event is triggered, notification messages are added to the trail files. From 2.0 M210 onward, a new environment variable PROTK_LOG_DISABLE enables you to disable this behavior. When set to true, the notifications messages are not added to the trail files.
To cancel a notification, call ProNotificationUnset().
È stato utile?