Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __XMMS_PLUGIN_INT_H__
00021 #define __XMMS_PLUGIN_INT_H__
00022
00023 #include "xmms/xmms_object.h"
00024 #include "xmms/xmms_plugin.h"
00025 #include "xmms/xmms_config.h"
00026
00027 #include <gmodule.h>
00028
00029 typedef struct xmms_plugin_St {
00030 xmms_object_t object;
00031 GModule *module;
00032
00033 xmms_plugin_type_t type;
00034 const gchar *name;
00035 const gchar *shortname;
00036 const gchar *description;
00037 const gchar *version;
00038 } xmms_plugin_t;
00039
00040
00041
00042
00043
00044 gboolean xmms_plugin_init (const gchar *path);
00045 void xmms_plugin_shutdown (void);
00046 void xmms_plugin_destroy (xmms_plugin_t *plugin);
00047
00048 typedef gboolean (*xmms_plugin_foreach_func_t)(xmms_plugin_t *, gpointer);
00049 void xmms_plugin_foreach (xmms_plugin_type_t type, xmms_plugin_foreach_func_t func, gpointer user_data);
00050
00051 xmms_plugin_t *xmms_plugin_find (xmms_plugin_type_t type, const gchar *name);
00052
00053 xmms_plugin_type_t xmms_plugin_type_get (const xmms_plugin_t *plugin);
00054 const char *xmms_plugin_name_get (const xmms_plugin_t *plugin);
00055 const gchar *xmms_plugin_shortname_get (const xmms_plugin_t *plugin);
00056 const gchar *xmms_plugin_version_get (const xmms_plugin_t *plugin);
00057 const char *xmms_plugin_description_get (const xmms_plugin_t *plugin);
00058
00059 xmms_config_property_t *xmms_plugin_config_lookup (xmms_plugin_t *plugin, const gchar *key);
00060 xmms_config_property_t *xmms_plugin_config_property_register (xmms_plugin_t *plugin, const gchar *name, const gchar *default_value, xmms_object_handler_t cb, gpointer userdata);
00061
00062
00063 #define XMMS_BUILTIN(type, api_ver, shname, name, ver, desc, setupfunc) \
00064 const xmms_plugin_desc_t xmms_builtin_##shname = { \
00065 type, \
00066 api_ver, \
00067 G_STRINGIFY(shname), \
00068 name, \
00069 ver, \
00070 desc, \
00071 setupfunc \
00072 };
00073
00074 #endif