PreCache NetInjector Documentation Center : PreCache NetInjector API Reference

C Types and Functions

   







Subscription handlers

— a subscription interface


Subscription handler functions identify a subscription registered with a Proxy. Proxies can invoke subscription handlers to perform various operations on the subscription.

Type

typedef struct PC_evn_Subscription_Handle

Functions

PC_evn_pause

Halts delivery of matching notifications to the callback associated with a subscription.

Note: The operation is idempotent.

PC_Status PC_EXPORT PC_evn_pause(
PC_evn_Proxy proxy,
PC_evn_Subscription_Handle ShSubscription)

proxy —
the proxy with which the subscription was registered

ShSubscription —
a handle for the subscription to be paused

returns —
PC_INVALID_SUBSCRIPTION_HANDLE, if the subscription handle does not identify a subscription currently registered with the proxy; otherwise PC_SUCCESS

PC_evn_suspend

PC_Status PC_EXPORT PC_evn_suspend(
PC_evn_Proxy proxy,
PC_evn_Subscription_Handle ShSubscription)

Halts matching of notifications against a subscription.

Note: The operation is idempotent.

proxy —
the proxy with which the subscription was registered

ShSubscription —
a handle for the subscription to be suspended

returns —
PC_INVALID_SUBSCRIPTION_HANDLE, if the subscription handle does not identify a subscription currently registered with the proxy; otherwise PC_SUCCESS

PC_evn_resume

PC_Status PC_EXPORT PC_evn_resume(
PC_evn_Proxy proxy,
PC_evn_Subscription_Handle ShSubscription)

Resumes matching and delivery of notifications against a previously paused or suspended subscription, including notifications received while the subscription was paused.

proxy —
the proxy with which the subscription was registered

ShSubscription —
a handle for the subscription to be resumed

returns —
PC_INVALID_SUBSCRIPTION_HANDLE, if the subscription handle does not identify a subscription currently registered with the proxy; otherwise PC_SUCCESS

PC_evn_unsubscribe

PC_Status PC_EXPORT PC_evn_unsubscribe(
PC_evn_Proxy proxy,
PC_evn_Subscription_Handle ShSubscription)

Unregisters a subscription from a channel.

proxy —
the proxy with which the subscription was registered

ShSubscription —
a handle for the subscription to be unregistered; the argument passed for hSubscription is no longer valid upon return from the function

returns —
PC_INVALID_SUBSCRIPTION_HANDLE, if the subscription handle does not identify a subscription currently registered with the proxy; otherwise PC_SUCCESS

PC_evn_control_unsubscribe

PC_Status PC_EXPORT PC_evn_control_unsubscribe(
PC_evn_Proxy proxy,
PC_evn_Subscription_Handle ShSubscription)

Unregisters a control subscription from a channel.

proxy —
the proxy with which the subscription was registered

ShSubscription —
a handle for the subscription to be unregistered; the argument passed for hSubscription is no longer valid upon return from the function

returns —
PC_INVALID_SUBSCRIPTION_HANDLE, if the subscription handle does not identify a subscription currently registered with the proxy; otherwise PC_SUCCESS

PC_evn_get_subscriptions_count

PC_Status PC_EXPORT PC_evn_get_subscriptions_count (
PC_evn_Proxy proxy,
PC_UINT* pcSubscription)

Retrieves the number of the subscriptions associated with a proxy.

proxy —
the proxy being queried

pcSubscription —
the number of subscriptions (result)

returns —
PC_SUCCESS is the operation is completed successfuly and PC_ERROR otherwise

PC_evn_get_subscriptions

PC_Status PC_EXPORT PC_evn_get_subscriptions (PC_evn_Proxy proxy, PC_evn_Subscription_Handle rgShSubscription[], PC_UINT unrgShSubscriptionSize,
PC_UINT* pcSubscription)

Retrieves the subscriptions associated with a proxy.

proxy —
the proxy being queried

rgShSubscription —
the buffer where the subscriptions will be stored

unrgShSubscriptionSize —
the size of the buffer used provided for retrieving the subscriptions

pcSubscription —
the number of subscriptions actually read

returns —
PC_SUCCESS is the operation is completed successfuly and PC_ERROR otherwise

PC_evn_get_attr_filter_string

PC_Status PC_EXPORT
PC_evn_get_attr_filter_string (
PC_evn_Subscription_Handle ShSubscription,
PC_CHAR** pszAttrFilter)

Retrives the string representation of the attribute filter associated with the subscription.

ShSubscription —
The handle of the subscription being queried

pszAttrFilter —
Upon succesful completion contains a pointer to the result

returns —
PC_SUCCESS is the operation is completed successfuly and PC_ERROR otherwise

PC_evn_get_subject_filter

PC_Status PC_EXPORT PC_evn_get_subject_filter (
PC_evn_Subscription_Handle ShSubscription,
PC_CHAR** pszSubjectFilter)

Retrives the string representation of the subject filter associated with the subscription.

ShSubscription —
The handle of the subscription being queried

pszSubjectFilter —
Upon succesful completion contains a pointer to the result

returns —
PC_SUCCESS, if the operation is completed successfuly; otherwise, PC_ERROR

PC_evn_get_closure

PC_Status PC_EXPORT PC_evn_get_closure (
PC_evn_Subscription_Handle ShSubscription,
void** ppClosure)

Retrieves a pointer to the closure associated with the current subscription.

ShSubscription —
The handle of the subscription being queried

ppClosure —
upon succesful completion contains a pointer to the result

returns —
PC_SUCCESS is the operation is completed successfuly and PC_ERROR otherwise