Mercurial > audlegacy
annotate audacious/vfs_buffer.h @ 2304:b0e49d195c64 trunk
[svn] Fuck, I forgot to quote the $ in the commit msg, so my home was in the ChangeLog.
author | js |
---|---|
date | Tue, 09 Jan 2007 14:53:19 -0800 |
parents | 329fb2453c87 |
children |
rev | line source |
---|---|
2068 | 1 /* Audacious |
2253 | 2 * Copyright (c) 2006-2007 William Pitcock |
2068 | 3 * |
4 * This program is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
2105
f18a5b617c34
[svn] - move to GPLv2-only. Based on my interpretation of the license, we are
nenolod
parents:
2075
diff
changeset
|
6 * the Free Software Foundation; under version 2 of the License. |
2068 | 7 * |
8 * This program is distributed in the hope that it will be useful, | |
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 * GNU General Public License for more details. | |
12 * | |
13 * You should have received a copy of the GNU General Public License | |
14 * along with this program; if not, write to the Free Software | |
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | |
16 * 02110-1301, USA. | |
17 */ | |
18 | |
19 #ifndef AUDACIOUS_VFS_BUFFER_H | |
20 #define AUDACIOUS_VFS_BUFFER_H | |
21 | |
22 #include <glib.h> | |
2075 | 23 #include "vfs.h" |
2068 | 24 |
25 G_BEGIN_DECLS | |
26 | |
27 /** | |
28 * VFSBuffer: | |
29 * @data: The data inside the VFSBuffer. | |
30 * @iter: The current position of the VFS buffer iterator. | |
31 * @begin: The beginning of the memory segment that the VFS buffer uses. | |
32 * @end: The end of the memory segment that the VFS buffer uses. | |
33 * @size: The size of the memory segment. | |
34 * | |
35 * Private data for the VFS memorybuffer class. | |
36 **/ | |
37 | |
38 typedef struct { | |
39 guchar *data; | |
40 guchar *iter; | |
41 guchar *end; | |
42 gsize size; | |
43 } VFSBuffer; | |
44 | |
45 /** | |
46 * vfs_buffer_new: | |
47 * @data: Pointer to data to use. | |
48 * @size: Size of data to use. | |
49 * | |
50 * Creates a VFS buffer for reading/writing to a memory segment. | |
51 * | |
52 * Return value: A VFSFile handle for the memory segment's stream | |
53 * representation. | |
54 **/ | |
55 VFSFile *vfs_buffer_new(gpointer data, gsize size); | |
56 | |
57 /** | |
58 * vfs_buffer_new_from_string: | |
59 * @str: String to use. | |
60 * | |
61 * Creates a VFS buffer for reading/writing to a string. | |
62 * | |
63 * Return value: A VFSFile handle for the memory segment's stream | |
64 * representation. | |
65 **/ | |
66 VFSFile *vfs_buffer_new_from_string(gchar *str); | |
67 | |
68 G_END_DECLS | |
69 | |
70 #endif |