dxFeed Graal Native SDK 3.12.0
Loading...
Searching...
No Matches
dxfg_v4_feed.h
Go to the documentation of this file.
1// Copyright (c) 2026 Devexperts LLC.
2// SPDX-License-Identifier: MPL-2.0
3
8
9#ifndef DXFG_V4_FEED_H
10#define DXFG_V4_FEED_H
11
12#include "dxfg_feed.h"
13#include "dxfg_v4_common.h"
14#include "dxfg_v4_events.h"
16#include "dxfg_v4_javac.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
28
31
34
37
40
43
46
49
52
55
72
90 dxfg_v4_event_clazz_t eventClazz,
91 DXFG_OUT dxfg_v4_subscription_t **subscription);
92
110 dxfg_v4_event_clazz_list *eventClazzes,
111 DXFG_OUT dxfg_v4_subscription_t **subscription);
112
135 DXFG_OUT dxfg_v4_time_series_subscription_t **timeSeriesSubscription);
136
155 DXFG_OUT dxfg_v4_time_series_subscription_t **timeSeriesSubscription);
156
174
191
208
234 dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol,
236
265 dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol,
266 const char *source, DXFG_OUT dxfg_v4_event_type_list **events);
267
297 dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol,
298 int64_t from_time, int64_t to_time,
300
327 const dxfg_v4_event_type_t *event, DXFG_OUT dxfg_v4_event_type_t **lastEvent);
328
347 const dxfg_v4_event_type_list *events,
348 DXFG_OUT dxfg_v4_event_type_list **lastEvents);
349
377 dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol,
379
402 dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_list *symbols,
403 DXFG_OUT dxfg_v4_promise_list **promises);
404
440 dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol,
443
478 dxfg_v4_event_clazz_t clazz, dxfg_v4_symbol_t *symbol, int64_t fromTime,
479 int64_t toTime, DXFG_OUT dxfg_v4_promise_events_t **promise);
480
495 dxfg_v4_time_series_subscription_t *sub, int64_t fromTime);
496
509
523 DXFG_OUT int32_t *hasResult);
524
540 DXFG_OUT int32_t *hasException);
541
555 DXFG_OUT int32_t *cancelled);
556
576
596
613 DXFG_OUT dxfg_v4_exception_t **exception);
614
631
649 int32_t timeoutInMilliseconds);
650
669 int32_t timeoutInMilliseconds);
670
687
707
727 dxfg_v4_event_type_t* event);
728
745 dxfg_v4_exception_t* exception);
746
773 dxfg_v4_promise_handler_function promise_handler_function, void *user_data);
774
799 dxfg_v4_promise_handler_function promise_handler_function, void *user_data,
800 dxfg_v4_executor_t* executor);
801
821
842 dxfg_v4_exception_t* exception, DXFG_OUT dxfg_v4_promise_t **newPromise);
843
862 DXFG_OUT dxfg_v4_promise_t **promise);
863
875 // end of V4_Feed
877
878#ifdef __cplusplus
879}
880#endif
881
882#endif // DXFG_V4_FEED_H
dxFeed Graal Native SDK Feed functions and types declarations
The v4 functions of dxfg_catch_exception.h and the v4 names of its types (see the group Exceptions (v...
The v4 functions of dxfg_common.h and the v4 names of its types (see the group Common (v4)).
The v4 functions of dxfg_events.h and the v4 names of its types (see the group Events (v4)).
The v4 functions of dxfg_javac.h and the v4 names of its types (see the group Javac (v4)).
struct __graal_isolatethread_t graal_isolatethread_t
The state of one thread attached to an isolate: the first parameter (thread) of the SDK functions.
Definition graal_isolate.h:60
#define DXFG_OUT
Definition dxfg_common.h:37
void(*) dxfg_promise_handler_function(graal_isolatethread_t *thread, dxfg_promise_t *promise, void *user_data)
The function that is called when a promise is done.
Definition dxfg_feed.h:614
dxfg_event_clazz_list_t dxfg_v4_event_clazz_list
A list of event classes.
Definition dxfg_v4_endpoint.h:34
dxfg_feed_t dxfg_v4_feed_t
A handle of a Java DXFeed object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_v4_endpoint.h:28
dxfg_event_type_t dxfg_v4_event_type_t
The base structure of every event: the first field of all the event structures.
Definition dxfg_v4_events.h:64
dxfg_indexed_event_source_t dxfg_v4_indexed_event_source_t
The source of indexed events.
Definition dxfg_v4_events.h:31
dxfg_symbol_list dxfg_v4_symbol_list
A list of symbols.
Definition dxfg_v4_events.h:58
dxfg_event_clazz_t dxfg_v4_event_clazz_t
The class of an event: tells which structure an event (dxfg_event_type_t) is.
Definition dxfg_v4_events.h:61
dxfg_symbol_t dxfg_v4_symbol_t
The base structure of every symbol: the first field of all the symbol structures.
Definition dxfg_v4_events.h:40
dxfg_event_type_list dxfg_v4_event_type_list
A list of events.
Definition dxfg_v4_events.h:154
dxfg_exception_t dxfg_v4_exception_t
An exception that was thrown by the Java side: the class, the message, the stack trace and the cause.
Definition dxfg_v4_catch_exception.h:33
int32_t dxfg_v4_Promise_List_EventType_getResult(graal_isolatethread_t *thread, dxfg_v4_promise_events_t *promise, DXFG_OUT dxfg_v4_event_type_list **events)
Returns the result of a promise of a list of events.
int32_t dxfg_v4_Promises_allOf(graal_isolatethread_t *thread, dxfg_v4_promise_list *promises, DXFG_OUT dxfg_v4_promise_t **promise)
Creates a promise that is done when all the given promises are done.
int32_t dxfg_v4_DXFeed_getLastEventPromise(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol, DXFG_OUT dxfg_v4_promise_event_t **promise)
Requests the last event for the event class and symbol and returns the promise of the result.
int32_t dxfg_v4_DXFeed_createSubscription(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t eventClazz, DXFG_OUT dxfg_v4_subscription_t **subscription)
Creates a subscription for the events of one class and attaches it to the feed.
int32_t dxfg_v4_DXFeed_getIndexedEventsPromise(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol, dxfg_v4_indexed_event_source_t *source, DXFG_OUT dxfg_v4_promise_events_t **promise)
Requests the indexed events for the event class, symbol and source and returns the promise of the res...
int32_t dxfg_v4_DXFeed_getLastEvents(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, const dxfg_v4_event_type_list *events, DXFG_OUT dxfg_v4_event_type_list **lastEvents)
The bulk version of dxfg_v4_DXFeed_getLastEvent(): gets a new list with the last event for every even...
int32_t dxfg_v4_Promise_completed(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, dxfg_v4_java_object_handler *handler, DXFG_OUT dxfg_v4_promise_t **newPromise)
Creates a promise that is already completed normally, with the given Java object as the result.
int32_t dxfg_v4_DXFeed_attachSubscription(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_subscription_t *sub)
Attaches the subscription to the feed.
int32_t dxfg_v4_Promise_whenDoneAsync(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, dxfg_v4_promise_handler_function promise_handler_function, void *user_data, dxfg_v4_executor_t *executor)
Adds a handler that is called by the given executor when the promise is done.
dxfg_executor_t dxfg_v4_executor_t
A handle of a Java Executor object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_v4_feed.h:36
int32_t dxfg_v4_DXFeed_createSubscriptionWithEventTypes(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_list *eventClazzes, DXFG_OUT dxfg_v4_subscription_t **subscription)
Creates a subscription for the events of several classes and attaches it to the feed.
int32_t dxfg_v4_Promise_cancel(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise)
Cancels the promise.
int32_t dxfg_v4_Promise_isDone(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, DXFG_OUT int32_t *done)
Tells whether the promise is done: completed with a result, completed exceptionally or cancelled.
int32_t dxfg_v4_DXFeed_createTimeSeriesSubscription(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t eventClazz, DXFG_OUT dxfg_v4_time_series_subscription_t **timeSeriesSubscription)
Creates a time series subscription for the events of one class and attaches it to the feed.
int32_t dxfg_v4_DXFeed_createTimeSeriesSubscriptionWithEventTypes(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_list *eventClazzes, DXFG_OUT dxfg_v4_time_series_subscription_t **timeSeriesSubscription)
Creates a time series subscription for the events of several classes and attaches it to the feed.
int32_t dxfg_v4_DXFeed_getLastEventIfSubscribed(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol, DXFG_OUT dxfg_v4_event_type_t **event)
Returns the last event for the event class and symbol if there is a subscription for them.
int32_t dxfg_v4_DXFeedTimeSeriesSubscription_setFromTime(graal_isolatethread_t *thread, dxfg_v4_time_series_subscription_t *sub, int64_t fromTime)
Sets the earliest time from which the time series subscription receives the events.
int32_t dxfg_v4_DXFeed_getLastEvent(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, const dxfg_v4_event_type_t *event, DXFG_OUT dxfg_v4_event_type_t **lastEvent)
Gets the last event for the type and symbol of the given event.
int32_t dxfg_v4_DXFeed_getTimeSeriesPromise(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t clazz, dxfg_v4_symbol_t *symbol, int64_t fromTime, int64_t toTime, DXFG_OUT dxfg_v4_promise_events_t **promise)
Requests the time series events for the event class, symbol and time range and returns the promise of...
dxfg_promise_events_t dxfg_v4_promise_events_t
A handle of a Java Promise object whose result is a list of events; release it with dxfg_JavaObjectHa...
Definition dxfg_v4_feed.h:48
int32_t dxfg_v4_Promise_getException(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, DXFG_OUT dxfg_v4_exception_t **exception)
Gets the exception of the promise.
int32_t dxfg_v4_Promise_failed(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, dxfg_v4_exception_t *exception, DXFG_OUT dxfg_v4_promise_t **newPromise)
Creates a promise that is already failed, with the given exception.
int32_t dxfg_v4_DXFeed_getIndexedEventsIfSubscribed(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol, const char *source, DXFG_OUT dxfg_v4_event_type_list **events)
Returns the indexed events for the event class, symbol and source if there is a subscription for them...
int32_t dxfg_v4_Promise_EventType_getResult(graal_isolatethread_t *thread, dxfg_v4_promise_event_t *promise, DXFG_OUT dxfg_v4_event_type_t **event)
Returns the result of a promise of an event.
int32_t dxfg_v4_promise_list_release(graal_isolatethread_t *thread, dxfg_v4_promise_list *promises)
int32_t dxfg_v4_Promise_hasResult(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, DXFG_OUT int32_t *hasResult)
Tells whether the promise has completed normally, with a result.
int32_t dxfg_v4_Promise_isCancelled(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, DXFG_OUT int32_t *cancelled)
Tells whether the promise was cancelled.
int32_t dxfg_v4_Promise_await(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise)
Waits for the promise to complete.
int32_t dxfg_v4_DXFeed_getInstance(graal_isolatethread_t *thread, DXFG_OUT dxfg_v4_feed_t **feed)
Returns the feed of the default endpoint of the process.
int32_t dxfg_v4_Promise_whenDone(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, dxfg_v4_promise_handler_function promise_handler_function, void *user_data)
Adds a handler that is called when the promise is done.
int32_t dxfg_v4_Promise_awaitWithoutException(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, int32_t timeoutInMilliseconds)
Waits for the promise to complete or the timeout to elapse, and reports the timeout without an except...
int32_t dxfg_v4_Promise_hasException(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, DXFG_OUT int32_t *hasException)
Tells whether the promise has completed exceptionally or was cancelled.
int32_t dxfg_v4_DXFeed_detachSubscription(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_subscription_t *sub)
Detaches the subscription from the feed.
int32_t dxfg_v4_DXFeed_getLastEventsPromises(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_list *symbols, DXFG_OUT dxfg_v4_promise_list **promises)
The bulk version of dxfg_v4_DXFeed_getLastEventPromise(): requests the last events for one event clas...
dxfg_promise_handler_function dxfg_v4_promise_handler_function
The function that is called when a promise is done.
Definition dxfg_v4_feed.h:54
dxfg_time_series_subscription_t dxfg_v4_time_series_subscription_t
A handle of a Java DXFeedTimeSeriesSubscription object; release it with dxfg_JavaObjectHandler_releas...
Definition dxfg_v4_feed.h:33
dxfg_promise_event_t dxfg_v4_promise_event_t
A handle of a Java Promise object whose result is an event; release it with dxfg_JavaObjectHandler_re...
Definition dxfg_v4_feed.h:51
int32_t dxfg_v4_Promise_awaitWithTimeout(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, int32_t timeoutInMilliseconds)
Waits for the promise to complete or the timeout to elapse.
dxfg_promise_list dxfg_v4_promise_list
A list of promise handles.
Definition dxfg_v4_feed.h:45
dxfg_subscription_t dxfg_v4_subscription_t
A handle of a Java DXFeedSubscription object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_v4_feed.h:30
int32_t dxfg_v4_DXFeed_getTimeSeriesIfSubscribed(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_event_clazz_t eventClazz, dxfg_v4_symbol_t *symbol, int64_t from_time, int64_t to_time, DXFG_OUT dxfg_v4_event_type_list **events)
Returns the time series events for the event class, symbol and time range if there is a subscription ...
dxfg_promise_t dxfg_v4_promise_t
A handle of a Java Promise object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_v4_feed.h:42
int32_t dxfg_v4_Promise_EventType_complete(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, dxfg_v4_event_type_t *event)
Completes the promise of an event normally, with the given event.
int32_t dxfg_v4_DXFeed_detachSubscriptionAndClear(graal_isolatethread_t *thread, dxfg_v4_feed_t *feed, dxfg_v4_subscription_t *sub)
Detaches the subscription from the feed and clears the data that was delivered to the subscription.
int32_t dxfg_v4_Promise_List_EventType_complete(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, dxfg_v4_event_type_list *events)
Completes the promise of a list of events normally, with the given list.
int32_t dxfg_v4_Promise_completeExceptionally(graal_isolatethread_t *thread, dxfg_v4_promise_t *promise, dxfg_v4_exception_t *exception)
Completes the promise exceptionally, with the given exception.
dxfg_java_object_handler dxfg_v4_java_object_handler
The handle of a Java object: the reference by which the C code refers to an object that lives in Java...
Definition dxfg_v4_javac.h:27
A handle of a Java Executor object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_javac.h:126
A handle of a Java DXFeed object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_feed.h:61
A handle of a Java Promise object whose result is an event; release it with dxfg_JavaObjectHandler_re...
Definition dxfg_feed.h:110
A handle of a Java Promise object whose result is a list of events; release it with dxfg_JavaObjectHa...
Definition dxfg_feed.h:99
A list of promise handles.
Definition dxfg_feed.h:87
A handle of a Java Promise object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_feed.h:74
A handle of a Java DXFeedSubscription object; release it with dxfg_JavaObjectHandler_release().
Definition dxfg_subscription.h:68
A handle of a Java DXFeedTimeSeriesSubscription object; release it with dxfg_JavaObjectHandler_releas...
Definition dxfg_subscription.h:83