Mercurial > audlegacy
comparison libaudacious/vfs.h @ 2060:53a3d5db6b58 trunk
[svn] - finish documenting the libaudacious API
author | nenolod |
---|---|
date | Mon, 04 Dec 2006 19:24:14 -0800 |
parents | 93c59698f5fd |
children | f18a5b617c34 |
comparison
equal
deleted
inserted
replaced
2059:8aaf0f145578 | 2060:53a3d5db6b58 |
---|---|
24 #include <stdio.h> | 24 #include <stdio.h> |
25 | 25 |
26 typedef struct _VFSFile VFSFile; | 26 typedef struct _VFSFile VFSFile; |
27 typedef struct _VFSConstructor VFSConstructor; | 27 typedef struct _VFSConstructor VFSConstructor; |
28 | 28 |
29 /** | |
30 * VFSFile: | |
31 * @uri: The URI of the stream. | |
32 * @handle: Opaque data used by the transport plugins. | |
33 * @base: The base vtable used for VFS functions. | |
34 * | |
35 * #VFSFile objects describe a VFS stream. | |
36 **/ | |
29 struct _VFSFile { | 37 struct _VFSFile { |
30 gchar *uri; | 38 gchar *uri; |
31 gpointer handle; | 39 gpointer handle; |
32 VFSConstructor *base; | 40 VFSConstructor *base; |
33 }; | 41 }; |
34 | 42 |
43 /** | |
44 * VFSConstructor: | |
45 * @uri_id: The uri identifier, e.g. "file" would handle "file://" streams. | |
46 * @vfs_fopen_impl: A function pointer which points to a fopen implementation. | |
47 * @vfs_fclose_impl: A function pointer which points to a fclose implementation. | |
48 * @vfs_fread_impl: A function pointer which points to a fread implementation. | |
49 * @vfs_fwrite_impl: A function pointer which points to a fwrite implementation. | |
50 * @vfs_getc_impl: A function pointer which points to a getc implementation. | |
51 * @vfs_ungetc_impl: A function pointer which points to an ungetc implementation. | |
52 * @vfs_fseek_impl: A function pointer which points to a fseek implementation. | |
53 * @vfs_rewind_impl: A function pointer which points to a rewind implementation. | |
54 * @vfs_ftell_impl: A function pointer which points to a ftell implementation. | |
55 * @vfs_feof_impl: A function pointer which points to a feof implementation. | |
56 * @vfs_truncate_impl: A function pointer which points to a ftruncate implementation. | |
57 * | |
58 * #VFSConstructor objects contain the base vtables used for extrapolating | |
59 * a VFS stream. #VFSConstructor objects should be considered %virtual in | |
60 * nature. VFS base vtables are registered via vfs_register_transport(). | |
61 **/ | |
35 struct _VFSConstructor { | 62 struct _VFSConstructor { |
36 gchar *uri_id; | 63 gchar *uri_id; |
37 VFSFile *(*vfs_fopen_impl)(const gchar *path, | 64 VFSFile *(*vfs_fopen_impl)(const gchar *path, |
38 const gchar *mode); | 65 const gchar *mode); |
39 gint (*vfs_fclose_impl)(VFSFile * file); | 66 gint (*vfs_fclose_impl)(VFSFile * file); |
49 gboolean (*vfs_feof_impl)(VFSFile *file); | 76 gboolean (*vfs_feof_impl)(VFSFile *file); |
50 gboolean (*vfs_truncate_impl)(VFSFile *file, glong length); | 77 gboolean (*vfs_truncate_impl)(VFSFile *file, glong length); |
51 }; | 78 }; |
52 | 79 |
53 G_BEGIN_DECLS | 80 G_BEGIN_DECLS |
54 | |
55 /* Reserved for private use by BMP */ | |
56 extern gboolean vfs_init(void); | |
57 | 81 |
58 extern VFSFile * vfs_fopen(const gchar * path, | 82 extern VFSFile * vfs_fopen(const gchar * path, |
59 const gchar * mode); | 83 const gchar * mode); |
60 extern gint vfs_fclose(VFSFile * file); | 84 extern gint vfs_fclose(VFSFile * file); |
61 | 85 |