API event listeners management functions.
More...
|
DXFEED_API ERRORCODE | dxf_attach_event_listener (dxf_subscription_t subscription, dxf_event_listener_t event_listener, void *user_data) |
| Attaches a listener callback to the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_detach_event_listener (dxf_subscription_t subscription, dxf_event_listener_t event_listener) |
| Detaches a listener from the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_attach_event_listener_v2 (dxf_subscription_t subscription, dxf_event_listener_v2_t event_listener, void *user_data) |
| Attaches a extended listener callback to the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_detach_event_listener_v2 (dxf_subscription_t subscription, dxf_event_listener_v2_t event_listener) |
| Detaches a extended listener from the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_get_subscription_event_types (dxf_subscription_t subscription, OUT int *event_types) |
| Retrieves the subscription event types. More...
|
|
DXFEED_API ERRORCODE | dxf_get_last_event (dxf_connection_t connection, int event_type, dxf_const_string_t symbol, OUT dxf_event_data_t *event_data) |
| Retrieves the last event data of the specified symbol and type for the connection. More...
|
|
dxf_const_string_t | dx_event_type_to_string (int event_type) |
| Converts event type code to its string representation. More...
|
|
int | dx_get_event_data_struct_size (int event_id) |
| Get event data structure size for given event id. More...
|
|
dx_event_id_t | dx_get_event_id_by_bitmask (int event_bitmask) |
| Get event id by event bitmask. More...
|
|
const dxf_event_data_t | dx_get_event_data_item (int event_mask, dxf_const_event_data_t data, size_t index) |
| Get event data item from event data. More...
|
|
API event listeners management functions.
◆ dx_event_type_to_string()
Converts event type code to its string representation.
- Parameters
-
event_type | Event type code |
- Returns
- String representation of event type
◆ dx_get_event_data_item()
const dxf_event_data_t dx_get_event_data_item |
( |
int |
event_mask, |
|
|
dxf_const_event_data_t |
data, |
|
|
size_t |
index |
|
) |
| |
Get event data item from event data.
- Parameters
-
event_mask | Event mask |
data | Event data |
index | Event data item index |
- Returns
- Event data item
◆ dx_get_event_data_struct_size()
int dx_get_event_data_struct_size |
( |
int |
event_id | ) |
|
Get event data structure size for given event id.
- Parameters
-
- Returns
- Data structure size
◆ dx_get_event_id_by_bitmask()
Get event id by event bitmask.
- Parameters
-
event_bitmask | Event bitmask |
- Returns
- Event id
◆ dxf_attach_event_listener()
Attaches a listener callback to the subscription.
This callback will be invoked when the new event data for the subscription symbols arrives. No error occurs if it's attempted to attach the same listener twice or more.
- Parameters
-
[in] | subscription | A handle of the subscription to which a listener is to be attached |
[in] | event_listener | A listener callback function pointer |
[in] | user_data | Data to be passed to the callback function |
- Returns
- DXF_SUCCESS on successful event listener attachment or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;
◆ dxf_attach_event_listener_v2()
Attaches a extended listener callback to the subscription.
This callback will be invoked when the new event data for the subscription symbols arrives. No error occurs if it's attempted to attach the same listener twice or more. This listener differs with extend number of callback parameters.
- Parameters
-
[in] | subscription | A handle of the subscription to which a listener is to be attached |
[in] | event_listener | A listener callback function pointer |
[in] | user_data | Data to be passed to the callback function; if there isn't user data pass NULL |
- Returns
- DXF_SUCCESS on successful event listener attachment or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;
◆ dxf_detach_event_listener()
Detaches a listener from the subscription.
No error occurs if it's attempted to detach a listener which wasn't previously attached.
- Parameters
-
[in] | subscription | A handle of the subscription from which a listener is to be detached |
[in] | event_listener | A listener callback function pointer |
- Returns
- DXF_SUCCESS on successful event listener detachment or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;
◆ dxf_detach_event_listener_v2()
Detaches a extended listener from the subscription.
No error occurs if it's attempted to detach a listener which wasn't previously attached.
- Parameters
-
[in] | subscription | A handle of the subscription from which a listener is to be detached |
[in] | event_listener | A listener callback function pointer |
- Returns
- DXF_SUCCESS on successful event listener detachment or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;
◆ dxf_get_last_event()
Retrieves the last event data of the specified symbol and type for the connection.
- Parameters
-
[in] | connection | A handle of the connection whose data is to be retrieved |
[in] | event_type | An event type bitmask defining a single event type |
[in] | symbol | A symbol name |
[out] | event_data | A pointer to the variable to which the last data buffer pointer is stored; if there was no data for this connection/event type/symbol, NULL will be stored |
- Returns
- DXF_SUCCESS on successful event retrieval or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;
◆ dxf_get_subscription_event_types()
Retrieves the subscription event types.
- Parameters
-
[in] | subscription | A handle of the subscription whose event types are to be retrieved |
[out] | event_types | A pointer to the variable to which the subscription event types bitmask is to be stored |
- Returns
- DXF_SUCCESS on successful event types retrieval or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;