summaryrefslogtreecommitdiff
path: root/src/block-parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/block-parser.h')
-rw-r--r--src/block-parser.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/block-parser.h b/src/block-parser.h
index 96c7fb8..edf6dd2 100644
--- a/src/block-parser.h
+++ b/src/block-parser.h
@@ -26,6 +26,11 @@ G_BEGIN_DECLS
typedef struct BlockParser BlockParser;
+/*
+ * conditional function callback, arguments passed as strings. Returning TRUE means not to ignore the block.
+ */
+typedef gboolean (*BlockParserConditionalFunction) (gchar **args, gpointer user_data);
+
BlockParser * block_parser_new ();
@@ -47,6 +52,12 @@ void block_parser_set_conditionals (BlockParser *parser, GHashTable *conditional
void block_parser_register_key (BlockParser *parser, const gchar *key, const gchar *replace_key);
/*
+ * block_parser_register_function: function called to determine whether a block should be ignored or not
+ *
+ */
+void block_parser_register_function (BlockParser *parser, const gchar *conditional_name, BlockParserConditionalFunction callback, gpointer user_data);
+
+/*
* block_parser_get_data: return retrieved data or NULL if none read yet
* returns newly allocated string, caller is responsible for freeing
*