Mercurial > audlegacy
changeset 3698:0ef1a18a5583
Export Tuple API.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sun, 07 Oct 2007 00:04:09 -0500 |
parents | cdc65ca04db4 |
children | ddde4794b4e2 |
files | src/audacious/plugin.h src/audacious/pluginenum.c |
diffstat | 2 files changed, 51 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/plugin.h Sat Oct 06 21:20:27 2007 -0500 +++ b/src/audacious/plugin.h Sun Oct 07 00:04:09 2007 -0500 @@ -227,6 +227,36 @@ const gchar *section, const gchar *key); + /* Tuple manipulation API */ + Tuple *(*tuple_new)(void); + Tuple *(*tuple_new_from_filename)(const gchar *filename); + + gboolean (*tuple_associate_string)(Tuple *tuple, + const gint nfield, + const gchar *field, + const gchar *string); + gboolean (*tuple_associate_int)(Tuple *tuple, + const gint nfield, + const gchar *field, + gint integer); + + void (*tuple_disassociate)(Tuple *tuple, + const gint nfield, + const gchar *field); + + void (*tuple_disassociate_now)(TupleValue *value); + + TupleValueType (*tuple_get_value_type)(Tuple *tuple, + const gint nfield, + const gchar *field); + + const gchar *(*tuple_get_string)(Tuple *tuple, + const gint nfield, + const gchar *field); + gint tuple_get_int(Tuple *tuple, + const gint nfield, + const gchar *field); + }; /* Convenience macros for accessing the public API. */ @@ -289,6 +319,17 @@ #define aud_cfg_db_get_double _audvt->cfg_db_get_double #define aud_cfg_db_unset_key _audvt->cfg_db_unset_key +#define aud_tuple_new _audvt->tuple_new +#define aud_tuple_new_from_filename _audvt->tuple_new_from_filename +#define aud_tuple_associate_string _audvt->tuple_associate_string +#define aud_tuple_associate_int _audvt->tuple_associate_int +#define aud_tuple_dissociate _audvt->tuple_dissociate +#define aud_tuple_dissociate_now _audvt->tuple_dissociate_now +#define aud_tuple_get_value_type _audvt->tuple_get_value_type +#define aud_tuple_get_string _audvt->tuple_get_string +#define aud_tuple_get_int _audvt->tuple_get_int +#define aud_tuple_free mowgli_object_unref + /* for multi-file plugins :( */ extern struct _AudaciousFuncTableV1 *_audvt;
--- a/src/audacious/pluginenum.c Sat Oct 06 21:20:27 2007 -0500 +++ b/src/audacious/pluginenum.c Sun Oct 07 00:04:09 2007 -0500 @@ -108,6 +108,16 @@ .cfg_db_set_double = cfg_db_set_double, .cfg_db_unset_key = cfg_db_unset_key, + + .tuple_new = tuple_new, + .tuple_new_from_filename = tuple_new_from_filename, + .tuple_associate_string = tuple_associate_string, + .tuple_associate_int = tuple_associate_int, + .tuple_dissociate = tuple_dissociate + .tuple_dissociate_now = tuple_dissociate_now, + .tuple_get_value_type = tuple_get_value_type, + .tuple_get_string = tuple_get_string, + .tuple_get_int = tuple_get_int, }; /*****************************************************************/