aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/inputPlugin.h')
-rw-r--r--src/inputPlugin.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/inputPlugin.h b/src/inputPlugin.h
index 9f57037fb..9e1ff395d 100644
--- a/src/inputPlugin.h
+++ b/src/inputPlugin.h
@@ -1,6 +1,7 @@
#ifndef INPUT_PLUGIN_H
#define INPUT_PLUGIN_H
+#include "../config.h"
#include "inputStream.h"
#include "decode.h"
#include "outputBuffer.h"
@@ -9,8 +10,6 @@
#define INPUT_PLUGIN_STREAM_FILE 0x01
#define INPUT_PLUGIN_STREAM_URL 0x02
-#define INPUT_PLUGIN_NAME_LENGTH 64
-
typedef int (* InputPlugin_streamDecodeFunc) (OutputBuffer *, DecoderControl *,
InputStream *);
@@ -19,7 +18,7 @@ typedef int (* InputPlugin_fileDecodeFunc) (OutputBuffer *, DecoderControl *);
typedef MpdTag * (* InputPlugin_tagDupFunc) (char * utf8file);
typedef struct _InputPlugin {
- char name[INPUT_PLUGIN_NAME_LENGTH];
+ char * name;
InputPlugin_streamDecodeFunc streamDecodeFunc;
InputPlugin_fileDecodeFunc fileDecodeFunc;
InputPlugin_tagDupFunc tagDupFunc;
@@ -28,25 +27,15 @@ typedef struct _InputPlugin {
char ** mimeTypes;
} InputPlugin;
-/* interface for constructing a plugin */
-
-InputPlugin * newInputPlugin(char * name, InputPlugin_streamDecodeFunc
- streamDecodeFunc, InputPlugin_fileDecodeFunc fileDecodeFunc,
- InputPlugin_tagDupFunc tagDupFunc, unsigned char streamTypes);
-void addSuffixToInputPlugin(InputPlugin * inPlugin, char * suffix);
-void addMimeTypeToInputPlugin(InputPlugin * inPlugin, char * suffix);
-void freeInputPlugin(InputPlugin * inputPlugin);
-
/* individual functions to load/unload plugins */
void loadInputPlugin(InputPlugin * inputPlugin);
-/* this free's inputPlugin as well! */
void unloadInputPlugin(InputPlugin * inputPlugin);
/* interface for using plugins */
InputPlugin * getInputPluginFromSuffix(char * suffix);
-InputPlugin * getInputPluginFromMimeTypes(char * mimeType);
+InputPlugin * getInputPluginFromMimeType(char * mimeType);
InputPlugin * getInputPluginFromName(char * name);