diff src/audacious/plugin.h @ 3706:fc17623eb561

Export MIME/Custom URI APIs
author William Pitcock <nenolod@atheme.org>
date Sun, 07 Oct 2007 18:00:57 -0500
parents 38259e9394a2
children 1baa8e00c9d7
line wrap: on
line diff
--- a/src/audacious/plugin.h	Sun Oct 07 14:05:16 2007 -0500
+++ b/src/audacious/plugin.h	Sun Oct 07 18:00:57 2007 -0500
@@ -42,6 +42,8 @@
 #include "audacious/tuple_formatter.h"
 #include "audacious/eventqueue.h"
 #include "audacious/configdb.h"
+#include "audacious/mime.h"
+#include "audacious/custom_uri.h"
 
 #define PLUGIN(x)         ((Plugin *)(x))
 #define INPUT_PLUGIN(x)   ((InputPlugin *)(x))
@@ -268,6 +270,14 @@
            const gchar *argument);
     gchar *(*tuple_formatter_process_construct)(Tuple *tuple, const gchar *string);
 
+    /* MIME types */
+    InputPlugin *(*mime_get_plugin)(const gchar *mimetype);
+    void (*mime_set_plugin)(const gchar *mimetype, InputPlugin *ip);
+
+    /* Custom URI registry */
+    InputPlugin *(*uri_get_plugin)(const gchar *filename);
+    void (*uri_set_plugin)(const gchar *uri, InputPlugin *ip);
+
 };
 
 /* Convenience macros for accessing the public API. */
@@ -349,6 +359,12 @@
 #define aud_tuple_formatter_process_function		_audvt->tuple_formatter_process_function
 #define aud_tuple_formatter_process_construct		_audvt->tuple_formatter_process_construct
 
+#define aud_mime_get_plugin		_audvt->mime_get_plugin
+#define aud_mime_set_plugin		_audvt->mime_set_plugin
+
+#define aud_uri_get_plugin		_audvt->uri_get_plugin
+#define aud_uri_set_plugin		_audvt->uri_set_plugin
+
 /* for multi-file plugins :( */
 extern struct _AudaciousFuncTableV1 *_audvt;
 
@@ -532,7 +548,4 @@
 
 G_END_DECLS
 
-#include "audacious/mime.h"
-#include "audacious/custom_uri.h"
-
 #endif