Proxy
connectivity to a channel
A proxy provides connectivity to a channel and validation of notifications and subscriptions against the channel's
Notification type.
Proxies also delivers matching notifications to subscriber's via
Subscriber callbacks.
Type
typedef void* PC_evn_Proxy
Functions
PC_evn_create_proxy
PC_Status PC_EXPORT PC_evn_create_proxy( PC_evn_Proxy* pProxy, PC_UINT idChannel, PC_UINT idPublisher)
Creates a proxy for a specified channel and publisher.
- pProxy
- a pointer to a variable to hold the newly-allocated proxy
- idChannel
- the ID of the channel to be accessed
- idPublisher
- the ID of the application using this object
- returns
- PC_INVALID_CHANNEL, if the specified channel ID is invalid, or if the specified publisher ID is not allowed to access the channel (in which case pProxy is set to PC_NULL); otherwise PC_SUCCESS
PC_evn_recover_proxy
PC_Status PC_EXPORT PC_evn_recover_proxy( PC_evn_Proxy* pProxy, PC_UINT idChannel, PC_UINT idPublisher)
Creates a proxy for a specified channel and publisher in recovery mode.
- pProxy
- a pointer to a variable to hold the newly-allocated proxy
- idChannel
- the ID of the channel to be accessed
- idPublisher
- the ID of the application using this object
- returns
- PC_INVALID_CHANNEL, if the specified channel ID is invalid, or if the specified publisher ID is not allowed to access the channel (in which case pProxy is set to PC_NULL); otherwise PC_SUCCESS
PC_evn_destroy_proxy
PC_Status PC_EXPORT PC_evn_destroy_proxy( PC_evn_Proxy proxy)
Releases the resources associated with a proxy.
- proxy
- the proxy to be destroyed; the argument passed for proxy is no longer valid upon return from the function
- returns
- PC_SUCCESS
PC_evn_get_channel_info
PC_evn_Channel_Info PC_EXPORT PC_evn_get_channel_info( PC_evn_Proxy proxy, PC_BOOL bIsControl)
Obtains the information about the channel accessed by a proxy.
- proxy
- the proxy whose channel information is to be retrieved
- bIsControl
- an indication of whether the control channel information (PC_TRUE) or data channel information (PC_FALSE) is desired
- returns
- the underlying channel information
PC_evn_proxy_save
PC_Status PC_EXPORT PC_evn_proxy_save ( PC_evn_Proxy proxy, PC_STRING szFileName)
Saves the current proxy state in the file.
- proxy
- the proxy whose state is being saved
- szFileName
- the name of the file to be serialized
PC_evn_proxy_load
PC_Status PC_EXPORT PC_evn_proxy_load ( PC_evn_Proxy* pproxy, PC_STRING szFileName)
Restores a saved proxy from a file
- pproxy
- a pointer to the proxy variable being loaded
- szFileName
- the name of the file to be serialized
PC_evn_register_callback
int PC_EXPORT PC_evn_register_callback ( const PC_STRING, PC_evn_pfnCallback)
Registers the callback such that it would be available for serialization.
PC_evn_set_client_type
PC_evn_set_client_type ( PC_UINT idChannel, PC_BOOL bIsAllowedToPublish, PC_BOOL bIsAllowedToSubscribe)
Specifies whether the client is allowed to subscribe or publish on a specific channel.
- idChannel
- the ID of the channel to be accessed
- bIsAllowedToPublish
- when set to true it enables the application to publish on the given channel
- bIsAllowedToSubscribe
- when set to true it enables the application to subscribe on the given channel
|