comparison audacious/vfs_buffer.h @ 2146:e0e50e151bab trunk

[svn] - move vfs from libaudacious to main audacious
author nenolod
date Sun, 17 Dec 2006 08:52:31 -0800
parents libaudacious/vfs_buffer.h@f18a5b617c34
children 329fb2453c87
comparison
equal deleted inserted replaced
2145:e2c6696c1d9a 2146:e0e50e151bab
1 /* Audacious
2 * Copyright (c) 2006 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