C Types and Functions
Filter
Notification
Proxy
Subscriber
Subscription handlers
PC_evn_Channel_Info
 |
 |
Subscriber
callback functions
In order to receive
Notification, subscriber applications implement a callback function, which is invoked by a
Proxy to match notifications to the callback's criteria.
Type
typedef void PC_evn_pfnCallback( PC_evn_Notification notification, void* pClosure)
- notification
- the notification delivered to the callback
- pClosure
- a pointer to the closure object associated with the subscription that the notification matched
Functions
PC_evn_publish
PC_Status PC_EXPORT PC_evn_publish ( PC_evn_Proxy proxy, PC_evn_Notification notification)
Delivers a notification over a channel via a proxy.
- proxy
- the proxy to be used to publish the notification
- notification
- the notification to be published
- returns
- PC_INVALID_NOTIFICATION, if the notification is incomplete or otherwise invalid for publication over the channel, or if a problem was encountered in attempting to publish it over the channel; otherwise PC_SUCCESS
PC_evn_subscribe
PC_Status PC_EXPORT PC_evn_subscribe( PC_evn_Proxy proxy, PC_CHAR* szSubjectFilter, PC_evn_SFilter SAttrFilter, PC_evn_pfnCallback callback,void* pClosure, PC_evn_pfnCallback ctrlCallback, PC_evn_Subscription_Handle* pShSubscription)
Subscribes via a proxy by providing a subject filter string and attribute filter.
- proxy
- the proxy to be used to register the subscription
- szSubjectFilter
- a filter to be applied to the subject of notifications sent over the channel
- SAttrFilter
- an attribute filter to be applied to the attributes of notifications sent over the channel
- callback
- the function to be invoked to deliver matching notifications for the subscription
- pClosure
- a pointer that is passed to the callback to allow the receiving application to identify which subscription was matched by the delivered notification, in case the same callback is associated with multiple subscriptions
- ctrlCallback
- PC_NULL, or a function to be invoked to deliver control notifications associated wtih this subscription
- pShSubscription
- a pointer to variable to hold a newly-allocated handle that can be used to identify the registered subscription in other operations
- returns
- PC_INVALID_FILTER, if a problem was encountered in attempting to register the subscription with the channel (in which case pShSubscription is set to PC_NULL); PC_INVALID_SUBJECT, if the subject filter is syntactically incorrect or names fields that are invalid for the underlying channel (in which case pShSubscription is set to PC_NULL; otherwise PC_SUCCESS
PC_evn_subscribe_with_exp
PC_Status PC_EXPORT PC_evn_subscribe_with_exp( PC_evn_Proxy proxy,PC_CHAR* szSubjectFilter, PC_CHAR* szAttrFilter, PC_evn_pfnCallback callback,void* pClosure, PC_evn_pfnCallback ctrlCallback, PC_evn_Subscription_Handle* pShSubscription)
Subscribes via a proxy by providing a subject filter string and attribute filter string.
- proxy
- the proxy to be used to register the subscription
- szSubjectFilter
- a filter to be applied to the subject of notifications sent over the channel
- szAttrFilter
- PC_NULL, or an attribute filter to be applied to the attributes of notifications sent over the channel; a null value sets the attribute filter to true
- callback
- the function to be invoked to deliver matching notifications for this subscription
- pClosure
- a pointer that is passed to the callback to allow the receiving application to identify which subscription was matched by the delivered notification, in case the same callback is associated with multiple subscriptions
- ctrlCallback
- PC_NULL, or a function to be invoked to deliver control notifications associated wtih this subscription
- pShSubscription
- a pointer to variable to hold a newly-allocated handle that can be used to identify the registered subscription in other operations
- returns
- PC_INVALID_FILTER, if a problem was encountered in attempting to register the subscription with the channel (in which case pShSubscription is set to PC_NULL); PC_INVALID_SUBJECT, if the subject filter is syntactically incorrect or names fields that are invalid for the underlying channel (in which case pShSubscription is set to PC_NULL; otherwise PC_SUCCESS
PC_evn_control_subscribe
PC_Status PC_EXPORT PC_evn_control_subscribe( PC_evn_Proxy proxy, PC_CHAR* szSubjectFilter, PC_evn_SFilter SAttrFilter, PC_evn_pfnCallback callback,void* pClosure, PC_evn_Subscription_Handle* pShSubscription)
Subscribes to a control subject via a proxy by providing a subject filter string and attribute filter.
- proxy
- the proxy to be used to register the subscription
- szSubjectFilter
- a filter to be applied to the subject of notifications sent over the channel
- SAttrFilter
- an attribute filter to be applied to the attributes of notifications sent over the channel
- callback
- the function to be invoked to deliver matching notifications for the subscription
- pClosure
- a pointer that is passed to the callback to allow the receiving application to identify which subscription was matched by the delivered notification, in case the same callback is associated with multiple subscriptions
- pShSubscription
- a pointer to variable to hold a newly-allocated handle that can be used to identify the registered subscription in other operations
- returns
- PC_INVALID_FILTER, if a problem was encountered in attempting to register the subscription with the channel (in which case pShSubscription is set to PC_NULL); PC_INVALID_SUBJECT, if the subject filter is syntactically incorrect or names fields that are invalid for the underlying channel (in which case pShSubscription is set to PC_NULL; otherwise PC_SUCCESS
PC_evn_control_subscribe_with_exp
PC_Status PC_EXPORT PC_evn_control_subscribe_with_exp( PC_evn_Proxy proxy, PC_CHAR* szSubjectFilter, PC_CHAR* szAttrFilter, PC_evn_pfnCallback callback,void* pClosure, PC_evn_Subscription_Handle* pShSubscription)
Subscribes to a control subject via a proxy by providing a subject filter string and attribute filter string.
- proxy
- the proxy to be used to register the subscription
- szSubjectFilter
- a filter to be applied to the subject of notifications sent over the channel
- szAttrFilter
- PC_NULL, or an attribute filter to be applied to the attributes of notifications sent over the channel; a null value sets the attribute filter to true
- callback
- the function to be invoked to deliver matching notifications for the subscription
- pClosure
- a pointer that is passed to the callback to allow the receiving application to identify which subscription was matched by the delivered notification, in case the same callback is associated with multiple subscriptions
- pShSubscription
- a pointer to variable to hold a newly-allocated handle that can be used to identify the registered subscription in other operations
- returns
- PC_INVALID_FILTER, if a problem was encountered in attempting to register the subscription with the channel (in which case pShSubscription is set to PC_NULL); PC_INVALID_SUBJECT, if the subject filter is syntactically incorrect or names fields that are invalid for the underlying channel (in which case pShSubscription is set to PC_NULL; otherwise PC_SUCCESS
|