Transformer SDK For C  6.2.11.309924
transformer.h
Go to the documentation of this file.
1 /*
2  * Caplin Transformer SDK
3  *
4  * Copyright CAPLIN Systems Ltd 2000-2009
5  *
6  * $Author: andys $
7  * $DateTime: 2017/08/22 10:56:18 $
8  * $Change: 309918 $
9  * $Id: //CDev/V-6_2/rtas/include/transformer.h#19 $
10  */
11 
12 
13 #ifndef __TRANSFORMER_H__
14 #define __TRANSFORMER_H__
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #include <time.h>
21 #include "datasrc.h"
22 
23 
24 #define TRANSFORMER_VERSION "6.2.11"
25 
26 #define TRANSFORMER_MAJOR_VERSION 6
27 #define TRANSFORMER_MINOR_VERSION 2
28 #define TRANSFORMER_PATCH_VERSION 11
29 
30 
31 #ifndef WIN32
32 #ifndef TRANSFORMER_EXPORT
33 #define TRANSFORMER_EXPORT extern
34 #endif
35 #ifndef TRANSFORMER_MODULE_EXPORT
36 #define TRANSFORMER_MODULE_EXPORT extern
37 #endif
38 #else
39 #ifndef TRANSFORMER_EXPORT
40 #define TRANSFORMER_EXPORT __declspec(dllimport)
41 #endif
42 #ifndef TRANSFORMER_MODULE_EXPORT
43 #define TRANSFORMER_MODULE_EXPORT __declspec(dllexport)
44 #endif
45 #endif
46 
47 
48 
56 typedef struct _userinfo userinfo_t;
57 
60 typedef struct _authfuncs authfuncs_t;
61 
64 typedef struct _tfhandle tf_handle_t;
65 
79 typedef int (*tf_request_cb)(tf_handle_t *handle, int peer, const char *subject, int flags, int id, void *data);
80 
94 typedef int (*tf_discard_cb)(tf_handle_t *handle, int peer, const char *subject, int flags, int id, void *data);
95 
109 typedef int (*tf_update_cb)(tf_handle_t *handle, int peer, ds_data_t *dsdata, int flags, int id, void *data);
110 
124 typedef int (*tf_nodata_cb)(tf_handle_t *handle, int peer, const char *subject, short nodata_flags, int flags, int id, void *data);
125 
141 typedef int (*tf_status_cb)(tf_handle_t *handle, int peer, const char *subject, int status, u_short code, const char *message, int flags, int id, void *data);
142 
167 typedef void (*update_cb)(int peer, ds_data_t *dsdata, time_t update_time, int val, void *data);
168 
181 typedef void (*tf_finalize_cb)(int val, void *data, tf_handle_t *handle);
182 
183 #ifndef WIN32
184 enum
185 {
186  FALSE = 0,
187  TRUE = 1,
188 };
189 #endif
190 
191 
192 TRANSFORMER_EXPORT int register_interest(const char *name, update_cb update,int id, void *data);
193 
194 TRANSFORMER_EXPORT int register_interest_check(const char *name, update_cb update,int id, void *data);
195 
196 TRANSFORMER_EXPORT int deregister_interest(const char *name, update_cb update,int id, void *data);
197 
198 TRANSFORMER_EXPORT int register_type_interest(int typ, update_cb update, int id, void *data);
199 
200 TRANSFORMER_EXPORT int deregister_type_interest(int typ, update_cb update, int id, void *data);
201 
202 TRANSFORMER_EXPORT void free_array(int argc, char *argv[]);
203 
219 typedef int (*provider_cb)(int peer, char *name, int isrequest);
220 
225 #define PROVIDER_DENY -1
226 
231 #define PROVIDER_OK 0
232 
237 #define TF_LISTENER_DEFAULT 0
238 
246 #define TF_LISTENER_WILDNOW 2
247 
255 #define TF_LISTENER_WILDNEXT 4
256 
268 #define TF_LISTENER_WILDREMOVE 8
269 
274 #define TF_LISTENER_WILDCARD (TF_LISTENER_WILDNOW|TF_LISTENER_WILDNEXT)
275 
281 #define TF_LISTENER_NOASKPEERS 16
282 
287 #define TF_LISTENER_NOASKMODULES 32
288 
297 #define TF_LISTENER_ACCESSORY (1|TF_LISTENER_NOASKPEERS|TF_LISTENER_NOASKMODULES)
298 
307 #define TF_LISTENER_PROVIDEONCE 64
308 
315 #define TF_LISTENER_NOREGEX 128
316 
323 #define TF_LISTENER_ONCE 256
324 
325 TRANSFORMER_EXPORT tf_handle_t *tf_add_listener(const char *pattern, int listener_typeflags, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data, tf_finalize_cb finalize);
326 
327 TRANSFORMER_EXPORT tf_handle_t *tf_add_listener_get_cache(const char *pattern, int listener_typeflags, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data, tf_finalize_cb finalize, ds_data_t **dsdata_ptr);
328 
329 TRANSFORMER_EXPORT tf_handle_t *tf_add_listener_nspace(ds5_namespace_t *nspace, int listener_typeflags, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data, tf_finalize_cb finalize);
330 
331 
332 TRANSFORMER_EXPORT tf_handle_t *tf_add_type_listener(int data_type, int listener_typeflags, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data, tf_finalize_cb finalize);
333 
334 TRANSFORMER_EXPORT tf_handle_t *tf_add_provider(const char *pattern, int provider_typeflags, tf_request_cb request, tf_discard_cb discard, int val, void *data, void *reserved);
335 TRANSFORMER_EXPORT tf_handle_t *tf_add_provider_nspace(ds5_namespace_t *nspace, int provider_typeflags, tf_request_cb request, tf_discard_cb discard, int val, void *data, void *reserved);
336 
337 TRANSFORMER_EXPORT void tf_handle_delete(tf_handle_t *handle);
338 
339 TRANSFORMER_EXPORT int tf_handle_set_listener_params(tf_handle_t *handle, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data);
340 
341 TRANSFORMER_EXPORT int tf_handle_set_provider_params(tf_handle_t *handle, tf_request_cb request, tf_discard_cb discard, int val, void *data);
342 
343 TRANSFORMER_EXPORT int tf_handle_set_update_cb(tf_handle_t *handle, tf_update_cb update);
344 
345 TRANSFORMER_EXPORT int tf_handle_set_nodata_cb(tf_handle_t *handle, tf_nodata_cb nodata);
346 
347 TRANSFORMER_EXPORT int tf_handle_set_status_cb(tf_handle_t *handle, tf_status_cb status);
348 
349 TRANSFORMER_EXPORT int tf_handle_set_request_cb(tf_handle_t *handle, tf_request_cb request);
350 
351 TRANSFORMER_EXPORT int tf_handle_set_discard_cb(tf_handle_t *handle, tf_discard_cb discard);
352 
353 TRANSFORMER_EXPORT int tf_handle_set_listener_finalize_cb(tf_handle_t *handle, tf_finalize_cb finalize);
354 
355 TRANSFORMER_EXPORT int tf_handle_set_callback_params(tf_handle_t *handle, int id, void *data);
356 
357 
358 TRANSFORMER_EXPORT ds5_namespace_t *tf_create_globbed_namespace(const char *globbed);
359 TRANSFORMER_EXPORT ds5_namespace_t *tf_create_regex_namespace(const char *expr);
360 TRANSFORMER_EXPORT int tf_regex_namespace_add_expr(ds5_namespace_t *nspace, const char *expr, int exclude);
361 
362 
363 
367 typedef enum _authdirection
368 {
372 
377 {
378  int (*map_object)(int peer, char *orig, char *destbuf, int destlen, authdirection_t direction);
391  int (*request_object)(int peer, char *orig, char *mapname, void **userptr);
402  int (*discard_object)(int peer, char *orig, char *mapname, void **userptr);
403  int *(*return_peers)(char *name, int *peers_num);
404  ds_data_t *(*map_fields)(int peerno, char *basename, ds_data_t *orig, void **userptr, int *cancel_sub);
405 };
406 
407 TRANSFORMER_EXPORT void auth_register_functions(authfuncs_t *auth);
408 
409 TRANSFORMER_EXPORT void auth_deregister_functions();
410 
411 TRANSFORMER_EXPORT void auth_invalidate_perms();
412 
413 TRANSFORMER_EXPORT void auth_invalidate_peer_perms(int peernum);
414 
415 TRANSFORMER_EXPORT int tf_register_function(const char *name, void *function);
416 
417 TRANSFORMER_EXPORT void *tf_find_function(const char *name);;
418 
419 TRANSFORMER_EXPORT int file_reading();
420 
421 TRANSFORMER_EXPORT void file_write_pkt(FILE *fp, ds_data_t *pkt, time_t tim);
422 
423 TRANSFORMER_EXPORT void mod_config_parse_file(const char *file);
424 
425 TRANSFORMER_EXPORT void mod_config_parse_optional_file(const char *file);
426 
427 TRANSFORMER_EXPORT char *filename_expand(char *format);
428 
435 TRANSFORMER_EXPORT ds_log_t *rtas_log;
436 
437 TRANSFORMER_EXPORT int c_debug_level;
438 
439 #define DBG(level) ( ( c_debug_level >= (level) ) )
440 
441 enum
442 {
443  DBG_CRIT = 1,
444  DBG_ERROR,
445  DBG_NOTIFY,
446  DBG_WARN,
447  DBG_INFO,
448  DBG_DEBUG
449 };
450 
451 TRANSFORMER_EXPORT int debug_level(char *text);
452 
453 TRANSFORMER_EXPORT char *debug_string(int level);
454 
463 #define PACKET_STORE 1
464 
473 #define PACKET_PUBLISH 2
474 
487 #define PACKET_OWRITE 4
488 
504 #define PACKET_FREE 8
505 
516 #define PACKET_NOLISTEN 32
517 
523 #define PACKET_UPDATE 128
524 
534 #define PACKET_NOFEEDTIME 256
535 
536 TRANSFORMER_EXPORT char *packet_get_field_byname(ds_data_t *pkt, const char *field);
537 
538 TRANSFORMER_EXPORT char *packet_get_field(ds_data_t *pkt, int fid);
539 
540 TRANSFORMER_EXPORT int packet_update(ds_data_t *dest, ds_data_t *src);
541 
542 TRANSFORMER_EXPORT int packet_merge(ds_data_t *dest, ds_data_t *src, int *newfields);
543 
544 TRANSFORMER_EXPORT int packet_update_field_byname(ds_data_t *dest, const char *field, const char *value);
545 
546 TRANSFORMER_EXPORT int packet_update_field(ds_data_t *dest, int fid, const char *value);
547 
548 TRANSFORMER_EXPORT ds_data_t *packet_clone(ds_data_t *src);
549 
550 TRANSFORMER_EXPORT int packet_delete_field(ds_data_t *pkt, int index);
551 
552 TRANSFORMER_EXPORT void packet_contrib(ds_data_t *pkt,void *data,int storeflags);
553 
554 TRANSFORMER_EXPORT void packet_log_dump(ds_log_t *log,const char *label,ds_data_t *pkt);
555 
556 TRANSFORMER_EXPORT void register_provider(const char *wildcard, provider_cb provider);
557 
558 TRANSFORMER_EXPORT void deregister_provider(const char *wildcard, provider_cb provider);
559 
570 #define SYMBOL_PUBLISH 2
571 
582 #define SYMBOL_NOSAVE 16
583 
594 #define SYMBOL_NOLISTEN 32
595 
596 TRANSFORMER_EXPORT int symbol_create(const char *name, unsigned flags);
597 
598 TRANSFORMER_EXPORT ds_data_t *symbol_last_update(const char *name);
599 
600 TRANSFORMER_EXPORT time_t symbol_last_updatetime(const char *name);
601 
602 TRANSFORMER_EXPORT ds_data_t *symbol_last_mmaker_update(const char *name, const char *mmaker);
603 
604 TRANSFORMER_EXPORT char **symbol_return_mmakers(const char *name, int *num);
605 
606 TRANSFORMER_EXPORT char *symbol_last_field_byname(const char *name, const char *field);
607 
608 TRANSFORMER_EXPORT char *symbol_last_field(const char *name, int fid);
609 
610 TRANSFORMER_EXPORT char **symbol_historic_field(const char *name, int fid, int *number);
611 
612 TRANSFORMER_EXPORT void symbol_add_constant(const char *name, int fid, const char *value);
613 
614 TRANSFORMER_EXPORT char *symbol_get_constant(const char *name, int fid);
615 
616 TRANSFORMER_EXPORT char **symbol_match(const char *name, int *num);
617 
618 TRANSFORMER_EXPORT char **symbol_match_bytype(const char *name, int type, int *number);
619 
620 TRANSFORMER_EXPORT void symbol_delete_type2(const char *name, const char *index, int fieldnum);
621 
622 TRANSFORMER_EXPORT void symbol_delete_all_mmaker(const char *name);
623 
624 TRANSFORMER_EXPORT void symbol_delete_mmaker(const char *symname, const char *mmaker);
625 
626 TRANSFORMER_EXPORT void symbol_send_nodata(const char *symname, u_short flags);
627 
628 TRANSFORMER_EXPORT int symbol_get_type(const char *objname);
629 
630 TRANSFORMER_EXPORT int symbol_request(const char *name, update_cb update,int id, void *data);
631 
632 TRANSFORMER_EXPORT int symbol_discard(const char *name, update_cb update,int id, void *data);
633 
634 TRANSFORMER_EXPORT int tf_symbol_get_type(const char *objname);
635 
636 TRANSFORMER_EXPORT int tf_symbol_get_status(const char *name, char **status_message_ptr);
637 
638 TRANSFORMER_EXPORT void tf_symbol_send_status(const char *name, int status, const char *message);
639 
640 TRANSFORMER_EXPORT ds_data_t *symbol_last_permission_update(const char *name, const char *key);
641 
642 TRANSFORMER_EXPORT char **symbol_return_permission_keys(const char *name, int *num);
643 
644 TRANSFORMER_EXPORT void symbol_delete_permission_key(const char *name, const char *index);
645 
646 TRANSFORMER_EXPORT void symbol_delete_all_permission_keys(const char *name);
647 
648 TRANSFORMER_EXPORT char **tf_symbol_match(const char *pattern, int *number);
649 
650 TRANSFORMER_EXPORT char **tf_symbol_match_bytype(const char *pattern, int type, int *number);
651 
652 TRANSFORMER_EXPORT void symbol_unset_flag(const char *subject, unsigned int flags);
653 
654 TRANSFORMER_EXPORT void symbol_set_flag(const char *subject, unsigned int flags);
655 
656 
663 struct _userinfo
664 {
665  unsigned int id;
668  char *ident;
671  char *desc;
674  int (*strprint)(char *dest, size_t len, void *data);
678  void (*filewrite)(FILE *fp, void *data);
681  void *(*fileread)(FILE *fp, char *name);
684 };
685 
686 TRANSFORMER_EXPORT void *symbol_get_userdata(const char *name,unsigned int id);
687 
688 TRANSFORMER_EXPORT void symbol_remove_alluserdata(const char *wildcard,unsigned int id, void (*dataremover)(void *data));
689 
690 TRANSFORMER_EXPORT void symbol_remove_userdata(const char *name,unsigned int id);
691 
692 TRANSFORMER_EXPORT void symbol_set_userdata(const char *name, unsigned int id, void *ptr);
693 
694 TRANSFORMER_EXPORT void register_userdata_funcs(userinfo_t *user);
695 
696 TRANSFORMER_EXPORT void deregister_userdata_funcs(unsigned int id);
697 
716 typedef void (*udpcmd_t)(int argc,char *argv[]);
717 
718 TRANSFORMER_EXPORT int udpsignal_addjob(const char *cmd, udpcmd_t callback, const char *msg);
719 
720 TRANSFORMER_EXPORT int udpsignal_deljob(const char *cmd, udpcmd_t callback);
721 
722 TRANSFORMER_EXPORT void udpsignal_send(const char *message);
723 
724 TRANSFORMER_EXPORT void udpsignal_send_argv(const char *command, char *argv[]);
725 
740 #define CMD_DUMP_MEMORY "memory_write"
741 
759 #define CMD_RESTORE_MEMORY "memory_read"
760 
769 #define CMD_MODULE_LOAD "module_load"
770 
778 #define CMD_MODULE_UNLOAD "module_unload"
779 
789 #define CMD_SYMBOL_DEL_PKTS "symbol_delete"
790 
798 #define CMD_SYMBOL_PUBLISH "symbol_publish"
799 
807 #define CMD_SOURCE_UP "source_up"
808 
816 #define CMD_SOURCE_DOWN "source_down"
817 
829 TRANSFORMER_MODULE_EXPORT void mod_init(char *module_name);
830 
838 TRANSFORMER_MODULE_EXPORT void mod_exit();
839 
844 TRANSFORMER_EXPORT char * mon_module_setup(const char *name,const char *description,const char *version);
845 
846 #ifdef __cplusplus
847 }
848 #endif
849 
850 #endif /* __TRANSFORMER_H__ */
TRANSFORMER_EXPORT ds5_namespace_t * tf_create_regex_namespace(const char *expr)
Creates a DataSource namespace which will match subject names using a regular expression.
Definition: namespaces.c:63
int symbol_create(const char *name, unsigned int flags)
Create a new symbol within the Transformer memory.
Definition: symbols.c:263
TRANSFORMER_EXPORT int packet_merge(ds_data_t *dest, ds_data_t *src, int *newfields)
Merge the contents of one packet into the other.
Definition: packet.c:199
_authdirection
Define the mapping direction used for the authfuncs_t::map_object() call.
Definition: transformer.h:367
TRANSFORMER_EXPORT int tf_symbol_get_type(const char *objname)
Return the type of a particular object.
Definition: symbols.c:602
Define the callback functions that should be implemented by a permissioning module.
Definition: transformer.h:376
TRANSFORMER_EXPORT char * mon_module_setup(const char *name, const char *description, const char *version)
Function to allow modules to set up their monitoring strings.
Definition: modules.c:771
int(* tf_update_cb)(tf_handle_t *handle, int peer, ds_data_t *dsdata, int flags, int id, void *data)
Definition of the function type used to process updates.
Definition: transformer.h:109
TRANSFORMER_EXPORT char ** symbol_return_permission_keys(const char *name, int *num)
Returns a list of all the cached permission object keys.
Definition: symbols.c:245
TRANSFORMER_EXPORT void auth_invalidate_perms()
Invalidate permissions for all peers.
Definition: auth.c:164
TRANSFORMER_EXPORT int tf_register_function(const char *name, void *function)
Register a new function against the extension system.
Definition: extender.c:79
int(* provider_cb)(int peer, char *name, int isrequest)
Definition of the function type used for provider callbacks.
Definition: transformer.h:219
TRANSFORMER_EXPORT int tf_handle_set_listener_params(tf_handle_t *handle, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data)
Set the the callback parameters for a listener.
Definition: listener.c:727
TRANSFORMER_EXPORT void mod_config_parse_file(const char *file)
Parse a mandatory module configuration file.
Definition: modules.c:589
TRANSFORMER_EXPORT tf_handle_t * tf_add_listener(const char *pattern, int listener_typeflags, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data, tf_finalize_cb finalize)
Create a new object listener.
Definition: test_autopub.c:68
TRANSFORMER_EXPORT int packet_update_field(ds_data_t *dest, int fid, const char *value)
Update a field within a packet.
Definition: packet.c:305
TRANSFORMER_EXPORT void symbol_set_userdata(const char *name, unsigned int id, void *ptr)
Register a piece of data against a particular symbol and unique id.
Definition: symboluser.c:237
struct _tfhandle tf_handle_t
Opaque handle for operations.
Definition: transformer.h:64
TRANSFORMER_EXPORT int deregister_type_interest(int typ, update_cb update, int id, void *data)
Deregister an interest in a particular DataSource type.
Definition: compat.c:306
TRANSFORMER_EXPORT void symbol_send_nodata(const char *symname, u_short flags)
Send a "nodata" message to the cache and to interested peers.
Definition: symbols.c:35
Definition: transformer.h:370
TRANSFORMER_MODULE_EXPORT void mod_init(char *module_name)
Module initialisation function.
Definition: formatter.c:107
TRANSFORMER_EXPORT char * symbol_last_field_byname(const char *name, const char *field)
Return the last recieved fieldvalue for a symbol.
Definition: symbols.c:292
TRANSFORMER_EXPORT int tf_symbol_get_status(const char *name, char **status_message_ptr)
Return the status for an object within the cache.
Definition: symbols.c:739
char * desc
Definition: transformer.h:671
Defines the functions required to support userdata preservation.
Definition: transformer.h:663
TRANSFORMER_EXPORT void symbol_remove_userdata(const char *name, unsigned int id)
Remove userdata for a given symbol and unique id.
Definition: symboluser.c:210
TRANSFORMER_EXPORT ds_data_t * symbol_last_permission_update(const char *name, const char *key)
Returns the currently cached permission object data.
Definition: symbols.c:160
TRANSFORMER_EXPORT void packet_contrib(ds_data_t *pkt, void *data, int storeflags)
Contribute an update to the memory core/DataSource.
Definition: packet.c:78
TRANSFORMER_EXPORT void symbol_delete_all_mmaker(const char *name)
Delete all the Type 2 data associated with a symbol.
Definition: symbols.c:568
TRANSFORMER_EXPORT void symbol_delete_permission_key(const char *name, const char *index)
Delete the data associated with a permission key.
Definition: symbols.c:533
TRANSFORMER_EXPORT void packet_log_dump(ds_log_t *log, const char *label, ds_data_t *pkt)
Write a ds_data_t to a log file in a human readable format.
Definition: packet.c:35
TRANSFORMER_EXPORT tf_handle_t * tf_add_listener_get_cache(const char *pattern, int listener_typeflags, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data, tf_finalize_cb finalize, ds_data_t **dsdata_ptr)
Create a new object listener returning the cache contents.
Definition: listener.c:411
TRANSFORMER_EXPORT int packet_delete_field(ds_data_t *pkt, int index)
Remove a field in a dsdata.
Definition: packet.c:355
TRANSFORMER_EXPORT int tf_handle_set_status_cb(tf_handle_t *handle, tf_status_cb status)
Set the status callback on a listener.
Definition: listener.c:803
TRANSFORMER_EXPORT void free_array(int argc, char *argv[])
Frees a classical array of pointers to chars.
Definition: api.c:27
TRANSFORMER_EXPORT int packet_update_field_byname(ds_data_t *dest, const char *field, const char *value)
Update a field within a packet by name.
Definition: packet.c:266
TRANSFORMER_EXPORT tf_handle_t * tf_add_type_listener(int data_type, int listener_typeflags, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data, tf_finalize_cb finalize)
Register an interest in a particular DataSource type.
Definition: listener.c:508
TRANSFORMER_EXPORT char * packet_get_field(ds_data_t *pkt, int fid)
Find a field within a packet.
Definition: packet.c:148
TRANSFORMER_EXPORT void symbol_delete_all_permission_keys(const char *name)
Delete all the data associated with a permission object.
Definition: symbols.c:585
enum _authdirection authdirection_t
Define the mapping direction used for the authfuncs_t::map_object() call.
TRANSFORMER_EXPORT char ** tf_symbol_match(const char *pattern, int *number)
Return a list of symbols matching the specifier.
Definition: test_autopub.c:51
Definition: transformer.h:369
TRANSFORMER_EXPORT int packet_update(ds_data_t *dest, ds_data_t *src)
Update the contents of one packet based on the contents of the other.
Definition: packet.c:170
TRANSFORMER_EXPORT ds_data_t * symbol_last_mmaker_update(const char *name, const char *mmaker)
Returns the currently cached Type 2 data for a symbol/Type 2 index.
Definition: symbols.c:114
TRANSFORMER_EXPORT time_t symbol_last_updatetime(const char *name)
Return the time that the last update was received for this symbol.
Definition: symbols.c:45
TRANSFORMER_EXPORT int tf_handle_set_discard_cb(tf_handle_t *handle, tf_discard_cb discard)
Set the discard callback on a provider.
Definition: listener.c:882
TRANSFORMER_EXPORT char ** symbol_return_mmakers(const char *name, int *num)
Returns a list of all the cached Type 2 market makers.
Definition: symbols.c:188
TRANSFORMER_EXPORT void deregister_provider(const char *wildcard, provider_cb provider)
Deregisters the data provider with the Transformer core for the specified object name pattern...
Definition: legacy_listeners.c:932
TRANSFORMER_EXPORT int tf_handle_set_nodata_cb(tf_handle_t *handle, tf_nodata_cb nodata)
Set the nodata callback on a listener.
Definition: listener.c:779
TRANSFORMER_EXPORT char ** tf_symbol_match_bytype(const char *pattern, int type, int *number)
Return a list of symbols matching the pattern and of the specified type.
Definition: symbols.c:703
TRANSFORMER_EXPORT void register_provider(const char *wildcard, provider_cb provider)
Registers the specified data provider with the Transformer core for the specified object name pattern...
Definition: legacy_listeners.c:900
TRANSFORMER_EXPORT int tf_handle_set_callback_params(tf_handle_t *handle, int id, void *data)
Set the callback parameters on a handle.
Definition: test_autopub.c:62
TRANSFORMER_EXPORT void deregister_userdata_funcs(unsigned int id)
Deregister a set of functions that handled a specific id.
Definition: symboluser.c:92
TRANSFORMER_EXPORT char ** symbol_historic_field(const char *name, int fid, int *number)
Get all data for a particular field number within a symbol.
Definition: symbols.c:405
TRANSFORMER_EXPORT int symbol_get_type(const char *objname)
Return the type of a particular object.
Definition: symbols.c:619
TRANSFORMER_EXPORT void symbol_delete_mmaker(const char *symname, const char *mmaker)
Delete the data associated with a type 2 index.
Definition: symbols.c:549
TRANSFORMER_EXPORT ds5_namespace_t * tf_create_globbed_namespace(const char *globbed)
Creates a DataSource namespace which will match subject names using globbing.
Definition: namespaces.c:29
TRANSFORMER_EXPORT ds_data_t * packet_clone(ds_data_t *src)
Duplicate a DataSource packet.
Definition: packet.c:328
int(* tf_status_cb)(tf_handle_t *handle, int peer, const char *subject, int status, u_short code, const char *message, int flags, int id, void *data)
Definition of the function type used to process status updates.
Definition: transformer.h:141
Definition of the interface that you should implement if you require custom subject matching logic...
Definition: datasrc.h:443
TRANSFORMER_EXPORT void * tf_find_function(const char *name)
Lookup an extension function.
Definition: extender.c:115
TRANSFORMER_EXPORT int register_interest(const char *name, update_cb update, int id, void *data)
Register an interest in a particular group of symbols.
Definition: legacy_listeners.c:536
void(* update_cb)(int peer, ds_data_t *dsdata, time_t update_time, int val, void *data)
Definition of the function type used for update callbacks.
Definition: transformer.h:167
TRANSFORMER_EXPORT void symbol_delete_type2(const char *name, const char *index, int fieldnum)
Delete the data associated with a type 2 index.
Definition: symbols.c:495
TRANSFORMER_EXPORT int register_type_interest(int typ, update_cb update, int id, void *data)
Register an interest in a particular DataSource type.
Definition: compat.c:277
TRANSFORMER_EXPORT char * packet_get_field_byname(ds_data_t *pkt, const char *field)
Find a field within a packet.
Definition: packet.c:113
TRANSFORMER_EXPORT ds_log_t * rtas_log
Name of the Transformer&#39;s event log.
Definition: transformer.h:435
int(* tf_nodata_cb)(tf_handle_t *handle, int peer, const char *subject, short nodata_flags, int flags, int id, void *data)
Definition of the function type used to process nodata messages.
Definition: transformer.h:124
TRANSFORMER_EXPORT ds_data_t * symbol_last_update(const char *name)
Returns the currently cached Type 1 data for a symbol.
Definition: test_autopub.c:41
int(* request_object)(int peer, char *orig, char *mapname, void **userptr)
Definition: transformer.h:391
TRANSFORMER_EXPORT int tf_handle_set_listener_finalize_cb(tf_handle_t *handle, tf_finalize_cb finalize)
Associate a callback for handle deletion with a listener.
Definition: listener.c:548
struct _ds_log ds_log_t
The log file object.
Definition: datasrc.h:186
unsigned int id
Definition: transformer.h:665
TRANSFORMER_EXPORT tf_handle_t * tf_add_provider(const char *pattern, int provider_typeflags, tf_request_cb request, tf_discard_cb discard, int val, void *data, void *reserved)
Registers the specified data provider with the Transformer core.
Definition: listener.c:581
TRANSFORMER_EXPORT tf_handle_t * tf_add_provider_nspace(ds5_namespace_t *nspace, int provider_typeflags, tf_request_cb request, tf_discard_cb discard, int val, void *data, void *reserved)
Registers the specified data provider with the Transformer core.
Definition: listener.c:634
TRANSFORMER_EXPORT void * symbol_get_userdata(const char *name, unsigned int id)
Retrieve module specific data for a given symbol and unique id.
Definition: symboluser.c:127
TRANSFORMER_EXPORT int deregister_interest(const char *name, update_cb update, int id, void *data)
Deregister an interest in a particular group of symbols.
Definition: legacy_listeners.c:689
TRANSFORMER_EXPORT void auth_invalidate_peer_perms(int peernum)
Invalidate permissions for an individual peer.
Definition: auth.c:178
char * ident
Definition: transformer.h:668
TRANSFORMER_MODULE_EXPORT void mod_exit()
Module exit function.
A data update object.
Definition: datasrc.h:2425
TRANSFORMER_EXPORT int tf_regex_namespace_add_expr(ds5_namespace_t *nspace, const char *expr, int exclude)
Adds a regular expression to a namespace.
Definition: namespaces.c:48
TRANSFORMER_EXPORT void register_userdata_funcs(userinfo_t *user)
Register a set of functions to handle a specific id.
Definition: symboluser.c:65
TRANSFORMER_EXPORT void tf_symbol_send_status(const char *name, int status, const char *message)
Send a status message for an object within the cache.
Definition: symbols.c:775
int(* tf_request_cb)(tf_handle_t *handle, int peer, const char *subject, int flags, int id, void *data)
Definition of the function type used to handle provider requests.
Definition: transformer.h:79
TRANSFORMER_EXPORT int tf_handle_set_provider_params(tf_handle_t *handle, tf_request_cb request, tf_discard_cb discard, int val, void *data)
Set the the callback parameters for a provider.
Definition: listener.c:831
TRANSFORMER_EXPORT void auth_deregister_functions()
Disable the auth API.
Definition: auth.c:151
TRANSFORMER_EXPORT int register_interest_check(const char *name, update_cb update, int id, void *data)
Register an interest in a particular group of symbols checking the provider if necessary.
Definition: legacy_listeners.c:573
void(* udpcmd_t)(int argc, char *argv[])
Definition of the function type used for udp command callbacks.
Definition: transformer.h:716
int(* tf_discard_cb)(tf_handle_t *handle, int peer, const char *subject, int flags, int id, void *data)
Definition of the function type used to handle provider discards.
Definition: transformer.h:94
TRANSFORMER_EXPORT void tf_handle_delete(tf_handle_t *handle)
Delete a handle to a listener or a provider.
Definition: listener.c:671
TRANSFORMER_EXPORT int tf_handle_set_request_cb(tf_handle_t *handle, tf_request_cb request)
Set the request callback on a provider.
Definition: listener.c:858
TRANSFORMER_EXPORT int tf_handle_set_update_cb(tf_handle_t *handle, tf_update_cb update)
Set the update callback on a listener.
Definition: listener.c:755
TRANSFORMER_EXPORT void symbol_remove_alluserdata(const char *wildcard, unsigned int id, void(*dataremover)(void *data))
Delete all userdata associated with a particular id for a group of symbols.
Definition: symboluser.c:159
TRANSFORMER_EXPORT tf_handle_t * tf_add_listener_nspace(ds5_namespace_t *nspace, int listener_typeflags, tf_update_cb update, tf_nodata_cb nodata, tf_status_cb status, int val, void *data, tf_finalize_cb finalize)
Create a new object listener for subjects that match the supplied namespace.
Definition: listener.c:364
void(* tf_finalize_cb)(int val, void *data, tf_handle_t *handle)
Definition of the function type used to call back to application when last callback for a deleted han...
Definition: transformer.h:181
TRANSFORMER_EXPORT void auth_register_functions(authfuncs_t *auth)
Register a set of functions for handling auth capabilities.
Definition: auth.c:138
TRANSFORMER_EXPORT char ** symbol_match_bytype(const char *name, int type, int *number)
Return a list of symbols matching the pattern and of the specified type.
Definition: legacy_misc.c:109
int(* map_object)(int peer, char *orig, char *destbuf, int destlen, authdirection_t direction)
Definition: transformer.h:378
TRANSFORMER_EXPORT char ** symbol_match(const char *name, int *num)
Return a list of symbols matching the specifier.
Definition: legacy_misc.c:82
TRANSFORMER_EXPORT void mod_config_parse_optional_file(const char *file)
Parse an optional module configuration file.
Definition: modules.c:606
TRANSFORMER_EXPORT char * symbol_last_field(const char *name, int fid)
Return the last received fieldvalue for a symbol.
Definition: symbols.c:319

Generated on Sat Aug 26 2017 12:36:31 for Transformer SDK For C