ant-http/plugin_manager.h

20 lines
503 B
C
Raw Normal View History

2017-07-29 22:00:34 +02:00
#ifndef PLUGIN_MANAGER_H
#define PLUGIN_MANAGER_H
#include "lib/dictionary.h"
2024-03-12 21:59:50 +01:00
#define PLUGIN_HANDLER "handle"
2015-10-22 11:39:11 +02:00
struct plugin_entry {
struct plugin_entry *next;
2024-03-12 21:59:50 +01:00
char *name;
2015-10-22 11:39:11 +02:00
void *handle;
2024-03-12 21:59:50 +01:00
dictionary_t instances;
2015-10-22 11:39:11 +02:00
};
2024-03-12 21:59:50 +01:00
/* lookup: look for s in hashtable */
2015-10-22 11:39:11 +02:00
struct plugin_entry *plugin_lookup(char *s);
2024-03-12 21:59:50 +01:00
/* install: put (name, defn) in hashtable */
struct plugin_entry *plugin_load(char *name, dictionary_t config);
2015-10-22 11:39:11 +02:00
void unload_all_plugin();
2016-03-04 11:38:08 +01:00
void unload_plugin(struct plugin_entry*);
2017-07-29 22:00:34 +02:00
#endif