|
Audacious $Id:Doxyfile42802007-03-2104:39:00Znenolod$
|
#include "vfs.h"#include "audstrings.h"#include <stdio.h>#include <unistd.h>#include <sys/stat.h>#include <sys/types.h>#include <string.h>Go to the source code of this file.
Functions | |
| void | vfs_register_transport (VFSConstructor *vtable) |
| Registers a VFSConstructor vtable with the VFS system. | |
| static VFSConstructor * | vfs_get_constructor (const gchar *path) |
| VFSFile * | vfs_fopen (const gchar *path, const gchar *mode) |
| Opens a stream from a VFS transport using one of the registered VFSConstructor handlers. | |
| gint | vfs_fclose (VFSFile *file) |
| Closes a VFS stream and destroys a VFSFile object. | |
| gint64 | vfs_fread (void *ptr, gint64 size, gint64 nmemb, VFSFile *file) |
| Reads from a VFS stream. | |
| gint64 | vfs_fwrite (const void *ptr, gint64 size, gint64 nmemb, VFSFile *file) |
| Writes to a VFS stream. | |
| gint | vfs_getc (VFSFile *file) |
| Reads a character from a VFS stream. | |
| gint | vfs_ungetc (gint c, VFSFile *file) |
| Pushes a character back to the VFS stream. | |
| gint | vfs_fseek (VFSFile *file, gint64 offset, gint whence) |
| Performs a seek in given VFS stream. | |
| void | vfs_rewind (VFSFile *file) |
| Rewinds a VFS stream. | |
| glong | vfs_ftell (VFSFile *file) |
| Returns the current position in the VFS stream's buffer. | |
| gboolean | vfs_feof (VFSFile *file) |
| Returns whether or not the VFS stream has reached EOF. | |
| gint | vfs_ftruncate (VFSFile *file, gint64 length) |
| Truncates a VFS stream to a certain size. | |
| gint64 | vfs_fsize (VFSFile *file) |
| Returns size of the file. | |
| gchar * | vfs_get_metadata (VFSFile *file, const gchar *field) |
| Returns metadata about the stream. | |
| gboolean | vfs_file_test (const gchar *path, GFileTest test) |
| Wrapper for g_file_test(). | |
| gboolean | vfs_is_writeable (const gchar *path) |
| Tests if a file is writeable. | |
| VFSFile * | vfs_dup (VFSFile *in) |
| Increments the amount of references that are using this FD. | |
| gboolean | vfs_is_remote (const gchar *path) |
| Tests if a path is remote uri. | |
| gboolean | vfs_is_streaming (VFSFile *file) |
| Tests if a file is associated to streaming. | |
Variables | |
| GList * | vfs_transports = NULL |
| GList of VFSConstructor objects holding all the registered VFS transports. | |
Increments the amount of references that are using this FD.
References are removed by calling vfs_fclose on the handle returned from this function. If the amount of references reaches zero, then the file will be closed.
| in | The VFSFile handle to mark as duplicated. |
Closes a VFS stream and destroys a VFSFile object.
| file | A VFSFile object to destroy. |
Definition at line 110 of file vfs.c.
Referenced by buffered_file_vfs_fclose_impl(), file_find_decoder(), file_read_image(), file_read_tuple(), file_write_tuple(), playback_monitor_thread(), probe_buffer_fclose(), save_preset_file(), vfs_buffered_file_new_from_uri(), vfs_buffered_file_release_live_fd(), and vfs_file_get_contents().
Returns whether or not the VFS stream has reached EOF.
| file | VFSFile object that represents the VFS stream. |
Definition at line 254 of file vfs.c.
Referenced by buffered_file_vfs_feof_impl(), and probe_buffer_feof().
| gboolean vfs_file_test | ( | const gchar * | path, |
| GFileTest | test | ||
| ) |
Wrapper for g_file_test().
| path | A path to test. |
| test | A GFileTest to run. |
Definition at line 318 of file vfs.c.
Referenced by add_list().
| VFSFile* vfs_fopen | ( | const gchar * | path, |
| const gchar * | mode | ||
| ) |
Opens a stream from a VFS transport using one of the registered VFSConstructor handlers.
| path | The path or URI to open. |
| mode | The preferred access privileges (not guaranteed). |
Definition at line 82 of file vfs.c.
Referenced by check_opened(), file_read_image(), file_read_tuple(), file_write_tuple(), playback_monitor_thread(), probe_buffer_new(), save_preset_file(), vfs_buffered_file_new_from_uri(), and vfs_file_get_contents().
| gint64 vfs_fread | ( | void * | ptr, |
| gint64 | size, | ||
| gint64 | nmemb, | ||
| VFSFile * | file | ||
| ) |
Reads from a VFS stream.
| ptr | A pointer to the destination buffer. |
| size | The size of each element to read. |
| nmemb | The number of elements to read. |
| file | VFSFile object that represents the VFS stream. |
Definition at line 138 of file vfs.c.
Referenced by buffered_file_vfs_fread_impl(), import_winamp_eqf(), increase_buffer(), vfs_buffered_file_new_from_uri(), vfs_fget_be16(), vfs_fget_be32(), vfs_fget_be64(), vfs_fget_le16(), vfs_fget_le32(), vfs_fget_le64(), and vfs_file_get_contents().
Performs a seek in given VFS stream.
Standard C-style values of whence can be used to indicate desired action.
| file | VFSFile object that represents the VFS stream. |
| offset | The offset to seek to. |
| whence | Type of the seek: SEEK_CUR, SEEK_SET or SEEK_END. |
Definition at line 208 of file vfs.c.
Referenced by buffered_file_vfs_fread_impl(), buffered_file_vfs_fseek_impl(), buffered_file_vfs_getc_impl(), import_winamp_eqf(), and probe_func().
| gint64 vfs_fsize | ( | VFSFile * | file | ) |
Returns size of the file.
| file | VFSFile object that represents the VFS stream. |
Definition at line 284 of file vfs.c.
Referenced by buffered_file_vfs_fsize_impl(), probe_buffer_fsize(), and vfs_file_get_contents().
| glong vfs_ftell | ( | VFSFile * | file | ) |
Returns the current position in the VFS stream's buffer.
| file | VFSFile object that represents the VFS stream. |
Definition at line 239 of file vfs.c.
Referenced by buffered_file_vfs_fread_impl(), buffered_file_vfs_fseek_impl(), buffered_file_vfs_ftell_impl(), and buffered_file_vfs_getc_impl().
| gint64 vfs_fwrite | ( | const void * | ptr, |
| gint64 | size, | ||
| gint64 | nmemb, | ||
| VFSFile * | file | ||
| ) |
Writes to a VFS stream.
| ptr | A const pointer to the source buffer. |
| size | The size of each element to write. |
| nmemb | The number of elements to write. |
| file | VFSFile object that represents the VFS stream. |
Definition at line 155 of file vfs.c.
Referenced by buffered_file_vfs_fwrite_impl(), save_preset_file(), vfs_fput_be16(), vfs_fput_be32(), vfs_fput_be64(), vfs_fput_le16(), vfs_fput_le32(), vfs_fput_le64(), vfs_fputc(), and vfs_fputs().
| static VFSConstructor* vfs_get_constructor | ( | const gchar * | path | ) | [static] |
Definition at line 47 of file vfs.c.
Referenced by vfs_fopen(), and vfs_is_remote().
| gchar* vfs_get_metadata | ( | VFSFile * | file, |
| const gchar * | field | ||
| ) |
Returns metadata about the stream.
| file | VFSFile object that represents the VFS stream. |
| field | The string constant field name to get. |
Definition at line 300 of file vfs.c.
Referenced by buffered_file_vfs_metadata_impl(), probe_buffer_get_metadata(), and probe_by_mime().
Reads a character from a VFS stream.
| file | VFSFile object that represents the VFS stream. |
Definition at line 170 of file vfs.c.
Referenced by buffered_file_vfs_getc_impl(), and vfs_fgets().
| gboolean vfs_is_remote | ( | const gchar * | path | ) |
Tests if a path is remote uri.
| path | A path to test. |
Definition at line 381 of file vfs.c.
Referenced by check_opened().
| gboolean vfs_is_writeable | ( | const gchar * | path | ) |
| void vfs_register_transport | ( | VFSConstructor * | vtable | ) |
Registers a VFSConstructor vtable with the VFS system.
| vtable | The VFSConstructor vtable to register. |
| void vfs_rewind | ( | VFSFile * | file | ) |
Rewinds a VFS stream.
| file | VFSFile object that represents the VFS stream. |
Definition at line 224 of file vfs.c.
Referenced by buffered_file_vfs_rewind_impl(), and vfs_buffered_file_new_from_uri().
| GList* vfs_transports = NULL |
GList of VFSConstructor objects holding all the registered VFS transports.
Definition at line 33 of file vfs.c.
Referenced by plugin_system_cleanup(), vfs_get_constructor(), and vfs_register_transport().
1.7.4