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 GList *xmms_plugin_client_list (xmms_object_t *, guint32 type, xmms_error_t *err);
00052
00053 xmms_plugin_t *xmms_plugin_find (xmms_plugin_type_t type, const gchar *name);
00054
00055 xmms_plugin_type_t xmms_plugin_type_get (const xmms_plugin_t *plugin);
00056 const char *xmms_plugin_name_get (const xmms_plugin_t *plugin);
00057 const gchar *xmms_plugin_shortname_get (const xmms_plugin_t *plugin);
00058 const gchar *xmms_plugin_version_get (const xmms_plugin_t *plugin);
00059 const char *xmms_plugin_description_get (const xmms_plugin_t *plugin);
00060
00061 xmms_config_property_t *xmms_plugin_config_lookup (xmms_plugin_t *plugin, const gchar *key);
00062 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);
00063
00064
00065 #define XMMS_BUILTIN(type, api_ver, shname, name, ver, desc, setupfunc) \
00066 const xmms_plugin_desc_t xmms_builtin_##shname = { \
00067 type, \
00068 api_ver, \
00069 G_STRINGIFY(shname), \
00070 name, \
00071 ver, \
00072 desc, \
00073 setupfunc \
00074 };
00075
00076 #endif