annotate src/audacious/plugin.h @ 3687:12e11b15b549

Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*. The bmp_cfg_db_* aliases will be removed later once people have done sed on the plugins.
author William Pitcock <nenolod@atheme.org>
date Tue, 02 Oct 2007 21:41:06 -0500
parents 0ba593887cae
children 8ab4cd5c6462
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
1 /* Audacious
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
2 * Copyright (C) 2005-2007 Audacious team.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
3 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
4 * BMP - Cross-platform multimedia player
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
5 * Copyright (C) 2003-2004 BMP development team.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
6 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
7 * Based on XMMS:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
8 * Copyright (C) 1998-2000 Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
9 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
10 * Redistribution and use in source and binary forms, with or without
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
11 * modification, are permitted provided that the following conditions are
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
12 * met:
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
13 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
14 * 1. Redistributions of source code must retain the above copyright
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
15 * notice, this list of conditions and the following disclaimer.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
16 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
18 * notice, this list of conditions and the following disclaimer in
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
19 * the documentation and/or other materials provided with the
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
20 * distribution.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
21 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
23 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
24 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
25 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
26 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
28 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
29 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
32 * SUCH DAMAGE.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
33 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
34
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
35 #ifndef BMP_PLUGIN_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
36 #define BMP_PLUGIN_H
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
37
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
38 #include <glib.h>
3298
f985357757e0 audacious-core: convert to tuple-ng, remove titlestring API.
William Pitcock <nenolod@atheme-project.org>
parents: 3295
diff changeset
39 #include <gtk/gtk.h>
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
40 #include "audacious/vfs.h"
3298
f985357757e0 audacious-core: convert to tuple-ng, remove titlestring API.
William Pitcock <nenolod@atheme-project.org>
parents: 3295
diff changeset
41 #include "audacious/tuple.h"
f985357757e0 audacious-core: convert to tuple-ng, remove titlestring API.
William Pitcock <nenolod@atheme-project.org>
parents: 3295
diff changeset
42 #include "audacious/tuple_formatter.h"
3149
84c44d369969 Add eventqueue interface.
William Pitcock <nenolod@atheme-project.org>
parents: 3126
diff changeset
43 #include "audacious/eventqueue.h"
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
44 #include "audacious/configdb.h"
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
45
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: 2796
diff changeset
46 #define PLUGIN(x) ((Plugin *)(x))
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
47 #define INPUT_PLUGIN(x) ((InputPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
48 #define OUTPUT_PLUGIN(x) ((OutputPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
49 #define EFFECT_PLUGIN(x) ((EffectPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
50 #define GENERAL_PLUGIN(x) ((GeneralPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
51 #define VIS_PLUGIN(x) ((VisPlugin *)(x))
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3181
diff changeset
52 #define DISCOVERY_PLUGIN(x) ((DiscoveryPlugin *)(x))
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
53
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
54 #define LOWLEVEL_PLUGIN(x) ((LowlevelPlugin *)(x))
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
55
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
56 #define __AUDACIOUS_NEWVFS__
3496
1590c8f4ffa9 Plugin API v6
Matti Hamalainen <ccr@tnsp.org>
parents: 3390
diff changeset
57 #define __AUDACIOUS_PLUGIN_API__ 6
1590c8f4ffa9 Plugin API v6
Matti Hamalainen <ccr@tnsp.org>
parents: 3390
diff changeset
58 #define __AUDACIOUS_INPUT_PLUGIN_API__ 6
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
59
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
60 typedef enum {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
61 FMT_U8,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
62 FMT_S8,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
63 FMT_U16_LE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
64 FMT_U16_BE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
65 FMT_U16_NE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
66 FMT_S16_LE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
67 FMT_S16_BE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
68 FMT_S16_NE
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
69 } AFormat;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
70
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
71 typedef enum {
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
72 INPUT_VIS_ANALYZER,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
73 INPUT_VIS_SCOPE,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
74 INPUT_VIS_VU,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
75 INPUT_VIS_OFF
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
76 } InputVisType;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
77
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
78
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
79 typedef struct _Plugin Plugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
80 typedef struct _InputPlugin InputPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
81 typedef struct _OutputPlugin OutputPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
82 typedef struct _EffectPlugin EffectPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
83 typedef struct _GeneralPlugin GeneralPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
84 typedef struct _VisPlugin VisPlugin;
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3181
diff changeset
85 typedef struct _DiscoveryPlugin DiscoveryPlugin;
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
86 typedef struct _LowlevelPlugin LowlevelPlugin;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
87
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
88 typedef struct _InputPlayback InputPlayback;
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
89
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
90 #define PLUGIN_COMMON_FIELDS \
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
91 gpointer handle; \
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
92 gchar *filename; \
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
93 gchar *description; \
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
94 void (*init) (void); \
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
95 void (*cleanup) (void); \
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
96 void (*about) (void); \
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
97 void (*configure) (void); \
3436
a630ecae6708 Add "gboolean enabled;" to PLUGIN_COMMON_FIELDS.
William Pitcock <nenolod@atheme.org>
parents: 3435
diff changeset
98 gboolean enabled;
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
99
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
100
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
101 /*
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
102 * The v2 Module header.
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
103 *
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
104 * _list fields contain a null-terminated list of "plugins" to register.
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
105 * A single library can provide multiple plugins.
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
106 * --nenolod
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
107 */
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
108 typedef struct {
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
109 gint magic;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
110 gint api_version;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
111 gchar *name;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
112 GCallback init;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
113 GCallback fini;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
114 Plugin *priv_assoc;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
115 InputPlugin **ip_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
116 OutputPlugin **op_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
117 EffectPlugin **ep_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
118 GeneralPlugin **gp_list;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
119 VisPlugin **vp_list;
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3181
diff changeset
120 DiscoveryPlugin **dp_list;
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
121 } PluginHeader;
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
122
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
123 #define PLUGIN_MAGIC 0x8EAC8DE2
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
124
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: 3673
diff changeset
125 /* define the public API here */
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: 3673
diff changeset
126 /* add new functions to the bottom of this list!!!! --nenolod */
3683
4284187479d7 Unbreak compile.
William Pitcock <nenolod@atheme.org>
parents: 3682
diff changeset
127 struct _AudaciousFuncTableV1 {
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: 3673
diff changeset
128
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: 3673
diff changeset
129 /* VFS */
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: 3673
diff changeset
130 VFSFile *(*vfs_fopen)(const gchar *uri, const gchar *mode);
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: 3673
diff changeset
131 gint (*vfs_fclose)(VFSFile *fd);
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: 3673
diff changeset
132 VFSFile *(*vfs_dup)(VFSFile *in);
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: 3673
diff changeset
133 size_t (*vfs_fread)(gpointer ptr,
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: 3673
diff changeset
134 size_t size,
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: 3673
diff changeset
135 size_t nmemb,
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: 3673
diff changeset
136 VFSFile * file);
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: 3673
diff changeset
137 size_t (*vfs_fwrite)(gconstpointer ptr,
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: 3673
diff changeset
138 size_t size,
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: 3673
diff changeset
139 size_t nmemb,
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: 3673
diff changeset
140 VFSFile *file);
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: 3673
diff changeset
141
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: 3673
diff changeset
142 gint (*vfs_getc)(VFSFile *stream);
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: 3673
diff changeset
143 gint (*vfs_ungetc)(gint c,
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: 3673
diff changeset
144 VFSFile *stream);
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: 3673
diff changeset
145 gchar *(*vfs_fgets)(gchar *s,
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: 3673
diff changeset
146 gint n,
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: 3673
diff changeset
147 VFSFile *stream);
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: 3673
diff changeset
148
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: 3673
diff changeset
149 gint (*vfs_fseek)(VFSFile * file,
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: 3673
diff changeset
150 glong offset,
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: 3673
diff changeset
151 gint whence);
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: 3673
diff changeset
152 void (*vfs_rewind)(VFSFile * file);
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: 3673
diff changeset
153 glong (*vfs_ftell)(VFSFile * file);
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: 3673
diff changeset
154 gboolean (*vfs_feof)(VFSFile * file);
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: 3673
diff changeset
155
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: 3673
diff changeset
156 gboolean (*vfs_file_test)(const gchar * path,
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: 3673
diff changeset
157 GFileTest 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: 3673
diff changeset
158
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: 3673
diff changeset
159 gboolean (*vfs_is_writeable)(const gchar * path);
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: 3673
diff changeset
160 gboolean (*vfs_truncate)(VFSFile * file, glong length);
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: 3673
diff changeset
161 off_t (*vfs_fsize)(VFSFile * file);
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: 3673
diff changeset
162 gchar *(*vfs_get_metadata)(VFSFile * file, const gchar * field);
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: 3673
diff changeset
163
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: 3673
diff changeset
164 int (*vfs_fprintf)(VFSFile *stream, gchar const *format, ...)
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: 3673
diff changeset
165 __attribute__ ((__format__ (__printf__, 2, 3)));
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: 3673
diff changeset
166
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: 3673
diff changeset
167 gboolean (*vfs_register_transport)(VFSConstructor *vtable);
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: 3673
diff changeset
168 void (*vfs_file_get_contents)(const gchar *filename, gchar **buf, gsize *size);
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: 3673
diff changeset
169 gboolean (*vfs_is_remote)(const gchar * path);
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: 3673
diff changeset
170 gboolean (*vfs_is_streaming)(VFSFile *file);
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: 3673
diff changeset
171
3684
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
172 /* VFS Buffer */
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
173 VFSFile *(*vfs_buffer_new)(gpointer data, gsize size);
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
174 VFSFile *(*vfs_buffer_new_from_string)(gchar *str);
3685
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
175
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
176 /* VFS Buffered File */
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
177 VFSFile *(*vfs_buffered_file_new_from_uri)(const gchar *uri);
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
178 VFSFile *(*vfs_buffered_file_release_live_fd)(VFSFile *fd);
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
179
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
180 /* ConfigDb */
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
181 ConfigDb *(*cfg_db_open)(void);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
182 void (*cfg_db_close)(ConfigDb *db);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
183
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
184 gboolean (*cfg_db_get_string)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
185 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
186 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
187 gchar **value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
188 gboolean (*cfg_db_get_int)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
189 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
190 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
191 gint *value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
192 gboolean (*cfg_db_get_bool)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
193 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
194 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
195 gboolean *value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
196 gboolean (*cfg_db_get_float)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
197 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
198 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
199 gfloat *value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
200 gboolean (*cfg_db_get_double)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
201 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
202 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
203 gdouble *value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
204
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
205 void (*cfg_db_set_string)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
206 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
207 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
208 const gchar *value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
209 void (*cfg_db_set_int)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
210 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
211 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
212 gint value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
213 void (*cfg_db_set_bool)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
214 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
215 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
216 gboolean value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
217 void (*cfg_db_set_float)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
218 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
219 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
220 gfloat value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
221 void (*cfg_db_set_double)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
222 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
223 const gchar *key,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
224 gdouble value);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
225
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
226 void (*cfg_db_unset_key)(ConfigDb *db,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
227 const gchar *section,
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
228 const gchar *key);
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
229
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: 3673
diff changeset
230 };
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: 3673
diff changeset
231
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: 3673
diff changeset
232 /* Convenience macros for accessing the public API. */
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: 3673
diff changeset
233 /* public name vtable mapping */
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: 3673
diff changeset
234 #define aud_vfs_fopen _audvt->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: 3673
diff changeset
235 #define aud_vfs_fclose _audvt->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: 3673
diff changeset
236 #define aud_vfs_dup _audvt->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: 3673
diff changeset
237 #define aud_vfs_fread _audvt->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: 3673
diff changeset
238 #define aud_vfs_fwrite _audvt->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: 3673
diff changeset
239 #define aud_vfs_getc _audvt->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: 3673
diff changeset
240 #define aud_vfs_ungetc _audvt->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: 3673
diff changeset
241 #define aud_vfs_fgets _audvt->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: 3673
diff changeset
242 #define aud_vfs_fseek _audvt->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: 3673
diff changeset
243 #define aud_vfs_rewind _audvt->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: 3673
diff changeset
244 #define aud_vfs_ftell _audvt->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: 3673
diff changeset
245 #define aud_vfs_feof _audvt->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: 3673
diff changeset
246 #define aud_vfs_file_test _audvt->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: 3673
diff changeset
247 #define aud_vfs_is_writeable _audvt->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: 3673
diff changeset
248 #define aud_vfs_truncate _audvt->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: 3673
diff changeset
249 #define aud_vfs_fsize _audvt->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: 3673
diff changeset
250 #define aud_vfs_get_metadata _audvt->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: 3673
diff changeset
251 #define aud_vfs_fprintf _audvt->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: 3673
diff changeset
252 #define aud_vfs_register_transport _audvt->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: 3673
diff changeset
253 #define aud_vfs_file_get_contents _audvt->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: 3673
diff changeset
254 #define aud_vfs_is_remote _audvt->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: 3673
diff changeset
255 #define aud_vfs_is_streaming _audvt->vfs_is_streaming
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: 3673
diff changeset
256
3684
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
257 #define aud_vfs_buffer_new _audvt->vfs_buffer_new
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
258 #define aud_vfs_buffer_new_from_string _audvt->vfs_buffer_new_from_string
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
259
3685
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
260 #define aud_vfs_buffered_file_new_from_uri _audvt->vfs_buffered_file_new_from_uri
0ba593887cae Export VfsBufferedFile functions.
William Pitcock <nenolod@atheme.org>
parents: 3684
diff changeset
261 #define aud_vfs_buffered_file_release_live_fd _audvt->vfs_buffered_file_release_live_fd
3684
2f9d8b987e40 Export VfsBuffer functions.
William Pitcock <nenolod@atheme.org>
parents: 3683
diff changeset
262
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
263 /* XXX: deprecation warnings */
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
264 #define bmp_cfg_db_open _audvt->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
265 #define bmp_cfg_db_close _audvt->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
266 #define bmp_cfg_db_set_string _audvt->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
267 #define bmp_cfg_db_set_int _audvt->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
268 #define bmp_cfg_db_set_bool _audvt->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
269 #define bmp_cfg_db_set_float _audvt->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
270 #define bmp_cfg_db_set_double _audvt->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
271 #define bmp_cfg_db_get_string _audvt->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
272 #define bmp_cfg_db_get_int _audvt->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
273 #define bmp_cfg_db_get_bool _audvt->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
274 #define bmp_cfg_db_get_float _audvt->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
275 #define bmp_cfg_db_get_double _audvt->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
276 #define bmp_cfg_db_unset_key _audvt->cfg_db_unset_key
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
277
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
278 #define aud_cfg_db_open _audvt->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
279 #define aud_cfg_db_close _audvt->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
280 #define aud_cfg_db_set_string _audvt->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
281 #define aud_cfg_db_set_int _audvt->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
282 #define aud_cfg_db_set_bool _audvt->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
283 #define aud_cfg_db_set_float _audvt->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
284 #define aud_cfg_db_set_double _audvt->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
285 #define aud_cfg_db_get_string _audvt->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
286 #define aud_cfg_db_get_int _audvt->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
287 #define aud_cfg_db_get_bool _audvt->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
288 #define aud_cfg_db_get_float _audvt->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
289 #define aud_cfg_db_get_double _audvt->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
290 #define aud_cfg_db_unset_key _audvt->cfg_db_unset_key
12e11b15b549 Export ConfigDB API via vtable, adding public aliases: bmp_cfg_db_*, aud_cfg_db_*.
William Pitcock <nenolod@atheme.org>
parents: 3685
diff changeset
291
3233
88f602569477 Make DECLARE_PLUGIN() macro use a __VA_ARGS__ list instead of a static amount of tokens.
William Pitcock <nenolod@atheme-project.org>
parents: 3232
diff changeset
292 #define DECLARE_PLUGIN(name, init, fini, ...) \
2802
c799098c396f [svn] - guard v2 module header with G_BEGIN_DECLS and G_END_DECLS
nenolod
parents: 2797
diff changeset
293 G_BEGIN_DECLS \
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
294 static PluginHeader _pluginInfo = { PLUGIN_MAGIC, __AUDACIOUS_PLUGIN_API__, \
3234
fb2f3675cbeb Fix DECLARE_PLUGIN() macro.
William Pitcock <nenolod@atheme-project.org>
parents: 3233
diff changeset
295 (gchar *)#name, init, fini, NULL, __VA_ARGS__ }; \
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: 3673
diff changeset
296 static struct _AudaciousFuncVTable1 *_audvt = NULL; \
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: 3673
diff changeset
297 G_MODULE_EXPORT PluginHeader *get_plugin_info(struct _AudaciousFuncVTable1 *_vt) { \
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: 3673
diff changeset
298 _audvt = _vt; \
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
299 return &_pluginInfo; \
2802
c799098c396f [svn] - guard v2 module header with G_BEGIN_DECLS and G_END_DECLS
nenolod
parents: 2797
diff changeset
300 } \
c799098c396f [svn] - guard v2 module header with G_BEGIN_DECLS and G_END_DECLS
nenolod
parents: 2797
diff changeset
301 G_END_DECLS
2796
e9af66a1be74 [svn] - add functions for defining the v2 plugin header
nenolod
parents: 2794
diff changeset
302
3237
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
303 #define SIMPLE_INPUT_PLUGIN(name, ip_list) \
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
304 DECLARE_PLUGIN(name, NULL, NULL, ip_list)
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
305
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
306 #define SIMPLE_OUTPUT_PLUGIN(name, op_list) \
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
307 DECLARE_PLUGIN(name, NULL, NULL, NULL, op_list)
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
308
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
309 #define SIMPLE_EFFECT_PLUGIN(name, ep_list) \
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
310 DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, ep_list)
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
311
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
312 #define SIMPLE_GENERAL_PLUGIN(name, gp_list) \
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
313 DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, NULL, gp_list)
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
314
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
315 #define SIMPLE_VISUAL_PLUGIN(name, vp_list) \
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
316 DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, NULL, NULL, vp_list)
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
317
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
318 #define SIMPLE_DISCOVER_PLUGIN(name, dp_list) \
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
319 DECLARE_PLUGIN(name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, dp_list)
12bc288a7511 add simplified macros to declare plugin. no more excessive NULLs.
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3234
diff changeset
320
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
321 /* Sadly, this is the most we can generalize out of the disparate
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
322 plugin structs usable with typecasts - descender */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
323 struct _Plugin {
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
324 PLUGIN_COMMON_FIELDS
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
325 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
326
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
327 /*
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
328 * LowlevelPlugin is used for lowlevel system services, such as PlaylistContainers,
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
329 * VFSContainers and the like.
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
330 *
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
331 * They are not GUI visible at this time.
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
332 *
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
333 * XXX: Is this still in use in 1.4? --nenolod
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
334 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
335 struct _LowlevelPlugin {
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
336 PLUGIN_COMMON_FIELDS
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
337 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
338
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
339 struct _OutputPlugin {
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
340 PLUGIN_COMMON_FIELDS
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
341
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
342 void (*get_volume) (gint * l, gint * r);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
343 void (*set_volume) (gint l, gint r);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
344
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
345 gint (*open_audio) (AFormat fmt, gint rate, gint nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
346 void (*write_audio) (gpointer ptr, gint length);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
347 void (*close_audio) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
348
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
349 void (*flush) (gint time);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
350 void (*pause) (gshort paused);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
351 gint (*buffer_free) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
352 gint (*buffer_playing) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
353 gint (*output_time) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
354 gint (*written_time) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
355
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
356 void (*tell_audio) (AFormat * fmt, gint * rate, gint * nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
357 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
358
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
359 struct _EffectPlugin {
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
360 PLUGIN_COMMON_FIELDS
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
361
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
362 gint (*mod_samples) (gpointer * data, gint length, AFormat fmt, gint srate, gint nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
363 void (*query_format) (AFormat * fmt, gint * rate, gint * nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
364 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
365
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
366 struct _InputPlayback {
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
367 gchar *filename;
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
368 InputPlugin *plugin;
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
369 void *data;
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
370 OutputPlugin *output;
2438
8750a62abed8 [svn] Provide flags in InputPlayback for common plugin flag needs, and provide a
iabervon
parents: 2437
diff changeset
371
8750a62abed8 [svn] Provide flags in InputPlayback for common plugin flag needs, and provide a
iabervon
parents: 2437
diff changeset
372 int playing;
8750a62abed8 [svn] Provide flags in InputPlayback for common plugin flag needs, and provide a
iabervon
parents: 2437
diff changeset
373 gboolean error;
8750a62abed8 [svn] Provide flags in InputPlayback for common plugin flag needs, and provide a
iabervon
parents: 2437
diff changeset
374 gboolean eof;
3181
1596dcb77acd Track playback monitor thread in InputPlayback.thread.
William Pitcock <nenolod@atheme-project.org>
parents: 3160
diff changeset
375
1596dcb77acd Track playback monitor thread in InputPlayback.thread.
William Pitcock <nenolod@atheme-project.org>
parents: 3160
diff changeset
376 GThread *thread;
3319
d4f6507cded3 added a system that allows input plugins to signal to the core (actually, they MUST do it) that they're ready for playback and it's safe to call their stop function; this fixes a nasty race condition that triggered on fast track-switching
Giacomo Lozito <james@develia.org>
parents: 3298
diff changeset
377
d4f6507cded3 added a system that allows input plugins to signal to the core (actually, they MUST do it) that they're ready for playback and it's safe to call their stop function; this fixes a nasty race condition that triggered on fast track-switching
Giacomo Lozito <james@develia.org>
parents: 3298
diff changeset
378 GMutex *pb_ready_mutex;
d4f6507cded3 added a system that allows input plugins to signal to the core (actually, they MUST do it) that they're ready for playback and it's safe to call their stop function; this fixes a nasty race condition that triggered on fast track-switching
Giacomo Lozito <james@develia.org>
parents: 3298
diff changeset
379 GCond *pb_ready_cond;
d4f6507cded3 added a system that allows input plugins to signal to the core (actually, they MUST do it) that they're ready for playback and it's safe to call their stop function; this fixes a nasty race condition that triggered on fast track-switching
Giacomo Lozito <james@develia.org>
parents: 3298
diff changeset
380 gint pb_ready_val;
d4f6507cded3 added a system that allows input plugins to signal to the core (actually, they MUST do it) that they're ready for playback and it's safe to call their stop function; this fixes a nasty race condition that triggered on fast track-switching
Giacomo Lozito <james@develia.org>
parents: 3298
diff changeset
381 gint (*set_pb_ready) (InputPlayback*);
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
382 };
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
383
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
384 struct _InputPlugin {
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
385 PLUGIN_COMMON_FIELDS
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
386
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
387 gint (*is_our_file) (gchar * filename);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
388 GList *(*scan_dir) (gchar * dirname);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
389
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
390 void (*play_file) (InputPlayback * playback);
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
391 void (*stop) (InputPlayback * playback);
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
392 void (*pause) (InputPlayback * playback, gshort paused);
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
393 void (*seek) (InputPlayback * playback, gint time);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
394
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
395 void (*set_eq) (gint on, gfloat preamp, gfloat * bands);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
396
2436
f346d30bf5ab [svn] Change the input plugin API to use a struct for the currently-playing file.
iabervon
parents: 2313
diff changeset
397 gint (*get_time) (InputPlayback * playback);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
398
2437
62d8f9c05832 [svn] More input plugin API work
iabervon
parents: 2436
diff changeset
399 gint (*get_volume) (gint * l, gint * r);
62d8f9c05832 [svn] More input plugin API work
iabervon
parents: 2436
diff changeset
400 gint (*set_volume) (gint l, gint r);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
401
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
402 InputVisType (*get_vis_type) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
403 void (*add_vis_pcm) (gint time, AFormat fmt, gint nch, gint length, gpointer ptr);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
404
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
405 void (*set_info) (gchar * title, gint length, gint rate, gint freq, gint nch);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
406 void (*set_info_text) (gchar * text);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
407 void (*get_song_info) (gchar * filename, gchar ** title, gint * length);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
408 void (*file_info_box) (gchar * filename);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
409
2437
62d8f9c05832 [svn] More input plugin API work
iabervon
parents: 2436
diff changeset
410 OutputPlugin *output; /* deprecated */
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
411
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
412 /* Added in Audacious 1.1.0 */
3298
f985357757e0 audacious-core: convert to tuple-ng, remove titlestring API.
William Pitcock <nenolod@atheme-project.org>
parents: 3295
diff changeset
413 Tuple *(*get_song_tuple) (gchar * filename);
f985357757e0 audacious-core: convert to tuple-ng, remove titlestring API.
William Pitcock <nenolod@atheme-project.org>
parents: 3295
diff changeset
414 void (*set_song_tuple) (Tuple * tuple);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
415 void (*set_status_buffering) (gboolean status);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
416
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
417 /* Added in Audacious 1.3.0 */
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
418 gint (*is_our_file_from_vfs) (gchar *filename, VFSFile *fd);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
419 gchar **vfs_extensions;
2620
6393862824e5 [svn] - add millisecond seek function to InputPlugin API. with this function, cuesheet and encoder plugins can achieve higher accuracy.
yaz
parents: 2473
diff changeset
420
6393862824e5 [svn] - add millisecond seek function to InputPlugin API. with this function, cuesheet and encoder plugins can achieve higher accuracy.
yaz
parents: 2473
diff changeset
421 /* Added in Audacious 1.4.0 */
6393862824e5 [svn] - add millisecond seek function to InputPlugin API. with this function, cuesheet and encoder plugins can achieve higher accuracy.
yaz
parents: 2473
diff changeset
422 void (*mseek) (InputPlayback * playback, gulong millisecond);
3298
f985357757e0 audacious-core: convert to tuple-ng, remove titlestring API.
William Pitcock <nenolod@atheme-project.org>
parents: 3295
diff changeset
423 Tuple *(*probe_for_tuple)(gchar *uri, VFSFile *fd);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
424 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
425
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
426 struct _GeneralPlugin {
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
427 PLUGIN_COMMON_FIELDS
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
428 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
429
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
430 struct _VisPlugin {
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
431 PLUGIN_COMMON_FIELDS
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
432
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
433 gint num_pcm_chs_wanted;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
434 gint num_freq_chs_wanted;
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
435
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
436 void (*disable_plugin) (struct _VisPlugin *);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
437 void (*playback_start) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
438 void (*playback_stop) (void);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
439 void (*render_pcm) (gint16 pcm_data[2][512]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
440 void (*render_freq) (gint16 freq_data[2][256]);
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
441 };
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
442
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3181
diff changeset
443 struct _DiscoveryPlugin {
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
444 PLUGIN_COMMON_FIELDS
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
445
3384
7ac9c5c6b44e fixed the interface
Cristi Magherusan <majeru@atheme-project.org>
parents: 3237
diff changeset
446 GList *(*get_devices);
3227
2619f4c62abe added Discovery plugin type
Cristi Magherusan <majeru@atheme-project.org>
parents: 3181
diff changeset
447 };
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
448
3435
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
449 /* undefine the macro -- struct Plugin should be used instead. */
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
450 #undef PLUGIN_COMMON_FIELDS
639af8eb6824 Clean up some plugin mess -- this breaks API for plugins which don't do the ".member: value" thing yet. Oh well.
William Pitcock <nenolod@atheme.org>
parents: 3390
diff changeset
451
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
452 G_BEGIN_DECLS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
453
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
454 /* So that input plugins can get the title formatting information */
3334
ea806daf3ef0 rename xmms_get_gentitle_format() to get_gentitle_format().
Yoshiki Yazawa <yaz@cc.rim.or.jp>
parents: 3319
diff changeset
455 G_CONST_RETURN gchar * get_gentitle_format(void);
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
456
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
457 G_END_DECLS
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
458
3009
9976e065e2f5 Mimetype system.
William Pitcock <nenolod@atheme-project.org>
parents: 2841
diff changeset
459 #include "audacious/mime.h"
3340
a0c93cb34598 Add functions for custom uri support of input plugins
Christian Birchinger <joker@netswarm.net>
parents: 3334
diff changeset
460 #include "audacious/custom_uri.h"
3009
9976e065e2f5 Mimetype system.
William Pitcock <nenolod@atheme-project.org>
parents: 2841
diff changeset
461
2313
3149d4b1a9a9 [svn] - objective-make autodepend fixes
nenolod
parents:
diff changeset
462 #endif