PreCache NetInjector Documentation Center : PreCache NetInjector Application Development

Common Cases, Subscription — C++

   







Discretionary attributes

— filtering on discretionary attributes


If our subscriber would like to define a specific area of interest, the application would need to be enable her to create a discretionary attribute. We created this discretionary attribute when we defined Notifications with discretionary attributes in the previous exercise.

To create the subscription for the discretionary attribute, we add the filter to the subscription:

p.Subscribe("Sample.Chat","Interest == \"Country Music\"Music\"",new Subscriber1(),strdup("Country music fans"));

Because the program created Common Cases, Publication — C++ supports a discretionary attribute for Interest, the subscriber can refine her subscription to reflect her interest in Country Music.