|
PreCache NetInjector Documentation Center : PreCache NetInjector Application Development Basic Case, Subscription C |
|
|
|
Notification accessing the notification's content When we published the notification, we set a value for a predefined attribute called Message. The subscriber must access this attribute of the channel. The callback function already included a reference to the notification: void notify(PC_evn_Notification notification, Each matching notification is passed to the application as the first argument of the notify function. notification contains the contents of the notification's attributes. The value of our predefined attribute Message was set to Hello World by the publisher (see Notification, Basic Case, Publication C). PC_evn_get_predefined_attr_by_name retrieves the attribute value stored in the notification. This retrieval occurs within the PC_evn_Notification function. PC_evn_get_predefined_attr_by_name( printf("Incoming notification for (%s):%s\n", The complete subscriber output should read: Incoming notification for (My First Subscription): Hello World. |
|