From 1b8244b7f354cafc3aff2f27cbc9112cd1e45bd8 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Mon, 24 Apr 2006 08:44:04 +0000 Subject: [PATCH] Add auth handler to plugin --- src/db-gdbm.c | 1 + src/plugin.c | 2 +- src/plugins/mtd-plugins.h | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/db-gdbm.c b/src/db-gdbm.c index 51a4f11a..9cc3df11 100644 --- a/src/db-gdbm.c +++ b/src/db-gdbm.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include "err.h" diff --git a/src/plugin.c b/src/plugin.c index faf1ea8a..9c8e1a56 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -89,7 +89,7 @@ void pi_log(int, char *, ...); /* db helpers */ int pi_db_count(void); int pi_db_enum_start(char **pe, DBQUERYINFO *pinfo); -int pi_db_enum_fetch_row(char **pe, char ***row, DBQUERYINFO *pinfo); +int pi_db_enum_fetch_row(char **pe, PACKED_MP3FILE *row, DBQUERYINFO *pinfo); int pi_db_enum_end(char **pe); void pi_stream(WS_CONNINFO *pwsc, DBQUERYINFO *pqi, char *id); diff --git a/src/plugins/mtd-plugins.h b/src/plugins/mtd-plugins.h index 3064ab31..5e255f7e 100644 --- a/src/plugins/mtd-plugins.h +++ b/src/plugins/mtd-plugins.h @@ -22,7 +22,8 @@ struct tag_xmlstruct; typedef struct tag_xmlstruct XMLSTRUCT; typedef struct tag_plugin_output_fn { - void (*handler)(WS_CONNINFO *pwsc); + void(*handler)(WS_CONNINFO *pwsc); + int(*auth)(WS_CONNINFO *pwsc, char *username, char *pw); } PLUGIN_OUTPUT_FN; typedef struct tag_plugin_info { @@ -31,7 +32,7 @@ typedef struct tag_plugin_info { char *server; char *url; /* regex of namespace to handle if OUTPUT type */ void *handler_functions; - void *input_functions; + void *fn; /* input functions*/ } PLUGIN_INFO; /* xml helpers for output plugins */