25 #ifndef TEMPLATE_FUNCTION_H_INCLUDED
26 #define TEMPLATE_FUNCTION_H_INCLUDED
32 #define TEMPLATE_INVOKE_MAX_ARGS 64
38 typedef struct _LogTemplateInvokeArgs
58 gboolean (*
prepare)(LogTemplateFunction *
self, gpointer
state, LogTemplate *parent, gint
argc, gchar *
argv[],
73 void (*
free_fn)(LogTemplateFunction *
self);
79 #define TEMPLATE_FUNCTION_PROTOTYPE(prefix) \
81 prefix ## _construct(Plugin *self)
83 #define TEMPLATE_FUNCTION_DECLARE(prefix) \
84 TEMPLATE_FUNCTION_PROTOTYPE(prefix);
87 #define TEMPLATE_FUNCTION(state_struct, prefix, prepare, eval, call, free_state, arg) \
88 TEMPLATE_FUNCTION_PROTOTYPE(prefix) \
90 static LogTemplateFunction func = { \
91 sizeof(state_struct), \
102 #define TEMPLATE_FUNCTION_PLUGIN(x, tf_name) \
104 .type = LL_CONTEXT_TEMPLATE_FUNC, \
106 .construct = x ## _construct, \
#define TEMPLATE_INVOKE_MAX_ARGS
Definition: function.h:32
gint argc
Definition: gprocess.c:130
gchar ** argv
Definition: gprocess.c:131
NVType LogMessageValueType
Definition: logmsg.h:195
Definition: function.h:39
gint num_messages
Definition: function.h:42
LogMessage ** messages
Definition: function.h:41
LogTemplateEvalOptions * options
Definition: function.h:44
Definition: function.h:50
void(* free_state)(gpointer s)
Definition: function.h:70
gboolean(* prepare)(LogTemplateFunction *self, gpointer state, LogTemplate *parent, gint argc, gchar *argv[], GError **error)
Definition: function.h:58
void(* call)(LogTemplateFunction *self, gpointer state, const LogTemplateInvokeArgs *args, GString *result, LogMessageValueType *type)
Definition: function.h:66
gpointer arg
Definition: function.h:76
void(* free_fn)(LogTemplateFunction *self)
Definition: function.h:73
void(* eval)(LogTemplateFunction *self, gpointer state, LogTemplateInvokeArgs *args)
Definition: function.h:63
gint size_of_state
Definition: function.h:54
GString * result
Definition: test_lexer_block.c:34