annotate src/audlegacy/pluginenum.c @ 4884:f1fc1d973f27

imported new plugin enumeration loop.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 22 Jun 2009 14:53:31 +0900
parents bc6212d7fab1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1 /* Audacious - Cross-platform multimedia player
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2 * Copyright (C) 2005-2007 Audacious development team
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 * Based on BMP:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5 * Copyright (C) 2003-2004 BMP development team
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
6 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7 * Based on XMMS:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 * Copyright (C) 1998-2003 XMMS development team
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 2825
diff changeset
12 * the Free Software Foundation; under version 3 of the License.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 * GNU General Public License for more details.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 2825
diff changeset
20 * along with this program. If not, see <http://www.gnu.org/licenses>.
3123
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
21 *
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
22 * The Audacious team does not consider modular code linking to
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
23 * Audacious or using our public API to be a derived work.
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26 #ifdef HAVE_CONFIG_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27 # include "config.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
30 #ifndef SHARED_SUFFIX
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31 # define SHARED_SUFFIX G_MODULE_SUFFIX
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
32 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
34 #include <glib.h>
4325
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
35 #include <glib/gi18n.h>
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
36 #include <glib/gprintf.h>
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37 #include <gmodule.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 #include <string.h>
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
39
4624
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
40 #include "pluginenum.h"
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
41
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
42 #include "discovery.h"
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
43 #include "effect.h"
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
44 #include "general.h"
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
45 #include "input.h"
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
46 #include "main.h"
4624
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
47 #include "output.h"
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
48 #include "playback.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
49 #include "playlist.h"
2373
ad1d7687814c [svn] made strings.h for existing strings.c, cleanups
mf0102
parents: 2313
diff changeset
50 #include "strings.h"
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
51 #include "util.h"
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
52 #include "visualization.h"
4598
a2cbde1af409 export create_widgets to PAPI
Tomasz Mon <desowin@gmail.com>
parents: 4596
diff changeset
53 #include "preferences.h"
3684
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
54 #include "vfs_buffer.h"
3685
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
55 #include "vfs_buffered_file.h"
4624
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
56 #include "volumecontrol.h"
4703
49ea99d333e9 begin seperating equalizer preset from legacy ui
Tomasz Mon <desowin@gmail.com>
parents: 4700
diff changeset
57 #include "equalizer_preset.h"
3684
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
58
4712
6584bba8de63 I don't think those files belong to legacy ui...
Tomasz Mon <desowin@gmail.com>
parents: 4711
diff changeset
59 #include "ui_fileinfo.h"
3756
698e3936f6b4 add missing include.
William Pitcock <nenolod@atheme.org>
parents: 3755
diff changeset
60 #include "ui_fileinfopopup.h"
4624
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
61 #include "ui_plugin_menu.h"
5523b30cb122 - don't export dock functions to plugins anymore
mf0102 <0102@gmx.at>
parents: 4598
diff changeset
62 #include "ui_preferences.h"
3754
74bed6b35161 export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents: 3753
diff changeset
63
3761
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
64
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
65 const gchar *plugin_dir_list[] = {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
66 PLUGINSUBS,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
67 NULL
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
68 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
69
3934
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
70 GHashTable *ext_hash = NULL;
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
71
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
72 static void set_pvt_data(Plugin * plugin, gpointer data);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
73 static gpointer get_pvt_data(void);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
74
3682
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
75 /*****************************************************************/
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
76
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
77 static struct _AudaciousFuncTableV1 _aud_papi_v1 = {
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
78 .vfs_fopen = vfs_fopen,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
79 .vfs_fclose = vfs_fclose,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
80 .vfs_dup = vfs_dup,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
81 .vfs_fread = vfs_fread,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
82 .vfs_fwrite = vfs_fwrite,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
83 .vfs_getc = vfs_getc,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
84 .vfs_ungetc = vfs_ungetc,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
85 .vfs_fgets = vfs_fgets,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
86 .vfs_fseek = vfs_fseek,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
87 .vfs_rewind = vfs_rewind,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
88 .vfs_ftell = vfs_ftell,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
89 .vfs_feof = vfs_feof,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
90 .vfs_file_test = vfs_file_test,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
91 .vfs_is_writeable = vfs_is_writeable,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
92 .vfs_truncate = vfs_truncate,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
93 .vfs_fsize = vfs_fsize,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
94 .vfs_get_metadata = vfs_get_metadata,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
95 .vfs_fprintf = vfs_fprintf,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
96 .vfs_register_transport = vfs_register_transport,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
97 .vfs_file_get_contents = vfs_file_get_contents,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
98 .vfs_is_remote = vfs_is_remote,
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
99 .vfs_is_streaming = vfs_is_streaming,
3684
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
100
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
101 .vfs_buffer_new = vfs_buffer_new,
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
102 .vfs_buffer_new_from_string = vfs_buffer_new_from_string,
3685
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
103
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
104 .vfs_buffered_file_new_from_uri = vfs_buffered_file_new_from_uri,
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
105 .vfs_buffered_file_release_live_fd = vfs_buffered_file_release_live_fd,
4640
cbc9965e1552 removed some dangling white spaces.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4625
diff changeset
106
4394
34d010af590b Oops, forgot to add function initializations to the vtable. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents: 4348
diff changeset
107 .vfs_fget_le16 = vfs_fget_le16,
34d010af590b Oops, forgot to add function initializations to the vtable. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents: 4348
diff changeset
108 .vfs_fget_le32 = vfs_fget_le32,
34d010af590b Oops, forgot to add function initializations to the vtable. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents: 4348
diff changeset
109 .vfs_fget_le64 = vfs_fget_le64,
34d010af590b Oops, forgot to add function initializations to the vtable. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents: 4348
diff changeset
110 .vfs_fget_be16 = vfs_fget_be16,
34d010af590b Oops, forgot to add function initializations to the vtable. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents: 4348
diff changeset
111 .vfs_fget_be32 = vfs_fget_be32,
34d010af590b Oops, forgot to add function initializations to the vtable. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents: 4348
diff changeset
112 .vfs_fget_be64 = vfs_fget_be64,
3687
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
113
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
114 .cfg_db_open = cfg_db_open,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
115 .cfg_db_close = cfg_db_close,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
116
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
117 .cfg_db_get_string = cfg_db_get_string,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
118 .cfg_db_get_int = cfg_db_get_int,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
119 .cfg_db_get_bool = cfg_db_get_bool,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
120 .cfg_db_get_float = cfg_db_get_float,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
121 .cfg_db_get_double = cfg_db_get_double,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
122
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
123 .cfg_db_set_string = cfg_db_set_string,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
124 .cfg_db_set_int = cfg_db_set_int,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
125 .cfg_db_set_bool = cfg_db_set_bool,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
126 .cfg_db_set_float = cfg_db_set_float,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
127 .cfg_db_set_double = cfg_db_set_double,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
128
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
129 .cfg_db_unset_key = cfg_db_unset_key,
3698
0ef1a18a5583 Export Tuple API.
William Pitcock <nenolod@atheme.org>
parents: 3687
diff changeset
130
0ef1a18a5583 Export Tuple API.
William Pitcock <nenolod@atheme.org>
parents: 3687
diff changeset
131 .tuple_new = tuple_new,
0ef1a18a5583 Export Tuple API.
William Pitcock <nenolod@atheme.org>
parents: 3687
diff changeset
132 .tuple_new_from_filename = tuple_new_from_filename,
0ef1a18a5583 Export Tuple API.
William Pitcock <nenolod@atheme.org>
parents: 3687
diff changeset
133 .tuple_associate_string = tuple_associate_string,
0ef1a18a5583 Export Tuple API.
William Pitcock <nenolod@atheme.org>
parents: 3687
diff changeset
134 .tuple_associate_int = tuple_associate_int,
3701
e766d3aec087 Remove non-existant function.
William Pitcock <nenolod@atheme.org>
parents: 3699
diff changeset
135 .tuple_disassociate = tuple_disassociate,
3698
0ef1a18a5583 Export Tuple API.
William Pitcock <nenolod@atheme.org>
parents: 3687
diff changeset
136 .tuple_get_value_type = tuple_get_value_type,
0ef1a18a5583 Export Tuple API.
William Pitcock <nenolod@atheme.org>
parents: 3687
diff changeset
137 .tuple_get_string = tuple_get_string,
0ef1a18a5583 Export Tuple API.
William Pitcock <nenolod@atheme.org>
parents: 3687
diff changeset
138 .tuple_get_int = tuple_get_int,
3699
ddde4794b4e2 Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents: 3698
diff changeset
139
ddde4794b4e2 Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents: 3698
diff changeset
140 .tuple_formatter_process_string = tuple_formatter_process_string,
ddde4794b4e2 Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents: 3698
diff changeset
141 .tuple_formatter_process_function = tuple_formatter_process_function,
ddde4794b4e2 Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents: 3698
diff changeset
142 .tuple_formatter_process_construct = tuple_formatter_process_construct,
ddde4794b4e2 Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents: 3698
diff changeset
143 .tuple_formatter_process_expr = tuple_formatter_process_expr,
ddde4794b4e2 Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents: 3698
diff changeset
144 .tuple_formatter_register_function = tuple_formatter_register_function,
ddde4794b4e2 Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents: 3698
diff changeset
145 .tuple_formatter_register_expression = tuple_formatter_register_expression,
ddde4794b4e2 Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents: 3698
diff changeset
146 .tuple_formatter_make_title_string = tuple_formatter_make_title_string,
3706
fc17623eb561 Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents: 3701
diff changeset
147
fc17623eb561 Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents: 3701
diff changeset
148 .mime_get_plugin = mime_get_plugin,
fc17623eb561 Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents: 3701
diff changeset
149 .mime_set_plugin = mime_set_plugin,
fc17623eb561 Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents: 3701
diff changeset
150
fc17623eb561 Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents: 3701
diff changeset
151 .uri_get_plugin = uri_get_plugin,
fc17623eb561 Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents: 3701
diff changeset
152 .uri_set_plugin = uri_set_plugin,
3731
0e5da33a32b7 fun util dialog shit -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3706
diff changeset
153
4527
53bd726e4461 Temporarily revert small part of mf0102's changeset that broke API by removing
Matti Hamalainen <ccr@tnsp.org>
parents: 4514
diff changeset
154 .util_info_dialog = util_info_dialog,
3736
269449ad845e vtable get_gentitle_format().
William Pitcock <nenolod@atheme.org>
parents: 3735
diff changeset
155 .get_gentitle_format = get_gentitle_format,
3734
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
156
4754
b136f202ebfa export functions to make libSAD usage in plugins more easy
Andrew O. Shadoura <bugzilla@tut.by>
parents: 4747
diff changeset
157 .smart_realloc = smart_realloc,
b136f202ebfa export functions to make libSAD usage in plugins more easy
Andrew O. Shadoura <bugzilla@tut.by>
parents: 4747
diff changeset
158 .sadfmt_from_afmt = sadfmt_from_afmt,
b136f202ebfa export functions to make libSAD usage in plugins more easy
Andrew O. Shadoura <bugzilla@tut.by>
parents: 4747
diff changeset
159
3734
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
160 .escape_shell_chars = escape_shell_chars,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
161 .str_append = str_append,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
162 .str_replace = str_replace,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
163 .str_replace_in = str_replace_in,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
164 .str_has_prefix_nocase = str_has_prefix_nocase,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
165 .str_has_suffix_nocase = str_has_suffix_nocase,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
166 .str_has_suffixes_nocase = str_has_suffixes_nocase,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
167 .str_to_utf8_fallback = str_to_utf8_fallback,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
168 .str_to_utf8 = str_to_utf8,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
169 .filename_to_utf8 = filename_to_utf8,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
170 .str_skip_chars = str_skip_chars,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
171 .convert_title_text = convert_title_text,
e82ec5cb017c strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents: 3731
diff changeset
172 .chardet_to_utf8 = chardet_to_utf8,
3735
d41d03630f27 export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents: 3734
diff changeset
173
d41d03630f27 export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents: 3734
diff changeset
174 .playlist_container_register = playlist_container_register,
d41d03630f27 export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents: 3734
diff changeset
175 .playlist_container_unregister = playlist_container_unregister,
d41d03630f27 export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents: 3734
diff changeset
176 .playlist_container_read = playlist_container_read,
d41d03630f27 export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents: 3734
diff changeset
177 .playlist_container_write = playlist_container_write,
d41d03630f27 export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents: 3734
diff changeset
178 .playlist_container_find = playlist_container_find,
3738
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
179
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
180 .playlist_entry_new = playlist_entry_new,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
181 .playlist_entry_free = playlist_entry_free,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
182
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
183 .playlist_add_playlist = playlist_add_playlist,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
184 .playlist_remove_playlist = playlist_remove_playlist,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
185 .playlist_select_playlist = playlist_select_playlist,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
186 .playlist_select_next = playlist_select_next,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
187 .playlist_select_prev = playlist_select_prev,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
188 .playlist_get_playlists = playlist_get_playlists,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
189
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
190 .playlist_clear_only = playlist_clear_only,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
191 .playlist_clear = playlist_clear,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
192 .playlist_delete = playlist_delete,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
193
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
194 .playlist_add = playlist_add,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
195 .playlist_ins = playlist_ins,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
196 .playlist_add_dir = playlist_add_dir,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
197 .playlist_ins_dir = playlist_ins_dir,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
198 .playlist_add_url = playlist_add_url,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
199 .playlist_ins_url = playlist_ins_url,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
200
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
201 .playlist_check_pos_current = playlist_check_pos_current,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
202 .playlist_next = playlist_next,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
203 .playlist_prev = playlist_prev,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
204
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
205 .playlist_queue = playlist_queue,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
206 .playlist_queue_position = playlist_queue_position,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
207 .playlist_queue_remove = playlist_queue_remove,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
208 .playlist_queue_get_length = playlist_queue_get_length,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
209 .playlist_is_position_queued = playlist_is_position_queued,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
210 .playlist_clear_queue = playlist_clear_queue,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
211 .playlist_get_queue_position = playlist_get_queue_position,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
212 .playlist_get_queue_position_number = playlist_get_queue_position_number,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
213 .playlist_get_queue_qposition_number = playlist_get_queue_qposition_number,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
214
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
215 .playlist_eof_reached = playlist_eof_reached,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
216 .playlist_set_position = playlist_set_position,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
217
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
218 .playlist_get_length = playlist_get_length,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
219 .playlist_get_position = playlist_get_position,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
220 .playlist_get_position_nolock = playlist_get_position_nolock,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
221 .playlist_get_info_text = playlist_get_info_text,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
222 .playlist_get_current_length = playlist_get_current_length,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
223
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
224 .playlist_save = playlist_save,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
225 .playlist_load = playlist_load,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
226
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
227 .playlist_sort = playlist_sort,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
228 .playlist_sort_selected = playlist_sort_selected,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
229
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
230 .playlist_reverse = playlist_reverse,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
231 .playlist_random = playlist_random,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
232 .playlist_remove_duplicates = playlist_remove_duplicates,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
233 .playlist_remove_dead_files = playlist_remove_dead_files,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
234
4514
0fe46317167f renamed playlist_fileinfo* to ui_fileinfo_show* and reworked those
mf0102 <0102@gmx.at>
parents: 4513
diff changeset
235 .playlist_fileinfo_current = ui_fileinfo_show_current,
0fe46317167f renamed playlist_fileinfo* to ui_fileinfo_show* and reworked those
mf0102 <0102@gmx.at>
parents: 4513
diff changeset
236 .playlist_fileinfo = ui_fileinfo_show,
3738
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
237
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
238 .playlist_delete_index = playlist_delete_index,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
239
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
240 .playlist_get_entry_to_play = playlist_get_entry_to_play,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
241
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
242 .playlist_get_filename = playlist_get_filename,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
243 .playlist_get_songtitle = playlist_get_songtitle,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
244 .playlist_get_tuple = playlist_get_tuple,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
245 .playlist_get_songtime = playlist_get_songtime,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
246
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
247 .playlist_get_selected = playlist_get_selected,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
248 .playlist_get_num_selected = playlist_get_num_selected,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
249
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
250 .playlist_get_total_time = playlist_get_total_time,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
251 .playlist_select_search = playlist_select_search,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
252 .playlist_select_all = playlist_select_all,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
253 .playlist_select_range = playlist_select_range,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
254 .playlist_select_invert_all = playlist_select_invert_all,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
255 .playlist_select_invert = playlist_select_invert,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
256
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
257 .playlist_read_info_selection = playlist_read_info_selection,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
258 .playlist_read_info = playlist_read_info,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
259
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
260 .playlist_set_shuffle = playlist_set_shuffle,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
261
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
262 .playlist_clear_selected = playlist_clear_selected,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
263
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
264 .get_playlist_nth = get_playlist_nth,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
265
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
266 .playlist_set_current_name = playlist_set_current_name,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
267 .playlist_get_current_name = playlist_get_current_name,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
268
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
269 .playlist_filename_set = playlist_filename_set,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
270 .playlist_filename_get = playlist_filename_get,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
271
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
272 .playlist_new = playlist_new,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
273 .playlist_free = playlist_free,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
274 .playlist_new_from_selected = playlist_new_from_selected,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
275
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
276 .is_playlist_name = is_playlist_name,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
277
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
278 .playlist_load_ins_file = playlist_load_ins_file,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
279 .playlist_load_ins_file_tuple = playlist_load_ins_file_tuple,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
280
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
281 .playlist_get_active = playlist_get_active,
48a596a86459 export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents: 3736
diff changeset
282 .playlist_playlists_equal = playlist_playlists_equal,
3741
a1b31fe5a249 export ip_data and cfg
William Pitcock <nenolod@atheme.org>
parents: 3738
diff changeset
283
a1b31fe5a249 export ip_data and cfg
William Pitcock <nenolod@atheme.org>
parents: 3738
diff changeset
284 .ip_state = &ip_data,
a1b31fe5a249 export ip_data and cfg
William Pitcock <nenolod@atheme.org>
parents: 3738
diff changeset
285 ._cfg = &cfg,
3744
e2f8feddbb19 export hook API
William Pitcock <nenolod@atheme.org>
parents: 3741
diff changeset
286
e2f8feddbb19 export hook API
William Pitcock <nenolod@atheme.org>
parents: 3741
diff changeset
287 .hook_associate = hook_associate,
e2f8feddbb19 export hook API
William Pitcock <nenolod@atheme.org>
parents: 3741
diff changeset
288 .hook_dissociate = hook_dissociate,
e2f8feddbb19 export hook API
William Pitcock <nenolod@atheme.org>
parents: 3741
diff changeset
289 .hook_register = hook_register,
e2f8feddbb19 export hook API
William Pitcock <nenolod@atheme.org>
parents: 3741
diff changeset
290 .hook_call = hook_call,
3745
e26ac0692e8f export INIFile APIs
William Pitcock <nenolod@atheme.org>
parents: 3744
diff changeset
291
e26ac0692e8f export INIFile APIs
William Pitcock <nenolod@atheme.org>
parents: 3744
diff changeset
292 .open_ini_file = open_ini_file,
e26ac0692e8f export INIFile APIs
William Pitcock <nenolod@atheme.org>
parents: 3744
diff changeset
293 .close_ini_file = close_ini_file,
e26ac0692e8f export INIFile APIs
William Pitcock <nenolod@atheme.org>
parents: 3744
diff changeset
294 .read_ini_string = read_ini_string,
e26ac0692e8f export INIFile APIs
William Pitcock <nenolod@atheme.org>
parents: 3744
diff changeset
295 .read_ini_array = read_ini_array,
3746
d5580c6bca31 export xconvert API
William Pitcock <nenolod@atheme.org>
parents: 3745
diff changeset
296
3751
0fb35f6cc4b7 PluginMenu API is exported now. No changes required to plugins.
William Pitcock <nenolod@atheme.org>
parents: 3746
diff changeset
297 .menu_plugin_item_add = menu_plugin_item_add,
0fb35f6cc4b7 PluginMenu API is exported now. No changes required to plugins.
William Pitcock <nenolod@atheme.org>
parents: 3746
diff changeset
298 .menu_plugin_item_remove = menu_plugin_item_remove,
3753
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
299
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
300 .drct_quit = drct_quit,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
301 .drct_eject = drct_eject,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
302 .drct_jtf_show = drct_jtf_show,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
303 .drct_main_win_is_visible = drct_main_win_is_visible,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
304 .drct_main_win_toggle = drct_main_win_toggle,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
305 .drct_eq_win_is_visible = drct_eq_win_is_visible,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
306 .drct_eq_win_toggle = drct_eq_win_toggle,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
307 .drct_pl_win_is_visible = drct_pl_win_is_visible,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
308 .drct_pl_win_toggle = drct_pl_win_toggle,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
309 .drct_activate = drct_activate,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
310
4578
d27f00f6b568 add audacious_drct_initiate
Tomasz Mon <desowin@gmail.com>
parents: 4573
diff changeset
311 .drct_initiate = drct_initiate,
3753
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
312 .drct_play = drct_play,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
313 .drct_pause = drct_pause,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
314 .drct_stop = drct_stop,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
315 .drct_get_playing = drct_get_playing,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
316 .drct_get_paused = drct_get_paused,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
317 .drct_get_stopped = drct_get_stopped,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
318 .drct_get_info = drct_get_info,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
319 .drct_get_time = drct_get_time,
4573
11f7874f3a95 add audacious_drct_get_length
Tomasz Mon <desowin@gmail.com>
parents: 4546
diff changeset
320 .drct_get_length = drct_get_length,
3753
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
321 .drct_seek = drct_seek,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
322 .drct_get_volume = drct_get_volume,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
323 .drct_set_volume = drct_set_volume,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
324 .drct_get_volume_main = drct_get_volume_main,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
325 .drct_set_volume_main = drct_set_volume_main,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
326 .drct_get_volume_balance = drct_get_volume_balance,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
327 .drct_set_volume_balance = drct_set_volume_balance,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
328
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
329 .drct_pl_next = drct_pl_next,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
330 .drct_pl_prev = drct_pl_prev,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
331 .drct_pl_repeat_is_enabled = drct_pl_repeat_is_enabled,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
332 .drct_pl_repeat_toggle = drct_pl_repeat_toggle,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
333 .drct_pl_repeat_is_shuffled = drct_pl_repeat_is_shuffled,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
334 .drct_pl_shuffle_toggle = drct_pl_shuffle_toggle,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
335 .drct_pl_get_title = drct_pl_get_title,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
336 .drct_pl_get_time = drct_pl_get_time,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
337 .drct_pl_get_pos = drct_pl_get_pos,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
338 .drct_pl_get_file = drct_pl_get_file,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
339 .drct_pl_add = drct_pl_add,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
340 .drct_pl_clear = drct_pl_clear,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
341 .drct_pl_get_length = drct_pl_get_length,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
342 .drct_pl_delete = drct_pl_delete,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
343 .drct_pl_set_pos = drct_pl_set_pos,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
344 .drct_pl_ins_url_string = drct_pl_ins_url_string,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
345 .drct_pl_add_url_string = drct_pl_add_url_string,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
346 .drct_pl_enqueue_to_temp = drct_pl_enqueue_to_temp,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
347
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
348 .drct_pq_get_length = drct_pq_get_length,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
349 .drct_pq_add = drct_pq_add,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
350 .drct_pq_remove = drct_pq_remove,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
351 .drct_pq_clear = drct_pq_clear,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
352 .drct_pq_is_queued = drct_pq_is_queued,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
353 .drct_pq_get_position = drct_pq_get_position,
22d71f986b86 export AudDRCT API.
William Pitcock <nenolod@atheme.org>
parents: 3751
diff changeset
354 .drct_pq_get_queue_position = drct_pq_get_queue_position,
3754
74bed6b35161 export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents: 3753
diff changeset
355
74bed6b35161 export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents: 3753
diff changeset
356 .prefswin_page_new = prefswin_page_new,
74bed6b35161 export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents: 3753
diff changeset
357 .prefswin_page_destroy = prefswin_page_destroy,
3755
2ca446f02d97 export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents: 3754
diff changeset
358
2ca446f02d97 export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents: 3754
diff changeset
359 .fileinfopopup_create = fileinfopopup_create,
2ca446f02d97 export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents: 3754
diff changeset
360 .fileinfopopup_destroy = fileinfopopup_destroy,
2ca446f02d97 export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents: 3754
diff changeset
361 .fileinfopopup_show_from_title = fileinfopopup_show_from_title,
2ca446f02d97 export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents: 3754
diff changeset
362 .fileinfopopup_show_from_tuple = fileinfopopup_show_from_tuple,
2ca446f02d97 export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents: 3754
diff changeset
363 .fileinfopopup_hide = fileinfopopup_hide,
3757
d24d28e76588 export util_get_localdir().
William Pitcock <nenolod@atheme.org>
parents: 3756
diff changeset
364
d24d28e76588 export util_get_localdir().
William Pitcock <nenolod@atheme.org>
parents: 3756
diff changeset
365 .util_get_localdir = util_get_localdir,
3758
21b45219249f export input_check_file().
William Pitcock <nenolod@atheme.org>
parents: 3757
diff changeset
366
21b45219249f export input_check_file().
William Pitcock <nenolod@atheme.org>
parents: 3757
diff changeset
367 .input_check_file = input_check_file,
3761
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
368
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
369 .flow_new = flow_new,
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
370 .flow_execute = flow_execute,
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
371 .flow_link_element = flow_link_element,
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
372 .flow_unlink_element = flow_unlink_element,
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
373 .effect_flow = effect_flow,
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
374 .volumecontrol_flow = volumecontrol_flow,
ccc3725a82b3 link everything up.
William Pitcock <nenolod@atheme.org>
parents: 3758
diff changeset
375
4528
2638175099e0 Restore util_menu_main_show() for plugins - thanks go to ccr for the first
mf0102 <0102@gmx.at>
parents: 4527
diff changeset
376 .util_menu_main_show = util_menu_main_show,
4640
cbc9965e1552 removed some dangling white spaces.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4625
diff changeset
377
3973
26c503cdce58 Add get_output_list() to PAPI for xmms-crossfade.
William Pitcock <nenolod@atheme.org>
parents: 3963
diff changeset
378 .get_output_list = get_output_list,
4030
0b004b3bfb70 Add plugin function to pull volume.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3973
diff changeset
379
0b004b3bfb70 Add plugin function to pull volume.
Jonathan Schleifer <js-audacious@webkeks.org>
parents: 3973
diff changeset
380 .input_get_volume = input_get_volume,
4070
040243a50bd3 - modified playlist_load_ins_file() and playlist_load_ins_file_tuple(). path builder and ext_hash checker
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4030
diff changeset
381 .construct_uri = construct_uri,
4089
9e24c8746d99 - introduce new API functions uri_to_display_basename() and uri_to_display_dirname(). each function derives utf8 encoded basename or dirname from given uri respectively.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4070
diff changeset
382 .uri_to_display_basename = uri_to_display_basename,
9e24c8746d99 - introduce new API functions uri_to_display_basename() and uri_to_display_dirname(). each function derives utf8 encoded basename or dirname from given uri respectively.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4070
diff changeset
383 .uri_to_display_dirname = uri_to_display_dirname,
9e24c8746d99 - introduce new API functions uri_to_display_basename() and uri_to_display_dirname(). each function derives utf8 encoded basename or dirname from given uri respectively.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4070
diff changeset
384
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
385 .get_pvt_data = get_pvt_data,
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
386 .set_pvt_data = set_pvt_data,
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
387
4288
fe09acacd473 add event_queue() to the vtable as aud_event_queue()
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4282
diff changeset
388 .event_queue = event_queue,
fe09acacd473 add event_queue() to the vtable as aud_event_queue()
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4282
diff changeset
389
4596
a77d02342ee1 change visualization timeout; export calc_stereo_pcm, calc_mono_pcm and calc_mono_freq to PAPI
Tomasz Mon <desowin@gmail.com>
parents: 4578
diff changeset
390 .calc_mono_freq = calc_mono_freq,
a77d02342ee1 change visualization timeout; export calc_stereo_pcm, calc_mono_pcm and calc_mono_freq to PAPI
Tomasz Mon <desowin@gmail.com>
parents: 4578
diff changeset
391 .calc_mono_pcm = calc_mono_pcm,
a77d02342ee1 change visualization timeout; export calc_stereo_pcm, calc_mono_pcm and calc_mono_freq to PAPI
Tomasz Mon <desowin@gmail.com>
parents: 4578
diff changeset
392 .calc_stereo_pcm = calc_stereo_pcm,
4598
a2cbde1af409 export create_widgets to PAPI
Tomasz Mon <desowin@gmail.com>
parents: 4596
diff changeset
393
a2cbde1af409 export create_widgets to PAPI
Tomasz Mon <desowin@gmail.com>
parents: 4596
diff changeset
394 .create_widgets = create_widgets,
4703
49ea99d333e9 begin seperating equalizer preset from legacy ui
Tomasz Mon <desowin@gmail.com>
parents: 4700
diff changeset
395
49ea99d333e9 begin seperating equalizer preset from legacy ui
Tomasz Mon <desowin@gmail.com>
parents: 4700
diff changeset
396 .equalizer_read_presets = equalizer_read_presets,
49ea99d333e9 begin seperating equalizer preset from legacy ui
Tomasz Mon <desowin@gmail.com>
parents: 4700
diff changeset
397 .equalizer_write_preset_file = equalizer_write_preset_file,
49ea99d333e9 begin seperating equalizer preset from legacy ui
Tomasz Mon <desowin@gmail.com>
parents: 4700
diff changeset
398 .import_winamp_eqf = import_winamp_eqf,
4711
a33facf19590 more work on seperating presets from legacy ui
Tomasz Mon <desowin@gmail.com>
parents: 4703
diff changeset
399 .save_preset_file = save_preset_file,
a33facf19590 more work on seperating presets from legacy ui
Tomasz Mon <desowin@gmail.com>
parents: 4703
diff changeset
400 .equalizer_read_aud_preset = equalizer_read_aud_preset,
a33facf19590 more work on seperating presets from legacy ui
Tomasz Mon <desowin@gmail.com>
parents: 4703
diff changeset
401 .load_preset_file = load_preset_file,
4755
c6f352d25d27 makeing possible to reinitialize the output plugin from outher plugins
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4747
diff changeset
402 .output_plugin_cleanup = output_plugin_cleanup,
c6f352d25d27 makeing possible to reinitialize the output plugin from outher plugins
Paula Stanciu <paula.stanciu@gmail.com>
parents: 4747
diff changeset
403 .output_plugin_reinit = output_plugin_reinit,
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
404
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
405 // .get_plugin_menu = get_plugin_menu
3683
4284187479d7 Unbreak compile.
William Pitcock <nenolod@atheme.org>
parents: 3682
diff changeset
406 };
3682
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
407
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
408 /*****************************************************************/
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
409
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
410 GList *lowlevel_list = NULL;
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
411 extern GList *vfs_transports;
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
412
4513
867d7caeb95b - indentation of ui_main.c
mf0102 <0102@gmx.at>
parents: 4509
diff changeset
413 static mowgli_dictionary_t *plugin_dict = NULL;
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
414
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
415 static GStaticPrivate cur_plugin_key = G_STATIC_PRIVATE_INIT;
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
416 static mowgli_dictionary_t *pvt_data_dict = NULL;
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
417
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
418 static mowgli_list_t *headers_list = NULL;
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
419
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
420 void plugin_set_current(Plugin *plugin)
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
421 {
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
422 g_static_private_set(&cur_plugin_key, plugin, NULL);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
423 }
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
424
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
425 static Plugin *plugin_get_current(void)
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
426 {
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
427 return g_static_private_get(&cur_plugin_key);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
428 }
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
429
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
430 static void set_pvt_data(Plugin * plugin, gpointer data)
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
431 {
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
432 mowgli_dictionary_elem_t *elem;
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
433
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
434 elem = mowgli_dictionary_find(pvt_data_dict, g_path_get_basename(plugin->filename));
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
435 if (elem == NULL)
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
436 mowgli_dictionary_add(pvt_data_dict, g_path_get_basename(plugin->filename), data);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
437 else
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
438 elem->data = data;
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
439 }
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
440
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
441 static gpointer get_pvt_data(void)
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
442 {
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
443 Plugin *cur_p = plugin_get_current();
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
444
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
445 return mowgli_dictionary_retrieve(pvt_data_dict, g_path_get_basename(cur_p->filename));
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
446 }
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
447
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
448 static gint
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
449 inputlist_compare_func(gconstpointer a, gconstpointer b)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
450 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
451 const InputPlugin *ap = a, *bp = b;
2804
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
452 if(ap->description && bp->description)
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
453 return strcasecmp(ap->description, bp->description);
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
454 else
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
455 return 0;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
456 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
457
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
458 static gint
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
459 outputlist_compare_func(gconstpointer a, gconstpointer b)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
460 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
461 const OutputPlugin *ap = a, *bp = b;
4828
e413f6dffd21 Sort by probe_priority. Noisy decision logic for the plugins while we work this out.
Tony Vroon <chainsaw@gentoo.org>
parents: 4827
diff changeset
462 return (bp->probe_priority - ap->probe_priority);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
463 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
464
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
465 static gint
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
466 effectlist_compare_func(gconstpointer a, gconstpointer b)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
467 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
468 const EffectPlugin *ap = a, *bp = b;
2804
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
469 if(ap->description && bp->description)
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
470 return strcasecmp(ap->description, bp->description);
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
471 else
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
472 return 0;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
473 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
474
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
475 static gint
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
476 generallist_compare_func(gconstpointer a, gconstpointer b)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
477 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
478 const GeneralPlugin *ap = a, *bp = b;
2804
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
479 if(ap->description && bp->description)
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
480 return strcasecmp(ap->description, bp->description);
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
481 else
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
482 return 0;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
483 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
484
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
485 static gint
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
486 vislist_compare_func(gconstpointer a, gconstpointer b)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
487 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
488 const VisPlugin *ap = a, *bp = b;
2804
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
489 if(ap->description && bp->description)
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
490 return strcasecmp(ap->description, bp->description);
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
491 else
d5c77e670be0 [svn] - temporal fix for crash in compare_func().
yaz
parents: 2801
diff changeset
492 return 0;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
493 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
494
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
495 static gint
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
496 discoverylist_compare_func(gconstpointer a, gconstpointer b)
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
497 {
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
498 const DiscoveryPlugin *ap = a, *bp = b;
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
499 if(ap->description && bp->description)
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
500 return strcasecmp(ap->description, bp->description);
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
501 else
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
502 return 0;
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
503 }
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
504
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
505 static gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
506 plugin_is_duplicate(const gchar * filename)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
507 {
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
508 gchar *base_filename = g_path_get_basename(filename);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
509
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
510 if (mowgli_dictionary_retrieve(plugin_dict, base_filename) != NULL)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
511 {
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
512 g_free(base_filename);
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
513 return TRUE;
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
514 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
515
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
516 g_free(base_filename);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
517
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
518 return FALSE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
519 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
520
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
521 gboolean
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
522 plugin_is_enabled(const gchar *filename)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
523 {
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
524 Plugin *plugin = mowgli_dictionary_retrieve(plugin_dict, filename);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
525
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
526 if (!plugin)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
527 return FALSE;
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
528
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
529 return plugin->enabled;
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
530 }
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
531
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
532 void
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
533 plugin_set_enabled(const gchar *filename, gboolean enabled)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
534 {
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
535 Plugin *plugin = mowgli_dictionary_retrieve(plugin_dict, filename);
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
536
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
537 if (!plugin)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
538 return;
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
539
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
540 plugin->enabled = enabled;
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
541 }
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
542
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
543 Plugin *
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
544 plugin_get_plugin(const gchar *filename)
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
545 {
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
546 return mowgli_dictionary_retrieve(plugin_dict, filename);
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
547 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
548
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
549 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
550 input_plugin_init(Plugin * plugin)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
551 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
552 InputPlugin *p = INPUT_PLUGIN(plugin);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
553
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
554 p->get_vis_type = input_get_vis_type;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
555 p->add_vis_pcm = input_add_vis_pcm;
4640
cbc9965e1552 removed some dangling white spaces.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4625
diff changeset
556
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
557 /* Pretty const casts courtesy of XMMS's plugin.h legacy. Anyone
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
558 else thinks we could use a CONST macro to solve the warnings?
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
559 - descender */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
560 p->set_info = (void (*)(gchar *, gint, gint, gint, gint)) playlist_set_info_old_abi;
3165
8775dfc57ead Remove mainwin_set_info_text() craq. Still some work to do.
William Pitcock <nenolod@atheme-project.org>
parents: 3123
diff changeset
561 p->set_info_text = input_set_info_text;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
562
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
563 ip_data.input_list = g_list_append(ip_data.input_list, p);
4640
cbc9965e1552 removed some dangling white spaces.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4625
diff changeset
564
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
565 p->enabled = TRUE;
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
566
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
567 /* XXX: we need something better than p->filename if plugins
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
568 will eventually provide multiple plugins --nenolod */
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
569 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p);
3934
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
570
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
571 /* build the extension hash table */
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
572 gint i;
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
573 if(p->vfs_extensions) {
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
574 for(i = 0; p->vfs_extensions[i] != NULL; i++) {
3959
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
575 GList *hdr = NULL;
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
576 GList **handle = NULL; //allocated as auto in stack.
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
577 GList **handle2 = g_malloc(sizeof(GList **));
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
578
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
579 handle = g_hash_table_lookup(ext_hash, p->vfs_extensions[i]);
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
580 if(handle)
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
581 hdr = *handle;
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
582 hdr = g_list_append(hdr, p); //returned hdr is non-volatile
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
583 *handle2 = hdr;
a575c29cee05 - revive on-demand metadata retrieving. in the combination with "Detect file formats on demand", now audacious can load large directory in a few seconds.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3934
diff changeset
584 g_hash_table_replace(ext_hash, g_strdup(p->vfs_extensions[i]), handle2);
3934
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
585 }
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
586 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
587 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
588
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
589 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
590 output_plugin_init(Plugin * plugin)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
591 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
592 OutputPlugin *p = OUTPUT_PLUGIN(plugin);
4640
cbc9965e1552 removed some dangling white spaces.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4625
diff changeset
593 op_data.output_list = g_list_append(op_data.output_list, p);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
594
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
595 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
596 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
597
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
598 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
599 effect_plugin_init(Plugin * plugin)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
600 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
601 EffectPlugin *p = EFFECT_PLUGIN(plugin);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
602 ep_data.effect_list = g_list_append(ep_data.effect_list, p);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
603
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
604 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
605 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
606
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
607 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
608 general_plugin_init(Plugin * plugin)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
609 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
610 GeneralPlugin *p = GENERAL_PLUGIN(plugin);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
611 gp_data.general_list = g_list_append(gp_data.general_list, p);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
612
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
613 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
614 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
615
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
616 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
617 vis_plugin_init(Plugin * plugin)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
618 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
619 VisPlugin *p = VIS_PLUGIN(plugin);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
620 p->disable_plugin = vis_disable_plugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
621 vp_data.vis_list = g_list_append(vp_data.vis_list, p);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
622
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
623 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
624 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
625
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
626 static void
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
627 discovery_plugin_init(Plugin * plugin)
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
628 {
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
629 DiscoveryPlugin *p = DISCOVERY_PLUGIN(plugin);
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
630 dp_data.discovery_list = g_list_append(dp_data.discovery_list, p);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
631
4781
c2dc7a3a7240 g_basename is deprecated, replace with g_path_get_basename.
Tony Vroon <chainsaw@gentoo.org>
parents: 4768
diff changeset
632 mowgli_dictionary_add(plugin_dict, g_path_get_basename(p->filename), p);
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
633 }
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
634
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
635 /*******************************************************************/
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
636
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
637 static void
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
638 plugin2_dispose(GModule *module, const gchar *str, ...)
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
639 {
4747
0cc36efdbe07 Don't use a static buffer, but g_strdup_vprintf().
Matti Hamalainen <ccr@tnsp.org>
parents: 4712
diff changeset
640 gchar *buf;
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
641 va_list va;
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
642
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
643 va_start(va, str);
4747
0cc36efdbe07 Don't use a static buffer, but g_strdup_vprintf().
Matti Hamalainen <ccr@tnsp.org>
parents: 4712
diff changeset
644 buf = g_strdup_vprintf(str, va);
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
645 va_end(va);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
646
3247
e21930ccd5a8 remove old debugging notices that aren't very relevant anymore.
William Pitcock <nenolod@atheme-project.org>
parents: 3232
diff changeset
647 g_message("*** %s\n", buf);
4747
0cc36efdbe07 Don't use a static buffer, but g_strdup_vprintf().
Matti Hamalainen <ccr@tnsp.org>
parents: 4712
diff changeset
648 g_free(buf);
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
649
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
650 g_module_close(module);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
651 }
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
652
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
653 void
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
654 plugin2_process(PluginHeader *header, GModule *module, const gchar *filename)
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
655 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
656 gint i, n;
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
657 mowgli_node_t *hlist_node;
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
658
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
659 if (header->magic != PLUGIN_MAGIC)
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
660 return plugin2_dispose(module, "plugin <%s> discarded, invalid module magic", filename);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
661
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
662 if (header->api_version != __AUDACIOUS_PLUGIN_API__)
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
663 return plugin2_dispose(module, "plugin <%s> discarded, wanting API version %d, we implement API version %d",
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
664 filename, header->api_version, __AUDACIOUS_PLUGIN_API__);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
665
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
666 hlist_node = mowgli_node_create();
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
667 mowgli_node_add(header, hlist_node, headers_list);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
668
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
669 if (header->init)
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
670 header->init();
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
671
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
672 header->priv_assoc = g_new0(Plugin, 1);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
673 header->priv_assoc->handle = module;
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
674 header->priv_assoc->filename = g_strdup(filename);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
675
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
676 n = 0;
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
677
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
678 if (header->ip_list)
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
679 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
680 for (i = 0; (header->ip_list)[i] != NULL; i++, n++)
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
681 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
682 PLUGIN((header->ip_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, n);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
683 input_plugin_init(PLUGIN((header->ip_list)[i]));
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
684 }
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
685 }
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
686
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
687 if (header->op_list)
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
688 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
689 for (i = 0; (header->op_list)[i] != NULL; i++, n++)
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
690 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
691 PLUGIN((header->op_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, n);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
692 output_plugin_init(PLUGIN((header->op_list)[i]));
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
693 }
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
694 }
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
695
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
696 if (header->ep_list)
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
697 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
698 for (i = 0; (header->ep_list)[i] != NULL; i++, n++)
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
699 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
700 PLUGIN((header->ep_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, n);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
701 effect_plugin_init(PLUGIN((header->ep_list)[i]));
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
702 }
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
703 }
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
704
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
705
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
706 if (header->gp_list)
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
707 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
708 for (i = 0; (header->gp_list)[i] != NULL; i++, n++)
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
709 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
710 PLUGIN((header->gp_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, n);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
711 general_plugin_init(PLUGIN((header->gp_list)[i]));
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
712 }
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
713 }
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
714
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
715 if (header->vp_list)
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
716 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
717 for (i = 0; (header->vp_list)[i] != NULL; i++, n++)
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
718 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
719 PLUGIN((header->vp_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, n);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
720 vis_plugin_init(PLUGIN((header->vp_list)[i]));
2799
febdfe7a482b [svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents: 2798
diff changeset
721 }
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
722 }
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
723
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
724 if (header->dp_list)
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
725 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
726 for (i = 0; (header->dp_list)[i] != NULL; i++, n++)
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
727 {
4768
d470630b8cea The famed "multiple plugins in one module" feature didn't actually work,
Matti Hamalainen <ccr@tnsp.org>
parents: 4756
diff changeset
728 PLUGIN((header->dp_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, n);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
729 discovery_plugin_init(PLUGIN((header->dp_list)[i]));
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
730 }
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
731 }
4677
04c53c9d261b Add provision for Interface plugins.
William Pitcock <nenolod@atheme.org>
parents: 4640
diff changeset
732
04c53c9d261b Add provision for Interface plugins.
William Pitcock <nenolod@atheme.org>
parents: 4640
diff changeset
733 if (header->interface)
04c53c9d261b Add provision for Interface plugins.
William Pitcock <nenolod@atheme.org>
parents: 4640
diff changeset
734 interface_register(header->interface);
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
735 }
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
736
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
737 void
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
738 plugin2_unload(PluginHeader *header, mowgli_node_t *hlist_node)
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
739 {
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
740 GModule *module;
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
741
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
742 g_return_if_fail(header->priv_assoc != NULL);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
743
4677
04c53c9d261b Add provision for Interface plugins.
William Pitcock <nenolod@atheme.org>
parents: 4640
diff changeset
744 if (header->interface)
04c53c9d261b Add provision for Interface plugins.
William Pitcock <nenolod@atheme.org>
parents: 4640
diff changeset
745 interface_deregister(header->interface);
04c53c9d261b Add provision for Interface plugins.
William Pitcock <nenolod@atheme.org>
parents: 4640
diff changeset
746
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
747 module = header->priv_assoc->handle;
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
748
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
749 g_free(header->priv_assoc->filename);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
750 g_free(header->priv_assoc);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
751
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
752 if (header->fini)
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
753 header->fini();
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
754
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
755 mowgli_node_delete(hlist_node, headers_list);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
756 mowgli_node_free(hlist_node);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
757
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
758 g_module_close(module);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
759 }
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
760
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
761 /******************************************************************/
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
762
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
763 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
764 add_plugin(const gchar * filename)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
765 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
766 GModule *module;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
767 gpointer func;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
768
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
769 if (plugin_is_duplicate(filename))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
770 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
771
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
772 g_message("Loaded plugin (%s)", filename);
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
773
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
774 if (!(module = g_module_open(filename, G_MODULE_BIND_LOCAL))) {
4640
cbc9965e1552 removed some dangling white spaces.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4625
diff changeset
775 printf("Failed to load plugin (%s): %s\n",
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
776 filename, g_module_error());
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
777 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
778 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
779
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
780 /* v2 plugin loading */
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
781 if (g_module_symbol(module, "get_plugin_info", &func))
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
782 {
3682
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
783 PluginHeader *(*header_func_p)(struct _AudaciousFuncTableV1 *) = func;
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
784 PluginHeader *header;
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
785
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
786 /* this should never happen. */
3682
84bc78954db5 Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents: 3631
diff changeset
787 g_return_if_fail((header = header_func_p(&_aud_papi_v1)) != NULL);
2797
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
788
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
789 plugin2_process(header, module, filename);
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
790 return;
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
791 }
f0c1c8b22c88 [svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents: 2795
diff changeset
792
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
793 printf("Invalid plugin (%s)\n", filename);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
794 g_module_close(module);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
795 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
796
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
797 static gboolean
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
798 scan_plugin_func(const gchar * path, const gchar * basename, gpointer data)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
799 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
800 if (!str_has_suffix_nocase(basename, SHARED_SUFFIX))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
801 return FALSE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
802
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
803 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
804 return FALSE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
805
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
806 add_plugin(path);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
807
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
808 return FALSE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
809 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
810
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
811 static void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
812 scan_plugins(const gchar * path)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
813 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
814 dir_foreach(path, scan_plugin_func, NULL, NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
815 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
816
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
817 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
818 plugin_system_init(void)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
819 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
820 gchar *dir, **disabled;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
821 GList *node;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
822 OutputPlugin *op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
823 InputPlugin *ip;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
824 LowlevelPlugin *lp;
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
825 DiscoveryPlugin *dp;
4325
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
826 GtkWidget *dialog;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
827 gint dirsel = 0, i = 0;
4827
aa98096c7f68 Implement core changes for output plugin probing.
William Pitcock <nenolod@atheme.org>
parents: 4811
diff changeset
828 gint prio;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
829
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
830 if (!g_module_supported()) {
4325
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
831 dialog =
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
832 gtk_message_dialog_new (GTK_WINDOW (mainwin),
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
833 GTK_DIALOG_DESTROY_WITH_PARENT,
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
834 GTK_MESSAGE_ERROR,
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
835 GTK_BUTTONS_CLOSE,
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
836 _("Module loading not supported! Plugins will not be loaded.\n"));
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
837 gtk_dialog_run (GTK_DIALOG (dialog));
309e8f970517 removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents: 4303
diff changeset
838 gtk_widget_destroy (dialog);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
839 return;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
840 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
841
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
842 plugin_dict = mowgli_dictionary_create(g_ascii_strcasecmp);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
843 pvt_data_dict = mowgli_dictionary_create(g_ascii_strcasecmp);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
844
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
845 headers_list = mowgli_list_create();
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
846
3934
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
847 /* make extension hash */
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
848 ext_hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
849
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
850 #ifndef DISABLE_USER_PLUGIN_DIR
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4403
diff changeset
851 scan_plugins(aud_paths[BMP_PATH_USER_PLUGIN_DIR]);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
852 /*
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
853 * This is in a separate lo
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
854 * DiscoveryPlugin *dpop so if the user puts them in the
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
855 * wrong dir we'll still get them in the right order (home dir
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
856 * first) - Zinx
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
857 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
858 while (plugin_dir_list[dirsel]) {
4413
de33c83aa06f Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents: 4403
diff changeset
859 dir = g_build_filename(aud_paths[BMP_PATH_USER_PLUGIN_DIR],
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
860 plugin_dir_list[dirsel++], NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
861 scan_plugins(dir);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
862 g_free(dir);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
863 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
864 dirsel = 0;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
865 #endif
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
866
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
867 while (plugin_dir_list[dirsel]) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
868 dir = g_build_filename(PLUGIN_DIR, plugin_dir_list[dirsel++], NULL);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
869 scan_plugins(dir);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
870 g_free(dir);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
871 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
872
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
873 op_data.output_list = g_list_sort(op_data.output_list, outputlist_compare_func);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
874 if (!op_data.current_output_plugin
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
875 && g_list_length(op_data.output_list)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
876 op_data.current_output_plugin = op_data.output_list->data;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
877 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
878
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
879 ip_data.input_list = g_list_sort(ip_data.input_list, inputlist_compare_func);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
880
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
881 ep_data.effect_list = g_list_sort(ep_data.effect_list, effectlist_compare_func);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
882 ep_data.enabled_list = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
883
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
884 gp_data.general_list = g_list_sort(gp_data.general_list, generallist_compare_func);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
885 gp_data.enabled_list = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
886
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
887 vp_data.vis_list = g_list_sort(vp_data.vis_list, vislist_compare_func);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
888 vp_data.enabled_list = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
889
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
890 dp_data.discovery_list = g_list_sort(dp_data.discovery_list, discoverylist_compare_func);
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
891 dp_data.enabled_list = NULL;
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
892
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
893
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
894 general_enable_from_stringified_list(cfg.enabled_gplugins);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
895 vis_enable_from_stringified_list(cfg.enabled_vplugins);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
896 effect_enable_from_stringified_list(cfg.enabled_eplugins);
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
897 discovery_enable_from_stringified_list(cfg.enabled_dplugins);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
898
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
899 g_free(cfg.enabled_gplugins);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
900 cfg.enabled_gplugins = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
901
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
902 g_free(cfg.enabled_vplugins);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
903 cfg.enabled_vplugins = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
904
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
905 g_free(cfg.enabled_eplugins);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
906 cfg.enabled_eplugins = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
907
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
908 g_free(cfg.enabled_dplugins);
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
909 cfg.enabled_dplugins = NULL;
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
910
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
911 if (!cfg.outputplugin) {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
912 for (prio = 10; prio >= 0; prio--) {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
913 for (node = op_data.output_list; node; node = g_list_next(node)) {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
914 op = OUTPUT_PLUGIN(node->data);
4827
aa98096c7f68 Implement core changes for output plugin probing.
William Pitcock <nenolod@atheme.org>
parents: 4811
diff changeset
915
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
916 if (op->probe_priority != prio)
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
917 continue;
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
918
4828
e413f6dffd21 Sort by probe_priority. Noisy decision logic for the plugins while we work this out.
Tony Vroon <chainsaw@gentoo.org>
parents: 4827
diff changeset
919 if (op->init)
e413f6dffd21 Sort by probe_priority. Noisy decision logic for the plugins while we work this out.
Tony Vroon <chainsaw@gentoo.org>
parents: 4827
diff changeset
920 {
e413f6dffd21 Sort by probe_priority. Noisy decision logic for the plugins while we work this out.
Tony Vroon <chainsaw@gentoo.org>
parents: 4827
diff changeset
921 OutputPluginInitStatus ret = op->init();
e413f6dffd21 Sort by probe_priority. Noisy decision logic for the plugins while we work this out.
Tony Vroon <chainsaw@gentoo.org>
parents: 4827
diff changeset
922 if (ret == OUTPUT_PLUGIN_INIT_NO_DEVICES)
e413f6dffd21 Sort by probe_priority. Noisy decision logic for the plugins while we work this out.
Tony Vroon <chainsaw@gentoo.org>
parents: 4827
diff changeset
923 {
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
924 g_message("Plugin %s reports no devices. Attempting to avert disaster, trying others.\n",
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
925 g_path_get_basename(op->filename));
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
926 }
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
927 else if (ret == OUTPUT_PLUGIN_INIT_FAIL)
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
928 {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
929 g_message("Plugin %s was unable to initialise. Attemping to avert disaster, trying others.\n",
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
930 g_path_get_basename(op->filename));
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
931 }
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
932 else if (ret == OUTPUT_PLUGIN_INIT_FOUND_DEVICES)
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
933 {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
934 if (!op_data.current_output_plugin)
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
935 op_data.current_output_plugin = op;
4828
e413f6dffd21 Sort by probe_priority. Noisy decision logic for the plugins while we work this out.
Tony Vroon <chainsaw@gentoo.org>
parents: 4827
diff changeset
936 }
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
937 else if (!op_data.current_output_plugin)
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
938 {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
939 g_message("Plugin %s did not report status, and no plugin has worked yet. Do you still need to convert it? Selecting for now...\n",
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
940 g_path_get_basename(op->filename));
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
941
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
942 if (!op_data.current_output_plugin)
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
943 op_data.current_output_plugin = op;
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
944 }
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
945 }
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
946 }
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
947 }
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
948 }
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
949 else
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
950 {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
951 for (node = op_data.output_list; node; node = g_list_next(node)) {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
952 op = OUTPUT_PLUGIN(node->data);
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
953
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
954 if (op->init) {
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
955 plugin_set_current((Plugin *)op);
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
956 op->init();
4827
aa98096c7f68 Implement core changes for output plugin probing.
William Pitcock <nenolod@atheme.org>
parents: 4811
diff changeset
957 }
aa98096c7f68 Implement core changes for output plugin probing.
William Pitcock <nenolod@atheme.org>
parents: 4811
diff changeset
958
4884
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
959 if (!g_ascii_strcasecmp(g_path_get_basename(cfg.outputplugin), g_path_get_basename(op->filename)))
f1fc1d973f27 imported new plugin enumeration loop.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 4855
diff changeset
960 op_data.current_output_plugin = op;
4827
aa98096c7f68 Implement core changes for output plugin probing.
William Pitcock <nenolod@atheme.org>
parents: 4811
diff changeset
961 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
962 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
963
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
964 for (node = ip_data.input_list; node; node = g_list_next(node)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
965 ip = INPUT_PLUGIN(node->data);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
966 if (ip->init)
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
967 {
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
968 plugin_set_current((Plugin *)ip);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
969 ip->init();
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
970 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
971 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
972
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
973 for (node = dp_data.discovery_list; node; node = g_list_next(node)) {
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
974 dp = DISCOVERY_PLUGIN(node->data);
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
975 if (dp->init)
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
976 {
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
977 plugin_set_current((Plugin *)dp);
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
978 dp->init();
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
979 }
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
980 }
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
981
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
982
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
983 for (node = lowlevel_list; node; node = g_list_next(node)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
984 lp = LOWLEVEL_PLUGIN(node->data);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
985 if (lp->init)
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
986 {
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
987 plugin_set_current((Plugin *)lp);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
988 lp->init();
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
989 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
990 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
991
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
992 if (cfg.disabled_iplugins) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
993 disabled = g_strsplit(cfg.disabled_iplugins, ":", 0);
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
994
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
995 while (disabled[i]) {
3454
c0eb377bb4e5 Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents: 3438
diff changeset
996 Plugin *plugintmp = plugin_get_plugin(disabled[i]);
4099
b3830c28397e Fix memory leak in add_plugin() (Bugzilla #28)
Jussi Judin <jjudin+audacious@iki.fi>
parents: 4089
diff changeset
997 g_free(disabled[i]);
3454
c0eb377bb4e5 Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents: 3438
diff changeset
998 if (plugintmp)
c0eb377bb4e5 Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents: 3438
diff changeset
999 INPUT_PLUGIN(plugintmp)->enabled = FALSE;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1000 i++;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1001 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1002
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1003 g_free(disabled);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1004
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1005 g_free(cfg.disabled_iplugins);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1006 cfg.disabled_iplugins = NULL;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1007 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1008 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1009
3963
572258c68dfb - for input plugins which provide probe_for_tuple only, now input_do_check_file() calls probe_for_tuple regardless of cfg.use_pl_metadata.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3959
diff changeset
1010 static void
572258c68dfb - for input plugins which provide probe_for_tuple only, now input_do_check_file() calls probe_for_tuple regardless of cfg.use_pl_metadata.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3959
diff changeset
1011 remove_list(gpointer key, gpointer value, gpointer data)
572258c68dfb - for input plugins which provide probe_for_tuple only, now input_do_check_file() calls probe_for_tuple regardless of cfg.use_pl_metadata.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3959
diff changeset
1012 {
572258c68dfb - for input plugins which provide probe_for_tuple only, now input_do_check_file() calls probe_for_tuple regardless of cfg.use_pl_metadata.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3959
diff changeset
1013 g_list_free(*(GList **)value);
572258c68dfb - for input plugins which provide probe_for_tuple only, now input_do_check_file() calls probe_for_tuple regardless of cfg.use_pl_metadata.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3959
diff changeset
1014 }
572258c68dfb - for input plugins which provide probe_for_tuple only, now input_do_check_file() calls probe_for_tuple regardless of cfg.use_pl_metadata.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3959
diff changeset
1015
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1016 void
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1017 plugin_system_cleanup(void)
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1018 {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1019 InputPlugin *ip;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1020 OutputPlugin *op;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1021 EffectPlugin *ep;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1022 GeneralPlugin *gp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1023 VisPlugin *vp;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1024 LowlevelPlugin *lp;
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1025 DiscoveryPlugin *dp;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1026 GList *node;
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1027 mowgli_node_t *hlist_node;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1028
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1029 g_message("Shutting down plugin system");
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1030
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1031 if (playback_get_playing()) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1032 ip_data.stop = TRUE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1033 playback_stop();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1034 ip_data.stop = FALSE;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1035 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1036
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1037 /* FIXME: race condition -nenolod */
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1038 op_data.current_output_plugin = NULL;
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1039
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1040 for (node = get_input_list(); node; node = g_list_next(node)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1041 ip = INPUT_PLUGIN(node->data);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1042 if (ip) {
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1043 plugin_set_current((Plugin *)ip);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1044
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1045 if (ip->cleanup)
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1046 ip->cleanup();
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1047
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1048 GDK_THREADS_LEAVE();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1049 while (g_main_context_iteration(NULL, FALSE));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1050 GDK_THREADS_ENTER();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1051 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1052 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1053
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1054 if (ip_data.input_list != NULL)
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1055 {
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1056 g_list_free(ip_data.input_list);
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1057 ip_data.input_list = NULL;
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1058 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1059
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1060 for (node = get_output_list(); node; node = g_list_next(node)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1061 op = OUTPUT_PLUGIN(node->data);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1062 if (op) {
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1063 plugin_set_current((Plugin *)op);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1064
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1065 if (op->cleanup)
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1066 op->cleanup();
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1067
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1068 GDK_THREADS_LEAVE();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1069 while (g_main_context_iteration(NULL, FALSE));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1070 GDK_THREADS_ENTER();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1071 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1072 }
4640
cbc9965e1552 removed some dangling white spaces.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 4625
diff changeset
1073
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1074 if (op_data.output_list != NULL)
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1075 {
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1076 g_list_free(op_data.output_list);
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1077 op_data.output_list = NULL;
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1078 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1079
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1080 for (node = get_effect_list(); node; node = g_list_next(node)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1081 ep = EFFECT_PLUGIN(node->data);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1082 if (ep) {
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1083 plugin_set_current((Plugin *)ep);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1084
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1085 if (ep->cleanup)
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1086 ep->cleanup();
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1087
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1088 GDK_THREADS_LEAVE();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1089 while (g_main_context_iteration(NULL, FALSE));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1090 GDK_THREADS_ENTER();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1091 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1092 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1093
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1094 if (ep_data.effect_list != NULL)
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1095 {
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1096 g_list_free(ep_data.effect_list);
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1097 ep_data.effect_list = NULL;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1098 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1099
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1100 for (node = get_general_list(); node; node = g_list_next(node)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1101 gp = GENERAL_PLUGIN(node->data);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1102 if (gp) {
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1103 plugin_set_current((Plugin *)gp);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1104
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1105 if (gp->cleanup)
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1106 gp->cleanup();
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1107
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1108 GDK_THREADS_LEAVE();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1109 while (g_main_context_iteration(NULL, FALSE));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1110 GDK_THREADS_ENTER();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1111 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1112 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1113
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1114 if (gp_data.general_list != NULL)
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1115 {
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1116 g_list_free(gp_data.general_list);
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1117 gp_data.general_list = NULL;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1118 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1119
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1120 for (node = get_vis_list(); node; node = g_list_next(node)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1121 vp = VIS_PLUGIN(node->data);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1122 if (vp) {
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1123 plugin_set_current((Plugin *)vp);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1124
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1125 if (vp->cleanup)
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1126 vp->cleanup();
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1127
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1128 GDK_THREADS_LEAVE();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1129 while (g_main_context_iteration(NULL, FALSE));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1130 GDK_THREADS_ENTER();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1131 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1132 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1133
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1134 if (vp_data.vis_list != NULL)
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1135 {
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1136 g_list_free(vp_data.vis_list);
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1137 vp_data.vis_list = NULL;
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1138 }
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1139
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1140
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1141 for (node = get_discovery_list(); node; node = g_list_next(node)) {
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1142 dp = DISCOVERY_PLUGIN(node->data);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1143 if (dp) {
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1144 plugin_set_current((Plugin *)dp);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1145
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1146 if (dp->cleanup)
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1147 dp->cleanup();
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1148
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1149 GDK_THREADS_LEAVE();
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1150 while (g_main_context_iteration(NULL, FALSE));
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1151 GDK_THREADS_ENTER();
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1152 }
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1153 }
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1154
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1155 if (dp_data.discovery_list != NULL)
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1156 {
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1157 g_list_free(dp_data.discovery_list);
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1158 dp_data.discovery_list = NULL;
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1159 }
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3165
diff changeset
1160
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1161 for (node = lowlevel_list; node; node = g_list_next(node)) {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1162 lp = LOWLEVEL_PLUGIN(node->data);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1163 if (lp) {
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1164 plugin_set_current((Plugin *)lp);
4855
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1165
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1166 if (lp->cleanup)
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1167 lp->cleanup();
bc6212d7fab1 Remove no longer relevant code.
William Pitcock <nenolod@atheme.org>
parents: 4828
diff changeset
1168
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1169 GDK_THREADS_LEAVE();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1170 while (g_main_context_iteration(NULL, FALSE));
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1171 GDK_THREADS_ENTER();
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1172 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1173 }
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1174
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1175 if (lowlevel_list != NULL)
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1176 {
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1177 g_list_free(lowlevel_list);
2623
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1178 lowlevel_list = NULL;
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1179 }
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1180
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1181 /* XXX: vfs will crash otherwise. -nenolod */
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1182 if (vfs_transports != NULL)
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1183 {
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1184 g_list_free(vfs_transports);
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1185 vfs_transports = NULL;
0ad10a95ed10 [svn] - plugin reloading.
nenolod
parents: 2400
diff changeset
1186 }
2682
c3cd6e47faf6 [svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents: 2624
diff changeset
1187
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1188 MOWGLI_LIST_FOREACH(hlist_node, headers_list->head)
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1189 plugin2_unload(hlist_node->data, hlist_node);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1190
3437
3092a8b3fe34 Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents: 3247
diff changeset
1191 mowgli_dictionary_destroy(plugin_dict, NULL, NULL);
4266
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1192 mowgli_dictionary_destroy(pvt_data_dict, NULL, NULL);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1193
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1194 mowgli_list_free(headers_list);
2b7a74fce100 Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents: 4099
diff changeset
1195
3963
572258c68dfb - for input plugins which provide probe_for_tuple only, now input_do_check_file() calls probe_for_tuple regardless of cfg.use_pl_metadata.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3959
diff changeset
1196 g_hash_table_foreach(ext_hash, remove_list, NULL);
3934
e924c9ee3958 when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3768
diff changeset
1197 g_hash_table_remove_all(ext_hash);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1198 }