PreCache NetInjector Documentation Center : PreCache NetInjector Application Development

Common Cases, Subscription — C

   







Retrieving predefined attributes

— retrieving predefined attributes of various types


The subscriber class definition for the first tutorial included a single predefined attribute, Message:

PC_evn_get_predefined_attr_by_name(notification,
"Message",&message,PC_STRING_TYPE,&size);

The new subscriber class definition includes three more predefined attributes: UserName, Age, and Gender:

PC_evn_get_predefined_attr_by_name(notification,
"UserName",&username,PC_STRING_TYPE,&size);

PC_evn_get_predefined_attr_by_name(notification,
"Age",&age,PC_LONG_TYPE,&size);

PC_evn_get_predefined_attr_by_name(notification,
"Gender",&gender,PC_CHAR_TYPE,&size);

In the first part of this tutorial, Common Cases, Publication — C, we set the values for these predefined attributes.