Transformer SDK For C  8.0.3.342099-79b6f512
transformer.h
Go to the documentation of this file.
1 /*
2  * Caplin Transformer SDK
3  *
4  * Copyright CAPLIN Systems Ltd 2000-2019
5  *
6  * $Author$
7  * $DateTime$
8  * $Change$
9  * $Id$
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 "8.0.3"
25 
26 #define TRANSFORMER_MAJOR_VERSION 8
27 #define TRANSFORMER_MINOR_VERSION 0
28 #define TRANSFORMER_PATCH_VERSION 3
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 #ifndef CONF_DARWIN
185 enum
186 {
187  FALSE = 0,
188  TRUE = 1,
189 };
190 #endif
191 #endif
192 
193 
194 TRANSFORMER_EXPORT int register_interest(const char *name, update_cb update,int id, void *data);
195 
196 TRANSFORMER_EXPORT int register_interest_check(const char *name, update_cb update,int id, void *data);
197 
198 TRANSFORMER_EXPORT int deregister_interest(const char *name, update_cb update,int id, void *data);
199 
200 TRANSFORMER_EXPORT int register_type_interest(int typ, update_cb update, int id, void *data);
201 
202 TRANSFORMER_EXPORT int deregister_type_interest(int typ, update_cb update, int id, void *data);
203 
204 TRANSFORMER_EXPORT void free_array(int argc, char *argv[]);
205 
221 typedef int (*provider_cb)(int peer, char *name, int isrequest);
222 
228 #define PROVIDER_DENY -1
229 
234 #define PROVIDER_OK 0
235 
240 #define TF_LISTENER_DEFAULT 0
241 
249 #define TF_LISTENER_WILDNOW 2
250 
258 #define TF_LISTENER_WILDNEXT 4
259 
270 #define TF_LISTENER_WILDREMOVE 8
271 
276 #define TF_LISTENER_WILDCARD (TF_LISTENER_WILDNOW|TF_LISTENER_WILDNEXT)
277 
283 #define TF_LISTENER_NOASKPEERS 16
284 
289 #define TF_LISTENER_NOASKMODULES 32
290 
299 #define TF_LISTENER_ACCESSORY (1|TF_LISTENER_NOASKPEERS|TF_LISTENER_NOASKMODULES)
300 
309 #define TF_LISTENER_PROVIDEONCE 64
310 
317 #define TF_LISTENER_NOREGEX 128
318 
325 #define TF_LISTENER_ONCE 256
326 
327 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);
328 
329 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);
330 
331 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);
332 
333 
334 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);
335 
336 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, tf_finalize_cb finalize);
337 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, tf_finalize_cb finalize);
338 
339 TRANSFORMER_EXPORT void tf_handle_delete(tf_handle_t *handle);
340 
341 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);
342 
343 TRANSFORMER_EXPORT int tf_handle_set_provider_params(tf_handle_t *handle, tf_request_cb request, tf_discard_cb discard, int val, void *data);
344 
345 TRANSFORMER_EXPORT void tf_handle_set_listener_data(tf_handle_t *handle, void *data);
346 
347 TRANSFORMER_EXPORT int tf_handle_set_update_cb(tf_handle_t *handle, tf_update_cb update);
348 
349 TRANSFORMER_EXPORT int tf_handle_set_nodata_cb(tf_handle_t *handle, tf_nodata_cb nodata);
350 
351 TRANSFORMER_EXPORT int tf_handle_set_status_cb(tf_handle_t *handle, tf_status_cb status);
352 
353 TRANSFORMER_EXPORT int tf_handle_set_request_cb(tf_handle_t *handle, tf_request_cb request);
354 
355 TRANSFORMER_EXPORT int tf_handle_set_discard_cb(tf_handle_t *handle, tf_discard_cb discard);
356 
357 TRANSFORMER_EXPORT int tf_handle_set_listener_finalize_cb(tf_handle_t *handle, tf_finalize_cb finalize);
358 
359 TRANSFORMER_EXPORT int tf_handle_set_callback_params(tf_handle_t *handle, int id, void *data);
360 
361 
362 TRANSFORMER_EXPORT ds5_namespace_t *tf_create_globbed_namespace(const char *globbed);
363 TRANSFORMER_EXPORT ds5_namespace_t *tf_create_regex_namespace(const char *expr);
364 TRANSFORMER_EXPORT int tf_regex_namespace_add_expr(ds5_namespace_t *nspace, const char *expr, int exclude);
365 
366 
367 
371 typedef enum _authdirection
372 {
376 
381 {
382  int (*map_object)(int peer, char *orig, char *destbuf, int destlen, authdirection_t direction);
395  int (*request_object)(int peer, char *orig, char *mapname, void **userptr);
406  int (*discard_object)(int peer, char *orig, char *mapname, void **userptr);
407  int *(*return_peers)(char *name, int *peers_num);
408  ds_data_t *(*map_fields)(int peerno, char *basename, ds_data_t *orig, void **userptr, int *cancel_sub);
409 };
410 
411 TRANSFORMER_EXPORT void auth_register_functions(authfuncs_t *auth);
412 
413 TRANSFORMER_EXPORT void auth_deregister_functions();
414 
415 TRANSFORMER_EXPORT void auth_invalidate_perms();
416 
417 TRANSFORMER_EXPORT void auth_invalidate_peer_perms(int peernum);
418 
419 TRANSFORMER_EXPORT int tf_register_function(const char *name, void *function);
420 
421 TRANSFORMER_EXPORT void *tf_find_function(const char *name);;
422 
423 TRANSFORMER_EXPORT int file_reading();
424 
425 TRANSFORMER_EXPORT void file_write_pkt(FILE *fp, ds_data_t *pkt, time_t tim);
426 
427 TRANSFORMER_EXPORT void mod_config_parse_file(const char *file);
428 
429 TRANSFORMER_EXPORT void mod_config_parse_optional_file(const char *file);
430 
431 TRANSFORMER_EXPORT char *filename_expand(char *format);
432 
439 TRANSFORMER_EXPORT ds_log_t *rtas_log;
440 
441 TRANSFORMER_EXPORT int c_debug_level;
442 
443 #define DBG(level) ( ( c_debug_level >= (level) ) )
444 
445 enum
446 {
447  DBG_CRIT = 1,
448  DBG_ERROR,
449  DBG_NOTIFY,
450  DBG_WARN,
451  DBG_INFO,
452  DBG_DEBUG
453 };
454 
455 TRANSFORMER_EXPORT int debug_level(char *text);
456 
457 TRANSFORMER_EXPORT char *debug_string(int level);
458 
467 #define PACKET_STORE 1
468 
477 #define PACKET_PUBLISH 2
478 
491 #define PACKET_OWRITE 4
492 
508 #define PACKET_FREE 8
509 
520 #define PACKET_NOLISTEN 32
521 
527 #define PACKET_UPDATE 128
528 
538 #define PACKET_NOFEEDTIME 256
539 
540 TRANSFORMER_EXPORT char *packet_get_field_byname(ds_data_t *pkt, const char *field);
541 
542 TRANSFORMER_EXPORT char *packet_get_field(ds_data_t *pkt, int fid);
543 
544 TRANSFORMER_EXPORT int packet_update(ds_data_t *dest, ds_data_t *src);
545 
546 TRANSFORMER_EXPORT int packet_merge(ds_data_t *dest, ds_data_t *src, int *newfields);
547 
548 TRANSFORMER_EXPORT int packet_update_field_byname(ds_data_t *dest, const char *field, const char *value);
549 
550 TRANSFORMER_EXPORT int packet_update_field(ds_data_t *dest, int fid, const char *value);
551 
552 TRANSFORMER_EXPORT ds_data_t *packet_clone(ds_data_t *src);
553 
554 TRANSFORMER_EXPORT int packet_delete_field(ds_data_t *pkt, int index);
555 
556 TRANSFORMER_EXPORT void packet_contrib(ds_data_t *pkt,void *data,int storeflags);
557 
558 TRANSFORMER_EXPORT void packet_log_dump(ds_log_t *log,const char *label,ds_data_t *pkt);
559 
560 TRANSFORMER_EXPORT void register_provider(const char *wildcard, provider_cb provider);
561 
562 TRANSFORMER_EXPORT void deregister_provider(const char *wildcard, provider_cb provider);
563 
574 #define SYMBOL_PUBLISH 2
575 
586 #define SYMBOL_NOSAVE 16
587 
598 #define SYMBOL_NOLISTEN 32
599 
600 TRANSFORMER_EXPORT int symbol_create(const char *name, unsigned flags);
601 
602 TRANSFORMER_EXPORT ds_data_t *symbol_last_update(const char *name);
603 
604 TRANSFORMER_EXPORT time_t symbol_last_updatetime(const char *name);
605 
606 TRANSFORMER_EXPORT ds_data_t *symbol_last_mmaker_update(const char *name, const char *mmaker);
607 
608 TRANSFORMER_EXPORT char **symbol_return_mmakers(const char *name, int *num);
609 
610 TRANSFORMER_EXPORT char *symbol_last_field_byname(const char *name, const char *field);
611 
612 TRANSFORMER_EXPORT char *symbol_last_field(const char *name, int fid);
613 
614 TRANSFORMER_EXPORT char **symbol_historic_field(const char *name, int fid, int *number);
615 
616 TRANSFORMER_EXPORT void symbol_add_constant(const char *name, int fid, const char *value);
617 
618 TRANSFORMER_EXPORT char *symbol_get_constant(const char *name, int fid);
619 
620 TRANSFORMER_EXPORT char **symbol_match(const char *name, int *num);
621 
622 TRANSFORMER_EXPORT char **symbol_match_bytype(const char *name, int type, int *number);
623 
624 TRANSFORMER_EXPORT void symbol_delete_type2(const char *name, const char *index, int fieldnum);
625 
626 TRANSFORMER_EXPORT void symbol_delete_all_mmaker(const char *name);
627 
628 TRANSFORMER_EXPORT void symbol_delete_mmaker(const char *symname, const char *mmaker);
629 
630 TRANSFORMER_EXPORT void symbol_send_nodata(const char *symname, u_short flags);
631 
632 TRANSFORMER_EXPORT int symbol_get_type(const char *objname);
633 
634 TRANSFORMER_EXPORT int symbol_request(const char *name, update_cb update,int id, void *data);
635 
636 TRANSFORMER_EXPORT int symbol_discard(const char *name, update_cb update,int id, void *data);
637 
638 TRANSFORMER_EXPORT int tf_symbol_get_type(const char *objname);
639 
640 TRANSFORMER_EXPORT int tf_symbol_get_status(const char *name, char **status_message_ptr);
641 
642 TRANSFORMER_EXPORT void tf_symbol_send_status(const char *name, int status, const char *message);
643 
644 TRANSFORMER_EXPORT ds_data_t *symbol_last_permission_update(const char *name, const char *key);
645 
646 TRANSFORMER_EXPORT char **symbol_return_permission_keys(const char *name, int *num);
647 
648 TRANSFORMER_EXPORT void symbol_delete_permission_key(const char *name, const char *index);
649 
650 TRANSFORMER_EXPORT void symbol_delete_all_permission_keys(const char *name);
651 
652 TRANSFORMER_EXPORT char **tf_symbol_match(const char *pattern, int *number);
653 
654 TRANSFORMER_EXPORT char **tf_symbol_match_bytype(const char *pattern, int type, int *number);
655 
656 TRANSFORMER_EXPORT void symbol_unset_flag(const char *subject, unsigned int flags);
657 
658 TRANSFORMER_EXPORT void symbol_set_flag(const char *subject, unsigned int flags);
659 
660 
667 struct _userinfo
668 {
669  unsigned int id;
672  char *ident;
675  char *desc;
678  int (*strprint)(char *dest, size_t len, void *data);
682  void (*filewrite)(FILE *fp, void *data);
685  void *(*fileread)(FILE *fp, char *name);
688 };
689 
690 TRANSFORMER_EXPORT void *symbol_get_userdata(const char *name,unsigned int id);
691 
692 TRANSFORMER_EXPORT void symbol_remove_alluserdata(const char *wildcard,unsigned int id, void (*dataremover)(void *data));
693 
694 TRANSFORMER_EXPORT void symbol_remove_userdata(const char *name,unsigned int id);
695 
696 TRANSFORMER_EXPORT void symbol_set_userdata(const char *name, unsigned int id, void *ptr);
697 
698 TRANSFORMER_EXPORT void register_userdata_funcs(userinfo_t *user);
699 
700 TRANSFORMER_EXPORT void deregister_userdata_funcs(unsigned int id);
701 
720 typedef void (*udpcmd_t)(int argc,char *argv[]);
721 
722 TRANSFORMER_EXPORT int udpsignal_addjob(const char *cmd, udpcmd_t callback, const char *msg);
723 
724 TRANSFORMER_EXPORT int udpsignal_deljob(const char *cmd, udpcmd_t callback);
725 
726 TRANSFORMER_EXPORT void udpsignal_send(const char *message);
727 
728 TRANSFORMER_EXPORT void udpsignal_send_argv(const char *command, char *argv[]);
729 
744 #define CMD_DUMP_MEMORY "memory_write"
745 
763 #define CMD_RESTORE_MEMORY "memory_read"
764 
774 #define CMD_SYMBOL_DEL_PKTS "symbol_delete"
775 
783 #define CMD_SYMBOL_PUBLISH "symbol_publish"
784 
792 #define CMD_SOURCE_UP "source_up"
793 
801 #define CMD_SOURCE_DOWN "source_down"
802 
814 TRANSFORMER_MODULE_EXPORT void mod_init(char *module_name);
815 
820 TRANSFORMER_EXPORT char * mon_module_setup(const char *name,const char *description,const char *version);
821 
822 #ifdef __cplusplus
823 }
824 #endif
825 
826 #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
_authdirection
Define the mapping direction used for the authfuncs_t::map_object() call.
Definition: transformer.h:371
TRANSFORMER_EXPORT int tf_symbol_get_type(const char *objname)
Return the type of a particular object.
Definition: symbols.c:605
Define the callback functions that should be implemented by a permissioning module.
Definition: transformer.h:380
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:444
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:221
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:728
TRANSFORMER_EXPORT void mod_config_parse_file(const char *file)
Parse a mandatory module configuration file.
Definition: modules.c:368
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: listener.c:323
TRANSFORMER_EXPORT int packet_update_field(ds_data_t *dest, int fid, const char *value)
Update a field within a packet.
Definition: packet.c:284
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:374
TRANSFORMER_MODULE_EXPORT void mod_init(char *module_name)
Module initialisation function.
Definition: formatter.c:95
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:742
char * desc
Definition: transformer.h:675
Defines the functions required to support userdata preservation.
Definition: transformer.h:667
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:57
TRANSFORMER_EXPORT void symbol_delete_all_mmaker(const char *name)
Delete all the Type 2 data associated with a symbol.
Definition: symbols.c:571
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:334
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:816
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:245
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:127
TRANSFORMER_EXPORT void symbol_delete_all_permission_keys(const char *name)
Delete all the data associated with a permission object.
Definition: symbols.c:588
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: symbols.c:684
Definition: transformer.h:373
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:149
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:895
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:933
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:792
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:706
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:901
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:622
TRANSFORMER_EXPORT void symbol_delete_mmaker(const char *symname, const char *mmaker)
Delete the data associated with a type 2 index.
Definition: symbols.c:552
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 int tf_handle_set_callback_params(tf_handle_t *handle, int id, void *data)
Set the callback parameters on a handle.
Definition: listener.c:919
TRANSFORMER_EXPORT ds_data_t * packet_clone(ds_data_t *src)
Duplicate a DataSource packet.
Definition: packet.c:307
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:431
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:537
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:92
TRANSFORMER_EXPORT ds_log_t * rtas_log
Name of the Transformer&#39;s event log.
Definition: transformer.h:439
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: symbols.c:70
int(* request_object)(int peer, char *orig, char *mapname, void **userptr)
Definition: transformer.h:395
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, tf_finalize_cb finalize)
Registers the specified data provider with the Transformer core.
Definition: listener.c:581
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:178
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:174
unsigned int id
Definition: transformer.h:669
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:690
TRANSFORMER_EXPORT void auth_invalidate_peer_perms(int peernum)
Invalidate permissions for an individual peer.
Definition: auth.c:178
char * ident
Definition: transformer.h:672
A data update object.
Definition: datasrc.h:2477
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:778
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:844
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:574
void(* udpcmd_t)(int argc, char *argv[])
Definition of the function type used for udp command callbacks.
Definition: transformer.h:720
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:672
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:871
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:768
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:382
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:385
TRANSFORMER_EXPORT char * symbol_last_field(const char *name, int fid)
Return the last received fieldvalue for a symbol.
Definition: symbols.c:319
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, tf_finalize_cb finalize)
Registers the specified data provider with the Transformer core.
Definition: listener.c:635

Generated on Wed Dec 4 2024 17:41:36 for Transformer SDK For C