From e41be362a1dc5691721d72b7f915e32d7f5272bb Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:08 +0200 Subject: renamed InputPlugin to struct decoder_plugin "decoder plugin" is a better name than "input plugin", since the plugin does not actually do the input - InputStream does. Also don't use typedef, so we can forward-declare it if required. --- src/inputPlugin.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'src/inputPlugin.c') diff --git a/src/inputPlugin.c b/src/inputPlugin.c index 1ab118ceb..5bf2bdaa7 100644 --- a/src/inputPlugin.c +++ b/src/inputPlugin.c @@ -17,10 +17,11 @@ */ #include "inputPlugin.h" +#include "decoder_api.h" static List *inputPlugin_list; -void loadInputPlugin(InputPlugin * inputPlugin) +void loadInputPlugin(struct decoder_plugin * inputPlugin) { if (!inputPlugin) return; @@ -33,7 +34,7 @@ void loadInputPlugin(InputPlugin * inputPlugin) insertInList(inputPlugin_list, inputPlugin->name, (void *)inputPlugin); } -void unloadInputPlugin(InputPlugin * inputPlugin) +void unloadInputPlugin(struct decoder_plugin * inputPlugin) { if (inputPlugin->finishFunc) inputPlugin->finishFunc(); @@ -51,11 +52,11 @@ static int stringFoundInStringArray(const char *const*array, const char *suffix) return 0; } -InputPlugin *getInputPluginFromSuffix(const char *suffix, unsigned int next) +struct decoder_plugin *getInputPluginFromSuffix(const char *suffix, unsigned int next) { static ListNode *pos; ListNode *node; - InputPlugin *plugin; + struct decoder_plugin *plugin; if (suffix == NULL) return NULL; @@ -80,11 +81,11 @@ InputPlugin *getInputPluginFromSuffix(const char *suffix, unsigned int next) return NULL; } -InputPlugin *getInputPluginFromMimeType(const char *mimeType, unsigned int next) +struct decoder_plugin *getInputPluginFromMimeType(const char *mimeType, unsigned int next) { static ListNode *pos; ListNode *node; - InputPlugin *plugin; + struct decoder_plugin *plugin; if (mimeType == NULL) return NULL; @@ -103,23 +104,23 @@ InputPlugin *getInputPluginFromMimeType(const char *mimeType, unsigned int next) return NULL; } -InputPlugin *getInputPluginFromName(const char *name) +struct decoder_plugin *getInputPluginFromName(const char *name) { void *plugin = NULL; findInList(inputPlugin_list, name, &plugin); - return (InputPlugin *) plugin; + return (struct decoder_plugin *) plugin; } void printAllInputPluginSuffixes(FILE * fp) { ListNode *node = inputPlugin_list->firstNode; - InputPlugin *plugin; + struct decoder_plugin *plugin; const char *const*suffixes; while (node) { - plugin = (InputPlugin *) node->data; + plugin = (struct decoder_plugin *) node->data; suffixes = plugin->suffixes; while (suffixes && *suffixes) { fprintf(fp, "%s ", *suffixes); -- cgit v1.2.3