annotate src/audacious/vfs_buffered_file.h @ 3304:00286cde2485 trunk

Make filename a const
author Christian Birchinger <joker@netswarm.net>
date Fri, 10 Aug 2007 15:14:20 +0200
parents f1c756f39e6c
children 2eee464379dc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
2341
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
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.
2341
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
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.
2341
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
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>.
3123
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
15 *
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
16 * The Audacious team does not consider modular code linking to
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
17 * Audacious or using our public API to be a derived work.
2341
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
18 */
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
19
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
20 #ifndef AUDACIOUS_VFS_BUFFERED_FILE_H
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
21 #define AUDACIOUS_VFS_BUFFERED_FILE_H
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
22
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
23 #include <glib.h>
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
24 #include "vfs.h"
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
25 #include "vfs_buffer.h"
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
26
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
27 G_BEGIN_DECLS
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
28
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
29 /**
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
30 * VFSBufferedFile:
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
31 * @fd: The VFS handle for the active FD.
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
32 * @buffer: The first 32kb read from the FD.
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
33 * @mem: The memory for the buffer.
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
34 * @which: Whether to use the live FD or the buffer.
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
35 *
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
36 * Private data for the VFS memorybuffer class.
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
37 **/
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
38
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
39 typedef struct {
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
40 VFSFile *fd;
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
41 VFSFile *buffer;
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
42 gchar *mem;
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
43 gboolean which;
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
44 } VFSBufferedFile;
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
45
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
46 /**
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
47 * vfs_buffered_file_new_from_uri:
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
48 * @uri: The location to read from.
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
49 *
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
50 * Creates a VFSBufferedFile. VFSBufferedFile is read-only.
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
51 *
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
52 * Return value: A VFSFile handle for the VFSBufferedFile.
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
53 **/
2430
4e2fc64d95ef [svn] - make vfs_buffered_file_new_from_uri declaration const
nenolod
parents: 2341
diff changeset
54 VFSFile *vfs_buffered_file_new_from_uri(const gchar *uri);
2341
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
55
2589
ea470384e752 [svn] - add vfs_buffered_file_release_live_fd().
nenolod
parents: 2430
diff changeset
56 VFSFile *vfs_buffered_file_release_live_fd(VFSFile *fd);
ea470384e752 [svn] - add vfs_buffered_file_release_live_fd().
nenolod
parents: 2430
diff changeset
57
ea470384e752 [svn] - add vfs_buffered_file_release_live_fd().
nenolod
parents: 2430
diff changeset
58
2341
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
59 G_END_DECLS
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
60
02a850a2533b [svn] - automatically buffering deriv-class of VFSFile. will be used to speed up probing of network sources.
nenolod
parents:
diff changeset
61 #endif