Symbol-related functions.
More...
|
DXFEED_API ERRORCODE | dxf_add_symbol (dxf_subscription_t subscription, dxf_const_string_t symbol) |
| Adds a single symbol to the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_add_symbols (dxf_subscription_t subscription, dxf_const_string_t *symbols, int symbol_count) |
| Adds several symbols to the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_add_candle_symbol (dxf_subscription_t subscription, dxf_candle_attributes_t candle_attributes) |
| Adds a candle symbol to the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_remove_candle_symbol (dxf_subscription_t subscription, dxf_candle_attributes_t candle_attributes) |
| Remove a candle symbol from the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_remove_symbol (dxf_subscription_t subscription, dxf_const_string_t symbol) |
| Removes a single symbol from the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_remove_symbols (dxf_subscription_t subscription, dxf_const_string_t *symbols, int symbol_count) |
| Removes several symbols from the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_get_symbols (dxf_subscription_t subscription, OUT dxf_const_string_t **symbols, OUT int *symbol_count) |
| Retrieves the list of symbols currently added to the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_set_symbols (dxf_subscription_t subscription, dxf_const_string_t *symbols, int symbol_count) |
| Sets the symbols for the subscription. More...
|
|
DXFEED_API ERRORCODE | dxf_clear_symbols (dxf_subscription_t subscription) |
| Removes all the symbols from the subscription. More...
|
|
Symbol-related functions.
◆ dxf_add_candle_symbol()
Adds a candle symbol to the subscription.
- Parameters
-
subscription | A handle of the subscription to which a symbol is added |
candle_attributes | Pointer to the candle struct |
- Returns
- DXF_SUCCESS on successful symbol addition or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;
◆ dxf_add_symbol()
Adds a single symbol to the subscription.
A wildcard symbol "*" will replace all symbols: there will be an unsubscription from messages on all current symbols and a subscription to "*". The subscription type will be changed to dx_st_stream. If there is already a subscription to "*", then nothing will happen
- Parameters
-
[in] | subscription | A handle of the subscription to which a symbol is added |
[in] | symbol | The symbol to add |
- Returns
- DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error
◆ dxf_add_symbols()
Adds several symbols to the subscription.
No error occurs if the symbol is attempted to add for the second time. Empty symbols will be ignored. First met the "*" symbol (wildcard) will overwrite all other symbols: there will be an unsubscription from messages on all current symbols and a subscription to "*". The subscription type will be changed to dx_st_stream. If there is already a subscription to "*", then nothing will happen.
- Parameters
-
[in] | subscription | A handle of the subscription to which the symbols are added |
[in] | symbols | The symbols to add |
[in] | symbol_count | A number of symbols |
- Returns
- DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error
◆ dxf_clear_symbols()
Removes all the symbols from the subscription.
- Parameters
-
[in] | subscription | A handle of the subscription whose symbols are to be cleared |
- Returns
- DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error
◆ dxf_get_symbols()
Retrieves the list of symbols currently added to the subscription.
The memory for the resulting list is allocated internally, so no actions to free it are required. The symbol name buffer is guaranteed to be valid until either the subscription symbol list is changed or a new call of this function is performed.
- Parameters
-
[in] | subscription | A handle of the subscriptions whose symbols are to retrieve |
[out] | symbols | A pointer to the string array object to which the symbol list is to be stored |
[out] | symbol_count | A pointer to the variable to which the symbol count is to be stored |
- Returns
- DXF_SUCCESS on successful symbols 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_remove_candle_symbol()
Remove a candle symbol from the subscription.
- Parameters
-
[in] | subscription | a handle of the subscription from symbol will be removed |
[in] | candle_attributes | pointer to the candle structure |
- Returns
- DXF_SUCCESS on successful symbol removal or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure;
◆ dxf_remove_symbol()
Removes a single symbol from the subscription.
A wildcard symbol "*" will remove all symbols: there will be an unsubscription from messages on all current symbols. If there is already a subscription to "*" and the symbol to remove is not a "*", then nothing will happen.
- Parameters
-
[in] | subscription | A handle of the subscription from which a symbol is removed |
[in] | symbol | The symbol to remove |
- Returns
- DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error
◆ dxf_remove_symbols()
Removes several symbols from the subscription.
No error occurs if it's attempted to remove symbols that weren't added beforehand. First met the "*" symbol (wildcard) will remove all symbols: there will be an unsubscription from messages on all current symbols. If there is already a subscription to "*" and the symbols to remove are not contain a "*", then nothing will happen.
- Parameters
-
[in] | subscription | A handle of the subscription from which symbols are removed |
[in] | symbols | The symbols to remove |
[in] | symbol_count | A number of symbols |
- Returns
- DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error
◆ dxf_set_symbols()
Sets the symbols for the subscription.
The difference between this function and dxf_add_symbols is that all the previously added symbols that do not belong to the symbol list passed to this function will be removed.
- Parameters
-
[in] | subscription | A handle of the subscription whose symbols are to be set |
[in] | symbols | The symbol list to set |
[in] | symbol_count | The symbol count |
- Returns
- DXF_SUCCESS if the operation succeed or DXF_FAILURE if the operation fails. The error code can be obtained using the function dxf_get_last_error