1
0
mirror of https://github.com/lxsang/ant-http synced 2024-07-03 13:39:46 +02:00
ant-http/plugin_manager.h

21 lines
560 B
C

#ifndef PLUGIN_MANAGER_H
#define PLUGIN_MANAGER_H
#include <dlfcn.h>
#include "libs/utils.h"
#include "libs/handle.h"
#include "http_server.h"
struct plugin_entry {
struct plugin_entry *next;
char *pname;
void *handle;
};
/* lookup: look for s in hashtab */
struct plugin_entry *plugin_lookup(char *s);
/* install: put (name, defn) in hashtab */
struct plugin_entry *plugin_load(char *name);
void unload_all_plugin();
void unload_plugin(struct plugin_entry*);
void unload_plugin_by_name(const char*);
void * plugin_from_file(char* name);
#endif