Mercurial > audlegacy
comparison src/audacious/vfs_buffer.h @ 2313:3149d4b1a9a9 trunk
[svn] - objective-make autodepend fixes
- move all sourcecode into src/ and adjust Makefiles accordingly
author | nenolod |
---|---|
date | Fri, 12 Jan 2007 11:43:40 -0800 |
parents | |
children | 7d3beedf1db8 |
comparison
equal
deleted
inserted
replaced
2312:e1a5a66fb9cc | 2313:3149d4b1a9a9 |
---|---|
1 /* Audacious | |
2 * Copyright (c) 2006-2007 William Pitcock | |
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 | |
6 * the Free Software Foundation; under version 2 of the License. | |
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> | |
23 #include "vfs.h" | |
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 |