changeset 2376:e1513290ee3c trunk

[svn] Add a VFSFile method for getting metadata associated with the file.
author iabervon
date Sat, 20 Jan 2007 21:30:24 -0800
parents 063374a51105
children bc9e6b624a87
files ChangeLog src/audacious/ui_credits.c src/audacious/vfs.c src/audacious/vfs.h
diffstat 4 files changed, 34 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 <yaz@cc.rim.or.jp>
+  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 <nenolod@sacredspiral.co.uk>
   revision [3758]
   - return NULL if vfs_fopen request failed
--- 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",
--- 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.
--- 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)));