2017-07-29 22:00:34 +02:00
|
|
|
#ifndef PLUGIN_H
|
|
|
|
#define PLUGIN_H
|
|
|
|
|
2016-02-26 14:32:13 +01:00
|
|
|
#ifdef USE_DB
|
2015-10-22 11:39:11 +02:00
|
|
|
#include "dbhelper.h"
|
2016-02-26 14:32:13 +01:00
|
|
|
#endif
|
2017-07-29 23:54:43 +02:00
|
|
|
#include "ws.h"
|
2015-10-22 11:39:11 +02:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *name;
|
|
|
|
char *dbpath;
|
|
|
|
char * htdocs;
|
|
|
|
char*pdir;
|
2017-07-29 22:00:34 +02:00
|
|
|
int sport;
|
2015-10-22 11:39:11 +02:00
|
|
|
} plugin_header;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
typedef void(*call)();
|
2016-02-26 14:32:13 +01:00
|
|
|
#ifdef USE_DB
|
2015-10-22 11:39:11 +02:00
|
|
|
typedef sqlite3* sqldb;
|
2016-02-26 14:32:13 +01:00
|
|
|
#endif
|
2015-10-22 11:39:11 +02:00
|
|
|
extern plugin_header __plugin__;
|
|
|
|
extern call __init__;
|
|
|
|
|
2017-07-29 22:00:34 +02:00
|
|
|
|
2016-02-26 14:32:13 +01:00
|
|
|
#ifdef USE_DB
|
2015-10-22 11:39:11 +02:00
|
|
|
sqldb getdb();
|
2016-10-30 16:14:04 +01:00
|
|
|
sqldb __getdb(char *name);
|
2016-02-26 14:32:13 +01:00
|
|
|
#endif
|
2017-07-29 22:00:34 +02:00
|
|
|
|
|
|
|
char* route(const char*);
|
|
|
|
char* htdocs(const char*);
|
|
|
|
char* config_dir();
|
2015-10-22 11:39:11 +02:00
|
|
|
/*Default function for plugin*/
|
2016-10-29 15:02:16 +02:00
|
|
|
void handler(int, const char*,const char*,dictionary);
|
2017-07-29 22:00:34 +02:00
|
|
|
|
|
|
|
#endif
|