4#ifndef DXFEED_NATIVE_API_H_INCLUDED
5#define DXFEED_NATIVE_API_H_INCLUDED
20
21
22
25
26
42
43
44
45
46
47
51
52
53
54
55
56
57
58
59
60
61
65
66
69
70
71
72
73
74
75
76
80
81
82
83
84
88
89
90
91
92
93
97
98
99
100
101
102
103
104
108
109
110
111
112
113
117
118
119
120
122} dxfc_dxendpoint_role_t;
125
126
129
130
134
135
136
140
141
145
146
148} dxfc_dxendpoint_state_t;
151
152
153
154
155
157 dxfc_dxendpoint_state_t new_state,
void *user_data);
160
161
167} dxfc_dxendpoint_property_t;
170
171
172
173
174
175
179
180
181
182
183
184
188
189
193
194
198
199
200
201
202
203
207
208
209
210
211
212
213
217
218
219
220
221
222
223
227
228
229
230
231
232
233
238
239
240
241
242
243
244
246 const dxfc_dxendpoint_property_t **properties, size_t size);
249
250
251
252
253
254
255
260
261
262
263
264
265
266
271
272
273
274
275
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
360
361
362
363
364
365
366
367
368
372
373
374
375
376
377
378
379
380
381
382
386
387
388
389
390
391
395
396
397
398
399
400
401
402
406
407
408
409
410
411
412
413
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
467
468
469
470
471
472
473
474
475
476
477
481
482
483
484
485
486
487
488
489
490
491
495
496
497
498
499
500
501
505
506
507
508
509
510
511
512
513
514
515
516
520
521
522
523
524
525
529
530
531
532
533
534
535
536
541
542
543
544
545
546
547
552
553
554
555
556
560
561
562
563
564
568
569
570
571
#define DXFCPP_END_NAMESPACE
Definition Conf.hpp:54
#define DXFCPP_BEGIN_NAMESPACE
Definition Conf.hpp:51
dxfc_error_code_t dxfc_dxendpoint_create2(dxfc_dxendpoint_role_t role, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Creates an endpoint with a specified role.
Definition DXEndpoint.cpp:827
dxfc_error_code_t dxfc_dxendpoint_get_feed(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxfeed_t *feed)
Definition DXEndpoint.cpp:1103
dxfc_error_code_t dxfc_dxendpoint_builder_with_role(dxfc_dxendpoint_builder_t builder, dxfc_dxendpoint_role_t role)
Sets role for the created dxFeed endpoint.
Definition DXEndpoint.cpp:625
dxfc_error_code_t dxfc_dxendpoint_await_not_connected(dxfc_dxendpoint_t endpoint)
Waits while this endpoint state becomes NOT_CONNECTED or CLOSED.
Definition DXEndpoint.cpp:1020
dxfc_error_code_t dxfc_dxendpoint_password(dxfc_dxendpoint_t endpoint, const char *password)
Changes password for this endpoint.
Definition DXEndpoint.cpp:918
void * dxfc_dxendpoint_builder_t
The dxFeed endpoint's builder handle.
Definition api.h:185
dxfc_error_code_t dxfc_dxendpoint_get_instance2(dxfc_dxendpoint_role_t role, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Returns a default application-wide singleton instance of DXEndpoint for a specific role.
Definition DXEndpoint.cpp:782
dxfc_dxendpoint_state_t
Represents the current state of endpoint.
Definition api.h:127
@ DXFC_DXENDPOINT_STATE_CLOSED
Endpoint was closed.
Definition api.h:147
@ DXFC_DXENDPOINT_STATE_NOT_CONNECTED
Endpoint was created by is not connected to remote endpoints.
Definition api.h:131
@ DXFC_DXENDPOINT_STATE_CONNECTING
The connect function was called to establish connection to remove endpoint, but connection is not act...
Definition api.h:137
@ DXFC_DXENDPOINT_STATE_CONNECTED
The connection to remote endpoint is established.
Definition api.h:142
dxfc_error_code_t dxfc_dxendpoint_disconnect_and_clear(dxfc_dxendpoint_t endpoint)
Terminates all remote network connections and clears stored data.
Definition DXEndpoint.cpp:986
dxfc_error_code_t dxfc_dxendpoint_create(void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Creates an endpoint with FEED role.
Definition DXEndpoint.cpp:805
#define DXFC_OUT
Definition api.h:17
dxfc_error_code_t dxfc_dxendpoint_builder_with_name(dxfc_dxendpoint_builder_t builder, const char *name)
Changes name that is used to distinguish multiple endpoints in the same process (GraalVM Isolate) in ...
Definition DXEndpoint.cpp:642
void * dxfc_dxendpoint_t
The dxFeed endpoint handle.
Definition api.h:176
dxfc_error_code_t dxfc_dxendpoint_reconnect(dxfc_dxendpoint_t endpoint)
Terminates all established network connections and initiates connecting again with the same address.
Definition DXEndpoint.cpp:952
dxfc_error_code_t dxfc_dxendpoint_builder_build(dxfc_dxendpoint_builder_t builder, void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Builds the new dxFeed endpoint instance.
Definition DXEndpoint.cpp:719
dxfc_error_code_t
List of error codes.
Definition api.h:27
@ DXFC_EC_ERROR
The error returned if the current operation cannot be completed.
Definition api.h:38
@ DXFC_EC_SUCCESS
OK.
Definition api.h:31
@ DXFC_EC_G_ERR
dxFeed Graal Native API error.
Definition api.h:35
dxfc_error_code_t dxfc_system_set_property(const char *key, const char *value)
Sets the system property indicated by the specified key.
Definition System.cpp:69
dxfc_error_code_t dxfc_system_get_property(const char *key, DXFC_OUT char *buffer, size_t buffer_size)
Gets the system property indicated by the specified key.
dxfc_error_code_t dxfc_dxendpoint_builder_supports_property(dxfc_dxendpoint_builder_t builder, const char *key, DXFC_OUT int *supports)
Checks if a property is supported.
Definition DXEndpoint.cpp:702
dxfc_error_code_t dxfc_dxendpoint_close(dxfc_dxendpoint_t endpoint)
Closes this endpoint.
Definition DXEndpoint.cpp:850
dxfc_error_code_t dxfc_dxendpoint_user(dxfc_dxendpoint_t endpoint, const char *user)
Changes user name for this endpoint.
Definition DXEndpoint.cpp:901
dxfc_error_code_t dxfc_dxendpoint_remove_state_change_listener(dxfc_dxendpoint_t endpoint, dxfc_dxendpoint_state_change_listener listener)
Removes listener that is notified about changes in state property.
Definition DXEndpoint.cpp:1080
void(* dxfc_dxendpoint_state_change_listener)(dxfc_dxendpoint_state_t old_state, dxfc_dxendpoint_state_t new_state, void *user_data)
The endpoint current state change listener.
Definition api.h:156
dxfc_error_code_t dxfc_dxendpoint_get_publisher(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxpublisher_t *publisher)
Definition DXEndpoint.cpp:1108
dxfc_error_code_t dxfc_dxendpoint_get_state(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxendpoint_state_t *state)
Returns the state of this endpoint.
Definition DXEndpoint.cpp:1037
dxfc_error_code_t dxfc_dxendpoint_builder_free(dxfc_dxendpoint_builder_t builder)
Removes a builder from the registry.
Definition DXEndpoint.cpp:748
dxfc_dxendpoint_role_t
Represents the role of endpoint that was specified during its creation.
Definition api.h:67
@ DXFC_DXENDPOINT_ROLE_PUBLISHER
PUBLISHER endpoint connects to the remote publisher hub (also known as multiplexor) or creates a publ...
Definition api.h:105
@ DXFC_DXENDPOINT_ROLE_STREAM_FEED
STREAM_FEED endpoint is similar to DXFC_DXENDPOINT_ROLE_FEED and also connects to the remote data fee...
Definition api.h:94
@ DXFC_DXENDPOINT_ROLE_FEED
FEED endpoint connects to the remote data feed provider and is optimized for real-time or delayed dat...
Definition api.h:77
@ DXFC_DXENDPOINT_ROLE_STREAM_PUBLISHER
STREAM_PUBLISHER endpoint is similar to DXFC_DXENDPOINT_ROLE_PUBLISHER and also connects to the remot...
Definition api.h:114
@ DXFC_DXENDPOINT_ROLE_LOCAL_HUB
LOCAL_HUB endpoint is a local hub without ability to establish network connections.
Definition api.h:121
@ DXFC_DXENDPOINT_ROLE_ON_DEMAND_FEED
ON_DEMAND_FEED endpoint is similar to DXFC_DXENDPOINT_ROLE_FEED, but it is designed to be used with d...
Definition api.h:85
void * dxfc_dxpublisher_t
The dxFeed publisher handle.
Definition api.h:195
dxfc_error_code_t dxfc_dxendpoint_builder_with_properties(dxfc_dxendpoint_builder_t builder, const dxfc_dxendpoint_property_t **properties, size_t size)
Sets all supported properties from the provided properties object.
Definition DXEndpoint.cpp:675
dxfc_error_code_t dxfc_dxendpoint_connect(dxfc_dxendpoint_t endpoint, const char *address)
Connects to the specified remote address.
Definition DXEndpoint.cpp:935
dxfc_error_code_t dxfc_dxendpoint_new_builder(DXFC_OUT dxfc_dxendpoint_builder_t *builder)
Creates new dxFeed endpoint's builder instance.
Definition DXEndpoint.cpp:609
void * dxfc_dxfeed_t
The dxFeed handle.
Definition api.h:190
dxfc_error_code_t dxfc_dxendpoint_close_and_await_termination(dxfc_dxendpoint_t endpoint)
Closes this endpoint and wait until all pending data processing tasks are completed.
Definition DXEndpoint.cpp:867
dxfc_error_code_t dxfc_dxendpoint_get_instance(void *user_data, DXFC_OUT dxfc_dxendpoint_t *endpoint)
Returns a default application-wide singleton instance of dxFeed endpoint with a FEED role.
Definition DXEndpoint.cpp:760
dxfc_error_code_t dxfc_dxendpoint_disconnect(dxfc_dxendpoint_t endpoint)
Terminates all remote network connections.
Definition DXEndpoint.cpp:969
dxfc_error_code_t dxfc_dxendpoint_add_state_change_listener(dxfc_dxendpoint_t endpoint, dxfc_dxendpoint_state_change_listener listener)
Adds listener that is notified about changes in state property.
Definition DXEndpoint.cpp:1054
dxfc_error_code_t dxfc_dxendpoint_free(dxfc_dxendpoint_t endpoint)
Removes the dxFeed endpoint from the registry.
Definition DXEndpoint.cpp:1113
dxfc_error_code_t dxfc_dxendpoint_get_role(dxfc_dxendpoint_t endpoint, DXFC_OUT dxfc_dxendpoint_role_t *role)
Returns the role of this endpoint.
Definition DXEndpoint.cpp:884
dxfc_error_code_t dxfc_dxendpoint_await_processed(dxfc_dxendpoint_t endpoint)
Waits until this endpoint stops processing data (becomes quiescent).
Definition DXEndpoint.cpp:1003
dxfc_error_code_t dxfc_dxendpoint_builder_with_property(dxfc_dxendpoint_builder_t builder, const char *key, const char *value)
Sets the specified property.
Definition DXEndpoint.cpp:658
The simple key-value structure that represents an endpoint's property.
Definition api.h:162
const char * key
The property's key.
Definition api.h:164
const char * value
The property's value.
Definition api.h:166