Mercurial > audlegacy
annotate src/audacious/pluginenum.c @ 3934:e924c9ee3958
when "Detect file formats on demand" is specified, filter unplayable files on loading by the hash table of all available extensions.
| author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
|---|---|
| date | Thu, 15 Nov 2007 16:34:09 +0900 |
| parents | bf6b1c5091d5 |
| children | a575c29cee05 |
| 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> | |
| 35 #include <gmodule.h> | |
| 36 #include <glib/gprintf.h> | |
| 37 #include <string.h> | |
| 38 | |
| 39 #include "main.h" | |
|
3768
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
40 #include "dock.h" |
| 2313 | 41 #include "ui_main.h" |
| 42 #include "playback.h" | |
| 43 #include "playlist.h" | |
|
2373
ad1d7687814c
[svn] made strings.h for existing strings.c, cleanups
mf0102
parents:
2313
diff
changeset
|
44 #include "strings.h" |
| 2313 | 45 #include "util.h" |
| 46 | |
| 47 #include "effect.h" | |
| 48 #include "general.h" | |
| 49 #include "input.h" | |
| 50 #include "output.h" | |
| 51 #include "visualization.h" | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
52 #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
|
53 |
|
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 #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
|
55 |
|
3684
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
56 #include "vfs_buffer.h" |
|
3685
0ba593887cae
Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents:
3684
diff
changeset
|
57 #include "vfs_buffered_file.h" |
|
3684
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
58 |
|
3754
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
59 #include "ui_preferences.h" |
| 3756 | 60 #include "ui_fileinfopopup.h" |
|
3754
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
61 |
| 3761 | 62 #include "effect.h" |
| 63 #include "iir.h" | |
| 64 #include "volumecontrol.h" | |
| 65 | |
| 2313 | 66 const gchar *plugin_dir_list[] = { |
| 67 PLUGINSUBS, | |
| 68 NULL | |
| 69 }; | |
| 70 | |
|
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
|
71 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
|
72 |
|
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
|
73 /*****************************************************************/ |
|
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
|
74 |
|
84bc78954db5
Start working on exporting all public functions via a vtable. The API version will be bumped to 7 once I am done and -Wl,-export-dynamic is removed.
William Pitcock <nenolod@atheme.org>
parents:
3631
diff
changeset
|
75 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
|
76 .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
|
77 .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
|
78 .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
|
79 .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
|
80 .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
|
81 .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
|
82 .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
|
83 .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
|
84 .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
|
85 .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
|
86 .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
|
87 .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
|
88 .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
|
89 .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
|
90 .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
|
91 .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
|
92 .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
|
93 .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
|
94 .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
|
95 .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
|
96 .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
|
97 .vfs_is_streaming = vfs_is_streaming, |
|
3684
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
98 |
|
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
99 .vfs_buffer_new = vfs_buffer_new, |
|
2f9d8b987e40
Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents:
3683
diff
changeset
|
100 .vfs_buffer_new_from_string = vfs_buffer_new_from_string, |
|
3685
0ba593887cae
Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents:
3684
diff
changeset
|
101 |
|
0ba593887cae
Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents:
3684
diff
changeset
|
102 .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
|
103 .vfs_buffered_file_release_live_fd = vfs_buffered_file_release_live_fd, |
|
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
|
104 |
|
12e11b15b549
Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents:
3685
diff
changeset
|
105 .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
|
106 .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
|
107 |
|
12e11b15b549
Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents:
3685
diff
changeset
|
108 .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
|
109 .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
|
110 .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
|
111 .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
|
112 .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
|
113 |
|
12e11b15b549
Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents:
3685
diff
changeset
|
114 .cfg_db_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
|
115 .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
|
116 .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
|
117 .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
|
118 .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
|
119 |
|
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_unset_key = cfg_db_unset_key, |
| 3698 | 121 |
| 122 .tuple_new = tuple_new, | |
| 123 .tuple_new_from_filename = tuple_new_from_filename, | |
| 124 .tuple_associate_string = tuple_associate_string, | |
| 125 .tuple_associate_int = tuple_associate_int, | |
|
3701
e766d3aec087
Remove non-existant function.
William Pitcock <nenolod@atheme.org>
parents:
3699
diff
changeset
|
126 .tuple_disassociate = tuple_disassociate, |
| 3698 | 127 .tuple_get_value_type = tuple_get_value_type, |
| 128 .tuple_get_string = tuple_get_string, | |
| 129 .tuple_get_int = tuple_get_int, | |
|
3699
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
130 |
|
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
131 .tuple_formatter_process_string = tuple_formatter_process_string, |
|
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
132 .tuple_formatter_process_function = tuple_formatter_process_function, |
|
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
133 .tuple_formatter_process_construct = tuple_formatter_process_construct, |
|
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
134 .tuple_formatter_process_expr = tuple_formatter_process_expr, |
|
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
135 .tuple_formatter_register_function = tuple_formatter_register_function, |
|
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
136 .tuple_formatter_register_expression = tuple_formatter_register_expression, |
|
ddde4794b4e2
Export tuple formatter API.
William Pitcock <nenolod@atheme.org>
parents:
3698
diff
changeset
|
137 .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
|
138 |
|
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
139 .mime_get_plugin = mime_get_plugin, |
|
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
140 .mime_set_plugin = mime_set_plugin, |
|
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
141 |
|
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
142 .uri_get_plugin = uri_get_plugin, |
|
fc17623eb561
Export MIME/Custom URI APIs
William Pitcock <nenolod@atheme.org>
parents:
3701
diff
changeset
|
143 .uri_set_plugin = uri_set_plugin, |
|
3731
0e5da33a32b7
fun util dialog shit -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3706
diff
changeset
|
144 |
|
0e5da33a32b7
fun util dialog shit -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3706
diff
changeset
|
145 .util_info_dialog = util_info_dialog, |
|
3736
269449ad845e
vtable get_gentitle_format().
William Pitcock <nenolod@atheme.org>
parents:
3735
diff
changeset
|
146 .get_gentitle_format = get_gentitle_format, |
|
3734
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
147 |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
148 .escape_shell_chars = escape_shell_chars, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
149 .str_append = str_append, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
150 .str_replace = str_replace, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
151 .str_replace_in = str_replace_in, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
152 .str_has_prefix_nocase = str_has_prefix_nocase, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
153 .str_has_suffix_nocase = str_has_suffix_nocase, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
154 .str_has_suffixes_nocase = str_has_suffixes_nocase, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
155 .str_to_utf8_fallback = str_to_utf8_fallback, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
156 .str_to_utf8 = str_to_utf8, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
157 .filename_to_utf8 = filename_to_utf8, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
158 .str_skip_chars = str_skip_chars, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
159 .convert_title_text = convert_title_text, |
|
e82ec5cb017c
strings API -> vtable
William Pitcock <nenolod@atheme.org>
parents:
3731
diff
changeset
|
160 .chardet_to_utf8 = chardet_to_utf8, |
|
3735
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
161 |
|
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
162 .playlist_container_register = playlist_container_register, |
|
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
163 .playlist_container_unregister = playlist_container_unregister, |
|
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
164 .playlist_container_read = playlist_container_read, |
|
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
165 .playlist_container_write = playlist_container_write, |
|
d41d03630f27
export PlaylistContainer API in vtable.
William Pitcock <nenolod@atheme.org>
parents:
3734
diff
changeset
|
166 .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
|
167 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
168 .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
|
169 .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
|
170 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
171 .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
|
172 .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
|
173 .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
|
174 .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
|
175 .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
|
176 .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
|
177 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
178 .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
|
179 .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
|
180 .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
|
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_add, |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
183 .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
|
184 .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
|
185 .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
|
186 .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
|
187 .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
|
188 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
189 .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
|
190 .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
|
191 .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
|
192 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
193 .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
|
194 .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
|
195 .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
|
196 .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
|
197 .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
|
198 .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
|
199 .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
|
200 .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
|
201 .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
|
202 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
203 .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
|
204 .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
|
205 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
206 .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
|
207 .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
|
208 .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
|
209 .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
|
210 .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
|
211 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
212 .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
|
213 .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
|
214 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
215 .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
|
216 .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
|
217 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
218 .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
|
219 .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
|
220 .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
|
221 .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
|
222 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
223 .playlist_fileinfo_current = playlist_fileinfo_current, |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
224 .playlist_fileinfo = playlist_fileinfo, |
|
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_delete_index = playlist_delete_index, |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
227 .playlist_delete_filenames = playlist_delete_filenames, |
|
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_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
|
230 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
231 .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
|
232 .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
|
233 .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
|
234 .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
|
235 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
236 .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
|
237 .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
|
238 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
239 .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
|
240 .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
|
241 .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
|
242 .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
|
243 .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
|
244 .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
|
245 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
246 .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
|
247 .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
|
248 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
249 .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
|
250 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
251 .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
|
252 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
253 .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
|
254 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
255 .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
|
256 .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
|
257 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
258 .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
|
259 .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
|
260 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
261 .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
|
262 .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
|
263 .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
|
264 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
265 .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
|
266 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
267 .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
|
268 .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
|
269 |
|
48a596a86459
export Playlist API, remove old crap that isn't there anymore
William Pitcock <nenolod@atheme.org>
parents:
3736
diff
changeset
|
270 .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
|
271 .playlist_playlists_equal = playlist_playlists_equal, |
|
3741
a1b31fe5a249
export ip_data and cfg
William Pitcock <nenolod@atheme.org>
parents:
3738
diff
changeset
|
272 |
|
a1b31fe5a249
export ip_data and cfg
William Pitcock <nenolod@atheme.org>
parents:
3738
diff
changeset
|
273 .ip_state = &ip_data, |
|
a1b31fe5a249
export ip_data and cfg
William Pitcock <nenolod@atheme.org>
parents:
3738
diff
changeset
|
274 ._cfg = &cfg, |
| 3744 | 275 |
| 276 .hook_associate = hook_associate, | |
| 277 .hook_dissociate = hook_dissociate, | |
| 278 .hook_register = hook_register, | |
| 279 .hook_call = hook_call, | |
| 3745 | 280 |
| 281 .open_ini_file = open_ini_file, | |
| 282 .close_ini_file = close_ini_file, | |
| 283 .read_ini_string = read_ini_string, | |
| 284 .read_ini_array = read_ini_array, | |
| 3746 | 285 |
| 286 .xmms_convert_buffers_new = xmms_convert_buffers_new, | |
| 287 .xmms_convert_buffers_free = xmms_convert_buffers_free, | |
| 288 .xmms_convert_buffers_destroy = xmms_convert_buffers_destroy, | |
| 289 .xmms_convert_get_func = xmms_convert_get_func, | |
| 290 .xmms_convert_get_channel_func = xmms_convert_get_channel_func, | |
| 291 .xmms_convert_get_frequency_func = xmms_convert_get_frequency_func, | |
|
3751
0fb35f6cc4b7
PluginMenu API is exported now. No changes required to plugins.
William Pitcock <nenolod@atheme.org>
parents:
3746
diff
changeset
|
292 |
|
0fb35f6cc4b7
PluginMenu API is exported now. No changes required to plugins.
William Pitcock <nenolod@atheme.org>
parents:
3746
diff
changeset
|
293 .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
|
294 .menu_plugin_item_remove = menu_plugin_item_remove, |
| 3753 | 295 |
| 296 .drct_quit = drct_quit, | |
| 297 .drct_eject = drct_eject, | |
| 298 .drct_jtf_show = drct_jtf_show, | |
| 299 .drct_main_win_is_visible = drct_main_win_is_visible, | |
| 300 .drct_main_win_toggle = drct_main_win_toggle, | |
| 301 .drct_eq_win_is_visible = drct_eq_win_is_visible, | |
| 302 .drct_eq_win_toggle = drct_eq_win_toggle, | |
| 303 .drct_pl_win_is_visible = drct_pl_win_is_visible, | |
| 304 .drct_pl_win_toggle = drct_pl_win_toggle, | |
| 305 .drct_set_skin = drct_set_skin, | |
| 306 .drct_activate = drct_activate, | |
| 307 | |
| 308 .drct_play = drct_play, | |
| 309 .drct_pause = drct_pause, | |
| 310 .drct_stop = drct_stop, | |
| 311 .drct_get_playing = drct_get_playing, | |
| 312 .drct_get_paused = drct_get_paused, | |
| 313 .drct_get_stopped = drct_get_stopped, | |
| 314 .drct_get_info = drct_get_info, | |
| 315 .drct_get_time = drct_get_time, | |
| 316 .drct_seek = drct_seek, | |
| 317 .drct_get_volume = drct_get_volume, | |
| 318 .drct_set_volume = drct_set_volume, | |
| 319 .drct_get_volume_main = drct_get_volume_main, | |
| 320 .drct_set_volume_main = drct_set_volume_main, | |
| 321 .drct_get_volume_balance = drct_get_volume_balance, | |
| 322 .drct_set_volume_balance = drct_set_volume_balance, | |
| 323 | |
| 324 .drct_pl_next = drct_pl_next, | |
| 325 .drct_pl_prev = drct_pl_prev, | |
| 326 .drct_pl_repeat_is_enabled = drct_pl_repeat_is_enabled, | |
| 327 .drct_pl_repeat_toggle = drct_pl_repeat_toggle, | |
| 328 .drct_pl_repeat_is_shuffled = drct_pl_repeat_is_shuffled, | |
| 329 .drct_pl_shuffle_toggle = drct_pl_shuffle_toggle, | |
| 330 .drct_pl_get_title = drct_pl_get_title, | |
| 331 .drct_pl_get_time = drct_pl_get_time, | |
| 332 .drct_pl_get_pos = drct_pl_get_pos, | |
| 333 .drct_pl_get_file = drct_pl_get_file, | |
| 334 .drct_pl_add = drct_pl_add, | |
| 335 .drct_pl_clear = drct_pl_clear, | |
| 336 .drct_pl_get_length = drct_pl_get_length, | |
| 337 .drct_pl_delete = drct_pl_delete, | |
| 338 .drct_pl_set_pos = drct_pl_set_pos, | |
| 339 .drct_pl_ins_url_string = drct_pl_ins_url_string, | |
| 340 .drct_pl_add_url_string = drct_pl_add_url_string, | |
| 341 .drct_pl_enqueue_to_temp = drct_pl_enqueue_to_temp, | |
| 342 | |
| 343 .drct_pq_get_length = drct_pq_get_length, | |
| 344 .drct_pq_add = drct_pq_add, | |
| 345 .drct_pq_remove = drct_pq_remove, | |
| 346 .drct_pq_clear = drct_pq_clear, | |
| 347 .drct_pq_is_queued = drct_pq_is_queued, | |
| 348 .drct_pq_get_position = drct_pq_get_position, | |
| 349 .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
|
350 |
|
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
351 .formatter_new = formatter_new, |
|
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
352 .formatter_destroy = formatter_destroy, |
|
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
353 .formatter_associate = formatter_associate, |
|
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
354 .formatter_dissociate = formatter_dissociate, |
|
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
355 .formatter_format = formatter_format, |
|
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
356 |
|
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
357 .prefswin_page_new = prefswin_page_new, |
|
74bed6b35161
export formatter and prefswin APIs
William Pitcock <nenolod@atheme.org>
parents:
3753
diff
changeset
|
358 .prefswin_page_destroy = prefswin_page_destroy, |
|
3755
2ca446f02d97
export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents:
3754
diff
changeset
|
359 |
|
2ca446f02d97
export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents:
3754
diff
changeset
|
360 .fileinfopopup_create = fileinfopopup_create, |
|
2ca446f02d97
export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents:
3754
diff
changeset
|
361 .fileinfopopup_destroy = fileinfopopup_destroy, |
|
2ca446f02d97
export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents:
3754
diff
changeset
|
362 .fileinfopopup_show_from_title = fileinfopopup_show_from_title, |
|
2ca446f02d97
export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents:
3754
diff
changeset
|
363 .fileinfopopup_show_from_tuple = fileinfopopup_show_from_tuple, |
|
2ca446f02d97
export the fileinfopopup API.
William Pitcock <nenolod@atheme.org>
parents:
3754
diff
changeset
|
364 .fileinfopopup_hide = fileinfopopup_hide, |
|
3757
d24d28e76588
export util_get_localdir().
William Pitcock <nenolod@atheme.org>
parents:
3756
diff
changeset
|
365 |
|
d24d28e76588
export util_get_localdir().
William Pitcock <nenolod@atheme.org>
parents:
3756
diff
changeset
|
366 .util_get_localdir = util_get_localdir, |
|
3758
21b45219249f
export input_check_file().
William Pitcock <nenolod@atheme.org>
parents:
3757
diff
changeset
|
367 |
|
21b45219249f
export input_check_file().
William Pitcock <nenolod@atheme.org>
parents:
3757
diff
changeset
|
368 .input_check_file = input_check_file, |
| 3761 | 369 |
| 370 .flow_new = flow_new, | |
| 371 .flow_execute = flow_execute, | |
| 372 .flow_link_element = flow_link_element, | |
| 373 .flow_unlink_element = flow_unlink_element, | |
| 374 .effect_flow = effect_flow, | |
| 375 .iir_flow = iir_flow, | |
| 376 .volumecontrol_flow = volumecontrol_flow, | |
| 377 | |
|
3765
b4a9d4be27ab
forgot to export a symbol. now I am done. really.
William Pitcock <nenolod@atheme.org>
parents:
3761
diff
changeset
|
378 .util_menu_main_show = util_menu_main_show, |
|
3768
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
379 |
|
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
380 .get_dock_window_list = get_dock_window_list, |
|
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
381 .dock_add_window = dock_add_window, |
|
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
382 .dock_remove_window = dock_remove_window, |
|
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
383 .dock_move_press = dock_move_press, |
|
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
384 .dock_move_motion = dock_move_motion, |
|
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
385 .dock_move_release = dock_move_release, |
|
bf6b1c5091d5
Export dock functions
Christian Birchinger <joker@netswarm.net>
parents:
3765
diff
changeset
|
386 .dock_is_moving = dock_is_moving, |
| 3683 | 387 }; |
|
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
|
388 |
|
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
|
389 /*****************************************************************/ |
|
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
|
390 |
| 2313 | 391 GList *lowlevel_list = NULL; |
| 2623 | 392 extern GList *vfs_transports; |
| 393 | |
|
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
|
394 mowgli_dictionary_t *plugin_dict = 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
|
395 |
| 2313 | 396 static gint |
| 397 inputlist_compare_func(gconstpointer a, gconstpointer b) | |
| 398 { | |
| 399 const InputPlugin *ap = a, *bp = b; | |
| 2804 | 400 if(ap->description && bp->description) |
| 401 return strcasecmp(ap->description, bp->description); | |
| 402 else | |
| 403 return 0; | |
| 2313 | 404 } |
| 405 | |
| 406 static gint | |
| 407 outputlist_compare_func(gconstpointer a, gconstpointer b) | |
| 408 { | |
| 409 const OutputPlugin *ap = a, *bp = b; | |
| 2804 | 410 if(ap->description && bp->description) |
| 411 return strcasecmp(ap->description, bp->description); | |
| 412 else | |
| 413 return 0; | |
| 2313 | 414 } |
| 415 | |
| 416 static gint | |
| 417 effectlist_compare_func(gconstpointer a, gconstpointer b) | |
| 418 { | |
| 419 const EffectPlugin *ap = a, *bp = b; | |
| 2804 | 420 if(ap->description && bp->description) |
| 421 return strcasecmp(ap->description, bp->description); | |
| 422 else | |
| 423 return 0; | |
| 2313 | 424 } |
| 425 | |
| 426 static gint | |
| 427 generallist_compare_func(gconstpointer a, gconstpointer b) | |
| 428 { | |
| 429 const GeneralPlugin *ap = a, *bp = b; | |
| 2804 | 430 if(ap->description && bp->description) |
| 431 return strcasecmp(ap->description, bp->description); | |
| 432 else | |
| 433 return 0; | |
| 2313 | 434 } |
| 435 | |
| 436 static gint | |
| 437 vislist_compare_func(gconstpointer a, gconstpointer b) | |
| 438 { | |
| 439 const VisPlugin *ap = a, *bp = b; | |
| 2804 | 440 if(ap->description && bp->description) |
| 441 return strcasecmp(ap->description, bp->description); | |
| 442 else | |
| 443 return 0; | |
| 2313 | 444 } |
| 445 | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
446 static gint |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
447 discoverylist_compare_func(gconstpointer a, gconstpointer b) |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
448 { |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
449 const DiscoveryPlugin *ap = a, *bp = b; |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
450 if(ap->description && bp->description) |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
451 return strcasecmp(ap->description, bp->description); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
452 else |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
453 return 0; |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
454 } |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
455 |
| 2313 | 456 static gboolean |
| 457 plugin_is_duplicate(const gchar * filename) | |
| 458 { | |
|
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
|
459 gchar *base_filename = g_path_get_basename(filename); |
| 2313 | 460 |
|
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
|
461 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
|
462 { |
|
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
|
463 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
|
464 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
|
465 } |
| 2313 | 466 |
|
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
|
467 g_free(base_filename); |
| 2313 | 468 |
| 469 return FALSE; | |
| 470 } | |
| 471 | |
|
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
|
472 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
|
473 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
|
474 { |
|
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
|
475 Plugin *plugin = mowgli_dictionary_retrieve(plugin_dict, filename); |
| 2313 | 476 |
|
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
|
477 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
|
478 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
|
479 |
|
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
|
480 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
|
481 } |
|
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
|
482 |
|
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
|
483 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
|
484 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
|
485 { |
|
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
|
486 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
|
487 |
|
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
|
488 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
|
489 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
|
490 |
|
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
|
491 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
|
492 } |
|
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
|
493 |
|
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
|
494 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
|
495 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
|
496 { |
|
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
|
497 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
|
498 } |
| 2313 | 499 |
| 500 static void | |
| 501 input_plugin_init(Plugin * plugin) | |
| 502 { | |
| 503 InputPlugin *p = INPUT_PLUGIN(plugin); | |
| 504 | |
| 505 p->get_vis_type = input_get_vis_type; | |
| 506 p->add_vis_pcm = input_add_vis_pcm; | |
| 507 | |
| 508 /* Pretty const casts courtesy of XMMS's plugin.h legacy. Anyone | |
| 509 else thinks we could use a CONST macro to solve the warnings? | |
| 510 - descender */ | |
| 511 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
|
512 p->set_info_text = input_set_info_text; |
|
8775dfc57ead
Remove mainwin_set_info_text() craq. Still some work to do.
William Pitcock <nenolod@atheme-project.org>
parents:
3123
diff
changeset
|
513 p->set_status_buffering = input_set_status_buffering; |
| 2313 | 514 |
| 515 ip_data.input_list = g_list_append(ip_data.input_list, p); | |
| 516 | |
|
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
|
517 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
|
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 /* 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
|
520 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
|
521 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
|
522 |
|
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
|
523 /* 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
|
524 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
|
525 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
|
526 for(i = 0; p->vfs_extensions[i] != NULL; 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
|
527 g_hash_table_replace(ext_hash, g_strdup(p->vfs_extensions[i]), g_strdup(p->description)); |
|
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
|
528 } |
|
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
|
529 } |
| 2313 | 530 } |
| 531 | |
| 532 static void | |
| 533 output_plugin_init(Plugin * plugin) | |
| 534 { | |
| 535 OutputPlugin *p = OUTPUT_PLUGIN(plugin); | |
| 536 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
|
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 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
| 2313 | 539 } |
| 540 | |
| 541 static void | |
| 542 effect_plugin_init(Plugin * plugin) | |
| 543 { | |
| 544 EffectPlugin *p = EFFECT_PLUGIN(plugin); | |
| 545 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
|
546 |
|
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3247
diff
changeset
|
547 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
| 2313 | 548 } |
| 549 | |
| 550 static void | |
| 551 general_plugin_init(Plugin * plugin) | |
| 552 { | |
| 553 GeneralPlugin *p = GENERAL_PLUGIN(plugin); | |
| 554 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
|
555 |
|
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
|
556 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
| 2313 | 557 } |
| 558 | |
| 559 static void | |
| 560 vis_plugin_init(Plugin * plugin) | |
| 561 { | |
| 562 VisPlugin *p = VIS_PLUGIN(plugin); | |
| 563 p->disable_plugin = vis_disable_plugin; | |
| 564 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
|
565 |
|
3092a8b3fe34
Big plugin system changes (part 1 of who knows, it's still a big mess):
William Pitcock <nenolod@atheme.org>
parents:
3247
diff
changeset
|
566 mowgli_dictionary_add(plugin_dict, g_basename(p->filename), p); |
| 2313 | 567 } |
| 568 | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
569 static void |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
570 discovery_plugin_init(Plugin * plugin) |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
571 { |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
572 DiscoveryPlugin *p = DISCOVERY_PLUGIN(plugin); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
573 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
|
574 |
|
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
|
575 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
|
576 } |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
577 |
|
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
|
578 /*******************************************************************/ |
|
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
|
579 |
|
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
|
580 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
|
581 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
|
582 { |
|
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
|
583 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
|
584 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
|
585 |
|
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
|
586 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
|
587 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
|
588 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
|
589 |
|
3247
e21930ccd5a8
remove old debugging notices that aren't very relevant anymore.
William Pitcock <nenolod@atheme-project.org>
parents:
3232
diff
changeset
|
590 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
|
591 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
|
592 } |
|
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
|
593 |
|
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
|
594 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
|
595 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
|
596 { |
|
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
|
597 InputPlugin **ip_iter; |
|
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
|
598 OutputPlugin **op_iter; |
|
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
|
599 EffectPlugin **ep_iter; |
|
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
|
600 GeneralPlugin **gp_iter; |
|
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
|
601 VisPlugin **vp_iter; |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
602 DiscoveryPlugin **dp_iter; |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
603 |
|
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
|
604 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
|
605 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
|
606 |
|
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
|
607 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
|
608 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
|
609 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
|
610 |
|
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
|
611 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
|
612 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
|
613 |
|
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
|
614 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
|
615 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
|
616 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
|
617 |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
618 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
|
619 { |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
620 for (ip_iter = header->ip_list; *ip_iter != NULL; ip_iter++) |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
621 { |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
622 PLUGIN(*ip_iter)->filename = g_strdup(filename); |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
623 input_plugin_init(PLUGIN(*ip_iter)); |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
624 } |
|
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
|
625 } |
|
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
|
626 |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
627 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
|
628 { |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
629 for (op_iter = header->op_list; *op_iter != NULL; op_iter++) |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
630 { |
| 2801 | 631 PLUGIN(*op_iter)->filename = g_strdup(filename); |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
632 output_plugin_init(PLUGIN(*op_iter)); |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
633 } |
|
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
|
634 } |
|
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 |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
636 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
|
637 { |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
638 for (ep_iter = header->ep_list; *ep_iter != NULL; ep_iter++) |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
639 { |
| 2801 | 640 PLUGIN(*ep_iter)->filename = g_strdup(filename); |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
641 effect_plugin_init(PLUGIN(*ep_iter)); |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
642 } |
|
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
|
643 } |
|
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 |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
645 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
|
646 { |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
647 for (gp_iter = header->gp_list; *gp_iter != NULL; gp_iter++) |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
648 { |
| 2801 | 649 PLUGIN(*gp_iter)->filename = g_strdup(filename); |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
650 general_plugin_init(PLUGIN(*gp_iter)); |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
651 } |
|
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
|
652 } |
|
f0c1c8b22c88
[svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents:
2795
diff
changeset
|
653 |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
654 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
|
655 { |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
656 for (vp_iter = header->vp_list; *vp_iter != NULL; vp_iter++) |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
657 { |
| 2801 | 658 PLUGIN(*vp_iter)->filename = g_strdup(filename); |
|
2799
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
659 vis_plugin_init(PLUGIN(*vp_iter)); |
|
febdfe7a482b
[svn] - improve plugin2 loader's robustness (e.g. make it not crash)
nenolod
parents:
2798
diff
changeset
|
660 } |
|
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
|
661 } |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
662 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
663 if (header->dp_list) |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
664 { |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
665 for (dp_iter = header->dp_list; *dp_iter != NULL; dp_iter++) |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
666 { |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
667 PLUGIN(*dp_iter)->filename = g_strdup(filename); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
668 discovery_plugin_init(PLUGIN(*dp_iter)); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
669 } |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
670 } |
|
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
|
671 } |
|
f0c1c8b22c88
[svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents:
2795
diff
changeset
|
672 |
|
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 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
|
674 plugin2_unload(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
|
675 { |
|
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
|
676 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
|
677 |
|
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
|
678 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
|
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 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
|
681 |
|
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 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
|
683 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
|
684 |
|
f0c1c8b22c88
[svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents:
2795
diff
changeset
|
685 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
|
686 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
|
687 |
|
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 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
|
689 } |
|
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
|
690 |
|
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 /******************************************************************/ |
|
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
|
692 |
| 2313 | 693 static void |
| 694 add_plugin(const gchar * filename) | |
| 695 { | |
| 696 GModule *module; | |
| 697 gpointer func; | |
| 698 | |
| 699 if (plugin_is_duplicate(filename)) | |
| 700 return; | |
| 701 | |
| 2623 | 702 g_message("Loaded plugin (%s)", filename); |
| 703 | |
| 2313 | 704 if (!(module = g_module_open(filename, G_MODULE_BIND_LOCAL))) { |
| 705 printf("Failed to load plugin (%s): %s\n", | |
| 706 filename, g_module_error()); | |
| 707 return; | |
| 708 } | |
| 709 | |
|
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
|
710 /* 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
|
711 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
|
712 { |
|
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
|
713 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
|
714 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
|
715 |
|
f0c1c8b22c88
[svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents:
2795
diff
changeset
|
716 /* 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
|
717 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
|
718 |
|
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
|
719 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
|
720 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
|
721 } |
|
f0c1c8b22c88
[svn] - first attempt at an plugin API2 loader. this is entirely implemented inside the plugin2 namespace, so please respect that if you go editing this ;p
nenolod
parents:
2795
diff
changeset
|
722 |
| 2313 | 723 printf("Invalid plugin (%s)\n", filename); |
| 724 g_module_close(module); | |
| 725 } | |
| 726 | |
| 727 static gboolean | |
| 728 scan_plugin_func(const gchar * path, const gchar * basename, gpointer data) | |
| 729 { | |
| 730 if (!str_has_suffix_nocase(basename, SHARED_SUFFIX)) | |
| 731 return FALSE; | |
| 732 | |
| 733 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR)) | |
| 734 return FALSE; | |
| 735 | |
| 736 add_plugin(path); | |
| 737 | |
| 738 return FALSE; | |
| 739 } | |
| 740 | |
| 741 static void | |
| 742 scan_plugins(const gchar * path) | |
| 743 { | |
| 744 dir_foreach(path, scan_plugin_func, NULL, NULL); | |
| 745 } | |
| 746 | |
| 747 void | |
| 748 plugin_system_init(void) | |
| 749 { | |
| 750 gchar *dir, **disabled; | |
| 751 GList *node; | |
| 752 OutputPlugin *op; | |
| 753 InputPlugin *ip; | |
| 754 LowlevelPlugin *lp; | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
755 DiscoveryPlugin *dp; |
| 2313 | 756 gint dirsel = 0, i = 0; |
| 757 | |
| 758 if (!g_module_supported()) { | |
| 759 report_error("Module loading not supported! Plugins will not be loaded.\n"); | |
| 760 return; | |
| 761 } | |
| 762 | |
|
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
|
763 plugin_dict = mowgli_dictionary_create(g_ascii_strcasecmp); |
| 2313 | 764 |
|
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
|
765 /* 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
|
766 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
|
767 |
| 2313 | 768 #ifndef DISABLE_USER_PLUGIN_DIR |
| 769 scan_plugins(bmp_paths[BMP_PATH_USER_PLUGIN_DIR]); | |
| 770 /* | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
771 * This is in a separate lo |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
772 * DiscoveryPlugin *dpop so if the user puts them in the |
| 2313 | 773 * wrong dir we'll still get them in the right order (home dir |
| 774 * first) - Zinx | |
| 775 */ | |
| 776 while (plugin_dir_list[dirsel]) { | |
| 777 dir = g_build_filename(bmp_paths[BMP_PATH_USER_PLUGIN_DIR], | |
| 778 plugin_dir_list[dirsel++], NULL); | |
| 779 scan_plugins(dir); | |
| 780 g_free(dir); | |
| 781 } | |
| 782 dirsel = 0; | |
| 783 #endif | |
| 784 | |
| 785 while (plugin_dir_list[dirsel]) { | |
| 786 dir = g_build_filename(PLUGIN_DIR, plugin_dir_list[dirsel++], NULL); | |
| 787 scan_plugins(dir); | |
| 788 g_free(dir); | |
| 789 } | |
| 790 | |
| 791 op_data.output_list = g_list_sort(op_data.output_list, outputlist_compare_func); | |
| 792 if (!op_data.current_output_plugin | |
| 793 && g_list_length(op_data.output_list)) { | |
| 794 op_data.current_output_plugin = op_data.output_list->data; | |
| 795 } | |
| 796 | |
| 797 ip_data.input_list = g_list_sort(ip_data.input_list, inputlist_compare_func); | |
| 798 | |
| 799 ep_data.effect_list = g_list_sort(ep_data.effect_list, effectlist_compare_func); | |
| 800 ep_data.enabled_list = NULL; | |
| 801 | |
| 802 gp_data.general_list = g_list_sort(gp_data.general_list, generallist_compare_func); | |
| 803 gp_data.enabled_list = NULL; | |
| 804 | |
| 805 vp_data.vis_list = g_list_sort(vp_data.vis_list, vislist_compare_func); | |
| 806 vp_data.enabled_list = NULL; | |
| 807 | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
808 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
|
809 dp_data.enabled_list = NULL; |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
810 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
811 |
| 2313 | 812 general_enable_from_stringified_list(cfg.enabled_gplugins); |
| 813 vis_enable_from_stringified_list(cfg.enabled_vplugins); | |
| 814 effect_enable_from_stringified_list(cfg.enabled_eplugins); | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
815 discovery_enable_from_stringified_list(cfg.enabled_dplugins); |
| 2313 | 816 |
| 817 g_free(cfg.enabled_gplugins); | |
| 818 cfg.enabled_gplugins = NULL; | |
| 819 | |
| 820 g_free(cfg.enabled_vplugins); | |
| 821 cfg.enabled_vplugins = NULL; | |
| 822 | |
| 823 g_free(cfg.enabled_eplugins); | |
| 824 cfg.enabled_eplugins = NULL; | |
| 825 | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
826 g_free(cfg.enabled_dplugins); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
827 cfg.enabled_dplugins = NULL; |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
828 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
829 |
| 2313 | 830 for (node = op_data.output_list; node; node = g_list_next(node)) { |
| 831 op = OUTPUT_PLUGIN(node->data); | |
| 832 /* | |
| 833 * Only test basename to avoid problems when changing | |
| 834 * prefix. We will only see one plugin with the same | |
| 835 * basename, so this is usually what the user want. | |
| 836 */ | |
|
3631
6aea4fb32ef4
Missing NULL-pointer checks are bad, mkay?
Jonathan Schleifer <js@h3c.de>
parents:
3454
diff
changeset
|
837 if (cfg.outputplugin && !strcmp(g_basename(cfg.outputplugin), g_basename(op->filename))) |
| 2313 | 838 op_data.current_output_plugin = op; |
| 839 if (op->init) | |
| 840 op->init(); | |
| 841 } | |
| 842 | |
| 843 for (node = ip_data.input_list; node; node = g_list_next(node)) { | |
| 844 ip = INPUT_PLUGIN(node->data); | |
| 845 if (ip->init) | |
| 846 ip->init(); | |
| 847 } | |
| 848 | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
849 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
|
850 dp = DISCOVERY_PLUGIN(node->data); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
851 if (dp->init) |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
852 dp->init(); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
853 } |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
854 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
855 |
| 2313 | 856 for (node = lowlevel_list; node; node = g_list_next(node)) { |
| 857 lp = LOWLEVEL_PLUGIN(node->data); | |
| 858 if (lp->init) | |
| 859 lp->init(); | |
| 860 } | |
| 861 | |
| 862 if (cfg.disabled_iplugins) { | |
| 863 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
|
864 |
| 2313 | 865 while (disabled[i]) { |
|
3454
c0eb377bb4e5
Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents:
3438
diff
changeset
|
866 Plugin *plugintmp = plugin_get_plugin(disabled[i]); |
|
c0eb377bb4e5
Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents:
3438
diff
changeset
|
867 if (plugintmp) |
|
c0eb377bb4e5
Check pointer to prevent NULL dereference.
Matti Hamalainen <ccr@tnsp.org>
parents:
3438
diff
changeset
|
868 INPUT_PLUGIN(plugintmp)->enabled = FALSE; |
| 2313 | 869 i++; |
| 870 } | |
| 871 | |
| 872 g_free(disabled); | |
| 873 | |
| 874 g_free(cfg.disabled_iplugins); | |
| 875 cfg.disabled_iplugins = NULL; | |
| 876 } | |
| 877 } | |
| 878 | |
| 879 void | |
| 880 plugin_system_cleanup(void) | |
| 881 { | |
| 882 InputPlugin *ip; | |
| 883 OutputPlugin *op; | |
| 884 EffectPlugin *ep; | |
| 885 GeneralPlugin *gp; | |
| 886 VisPlugin *vp; | |
| 887 LowlevelPlugin *lp; | |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
888 DiscoveryPlugin *dp; |
| 2313 | 889 GList *node; |
| 890 | |
| 891 g_message("Shutting down plugin system"); | |
| 892 | |
| 893 if (playback_get_playing()) { | |
| 894 ip_data.stop = TRUE; | |
| 895 playback_stop(); | |
| 896 ip_data.stop = FALSE; | |
| 897 } | |
| 898 | |
| 2623 | 899 /* FIXME: race condition -nenolod */ |
| 900 op_data.current_output_plugin = NULL; | |
| 901 | |
| 2313 | 902 for (node = get_input_list(); node; node = g_list_next(node)) { |
| 903 ip = INPUT_PLUGIN(node->data); | |
| 904 if (ip && ip->cleanup) { | |
| 905 ip->cleanup(); | |
| 906 GDK_THREADS_LEAVE(); | |
| 907 while (g_main_context_iteration(NULL, FALSE)); | |
| 908 GDK_THREADS_ENTER(); | |
| 909 } | |
|
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
|
910 |
|
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
|
911 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
|
912 g_module_close(ip->handle); |
| 2313 | 913 } |
| 914 | |
| 2623 | 915 if (ip_data.input_list != NULL) |
| 916 { | |
| 2313 | 917 g_list_free(ip_data.input_list); |
| 2623 | 918 ip_data.input_list = NULL; |
| 919 } | |
| 2313 | 920 |
| 921 for (node = get_output_list(); node; node = g_list_next(node)) { | |
| 922 op = OUTPUT_PLUGIN(node->data); | |
| 923 if (op && op->cleanup) { | |
| 924 op->cleanup(); | |
| 925 GDK_THREADS_LEAVE(); | |
| 926 while (g_main_context_iteration(NULL, FALSE)); | |
| 927 GDK_THREADS_ENTER(); | |
| 928 } | |
|
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
|
929 |
|
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
|
930 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
|
931 g_module_close(op->handle); |
| 2313 | 932 } |
| 933 | |
| 2623 | 934 if (op_data.output_list != NULL) |
| 935 { | |
| 2313 | 936 g_list_free(op_data.output_list); |
| 2623 | 937 op_data.output_list = NULL; |
| 938 } | |
| 2313 | 939 |
| 940 for (node = get_effect_list(); node; node = g_list_next(node)) { | |
| 941 ep = EFFECT_PLUGIN(node->data); | |
| 942 if (ep && ep->cleanup) { | |
| 943 ep->cleanup(); | |
| 944 GDK_THREADS_LEAVE(); | |
| 945 while (g_main_context_iteration(NULL, FALSE)); | |
| 946 GDK_THREADS_ENTER(); | |
| 947 } | |
|
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
|
948 |
|
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
|
949 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
|
950 g_module_close(ep->handle); |
| 2313 | 951 } |
| 952 | |
| 2623 | 953 if (ep_data.effect_list != NULL) |
| 954 { | |
| 2313 | 955 g_list_free(ep_data.effect_list); |
| 2623 | 956 ep_data.effect_list = NULL; |
| 2313 | 957 } |
| 958 | |
| 959 for (node = get_general_list(); node; node = g_list_next(node)) { | |
| 960 gp = GENERAL_PLUGIN(node->data); | |
| 961 if (gp && gp->cleanup) { | |
| 962 gp->cleanup(); | |
| 963 GDK_THREADS_LEAVE(); | |
| 964 while (g_main_context_iteration(NULL, FALSE)); | |
| 965 GDK_THREADS_ENTER(); | |
| 966 } | |
|
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
|
967 |
|
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
|
968 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
|
969 g_module_close(gp->handle); |
| 2313 | 970 } |
| 971 | |
| 2623 | 972 if (gp_data.general_list != NULL) |
| 973 { | |
| 2313 | 974 g_list_free(gp_data.general_list); |
| 2623 | 975 gp_data.general_list = NULL; |
| 2313 | 976 } |
| 977 | |
| 978 for (node = get_vis_list(); node; node = g_list_next(node)) { | |
| 979 vp = VIS_PLUGIN(node->data); | |
| 980 if (vp && vp->cleanup) { | |
| 981 vp->cleanup(); | |
| 982 GDK_THREADS_LEAVE(); | |
| 983 while (g_main_context_iteration(NULL, FALSE)); | |
| 984 GDK_THREADS_ENTER(); | |
| 985 } | |
|
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
|
986 |
|
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
|
987 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
|
988 g_module_close(vp->handle); |
| 2313 | 989 } |
| 990 | |
| 2623 | 991 if (vp_data.vis_list != NULL) |
| 992 { | |
| 2313 | 993 g_list_free(vp_data.vis_list); |
| 2623 | 994 vp_data.vis_list = NULL; |
| 995 } | |
| 2313 | 996 |
|
3227
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
997 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
998 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
|
999 dp = DISCOVERY_PLUGIN(node->data); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1000 if (dp && dp->cleanup) { |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1001 dp->cleanup(); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1002 GDK_THREADS_LEAVE(); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1003 while (g_main_context_iteration(NULL, FALSE)); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1004 GDK_THREADS_ENTER(); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1005 } |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1006 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1007 if (dp->handle) |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1008 g_module_close(dp->handle); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1009 } |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1010 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1011 if (dp_data.discovery_list != NULL) |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1012 { |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1013 g_list_free(dp_data.discovery_list); |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1014 dp_data.discovery_list = NULL; |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1015 } |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1016 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1017 |
|
2619f4c62abe
added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents:
3165
diff
changeset
|
1018 |
| 2313 | 1019 for (node = lowlevel_list; node; node = g_list_next(node)) { |
| 1020 lp = LOWLEVEL_PLUGIN(node->data); | |
| 1021 if (lp && lp->cleanup) { | |
| 1022 lp->cleanup(); | |
| 1023 GDK_THREADS_LEAVE(); | |
| 1024 while (g_main_context_iteration(NULL, FALSE)); | |
| 1025 GDK_THREADS_ENTER(); | |
| 1026 } | |
|
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
|
1027 |
|
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
|
1028 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
|
1029 g_module_close(lp->handle); |
| 2313 | 1030 } |
| 1031 | |
| 2623 | 1032 if (lowlevel_list != NULL) |
| 1033 { | |
| 2313 | 1034 g_list_free(lowlevel_list); |
| 2623 | 1035 lowlevel_list = NULL; |
| 1036 } | |
| 1037 | |
| 1038 /* XXX: vfs will crash otherwise. -nenolod */ | |
| 1039 if (vfs_transports != NULL) | |
| 1040 { | |
| 1041 g_list_free(vfs_transports); | |
| 1042 vfs_transports = NULL; | |
| 1043 } | |
|
2682
c3cd6e47faf6
[svn] - make the evil 'reload plugins' button behave a bit better
giacomo
parents:
2624
diff
changeset
|
1044 |
|
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
|
1045 mowgli_dictionary_destroy(plugin_dict, NULL, 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
|
1046 g_hash_table_remove_all(ext_hash); |
| 2313 | 1047 } |
