|
dxFeed Graal Native SDK 3.14.0
|
The v4 functions and type names of dxfg_events.h. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions. More...
Typedefs | |
| typedef dxfg_indexed_event_source_type_t | dxfg_v4_indexed_event_source_type_t |
| The kind of an event source, see dxfg_indexed_event_source_t. | |
| typedef dxfg_indexed_event_source_t | dxfg_v4_indexed_event_source_t |
| The source of indexed events. | |
| typedef dxfg_indexed_event_source_list | dxfg_v4_indexed_event_source_list |
| A list of event sources. | |
| typedef dxfg_symbol_type_t | dxfg_v4_symbol_type_t |
| The kind of a symbol, see dxfg_symbol_t. | |
| typedef dxfg_symbol_t | dxfg_v4_symbol_t |
| The base structure of every symbol: the first field of all the symbol structures. | |
| typedef dxfg_string_symbol_t | dxfg_v4_string_symbol_t |
| A string symbol (for example, a ticker). | |
| typedef dxfg_wildcard_symbol_t | dxfg_v4_wildcard_symbol_t |
| The wildcard symbol: the subscription to all symbols of an event type. | |
| typedef dxfg_candle_symbol_t | dxfg_v4_candle_symbol_t |
| A candle symbol. | |
| typedef dxfg_indexed_event_subscription_symbol_t | dxfg_v4_indexed_event_subscription_symbol_t |
| The subscription to the indexed events of one source. | |
| typedef dxfg_time_series_subscription_symbol_t | dxfg_v4_time_series_subscription_symbol_t |
| The subscription to the time series of events from a time. | |
| typedef dxfg_symbol_list | dxfg_v4_symbol_list |
| A list of symbols. | |
| typedef dxfg_event_clazz_t | dxfg_v4_event_clazz_t |
| The class of an event: tells which structure an event (dxfg_event_type_t) is. | |
| typedef dxfg_event_type_t | dxfg_v4_event_type_t |
| The base structure of every event: the first field of all the event structures. | |
| typedef dxfg_market_event_t | dxfg_v4_market_event_t |
| The base structure of the market events: the event symbol and the event time. | |
| typedef dxfg_quote_t | dxfg_v4_quote_t |
| The quote event: a snapshot of the best bid and ask prices and sizes. | |
| typedef dxfg_profile_t | dxfg_v4_profile_t |
| The profile event: a snapshot of the description of a security instrument. | |
| typedef dxfg_summary_t | dxfg_v4_summary_t |
| The summary event: a snapshot of the trading session information (highs, lows and so on). | |
| typedef dxfg_greeks_t | dxfg_v4_greeks_t |
| The Greeks event: a snapshot of the option price, the Black-Scholes volatility and the greeks. | |
| typedef dxfg_candle_t | dxfg_v4_candle_t |
| The candle event: OHLC prices and other information for a specific period. | |
| typedef dxfg_daily_candle_t | dxfg_v4_daily_candle_t |
| The daily candle event (deprecated in Java, use dxfg_candle_t): a candle with the same fields. | |
| typedef dxfg_underlying_t | dxfg_v4_underlying_t |
| The underlying event: a snapshot of the values computed for an option underlying symbol. | |
| typedef dxfg_theo_price_t | dxfg_v4_theo_price_t |
| The theo price event: a snapshot of the theoretical option price computation. | |
| typedef dxfg_trade_base_t | dxfg_v4_trade_base_t |
| The common fields of the trade events: dxfg_trade_t and dxfg_trade_eth_t. | |
| typedef dxfg_trade_t | dxfg_v4_trade_t |
| The trade event: the last trade during the regular trading hours (RTH) and the volume and turnover of the day. | |
| typedef dxfg_trade_eth_t | dxfg_v4_trade_eth_t |
| The TradeETH event: the last trade during the extended trading hours (ETH) and their volume and turnover. | |
| typedef dxfg_configuration_t | dxfg_v4_configuration_t |
| The configuration event: an application-specific attachment with a version. | |
| typedef dxfg_message_t | dxfg_v4_message_t |
| The message event: a notification with an application-specific attachment. | |
| typedef dxfg_time_and_sale_t | dxfg_v4_time_and_sale_t |
| The time and sale event: a trade or another market event with a price, in a continuous time slice. | |
| typedef dxfg_option_sale_t | dxfg_v4_option_sale_t |
| The option sale event: a trade or another market event with a price for an option of an underlying. | |
| typedef dxfg_market_maker_t | dxfg_v4_market_maker_t |
| The market maker event: a snapshot of the aggregated top quotes of a market participant. | |
| typedef dxfg_order_base_t | dxfg_v4_order_base_t |
| The common fields of the order events: dxfg_order_t, dxfg_spread_order_t and the structures built on them. | |
| typedef dxfg_order_t | dxfg_v4_order_t |
| The order event: a snapshot of the market depth (an order or a price level) of a symbol. | |
| typedef dxfg_analytic_order_t | dxfg_v4_analytic_order_t |
| The analytic order event: an order with the iceberg information. | |
| typedef dxfg_otc_markets_order_t | dxfg_v4_otc_markets_order_t |
| The OTC Markets order event: an order with the OTC Markets specific quote data. | |
| typedef dxfg_spread_order_t | dxfg_v4_spread_order_t |
| The spread order event: a snapshot of the market depth of the spreads on an underlying symbol. | |
| typedef dxfg_series_t | dxfg_v4_series_t |
| The series event: a snapshot of the values computed for an option series of an underlying symbol. | |
| typedef dxfg_text_message_t | dxfg_v4_text_message_t |
| The text message event: a notification with a text. | |
| typedef dxfg_text_configuration_t | dxfg_v4_text_configuration_t |
| The text configuration event: a text with a version. | |
| typedef dxfg_nuam_order_t | dxfg_v4_nuam_order_t |
| The Nuam order event: an order with the data of the Nuam Exchange matching engine. | |
| typedef dxfg_nuam_time_and_sale_t | dxfg_v4_nuam_time_and_sale_t |
| The Nuam time and sale event: a time and sale with the data of the Nuam Exchange. | |
| typedef dxfg_nuam_trade_t | dxfg_v4_nuam_trade_t |
| The Nuam trade event: a trade with the trade statistics of the Nuam Exchange. | |
| typedef dxfg_order_imbalance_t | dxfg_v4_order_imbalance_t |
| The order imbalance event: the order book statistics during an auction. | |
| typedef dxfg_event_type_list | dxfg_v4_event_type_list |
| A list of events. | |
| typedef dxfg_event_clazz_list_t | dxfg_v4_event_clazz_list |
| A list of event classes. | |
| typedef dxfg_observable_subscription_change_listener_t | dxfg_v4_observable_subscription_change_listener_t |
| A handle of a Java ObservableSubscriptionChangeListener object; release it with dxfg_JavaObjectHandler_release(). | |
| typedef dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded | dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded |
| typedef dxfg_ObservableSubscriptionChangeListener_function_symbolsRemoved | dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved |
| typedef dxfg_ObservableSubscriptionChangeListener_function_subscriptionClosed | dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed |
| typedef void(*) | dxfg_v4_ObservableSubscriptionChangeListener_function_configurationChanged(graal_isolatethread_t *thread, void *user_data) |
| The callback of a subscription change listener: the configuration of the subscription changed. | |
The v4 functions and type names of dxfg_events.h. Every function returns DXFG_EXECUTE_SUCCESSFULLY or DXFG_EXECUTE_FAIL and writes its result to a DXFG_OUT parameter, see The v4 functions.
The analytic order event: an order with the iceberg information.
It is an indexed event, its clazz is DXFG_EVENT_ANALYTIC_ORDER.
A candle symbol.
| typedef dxfg_candle_t dxfg_v4_candle_t |
The candle event: OHLC prices and other information for a specific period.
It is a lasting event and a time series event, its clazz is DXFG_EVENT_CANDLE.
The configuration event: an application-specific attachment with a version.
It is a lasting event, its clazz is DXFG_EVENT_CONFIGURATION.
The attachment is handled as in dxfg_message_t. For a string payload prefer dxfg_text_configuration_t.
The daily candle event (deprecated in Java, use dxfg_candle_t): a candle with the same fields.
Its clazz is DXFG_EVENT_DAILY_CANDLE.
A list of event classes.
The list returned by the SDK is released with dxfg_CList_EventClazz_release().
The class of an event: tells which structure an event (dxfg_event_type_t) is.
In the Java implementation, all events are lined up in a hierarchy from the underlying EventType interface. In the C implementation, we specify the type in the event in a separate field because we cannot get it from the class name.
The comment of every value names the Java event class and its kind: a lasting event (LastingEvent: only the latest event of a symbol is kept), an indexed event (IndexedEvent: events of a symbol are told apart by an index and a source) or a time series event (TimeSeriesEvent: an indexed event with a time). The kind of the base class is inherited by its subclasses. The structure of a value is named by the value (DXFG_EVENT_QUOTE: dxfg_quote_t).
A list of events.
The list returned by the SDK (or passed by the SDK to a listener) is released with dxfg_CList_EventType_release().
The base structure of every event: the first field of all the event structures.
clazz tells which event structure the pointer really points to (for example, DXFG_EVENT_QUOTE: dxfg_quote_t); cast the pointer to that structure to read the other fields.
Who creates and releases an event:
| typedef dxfg_greeks_t dxfg_v4_greeks_t |
The Greeks event: a snapshot of the option price, the Black-Scholes volatility and the greeks.
It is a lasting event and a time series event, its clazz is DXFG_EVENT_GREEKS.
A list of event sources.
The list returned by the SDK is released with dxfg_CList_IndexedEventSource_release().
The source of indexed events.
Create it with dxfg_IndexedEventSource_new() or dxfg_IndexedEventSource_new2(), release it with dxfg_IndexedEventSource_release(). The sources that the SDK returns (for example, by dxfg_IndexedEvent_getSource()) are released the same way.
The kind of an event source, see dxfg_indexed_event_source_t.
The subscription to the indexed events of one source.
The base structure of the market events: the event symbol and the event time.
The market maker event: a snapshot of the aggregated top quotes of a market participant.
It is an indexed event, its clazz is DXFG_EVENT_MARKET_MAKER.
| typedef dxfg_message_t dxfg_v4_message_t |
The message event: a notification with an application-specific attachment.
It is neither a lasting nor an indexed event: messages are never conflated, its clazz is DXFG_EVENT_MESSAGE.
The attachment (the same for dxfg_configuration_t) is a UTF-8 null-terminated string (const char *, declared as void *) or NULL when there is no attachment:
So a non-string attachment loses its type when it passes through C: if the event is published back (or forwarded to another endpoint), the Java receivers get the string instead of the original object.
The C API does not support arbitrary Java attachments: C can neither create nor read them. For a string payload prefer dxfg_text_message_t and dxfg_text_configuration_t (TextMessage, TextConfiguration): their text is a plain string that passes both ways without loss.
Memory:
The Nuam order event: an order with the data of the Nuam Exchange matching engine.
It is an indexed event, its clazz is DXFG_EVENT_NUAM_ORDER.
https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamOrder.html
The Nuam time and sale event: a time and sale with the data of the Nuam Exchange.
It is a time series event, its clazz is DXFG_EVENT_NUAM_TIME_AND_SALE.
https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamTimeAndSale.html
The Nuam trade event: a trade with the trade statistics of the Nuam Exchange.
It is a lasting event, its clazz is DXFG_EVENT_NUAM_TRADE.
https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/custom/NuamTrade.html
| typedef dxfg_observable_subscription_change_listener_t dxfg_v4_observable_subscription_change_listener_t |
A handle of a Java ObservableSubscriptionChangeListener object; release it with dxfg_JavaObjectHandler_release().
| typedef void(*) dxfg_v4_ObservableSubscriptionChangeListener_function_configurationChanged(graal_isolatethread_t *thread, void *user_data) |
The callback of a subscription change listener: the configuration of the subscription changed.
The configuration is the non-functional settings of the subscription, such as its aggregation period: for example, dxfg_v4_DXFeedSubscription_setAggregationPeriod() with a value other than the current one calls it, the same value does not. It is called by the thread that changed the configuration, before that function returns, while the SDK holds the lock of the subscription.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | user_data | The user data passed to dxfg_v4_ObservableSubscriptionChangeListener_newWithConfigurationChanged(). |
| typedef dxfg_ObservableSubscriptionChangeListener_function_subscriptionClosed dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed |
The callback of a subscription change listener: the subscription was closed, or the listener was removed from it.
It is called in the same way as dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | user_data | The user data passed to dxfg_ObservableSubscriptionChangeListener_new(). |
| typedef dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded |
The callback of a subscription change listener: symbols were added to the subscription.
It is called by the SDK after the symbols are added to the subscription of the Java side, on a Java thread (not necessarily the thread that registered the listener), while the SDK holds the lock of the subscription: the notifications of one subscription do not run at the same time. The symbols are decorated depending on the subscription: for a time series subscription they are dxfg_time_series_subscription_symbol_t.
The list belongs to the SDK and is freed after the function returns: do not release it, copy the symbols that you need to keep.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | symbols | The added symbols. |
| [in] | user_data | The user data passed to dxfg_ObservableSubscriptionChangeListener_new(). |
| typedef dxfg_ObservableSubscriptionChangeListener_function_symbolsRemoved dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved |
The callback of a subscription change listener: symbols were removed from the subscription.
It is called in the same way as dxfg_ObservableSubscriptionChangeListener_function_symbolsAdded, after the symbols are removed from the subscription.
The list belongs to the SDK and is freed after the function returns: do not release it, copy the symbols that you need to keep.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | symbols | The removed symbols. |
| [in] | user_data | The user data passed to dxfg_ObservableSubscriptionChangeListener_new(). |
The option sale event: a trade or another market event with a price for an option of an underlying.
It is an indexed event with the default source, its clazz is DXFG_EVENT_OPTION_SALE.
The common fields of the order events: dxfg_order_t, dxfg_spread_order_t and the structures built on them.
It is an indexed event: a snapshot of the market depth of a symbol. Its clazz is DXFG_EVENT_ORDER_BASE.
The order imbalance event: the order book statistics during an auction.
It is a market event (neither lasting nor indexed), its clazz is DXFG_EVENT_ORDER_IMBALANCE.
https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/market/OrderImbalance.html
| typedef dxfg_order_t dxfg_v4_order_t |
The order event: a snapshot of the market depth (an order or a price level) of a symbol.
It is an indexed event, its clazz is DXFG_EVENT_ORDER.
The OTC Markets order event: an order with the OTC Markets specific quote data.
It is an indexed event, its clazz is DXFG_EVENT_OTC_MARKETS_ORDER. The original OTC quote is presented as two events: the bid and the ask side.
| typedef dxfg_profile_t dxfg_v4_profile_t |
The profile event: a snapshot of the description of a security instrument.
It is a lasting event, its clazz is DXFG_EVENT_PROFILE.
| typedef dxfg_quote_t dxfg_v4_quote_t |
The quote event: a snapshot of the best bid and ask prices and sizes.
<a href="https://docs.dxfeed.com/dxfeed/api/com/dxfeed/event/LastingEvent.html">Javadoc</a> ‍/
typedef struct dxfg_lasting_event_t { } dxfg_lasting_event_t;
/** Javadoc / typedef struct dxfg_indexed_event_t { // dxfg_indexed_event_source_t source; // int32_t event_flags; // int64_t index; } dxfg_indexed_event_t;
/** Javadoc / typedef struct dxfg_time_series_event_t { dxfg_indexed_event_t indexed_event; // int64_t time; } dxfg_time_series_event_t;
/**
It is a lasting event, its clazz is DXFG_EVENT_QUOTE.
| typedef dxfg_series_t dxfg_v4_series_t |
The series event: a snapshot of the values computed for an option series of an underlying symbol.
It is an indexed event, its clazz is DXFG_EVENT_SERIES.
The spread order event: a snapshot of the market depth of the spreads on an underlying symbol.
It is an indexed event, its clazz is DXFG_EVENT_SPREAD_ORDER.
A string symbol (for example, a ticker).
| typedef dxfg_summary_t dxfg_v4_summary_t |
The summary event: a snapshot of the trading session information (highs, lows and so on).
It is a lasting event, its clazz is DXFG_EVENT_SUMMARY.
| typedef dxfg_symbol_list dxfg_v4_symbol_list |
A list of symbols.
The list returned by the SDK (or passed by the SDK to a listener) is released with dxfg_CList_symbol_release().
| typedef dxfg_symbol_t dxfg_v4_symbol_t |
The base structure of every symbol: the first field of all the symbol structures.
type tells which of the structures dxfg_string_symbol_t, dxfg_candle_symbol_t, dxfg_wildcard_symbol_t, dxfg_indexed_event_subscription_symbol_t and dxfg_time_series_subscription_symbol_t the pointer really points to; cast the pointer to it to read the other fields.
A symbol created by dxfg_Symbol_new() or returned by the SDK is released with dxfg_Symbol_release() (a list of symbols with dxfg_CList_symbol_release()): that frees the structure, its strings and the nested symbols and sources.
The kind of a symbol, see dxfg_symbol_t.
The text configuration event: a text with a version.
It is a lasting event, its clazz is DXFG_EVENT_TEXT_CONFIGURATION.
The text message event: a notification with a text.
It is neither a lasting nor an indexed event: messages are never conflated, its clazz is DXFG_EVENT_TEXT_MESSAGE.
The theo price event: a snapshot of the theoretical option price computation.
It is a lasting event and a time series event, its clazz is DXFG_EVENT_THEO_PRICE.
The time and sale event: a trade or another market event with a price, in a continuous time slice.
It is a time series event, its clazz is DXFG_EVENT_TIME_AND_SALE. Its time is the one in index, there is no separate time field.
The subscription to the time series of events from a time.
The source of such a subscription is always the default one.
The common fields of the trade events: dxfg_trade_t and dxfg_trade_eth_t.
It is a lasting event, the information about the last trade. There is no event class of its own in the C API.
| typedef dxfg_trade_eth_t dxfg_v4_trade_eth_t |
The TradeETH event: the last trade during the extended trading hours (ETH) and their volume and turnover.
It is a lasting event, its clazz is DXFG_EVENT_TRADE_ETH.
| typedef dxfg_trade_t dxfg_v4_trade_t |
The trade event: the last trade during the regular trading hours (RTH) and the volume and turnover of the day.
It is a lasting event, its clazz is DXFG_EVENT_TRADE.
The underlying event: a snapshot of the values computed for an option underlying symbol.
It is a lasting event and a time series event, its clazz is DXFG_EVENT_UNDERLYING.
The wildcard symbol: the subscription to all symbols of an event type.
It has no fields besides the base structure.
| int32_t dxfg_v4_event_clazz_list_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_event_clazz_list * | eventClazzes ) |
Releases a list of event classes: frees the list, its array and every element. Passing NULL does nothing.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | eventClazzes | The list of event classes returned by the SDK. |
| int32_t dxfg_v4_event_type_list_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_event_type_list * | eventTypes ) |
Releases a list of events: frees the list, its array and every event of the list together with its strings. Passing NULL does nothing.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | eventTypes | The list of events returned by the SDK. |
| int32_t dxfg_v4_EventType_new | ( | graal_isolatethread_t * | thread, |
| const char * | symbolName, | ||
| dxfg_v4_event_clazz_t | clazz, | ||
| DXFG_OUT dxfg_v4_event_type_t ** | event ) |
Creates an event of the given class for the given symbol.
The event has the given clazz and event symbol (a copy of the string), all the other fields are zero (not NaN and not the defaults of the Java event). Fill the fields, then pass the event to a function that needs it.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | symbolName | The event symbol: a UTF-8 null-terminated string. For DXFG_EVENT_CANDLE and DXFG_EVENT_DAILY_CANDLE it is the string form of a candle symbol. |
| [in] | clazz | The class of the event to create. |
| [out] | event | The pointer to the variable that receives the event (release it with dxfg_v4_EventType_release()); must not be NULL. |
| int32_t dxfg_v4_EventType_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_event_type_t * | eventType ) |
Releases an event: frees the structure together with all its strings. Passing NULL does nothing.
Use it for the events created by dxfg_v4_EventType_new() and for the events that the SDK returns to the caller as a result. Do not release an event that the SDK passed to a listener: the SDK frees it after the listener returns.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | eventType | The event to release. |
| int32_t dxfg_v4_indexed_event_source_list_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_indexed_event_source_list * | list ) |
Releases a list of event sources: frees the list, its array and every source of the list with its name. Passing NULL does nothing.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | list | The list of sources returned by the SDK. |
| int32_t dxfg_v4_IndexedEvent_getSource | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_event_type_t * | eventType, | ||
| DXFG_OUT dxfg_v4_indexed_event_source_t ** | source ) |
Returns the source of an indexed event.
It works for the events of DXFG_EVENT_GREEKS, DXFG_EVENT_CANDLE, DXFG_EVENT_DAILY_CANDLE, DXFG_EVENT_TIME_AND_SALE, DXFG_EVENT_UNDERLYING, DXFG_EVENT_THEO_PRICE and DXFG_EVENT_SERIES (the default source) and of DXFG_EVENT_ORDER_BASE, DXFG_EVENT_ORDER, DXFG_EVENT_ANALYTIC_ORDER and DXFG_EVENT_SPREAD_ORDER (the source stored in the index of the order). For the events of any other class the function fails.
Java: IndexedEvent.getSource().
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | eventType | The event. |
| [out] | source | The pointer to the variable that receives the source (release it with dxfg_v4_IndexedEventSource_release()); must not be NULL. |
| int32_t dxfg_v4_IndexedEventSource_new | ( | graal_isolatethread_t * | thread, |
| const char * | source, | ||
| DXFG_OUT dxfg_v4_indexed_event_source_t ** | newSource ) |
Creates an event source by its name.
Java: OrderSource.valueOf(String).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The name of the order source: a UTF-8 null-terminated string, either predefined or at most four alphanumeric characters. If it is NULL, the default source (the identifier 0) is returned instead. |
| [out] | newSource | The pointer to the variable that receives the source (release it with dxfg_v4_IndexedEventSource_release()); must not be NULL. |
| int32_t dxfg_v4_IndexedEventSource_newWithId | ( | graal_isolatethread_t * | thread, |
| int32_t | sourceId, | ||
| DXFG_OUT dxfg_v4_indexed_event_source_t ** | source ) |
Creates an event source by its identifier.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | sourceId | The identifier of the source. If it is 0, the default source is returned, otherwise it is the identifier of an order source (a negative identifier is an error). |
| [out] | source | The pointer to the source (release it with dxfg_v4_IndexedEventSource_release()). It is not written on error. |
Java: OrderSource.valueOf(int).
| int32_t dxfg_v4_IndexedEventSource_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_indexed_event_source_t * | source ) |
Releases an event source: frees the structure and its name. Passing NULL does nothing.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | source | The source created by dxfg_v4_IndexedEventSource_new(), dxfg_v4_IndexedEventSource_newWithId() or returned by the SDK. |
| int32_t dxfg_v4_ObservableSubscriptionChangeListener_new | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded | function_symbolsAdded, | ||
| dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved | function_symbolsRemoved, | ||
| dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed | function_subscriptionClosed, | ||
| void * | user_data, | ||
| DXFG_OUT dxfg_v4_observable_subscription_change_listener_t ** | listener ) |
Creates a listener of the changes of a subscription.
Add the listener to a subscription (for example, with dxfg_v4_DXFeedSubscription_addChangeListener()). The SDK calls the functions without a check for NULL, so pass all three. Releasing the last handle of the listener with dxfg_v4_JavaObjectHandler_release() (or dxfg_v4_NativeListener_deactivate()) stops the calls: after that none of the functions is called or running, and the user data can be freed.
Java: ObservableSubscriptionChangeListener (symbolsAdded(Set), symbolsRemoved(Set), subscriptionClosed()).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | function_symbolsAdded | The function called when symbols are added to the subscription. |
| [in] | function_symbolsRemoved | The function called when symbols are removed from the subscription. |
| [in] | function_subscriptionClosed | The function called when the subscription is closed or the listener is removed. |
| [in] | user_data | The user data passed to every function; the SDK does not use or free it. |
| [out] | listener | The pointer to the variable that receives the listener handle (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_ObservableSubscriptionChangeListener_newWithConfigurationChanged | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsAdded | function_symbolsAdded, | ||
| dxfg_v4_ObservableSubscriptionChangeListener_function_symbolsRemoved | function_symbolsRemoved, | ||
| dxfg_v4_ObservableSubscriptionChangeListener_function_subscriptionClosed | function_subscriptionClosed, | ||
| dxfg_v4_ObservableSubscriptionChangeListener_function_configurationChanged | function_configurationChanged, | ||
| void * | user_data, | ||
| DXFG_OUT dxfg_v4_observable_subscription_change_listener_t ** | listener ) |
Creates a listener of the changes of a subscription that is also told about the changes of its configuration.
It is dxfg_v4_ObservableSubscriptionChangeListener_new() with the fourth callback, function_configurationChanged. Each of the four callbacks may be NULL: the SDK does not call a NULL one. Add the listener to a subscription with dxfg_v4_DXFeedSubscription_addChangeListener(). Releasing the last handle of the listener with dxfg_v4_JavaObjectHandler_release(), or dxfg_v4_NativeListener_deactivate() or dxfg_v4_NativeListener_deactivateAll(), stops the calls: after that none of the functions is called or running (except a call on the deactivating thread itself), and the user data can be freed.
Java: ObservableSubscriptionChangeListener (symbolsAdded(Set), symbolsRemoved(Set), subscriptionClosed(), configurationChanged()).
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | function_symbolsAdded | The function called when symbols are added to the subscription, or NULL. |
| [in] | function_symbolsRemoved | The function called when symbols are removed from the subscription, or NULL. |
| [in] | function_subscriptionClosed | The function called when the subscription is closed or the listener is removed, or NULL. |
| [in] | function_configurationChanged | The function called when the configuration of the subscription changes, or NULL. |
| [in] | user_data | The user data passed to every function; the SDK does not use or free it. |
| [out] | listener | The pointer to the variable that receives the listener handle (release it with dxfg_v4_JavaObjectHandler_release()); must not be NULL. |
| int32_t dxfg_v4_symbol_list_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_symbol_list * | symbols ) |
Releases a list of symbols: frees the list, its array and every symbol of the list with its strings and the nested symbols and sources.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | symbols | The list of symbols returned by the SDK. |
| int32_t dxfg_v4_Symbol_new | ( | graal_isolatethread_t * | thread, |
| const char * | symbol, | ||
| dxfg_v4_symbol_type_t | symbolType, | ||
| DXFG_OUT dxfg_v4_symbol_t ** | newSymbol ) |
Creates a symbol of the given type.
Only STRING, CANDLE and WILDCARD can be created here: for any other type the function fails. For CANDLE the string is parsed as a candle symbol (an invalid string is an error) and the symbol of the created structure is its normalized string form. For WILDCARD the string is ignored.
Java: CandleSymbol.valueOf(String) for CANDLE, WildcardSymbol.ALL for WILDCARD.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | symbol | The symbol: a UTF-8 null-terminated string. |
| [in] | symbolType | The type of the symbol to create. |
| [out] | newSymbol | The pointer to the variable that receives the symbol (release it with dxfg_v4_Symbol_release()); must not be NULL. |
| int32_t dxfg_v4_Symbol_release | ( | graal_isolatethread_t * | thread, |
| dxfg_v4_symbol_t * | symbol ) |
Releases a symbol: frees the structure, its strings and the nested symbols and sources. Passing NULL does nothing.
| [in] | thread | The current GraalVM Isolate's thread. |
| [in] | symbol | The symbol created by dxfg_v4_Symbol_new() or returned by the SDK. |