From 939c0c2e799734d46e3c3b784545f7c0c489c191 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Sat, 7 Aug 2021 16:58:11 +0200 Subject: migrate to Autotools --- scriptbase.h | 77 ------------------------------------------------------------ 1 file changed, 77 deletions(-) delete mode 100644 scriptbase.h (limited to 'scriptbase.h') diff --git a/scriptbase.h b/scriptbase.h deleted file mode 100644 index f7694f7..0000000 --- a/scriptbase.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * part of Hydrilla - * Scriptbase struct and functions operating on it. - * - * Copyright (C) 2021 Wojtek Kosior - * Redistribution terms are gathered in the `copyright' file. - */ - -#ifndef SCRIPTBASE_H -#define SCRIPTBASE_H - -#include - -#include - -#include "hashtable.h" - -union component { - struct script *script; - struct bag *bag; - void *any; -}; - -struct component_ref { - struct component_ref *next; - union component component; - const char *component_type; -}; - -struct script { - char *name; - char *location; - char *sha256; - bool filled; -}; - -struct bag { - char *name; - struct component_ref *components, *last_component; - bool filled; -}; - -struct page { - char *pattern; - union component payload; - const char *payload_type; -}; - -struct scriptbase { - char *repo_url; - hashtable_t scripts; - hashtable_t bags; - hashtable_t pages; -}; - -int catalogue_component(const char *path, cJSON *index_json, - struct scriptbase *base); - -int scriptbase_init(struct scriptbase *base, const char *repo_url); - -void scriptbase_destroy(struct scriptbase *base); - -const struct script *get_script(const char *name, struct scriptbase *base); -const struct bag *get_bag(const char *name, struct scriptbase *base); -const struct page *get_pattern(const char *pattern, struct scriptbase *base); - -char *get_script_json(const char *name, struct scriptbase *base); -char *get_bag_json(const char *name, struct scriptbase *base); -char *get_pattern_json(const char *name, struct scriptbase *base); -char *get_page_query_json(const char *name, struct scriptbase *base); - -int init_url_lookup_regex(void); -void destroy_url_lookup_regex(void); -int lookup_url(const char *url, struct scriptbase *base, - int (*callback)(struct page*, void*), void *data); - -#endif /* SCRIPTBASE_H */ -- cgit v1.2.3