Publisher API data structures hold information for callbacks, initialization, and market data messages.
typedef struct { void (*shutdown)(void); /* notifies caller of shutdown request */ } PUB_CALLBACKS;
Sample structure that holds information needed by the publisher for initialization. See pub_initialize for an explanation of the members of this class.
Feed handler initialization code must specify the version of the Publisher API used, prior to calling pub_initialize(). The current version is 1.
typedef struct { /* always set to PUB_STARTUP_VERSION */ size_t version; /* directory in which to locate configuration file */ const char * config_dir; /* directory in which to locate RDS templates */ const char * template_dir; /* indicates what type of publisher this is */ const char * component_subtype; /* enables/disables strict checking of messages as they are being built */ bool strict_check; /* indicates whether the feed handler has initialized the logger */ bool own_logger; /* callbacks to the feed handler */ PUB_CALLBACKS callbacks; } PUB_STARTUP;
typedef struct { /* MESSAGE_DEFN pointer */ void * message_defn; uint16_t current_field_num; /* location of destination message buffer */ uchar * dest_buffer; /* location of next fixed length value */ uchar * current_fixed_data; /* location of next variable length value */ uchar * current_variable_data /* length of market data message */ uint16_t message_length;} PUB_SEND_MESSAGE_CONTEXT;