hl7parse
|
private message structures More...
#include "node.h"
Go to the source code of this file.
Classes | |
struct | message_state_t |
holds callbacks and associated variables More... | |
Typedefs | |
typedef struct message_t | message_t |
typedef struct message_state_t | message_state_t |
holds callbacks and associated variables | |
Functions | |
message_state_t * | message_state_new () |
initializes an message_state_t structure | |
void | message_state_free (message_state_t *ms) |
frees an messate_state_t structure | |
private message structures
This file describes a structure that is used to keep the state of the parser while parsing a hl7 file. It is primarely used for registering callback functions.
If you want to analyze parts of the document while the parser is still running or you are using it in a multi-threaded environment, then there is the possibility to add callback functions. The following callback hooks are available:
void (*cb_progress)(message_t *message, size_t total, size_t current);
void (*cb_start)(message_t *message)
void (*cb_end)(message_t *message, size_t max, size_t current, int exit_code)
void (*cb_segment)(message_t *message, size_t num, char name[3])
Also, you can controll how often the cb_progress()
callback is fired, default is every 1% of progress (does not fire on files smaller than 100 bytes).
You may register callbacks as follows: