Mercurial > audlegacy
annotate src/audacious/pluginenum.c @ 4573:11f7874f3a95
add audacious_drct_get_length
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Wed, 21 May 2008 13:12:39 +0200 |
parents | d4c5719d30d1 |
children | d27f00f6b568 |
rev | line source |
---|---|
2313 | 1 /* Audacious - Cross-platform multimedia player |
2 * Copyright (C) 2005-2007 Audacious development team | |
3 * | |
4 * Based on BMP: | |
5 * Copyright (C) 2003-2004 BMP development team | |
6 * | |
7 * Based on XMMS: | |
8 * Copyright (C) 1998-2003 XMMS development team | |
9 * | |
10 * This program is free software; you can redistribute it and/or modify | |
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 | 13 * |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
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 | 24 */ |
25 | |
26 #ifdef HAVE_CONFIG_H | |
27 # include "config.h" | |
28 #endif | |
29 | |
30 #ifndef SHARED_SUFFIX | |
31 # define SHARED_SUFFIX G_MODULE_SUFFIX | |
32 #endif | |
33 | |
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 | 37 #include <gmodule.h> |
38 #include <string.h> | |
39 | |
40 #include "main.h" | |
41 #include "playback.h" | |
42 #include "playlist.h" | |
2373
ad1d7687814c
[svn] made strings.h for existing strings.c, cleanups
mf0102
parents:
2313
diff
changeset
|
43 #include "strings.h" |
2313 | 44 #include "util.h" |
45 | |
46 #include "effect.h" | |
47 #include "general.h" | |
48 #include "input.h" | |
49 #include "output.h" | |
50 #include "visualization.h" | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
51 #include "discovery.h" |
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
|
52 |
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
|
53 #include "pluginenum.h" |
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
|
54 |
3684
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
55 #include "vfs_buffer.h" |
3685
0ba593887cae
Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents:
3684
diff
changeset
|
56 #include "vfs_buffered_file.h" |
3684
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
57 |
4546 | 58 #include "ui_dock.h" |
3754
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
59 #include "ui_preferences.h" |
4514
0fe46317167f
renamed playlist_fileinfo* to ui_fileinfo_show* and reworked those
mf0102 <0102@gmx.at>
parents:
4513
diff
changeset
|
60 #include "ui_fileinfo.h" |
3756 | 61 #include "ui_fileinfopopup.h" |
3754
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
62 |
3761 | 63 #include "effect.h" |
64 #include "volumecontrol.h" | |
4348
225d11441186
fixed compilation, if this is wrong please someone make it in a better way
Cristi Magherusan <majeru@atheme.org>
parents:
4346
diff
changeset
|
65 #include "ui_plugin_menu.h" |
3761 | 66 |
2313 | 67 const gchar *plugin_dir_list[] = { |
68 PLUGINSUBS, | |
69 NULL | |
70 }; | |
71 | |
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
|
72 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
|
73 |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
74 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
|
75 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
|
76 |
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
|
77 /*****************************************************************/ |
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 |
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 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
|
80 .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
|
81 .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
|
82 .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
|
83 .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
|
84 .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
|
85 .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
|
86 .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
|
87 .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
|
88 .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
|
89 .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
|
90 .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
|
91 .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
|
92 .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
|
93 .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
|
94 .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
|
95 .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
|
96 .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
|
97 .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
|
98 .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
|
99 .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
|
100 .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
|
101 .vfs_is_streaming = vfs_is_streaming, |
3684
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
102 |
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
103 .vfs_buffer_new = vfs_buffer_new, |
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
104 .vfs_buffer_new_from_string = vfs_buffer_new_from_string, |
3685
0ba593887cae
Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents:
3684
diff
changeset
|
105 |
0ba593887cae
Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents:
3684
diff
changeset
|
106 .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
|
107 .vfs_buffered_file_release_live_fd = vfs_buffered_file_release_live_fd, |
4394
34d010af590b
Oops, forgot to add function initializations to the vtable. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents:
4348
diff
changeset
|
108 |
34d010af590b
Oops, forgot to add function initializations to the vtable. Fixed.
Matti Hamalainen <ccr@tnsp.org>
parents:
4348
diff
changeset
|
109 .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
|
110 .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
|
111 .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
|
112 .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
|
113 .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
|
114 .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
|
115 |
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 .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
|
117 .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
|
118 |
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_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
|
120 .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
|
121 .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
|
122 .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
|
123 .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
|
124 |
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_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
|
126 .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
|
127 .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
|
128 .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
|
129 .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
|
130 |
12e11b15b549
Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents:
3685
diff
changeset
|
131 .cfg_db_unset_key = cfg_db_unset_key, |
3698 | 132 |
133 .tuple_new = tuple_new, | |
134 .tuple_new_from_filename = tuple_new_from_filename, | |
135 .tuple_associate_string = tuple_associate_string, | |
136 .tuple_associate_int = tuple_associate_int, | |
3701
e766d3aec087
Remove non-existant function.
William Pitcock <nenolod@atheme.org>
parents:
3699
diff
changeset
|
137 .tuple_disassociate = tuple_disassociate, |
3698 | 138 .tuple_get_value_type = tuple_get_value_type, |
139 .tuple_get_string = tuple_get_string, | |
140 .tuple_get_int = tuple_get_int, | |
3699
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
141 |
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
142 .tuple_formatter_process_string = tuple_formatter_process_string, |
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
143 .tuple_formatter_process_function = tuple_formatter_process_function, |
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
144 .tuple_formatter_process_construct = tuple_formatter_process_construct, |
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
145 .tuple_formatter_process_expr = tuple_formatter_process_expr, |
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
146 .tuple_formatter_register_function = tuple_formatter_register_function, |
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
147 .tuple_formatter_register_expression = tuple_formatter_register_expression, |
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
148 .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
|
149 |
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
150 .mime_get_plugin = mime_get_plugin, |
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
151 .mime_set_plugin = mime_set_plugin, |
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
152 |
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
153 .uri_get_plugin = uri_get_plugin, |
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
154 .uri_set_plugin = uri_set_plugin, |
3731
0e5da33a32b7
fun util dialog shit -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3706
diff
changeset
|
155 |
4527
53bd726e4461
Temporarily revert small part of mf0102's changeset that broke API by removing
Matti Hamalainen <ccr@tnsp.org>
parents:
4514
diff
changeset
|
156 .util_info_dialog = util_info_dialog, |
3736
269449ad845e
vtable get_gentitle_format().
William Pitcock <nenolod@atheme.org>
parents:
3735
diff
changeset
|
157 .get_gentitle_format = get_gentitle_format, |
3734
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
158 |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
159 .escape_shell_chars = escape_shell_chars, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
160 .str_append = str_append, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
161 .str_replace = str_replace, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
162 .str_replace_in = str_replace_in, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
163 .str_has_prefix_nocase = str_has_prefix_nocase, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
164 .str_has_suffix_nocase = str_has_suffix_nocase, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
165 .str_has_suffixes_nocase = str_has_suffixes_nocase, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
166 .str_to_utf8_fallback = str_to_utf8_fallback, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
167 .str_to_utf8 = str_to_utf8, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
168 .filename_to_utf8 = filename_to_utf8, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
169 .str_skip_chars = str_skip_chars, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
170 .convert_title_text = convert_title_text, |
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
171 .chardet_to_utf8 = chardet_to_utf8, |
3735
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
172 |
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
173 .playlist_container_register = playlist_container_register, |
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
174 .playlist_container_unregister = playlist_container_unregister, |
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
175 .playlist_container_read = playlist_container_read, |
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
176 .playlist_container_write = playlist_container_write, |
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
177 .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
|
178 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
179 .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
|
180 .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
|
181 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
182 .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
|
183 .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
|
184 .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
|
185 .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
|
186 .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
|
187 .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
|
188 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
189 .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
|
190 .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
|
191 .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
|
192 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
193 .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
|
194 .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
|
195 .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
|
196 .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
|
197 .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
|
198 .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
|
199 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
200 .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
|
201 .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
|
202 .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
|
203 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
204 .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
|
205 .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
|
206 .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
|
207 .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
|
208 .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
|
209 .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
|
210 .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
|
211 .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
|
212 .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
|
213 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
214 .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
|
215 .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
|
216 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
217 .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
|
218 .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
|
219 .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
|
220 .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
|
221 .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
|
222 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
223 .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
|
224 .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
|
225 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
226 .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
|
227 .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
|
228 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
229 .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
|
230 .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
|
231 .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
|
232 .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
|
233 |
4514
0fe46317167f
renamed playlist_fileinfo* to ui_fileinfo_show* and reworked those
mf0102 <0102@gmx.at>
parents:
4513
diff
changeset
|
234 .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
|
235 .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
|
236 |
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
237 .playlist_delete_index = playlist_delete_index, |
4346 | 238 .playlist_delete_filenames = NULL, /* remove eventually --mf0102 */ |
3738
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 | 286 |
287 .hook_associate = hook_associate, | |
288 .hook_dissociate = hook_dissociate, | |
289 .hook_register = hook_register, | |
290 .hook_call = hook_call, | |
3745 | 291 |
292 .open_ini_file = open_ini_file, | |
293 .close_ini_file = close_ini_file, | |
294 .read_ini_string = read_ini_string, | |
295 .read_ini_array = read_ini_array, | |
3746 | 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 | 299 |
300 .drct_quit = drct_quit, | |
301 .drct_eject = drct_eject, | |
302 .drct_jtf_show = drct_jtf_show, | |
303 .drct_main_win_is_visible = drct_main_win_is_visible, | |
304 .drct_main_win_toggle = drct_main_win_toggle, | |
305 .drct_eq_win_is_visible = drct_eq_win_is_visible, | |
306 .drct_eq_win_toggle = drct_eq_win_toggle, | |
307 .drct_pl_win_is_visible = drct_pl_win_is_visible, | |
308 .drct_pl_win_toggle = drct_pl_win_toggle, | |
4509 | 309 .drct_set_skin = NULL, /* remove someday. --mf0102 */ |
3753 | 310 .drct_activate = drct_activate, |
311 | |
312 .drct_play = drct_play, | |
313 .drct_pause = drct_pause, | |
314 .drct_stop = drct_stop, | |
315 .drct_get_playing = drct_get_playing, | |
316 .drct_get_paused = drct_get_paused, | |
317 .drct_get_stopped = drct_get_stopped, | |
318 .drct_get_info = drct_get_info, | |
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 | 321 .drct_seek = drct_seek, |
322 .drct_get_volume = drct_get_volume, | |
323 .drct_set_volume = drct_set_volume, | |
324 .drct_get_volume_main = drct_get_volume_main, | |
325 .drct_set_volume_main = drct_set_volume_main, | |
326 .drct_get_volume_balance = drct_get_volume_balance, | |
327 .drct_set_volume_balance = drct_set_volume_balance, | |
328 | |
329 .drct_pl_next = drct_pl_next, | |
330 .drct_pl_prev = drct_pl_prev, | |
331 .drct_pl_repeat_is_enabled = drct_pl_repeat_is_enabled, | |
332 .drct_pl_repeat_toggle = drct_pl_repeat_toggle, | |
333 .drct_pl_repeat_is_shuffled = drct_pl_repeat_is_shuffled, | |
334 .drct_pl_shuffle_toggle = drct_pl_shuffle_toggle, | |
335 .drct_pl_get_title = drct_pl_get_title, | |
336 .drct_pl_get_time = drct_pl_get_time, | |
337 .drct_pl_get_pos = drct_pl_get_pos, | |
338 .drct_pl_get_file = drct_pl_get_file, | |
339 .drct_pl_add = drct_pl_add, | |
340 .drct_pl_clear = drct_pl_clear, | |
341 .drct_pl_get_length = drct_pl_get_length, | |
342 .drct_pl_delete = drct_pl_delete, | |
343 .drct_pl_set_pos = drct_pl_set_pos, | |
344 .drct_pl_ins_url_string = drct_pl_ins_url_string, | |
345 .drct_pl_add_url_string = drct_pl_add_url_string, | |
346 .drct_pl_enqueue_to_temp = drct_pl_enqueue_to_temp, | |
347 | |
348 .drct_pq_get_length = drct_pq_get_length, | |
349 .drct_pq_add = drct_pq_add, | |
350 .drct_pq_remove = drct_pq_remove, | |
351 .drct_pq_clear = drct_pq_clear, | |
352 .drct_pq_is_queued = drct_pq_is_queued, | |
353 .drct_pq_get_position = drct_pq_get_position, | |
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 | 368 |
369 .flow_new = flow_new, | |
370 .flow_execute = flow_execute, | |
371 .flow_link_element = flow_link_element, | |
372 .flow_unlink_element = flow_unlink_element, | |
373 .effect_flow = effect_flow, | |
374 .volumecontrol_flow = volumecontrol_flow, | |
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, |
3768
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
377 |
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
378 .get_dock_window_list = get_dock_window_list, |
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
379 .dock_add_window = dock_add_window, |
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
380 .dock_remove_window = dock_remove_window, |
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
381 .dock_move_press = dock_move_press, |
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
382 .dock_move_motion = dock_move_motion, |
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
383 .dock_move_release = dock_move_release, |
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
384 .dock_is_moving = dock_is_moving, |
3973
26c503cdce58
Add get_output_list() to PAPI for xmms-crossfade.
William Pitcock <nenolod@atheme.org>
parents:
3963
diff
changeset
|
385 |
26c503cdce58
Add get_output_list() to PAPI for xmms-crossfade.
William Pitcock <nenolod@atheme.org>
parents:
3963
diff
changeset
|
386 .get_output_list = get_output_list, |
4030
0b004b3bfb70
Add plugin function to pull volume.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
3973
diff
changeset
|
387 |
0b004b3bfb70
Add plugin function to pull volume.
Jonathan Schleifer <js-audacious@webkeks.org>
parents:
3973
diff
changeset
|
388 .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
|
389 .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
|
390 .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
|
391 .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
|
392 |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
393 .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
|
394 .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
|
395 |
4288
fe09acacd473
add event_queue() to the vtable as aud_event_queue()
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents:
4282
diff
changeset
|
396 .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
|
397 |
3683 | 398 }; |
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
|
399 |
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
|
400 /*****************************************************************/ |
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
|
401 |
2313 | 402 GList *lowlevel_list = NULL; |
2623 | 403 extern GList *vfs_transports; |
404 | |
4513 | 405 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
|
406 |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
407 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
|
408 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
|
409 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
410 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
|
411 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
412 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
|
413 { |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
414 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
|
415 } |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
416 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
417 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
|
418 { |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
419 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
|
420 } |
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 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
|
423 { |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
424 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
|
425 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
426 elem = mowgli_dictionary_find(pvt_data_dict, g_basename(plugin->filename)); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
427 if (elem == NULL) |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
428 mowgli_dictionary_add(pvt_data_dict, g_basename(plugin->filename), data); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
429 else |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
430 elem->data = 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 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
433 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
|
434 { |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
435 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
|
436 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
437 return mowgli_dictionary_retrieve(pvt_data_dict, g_basename(cur_p->filename)); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
438 } |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
439 |
2313 | 440 static gint |
441 inputlist_compare_func(gconstpointer a, gconstpointer b) | |
442 { | |
443 const InputPlugin *ap = a, *bp = b; | |
2804 | 444 if(ap->description && bp->description) |
445 return strcasecmp(ap->description, bp->description); | |
446 else | |
447 return 0; | |
2313 | 448 } |
449 | |
450 static gint | |
451 outputlist_compare_func(gconstpointer a, gconstpointer b) | |
452 { | |
453 const OutputPlugin *ap = a, *bp = b; | |
2804 | 454 if(ap->description && bp->description) |
455 return strcasecmp(ap->description, bp->description); | |
456 else | |
457 return 0; | |
2313 | 458 } |
459 | |
460 static gint | |
461 effectlist_compare_func(gconstpointer a, gconstpointer b) | |
462 { | |
463 const EffectPlugin *ap = a, *bp = b; | |
2804 | 464 if(ap->description && bp->description) |
465 return strcasecmp(ap->description, bp->description); | |
466 else | |
467 return 0; | |
2313 | 468 } |
469 | |
470 static gint | |
471 generallist_compare_func(gconstpointer a, gconstpointer b) | |
472 { | |
473 const GeneralPlugin *ap = a, *bp = b; | |
2804 | 474 if(ap->description && bp->description) |
475 return strcasecmp(ap->description, bp->description); | |
476 else | |
477 return 0; | |
2313 | 478 } |
479 | |
480 static gint | |
481 vislist_compare_func(gconstpointer a, gconstpointer b) | |
482 { | |
483 const VisPlugin *ap = a, *bp = b; | |
2804 | 484 if(ap->description && bp->description) |
485 return strcasecmp(ap->description, bp->description); | |
486 else | |
487 return 0; | |
2313 | 488 } |
489 | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
490 static gint |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
491 discoverylist_compare_func(gconstpointer a, gconstpointer b) |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
492 { |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
493 const DiscoveryPlugin *ap = a, *bp = b; |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
494 if(ap->description && bp->description) |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
495 return strcasecmp(ap->description, bp->description); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
496 else |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
497 return 0; |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
498 } |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
499 |
2313 | 500 static gboolean |
501 plugin_is_duplicate(const gchar * filename) | |
502 { | |
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
|
503 gchar *base_filename = g_path_get_basename(filename); |
2313 | 504 |
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
|
505 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
|
506 { |
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
|
507 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
|
508 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
|
509 } |
2313 | 510 |
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
|
511 g_free(base_filename); |
2313 | 512 |
513 return FALSE; | |
514 } | |
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 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
|
517 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
|
518 { |
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
|
519 Plugin *plugin = mowgli_dictionary_retrieve(plugin_dict, filename); |
2313 | 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 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
|
522 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
|
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 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
|
525 } |
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 |
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 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
|
528 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
|
529 { |
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 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
|
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 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
|
533 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
|
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->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
|
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 |
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 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
|
539 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
|
540 { |
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 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
|
542 } |
2313 | 543 |
544 static void | |
545 input_plugin_init(Plugin * plugin) | |
546 { | |
547 InputPlugin *p = INPUT_PLUGIN(plugin); | |
548 | |
549 p->get_vis_type = input_get_vis_type; | |
550 p->add_vis_pcm = input_add_vis_pcm; | |
551 | |
552 /* Pretty const casts courtesy of XMMS's plugin.h legacy. Anyone | |
553 else thinks we could use a CONST macro to solve the warnings? | |
554 - descender */ | |
555 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
|
556 p->set_info_text = input_set_info_text; |
4345
51b7809c2d87
- removed some unused ui_*.h references
mf0102 <0102@gmx.at>
parents:
4325
diff
changeset
|
557 p->set_status_buffering = NULL; /* XXX: remove this someday --mf0102 */ |
2313 | 558 |
559 ip_data.input_list = g_list_append(ip_data.input_list, p); | |
560 | |
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
|
561 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
|
562 |
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
|
563 /* 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
|
564 will eventually provide multiple plugins --nenolod */ |
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 mowgli_dictionary_add(plugin_dict, g_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
|
566 |
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
|
567 /* 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
|
568 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
|
569 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
|
570 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
|
571 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
|
572 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
|
573 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
|
574 |
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 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
|
576 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
|
577 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
|
578 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
|
579 *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
|
580 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
|
581 } |
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
|
582 } |
2313 | 583 } |
584 | |
585 static void | |
586 output_plugin_init(Plugin * plugin) | |
587 { | |
588 OutputPlugin *p = OUTPUT_PLUGIN(plugin); | |
589 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
|
590 |
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
|
591 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
2313 | 592 } |
593 | |
594 static void | |
595 effect_plugin_init(Plugin * plugin) | |
596 { | |
597 EffectPlugin *p = EFFECT_PLUGIN(plugin); | |
598 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
|
599 |
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
|
600 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
2313 | 601 } |
602 | |
603 static void | |
604 general_plugin_init(Plugin * plugin) | |
605 { | |
606 GeneralPlugin *p = GENERAL_PLUGIN(plugin); | |
607 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
|
608 |
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
|
609 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
2313 | 610 } |
611 | |
612 static void | |
613 vis_plugin_init(Plugin * plugin) | |
614 { | |
615 VisPlugin *p = VIS_PLUGIN(plugin); | |
616 p->disable_plugin = vis_disable_plugin; | |
617 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
|
618 |
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
|
619 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
2313 | 620 } |
621 | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
622 static void |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
623 discovery_plugin_init(Plugin * plugin) |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
624 { |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
625 DiscoveryPlugin *p = DISCOVERY_PLUGIN(plugin); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
626 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
|
627 |
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
|
628 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
629 } |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
630 |
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
|
631 /*******************************************************************/ |
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
|
632 |
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
|
633 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
|
634 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
|
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 gchar buf[4096]; |
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 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
|
638 |
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 va_start(va, 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
|
640 vsnprintf(buf, 4096, str, 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
|
641 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
|
642 |
3247
e21930ccd5a8
remove old debugging notices that aren't very relevant anymore.
William Pitcock <nenolod@atheme-project.org>
parents:
3232
diff
changeset
|
643 g_message("*** %s\n", 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
|
644 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
|
645 } |
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 |
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
|
647 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
|
648 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
|
649 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
650 int i; |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
651 mowgli_node_t *hlist_node; |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
652 |
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
|
653 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
|
654 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
|
655 |
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
|
656 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
|
657 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
|
658 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
|
659 |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
660 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
|
661 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
|
662 |
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
|
663 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
|
664 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
|
665 |
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
|
666 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
|
667 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
|
668 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
|
669 |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
670 i = 0; |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
671 |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
672 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
|
673 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
674 for (; (header->ip_list)[i] != NULL; i++) |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
675 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
676 PLUGIN((header->ip_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, i); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
677 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
|
678 } |
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 } |
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
|
680 |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
681 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
|
682 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
683 for (; (header->op_list)[i] != NULL; i++) |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
684 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
685 PLUGIN((header->op_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, i); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
686 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
|
687 } |
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 } |
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
|
689 |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
690 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
|
691 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
692 for (; (header->ep_list)[i] != NULL; i++) |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
693 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
694 PLUGIN((header->ep_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, i); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
695 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
|
696 } |
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 } |
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
|
698 |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
699 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
|
700 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
701 for (; (header->gp_list)[i] != NULL; i++) |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
702 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
703 PLUGIN((header->gp_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, i); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
704 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
|
705 } |
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
|
706 } |
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 |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
708 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
|
709 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
710 for (; (header->vp_list)[i] != NULL; i++) |
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
711 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
712 PLUGIN((header->vp_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, i); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
713 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
|
714 } |
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
|
715 } |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
716 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
717 if (header->dp_list) |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
718 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
719 for (; (header->dp_list)[i] != NULL; i++) |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
720 { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
721 PLUGIN((header->dp_list)[i])->filename = g_strdup_printf("%s (#%d)", filename, i); |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
722 discovery_plugin_init(PLUGIN((header->dp_list)[i])); |
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 } |
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
|
725 } |
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
|
726 |
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
|
727 void |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
728 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
|
729 { |
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
|
730 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
|
731 |
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
|
732 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
|
733 |
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
|
734 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
|
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 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
|
737 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
|
738 |
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 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
|
740 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
|
741 |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
742 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
|
743 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
|
744 |
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
|
745 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
|
746 } |
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 |
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 |
2313 | 750 static void |
751 add_plugin(const gchar * filename) | |
752 { | |
753 GModule *module; | |
754 gpointer func; | |
755 | |
756 if (plugin_is_duplicate(filename)) | |
757 return; | |
758 | |
2623 | 759 g_message("Loaded plugin (%s)", filename); |
760 | |
2313 | 761 if (!(module = g_module_open(filename, G_MODULE_BIND_LOCAL))) { |
762 printf("Failed to load plugin (%s): %s\n", | |
763 filename, g_module_error()); | |
764 return; | |
765 } | |
766 | |
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
|
767 /* 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
|
768 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
|
769 { |
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
|
770 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
|
771 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
|
772 |
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
|
773 /* 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
|
774 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
|
775 |
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
|
776 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
|
777 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
|
778 } |
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
|
779 |
2313 | 780 printf("Invalid plugin (%s)\n", filename); |
781 g_module_close(module); | |
782 } | |
783 | |
784 static gboolean | |
785 scan_plugin_func(const gchar * path, const gchar * basename, gpointer data) | |
786 { | |
787 if (!str_has_suffix_nocase(basename, SHARED_SUFFIX)) | |
788 return FALSE; | |
789 | |
790 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR)) | |
791 return FALSE; | |
792 | |
793 add_plugin(path); | |
794 | |
795 return FALSE; | |
796 } | |
797 | |
798 static void | |
799 scan_plugins(const gchar * path) | |
800 { | |
801 dir_foreach(path, scan_plugin_func, NULL, NULL); | |
802 } | |
803 | |
804 void | |
805 plugin_system_init(void) | |
806 { | |
807 gchar *dir, **disabled; | |
808 GList *node; | |
809 OutputPlugin *op; | |
810 InputPlugin *ip; | |
811 LowlevelPlugin *lp; | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
812 DiscoveryPlugin *dp; |
4325
309e8f970517
removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents:
4303
diff
changeset
|
813 GtkWidget *dialog; |
2313 | 814 gint dirsel = 0, i = 0; |
815 | |
816 if (!g_module_supported()) { | |
4325
309e8f970517
removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents:
4303
diff
changeset
|
817 dialog = |
309e8f970517
removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents:
4303
diff
changeset
|
818 gtk_message_dialog_new (GTK_WINDOW (mainwin), |
309e8f970517
removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents:
4303
diff
changeset
|
819 GTK_DIALOG_DESTROY_WITH_PARENT, |
309e8f970517
removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents:
4303
diff
changeset
|
820 GTK_MESSAGE_ERROR, |
309e8f970517
removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents:
4303
diff
changeset
|
821 GTK_BUTTONS_CLOSE, |
309e8f970517
removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents:
4303
diff
changeset
|
822 _("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
|
823 gtk_dialog_run (GTK_DIALOG (dialog)); |
309e8f970517
removed report_error() and reimplemented some error routines
mf0102 <0102@gmx.at>
parents:
4303
diff
changeset
|
824 gtk_widget_destroy (dialog); |
2313 | 825 return; |
826 } | |
827 | |
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
|
828 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
|
829 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
|
830 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
831 headers_list = mowgli_list_create(); |
2313 | 832 |
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
|
833 /* 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
|
834 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
|
835 |
2313 | 836 #ifndef DISABLE_USER_PLUGIN_DIR |
4413
de33c83aa06f
Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents:
4403
diff
changeset
|
837 scan_plugins(aud_paths[BMP_PATH_USER_PLUGIN_DIR]); |
2313 | 838 /* |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
839 * This is in a separate lo |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
840 * DiscoveryPlugin *dpop so if the user puts them in the |
2313 | 841 * wrong dir we'll still get them in the right order (home dir |
842 * first) - Zinx | |
843 */ | |
844 while (plugin_dir_list[dirsel]) { | |
4413
de33c83aa06f
Huge renaming patch, changing BMP references to Audacious.
Matti Hamalainen <ccr@tnsp.org>
parents:
4403
diff
changeset
|
845 dir = g_build_filename(aud_paths[BMP_PATH_USER_PLUGIN_DIR], |
2313 | 846 plugin_dir_list[dirsel++], NULL); |
847 scan_plugins(dir); | |
848 g_free(dir); | |
849 } | |
850 dirsel = 0; | |
851 #endif | |
852 | |
853 while (plugin_dir_list[dirsel]) { | |
854 dir = g_build_filename(PLUGIN_DIR, plugin_dir_list[dirsel++], NULL); | |
855 scan_plugins(dir); | |
856 g_free(dir); | |
857 } | |
858 | |
859 op_data.output_list = g_list_sort(op_data.output_list, outputlist_compare_func); | |
860 if (!op_data.current_output_plugin | |
861 && g_list_length(op_data.output_list)) { | |
862 op_data.current_output_plugin = op_data.output_list->data; | |
863 } | |
864 | |
865 ip_data.input_list = g_list_sort(ip_data.input_list, inputlist_compare_func); | |
866 | |
867 ep_data.effect_list = g_list_sort(ep_data.effect_list, effectlist_compare_func); | |
868 ep_data.enabled_list = NULL; | |
869 | |
870 gp_data.general_list = g_list_sort(gp_data.general_list, generallist_compare_func); | |
871 gp_data.enabled_list = NULL; | |
872 | |
873 vp_data.vis_list = g_list_sort(vp_data.vis_list, vislist_compare_func); | |
874 vp_data.enabled_list = NULL; | |
875 | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
876 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
|
877 dp_data.enabled_list = NULL; |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
878 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
879 |
2313 | 880 general_enable_from_stringified_list(cfg.enabled_gplugins); |
881 vis_enable_from_stringified_list(cfg.enabled_vplugins); | |
882 effect_enable_from_stringified_list(cfg.enabled_eplugins); | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
883 discovery_enable_from_stringified_list(cfg.enabled_dplugins); |
2313 | 884 |
885 g_free(cfg.enabled_gplugins); | |
886 cfg.enabled_gplugins = NULL; | |
887 | |
888 g_free(cfg.enabled_vplugins); | |
889 cfg.enabled_vplugins = NULL; | |
890 | |
891 g_free(cfg.enabled_eplugins); | |
892 cfg.enabled_eplugins = NULL; | |
893 | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
894 g_free(cfg.enabled_dplugins); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
895 cfg.enabled_dplugins = NULL; |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
896 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
897 |
2313 | 898 for (node = op_data.output_list; node; node = g_list_next(node)) { |
899 op = OUTPUT_PLUGIN(node->data); | |
900 /* | |
901 * Only test basename to avoid problems when changing | |
902 * prefix. We will only see one plugin with the same | |
903 * basename, so this is usually what the user want. | |
904 */ | |
3631
6aea4fb32ef4
Missing NULL-pointer checks are bad, mkay?
Jonathan Schleifer <js@h3c.de>
parents:
3454
diff
changeset
|
905 if (cfg.outputplugin && !strcmp(g_basename(cfg.outputplugin), g_basename(op->filename))) |
2313 | 906 op_data.current_output_plugin = op; |
907 if (op->init) | |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
908 { |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
909 plugin_set_current((Plugin *)op); |
2313 | 910 op->init(); |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
911 } |
2313 | 912 } |
913 | |
914 for (node = ip_data.input_list; node; node = g_list_next(node)) { | |
915 ip = INPUT_PLUGIN(node->data); | |
916 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
|
917 { |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
918 plugin_set_current((Plugin *)ip); |
2313 | 919 ip->init(); |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
920 } |
2313 | 921 } |
922 | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
923 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
|
924 dp = DISCOVERY_PLUGIN(node->data); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
925 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
|
926 { |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
927 plugin_set_current((Plugin *)dp); |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
928 dp->init(); |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
929 } |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
930 } |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
931 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
932 |
2313 | 933 for (node = lowlevel_list; node; node = g_list_next(node)) { |
934 lp = LOWLEVEL_PLUGIN(node->data); | |
935 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
|
936 { |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
937 plugin_set_current((Plugin *)lp); |
2313 | 938 lp->init(); |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
939 } |
2313 | 940 } |
941 | |
942 if (cfg.disabled_iplugins) { | |
943 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
|
944 |
2313 | 945 while (disabled[i]) { |
3454
c0eb377bb4e5
Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents:
3438
diff
changeset
|
946 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
|
947 g_free(disabled[i]); |
3454
c0eb377bb4e5
Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents:
3438
diff
changeset
|
948 if (plugintmp) |
c0eb377bb4e5
Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents:
3438
diff
changeset
|
949 INPUT_PLUGIN(plugintmp)->enabled = FALSE; |
2313 | 950 i++; |
951 } | |
952 | |
953 g_free(disabled); | |
954 | |
955 g_free(cfg.disabled_iplugins); | |
956 cfg.disabled_iplugins = NULL; | |
957 } | |
958 } | |
959 | |
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
|
960 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
|
961 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
|
962 { |
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
|
963 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
|
964 } |
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
|
965 |
2313 | 966 void |
967 plugin_system_cleanup(void) | |
968 { | |
969 InputPlugin *ip; | |
970 OutputPlugin *op; | |
971 EffectPlugin *ep; | |
972 GeneralPlugin *gp; | |
973 VisPlugin *vp; | |
974 LowlevelPlugin *lp; | |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
975 DiscoveryPlugin *dp; |
2313 | 976 GList *node; |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
977 mowgli_node_t *hlist_node; |
2313 | 978 |
979 g_message("Shutting down plugin system"); | |
980 | |
981 if (playback_get_playing()) { | |
982 ip_data.stop = TRUE; | |
983 playback_stop(); | |
984 ip_data.stop = FALSE; | |
985 } | |
986 | |
2623 | 987 /* FIXME: race condition -nenolod */ |
988 op_data.current_output_plugin = NULL; | |
989 | |
2313 | 990 for (node = get_input_list(); node; node = g_list_next(node)) { |
991 ip = INPUT_PLUGIN(node->data); | |
992 if (ip && ip->cleanup) { | |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
993 plugin_set_current((Plugin *)ip); |
2313 | 994 ip->cleanup(); |
995 GDK_THREADS_LEAVE(); | |
996 while (g_main_context_iteration(NULL, FALSE)); | |
997 GDK_THREADS_ENTER(); | |
998 } | |
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
|
999 |
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
|
1000 if (ip->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
|
1001 g_module_close(ip->handle); |
2313 | 1002 } |
1003 | |
2623 | 1004 if (ip_data.input_list != NULL) |
1005 { | |
2313 | 1006 g_list_free(ip_data.input_list); |
2623 | 1007 ip_data.input_list = NULL; |
1008 } | |
2313 | 1009 |
1010 for (node = get_output_list(); node; node = g_list_next(node)) { | |
1011 op = OUTPUT_PLUGIN(node->data); | |
1012 if (op && op->cleanup) { | |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
1013 plugin_set_current((Plugin *)op); |
2313 | 1014 op->cleanup(); |
1015 GDK_THREADS_LEAVE(); | |
1016 while (g_main_context_iteration(NULL, FALSE)); | |
1017 GDK_THREADS_ENTER(); | |
1018 } | |
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
|
1019 |
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
|
1020 if (op->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
|
1021 g_module_close(op->handle); |
2313 | 1022 } |
1023 | |
2623 | 1024 if (op_data.output_list != NULL) |
1025 { | |
2313 | 1026 g_list_free(op_data.output_list); |
2623 | 1027 op_data.output_list = NULL; |
1028 } | |
2313 | 1029 |
1030 for (node = get_effect_list(); node; node = g_list_next(node)) { | |
1031 ep = EFFECT_PLUGIN(node->data); | |
1032 if (ep && ep->cleanup) { | |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
1033 plugin_set_current((Plugin *)ep); |
2313 | 1034 ep->cleanup(); |
1035 GDK_THREADS_LEAVE(); | |
1036 while (g_main_context_iteration(NULL, FALSE)); | |
1037 GDK_THREADS_ENTER(); | |
1038 } | |
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
|
1039 |
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
|
1040 if (ep->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
|
1041 g_module_close(ep->handle); |
2313 | 1042 } |
1043 | |
2623 | 1044 if (ep_data.effect_list != NULL) |
1045 { | |
2313 | 1046 g_list_free(ep_data.effect_list); |
2623 | 1047 ep_data.effect_list = NULL; |
2313 | 1048 } |
1049 | |
1050 for (node = get_general_list(); node; node = g_list_next(node)) { | |
1051 gp = GENERAL_PLUGIN(node->data); | |
1052 if (gp && gp->cleanup) { | |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
1053 plugin_set_current((Plugin *)gp); |
2313 | 1054 gp->cleanup(); |
1055 GDK_THREADS_LEAVE(); | |
1056 while (g_main_context_iteration(NULL, FALSE)); | |
1057 GDK_THREADS_ENTER(); | |
1058 } | |
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
|
1059 |
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
|
1060 if (gp->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
|
1061 g_module_close(gp->handle); |
2313 | 1062 } |
1063 | |
2623 | 1064 if (gp_data.general_list != NULL) |
1065 { | |
2313 | 1066 g_list_free(gp_data.general_list); |
2623 | 1067 gp_data.general_list = NULL; |
2313 | 1068 } |
1069 | |
1070 for (node = get_vis_list(); node; node = g_list_next(node)) { | |
1071 vp = VIS_PLUGIN(node->data); | |
1072 if (vp && vp->cleanup) { | |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
1073 plugin_set_current((Plugin *)vp); |
2313 | 1074 vp->cleanup(); |
1075 GDK_THREADS_LEAVE(); | |
1076 while (g_main_context_iteration(NULL, FALSE)); | |
1077 GDK_THREADS_ENTER(); | |
1078 } | |
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
|
1079 |
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
|
1080 if (vp->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
|
1081 g_module_close(vp->handle); |
2313 | 1082 } |
1083 | |
2623 | 1084 if (vp_data.vis_list != NULL) |
1085 { | |
2313 | 1086 g_list_free(vp_data.vis_list); |
2623 | 1087 vp_data.vis_list = NULL; |
1088 } | |
2313 | 1089 |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1090 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1091 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
|
1092 dp = DISCOVERY_PLUGIN(node->data); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1093 if (dp && dp->cleanup) { |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
1094 plugin_set_current((Plugin *)dp); |
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1095 dp->cleanup(); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1096 GDK_THREADS_LEAVE(); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1097 while (g_main_context_iteration(NULL, FALSE)); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1098 GDK_THREADS_ENTER(); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1099 } |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1100 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1101 if (dp->handle) |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1102 g_module_close(dp->handle); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1103 } |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1104 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1105 if (dp_data.discovery_list != NULL) |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1106 { |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1107 g_list_free(dp_data.discovery_list); |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1108 dp_data.discovery_list = NULL; |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1109 } |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1110 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1111 |
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1112 |
2313 | 1113 for (node = lowlevel_list; node; node = g_list_next(node)) { |
1114 lp = LOWLEVEL_PLUGIN(node->data); | |
1115 if (lp && lp->cleanup) { | |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
1116 plugin_set_current((Plugin *)lp); |
2313 | 1117 lp->cleanup(); |
1118 GDK_THREADS_LEAVE(); | |
1119 while (g_main_context_iteration(NULL, FALSE)); | |
1120 GDK_THREADS_ENTER(); | |
1121 } | |
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
|
1122 |
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
|
1123 if (lp->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
|
1124 g_module_close(lp->handle); |
2313 | 1125 } |
1126 | |
2623 | 1127 if (lowlevel_list != NULL) |
1128 { | |
2313 | 1129 g_list_free(lowlevel_list); |
2623 | 1130 lowlevel_list = NULL; |
1131 } | |
1132 | |
1133 /* XXX: vfs will crash otherwise. -nenolod */ | |
1134 if (vfs_transports != NULL) | |
1135 { | |
1136 g_list_free(vfs_transports); | |
1137 vfs_transports = NULL; | |
1138 } | |
2682
c3cd6e47faf6
[svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents:
2624
diff
changeset
|
1139 |
4266
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
1140 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
|
1141 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
|
1142 |
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
|
1143 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
|
1144 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
|
1145 |
2b7a74fce100
Implemented support for multiple subplugins inside a plugin (see bug #148) and PluginHeader finalization
stefano@zanga
parents:
4099
diff
changeset
|
1146 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
|
1147 |
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
|
1148 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
|
1149 g_hash_table_remove_all(ext_hash); |
2313 | 1150 } |