# HG changeset patch # User iabervon # Date 1169357424 28800 # Node ID e1513290ee3c229155821b47eee2c0a8080deb0e # Parent 063374a511054626ac99037175191b9c46905e2a [svn] Add a VFSFile method for getting metadata associated with the file. diff -r 063374a51105 -r e1513290ee3c ChangeLog --- a/ChangeLog Sat Jan 20 20:57:39 2007 -0800 +++ b/ChangeLog Sat Jan 20 21:30:24 2007 -0800 @@ -1,3 +1,11 @@ +2007-01-21 04:57:39 +0000 Yoshiki Yazawa + revision [3760] + - config.h is necessary to conditional compilation of chardet. + + trunk/src/audacious/strings.c | 4 ++++ + 1 file changed, 4 insertions(+) + + 2007-01-21 00:55:37 +0000 William Pitcock revision [3758] - return NULL if vfs_fopen request failed diff -r 063374a51105 -r e1513290ee3c src/audacious/ui_credits.c --- a/src/audacious/ui_credits.c Sat Jan 20 20:57:39 2007 -0800 +++ b/src/audacious/ui_credits.c Sat Jan 20 21:30:24 2007 -0800 @@ -50,6 +50,7 @@ static const gchar *credit_text[] = { N_("Audacious core developers:"), "George Averill", + "Daniel Barkalow", "Daniel Bradshaw", "Adam Cecile", "Michael Färber", @@ -75,6 +76,7 @@ N_("Plugin development:"), "Kiyoshi Aman", "Luca Barbato", + "Daniel Barkalow", "Shay Green", "Giacomo Lozito", "William Pitcock", diff -r 063374a51105 -r e1513290ee3c src/audacious/vfs.c --- a/src/audacious/vfs.c Sat Jan 20 20:57:39 2007 -0800 +++ b/src/audacious/vfs.c Sat Jan 20 21:30:24 2007 -0800 @@ -298,6 +298,27 @@ } /** + * vfs_get_metadata: + * @file: #VFSFile object that represents the VFS stream. + * @field: The string constant field name to get. + * + * Returns metadata about the stream. + * + * Return value: On success, a copy of the value of the + * field. Otherwise, NULL. + **/ +gchar * +vfs_get_metadata(VFSFile * file, const gchar * field) +{ + if (file == NULL) + return NULL; + + if (file->base->vfs_get_metadata_impl) + return file->base->vfs_get_metadata_impl(file, field); + return NULL; +} + +/** * vfs_file_test: * @path: A path to test. * @test: A GFileTest to run. diff -r 063374a51105 -r e1513290ee3c src/audacious/vfs.h --- a/src/audacious/vfs.h Sat Jan 20 20:57:39 2007 -0800 +++ b/src/audacious/vfs.h Sat Jan 20 21:30:24 2007 -0800 @@ -74,6 +74,7 @@ glong (*vfs_ftell_impl)(VFSFile *file); gboolean (*vfs_feof_impl)(VFSFile *file); gboolean (*vfs_truncate_impl)(VFSFile *file, glong length); + gchar *(*vfs_get_metadata_impl)(VFSFile *file, const gchar * field); }; G_BEGIN_DECLS @@ -112,6 +113,8 @@ extern gboolean vfs_truncate(VFSFile * file, glong length); +extern gchar *vfs_get_metadata(VFSFile * file, const gchar * field); + extern int vfs_fprintf(VFSFile *stream, gchar const *format, ...) __attribute__ ((__format__ (__printf__, 2, 3)));