Mercurial > audlegacy
annotate src/audacious/vfs_buffer.h @ 3121:3b6d316f8b09 trunk
GPL3 relicensing.
author | William Pitcock <nenolod@atheme-project.org> |
---|---|
date | Fri, 20 Jul 2007 08:59:47 -0500 |
parents | 51dda959be4d |
children | f1c756f39e6c |
rev | line source |
---|---|
2896
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
1 /* Audacious |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
2 * Copyright (c) 2006-2007 William Pitcock |
2313 | 3 * |
2896
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
4 * This program is free software; you can redistribute it and/or modify |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
5 * it under the terms of the GNU General Public License as published by |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
2896
diff
changeset
|
6 * the Free Software Foundation; under version 3 of the License. |
2313 | 7 * |
2896
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
8 * This program is distributed in the hope that it will be useful, |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
11 * GNU General Public License for more details. |
2313 | 12 * |
2896
51dda959be4d
Backed out changeset 7d3beedf1db8677dab2327bc8d85af4746344f6e
William Pitcock <nenolod@atheme.org>
parents:
2861
diff
changeset
|
13 * You should have received a copy of the GNU General Public License |
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
2896
diff
changeset
|
14 * along with this program. If not, see <http://www.gnu.org/licenses>. |
2313 | 15 */ |
16 | |
17 #ifndef AUDACIOUS_VFS_BUFFER_H | |
18 #define AUDACIOUS_VFS_BUFFER_H | |
19 | |
20 #include <glib.h> | |
21 #include "vfs.h" | |
22 | |
23 G_BEGIN_DECLS | |
24 | |
25 /** | |
26 * VFSBuffer: | |
27 * @data: The data inside the VFSBuffer. | |
28 * @iter: The current position of the VFS buffer iterator. | |
29 * @begin: The beginning of the memory segment that the VFS buffer uses. | |
30 * @end: The end of the memory segment that the VFS buffer uses. | |
31 * @size: The size of the memory segment. | |
32 * | |
33 * Private data for the VFS memorybuffer class. | |
34 **/ | |
35 | |
36 typedef struct { | |
37 guchar *data; | |
38 guchar *iter; | |
39 guchar *end; | |
40 gsize size; | |
41 } VFSBuffer; | |
42 | |
43 /** | |
44 * vfs_buffer_new: | |
45 * @data: Pointer to data to use. | |
46 * @size: Size of data to use. | |
47 * | |
48 * Creates a VFS buffer for reading/writing to a memory segment. | |
49 * | |
50 * Return value: A VFSFile handle for the memory segment's stream | |
51 * representation. | |
52 **/ | |
53 VFSFile *vfs_buffer_new(gpointer data, gsize size); | |
54 | |
55 /** | |
56 * vfs_buffer_new_from_string: | |
57 * @str: String to use. | |
58 * | |
59 * Creates a VFS buffer for reading/writing to a string. | |
60 * | |
61 * Return value: A VFSFile handle for the memory segment's stream | |
62 * representation. | |
63 **/ | |
64 VFSFile *vfs_buffer_new_from_string(gchar *str); | |
65 | |
66 G_END_DECLS | |
67 | |
68 #endif |