XMMS2
xmms_plugin.h
Go to the documentation of this file.
1/* XMMS2 - X Music Multiplexer System
2 * Copyright (C) 2003-2011 XMMS2 Team
3 *
4 * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 */
16
17
18
19
20#ifndef __XMMS_PLUGIN_INT_H__
21#define __XMMS_PLUGIN_INT_H__
22
23#include "xmms/xmms_object.h"
24#include "xmms/xmms_plugin.h"
25#include "xmms/xmms_config.h"
26
27#include <gmodule.h>
28
29typedef struct xmms_plugin_St {
31 GModule *module;
32
34 const gchar *name;
35 const gchar *shortname;
36 const gchar *description;
37 const gchar *version;
39
40/*
41 * Private functions
42 */
43
44gboolean xmms_plugin_init (const gchar *path);
45void xmms_plugin_shutdown (void);
47
48typedef gboolean (*xmms_plugin_foreach_func_t)(xmms_plugin_t *, gpointer);
49void xmms_plugin_foreach (xmms_plugin_type_t type, xmms_plugin_foreach_func_t func, gpointer user_data);
50
51xmms_plugin_t *xmms_plugin_find (xmms_plugin_type_t type, const gchar *name);
52
54const char *xmms_plugin_name_get (const xmms_plugin_t *plugin);
55const gchar *xmms_plugin_shortname_get (const xmms_plugin_t *plugin);
56const gchar *xmms_plugin_version_get (const xmms_plugin_t *plugin);
57const char *xmms_plugin_description_get (const xmms_plugin_t *plugin);
58
60xmms_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);
61
62
63#define XMMS_BUILTIN(type, api_ver, shname, name, ver, desc, setupfunc) \
64 const xmms_plugin_desc_t xmms_builtin_##shname = { \
65 type, \
66 api_ver, \
67 G_STRINGIFY(shname), \
68 name, \
69 ver, \
70 desc, \
71 setupfunc \
72 };
73
74#endif
void xmms_plugin_destroy(xmms_plugin_t *plugin)
Definition: plugin.c:466
const gchar * xmms_plugin_version_get(const xmms_plugin_t *plugin)
Definition: plugin.c:171
gboolean xmms_plugin_init(const gchar *path)
Definition: plugin.c:219
xmms_plugin_type_t xmms_plugin_type_get(const xmms_plugin_t *plugin)
Definition: plugin.c:132
gboolean(* xmms_plugin_foreach_func_t)(xmms_plugin_t *, gpointer)
Definition: xmms_plugin.h:48
struct xmms_plugin_St xmms_plugin_t
const gchar * xmms_plugin_shortname_get(const xmms_plugin_t *plugin)
Definition: plugin.c:158
void xmms_plugin_foreach(xmms_plugin_type_t type, xmms_plugin_foreach_func_t func, gpointer user_data)
Definition: plugin.c:406
const char * xmms_plugin_description_get(const xmms_plugin_t *plugin)
Definition: plugin.c:184
xmms_config_property_t * xmms_plugin_config_lookup(xmms_plugin_t *plugin, const gchar *key)
Definition: plugin.c:76
void xmms_plugin_shutdown(void)
Definition: plugin.c:235
const char * xmms_plugin_name_get(const xmms_plugin_t *plugin)
Definition: plugin.c:145
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)
Definition: plugin.c:104
xmms_plugin_t * xmms_plugin_find(xmms_plugin_type_t type, const gchar *name)
Definition: plugin.c:445
GModule * module
Definition: xmms_plugin.h:31
const gchar * description
Definition: xmms_plugin.h:36
const gchar * shortname
Definition: xmms_plugin.h:35
const gchar * name
Definition: xmms_plugin.h:34
xmms_plugin_type_t type
Definition: xmms_plugin.h:33
xmms_object_t object
Definition: xmms_plugin.h:30
const gchar * version
Definition: xmms_plugin.h:37
struct xmms_config_property_St xmms_config_property_t
Definition: xmms_config.h:26
void(* xmms_object_handler_t)(xmms_object_t *object, xmmsv_t *data, gpointer userdata)
Definition: xmms_object.h:66
xmms_plugin_type_t