2 * Copyright (c) 2006-2011 Ed Schouten <ed@80386.nl>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * @brief Virtual filesystem access modules.
35 * @brief Open a directory.
37 int vfs_dir_match(struct vfsent
*ve
, int isdir
);
39 * @brief Read the contents of a directory and add them to the
40 * population of the current node. This function honours the sort
41 * order each module has.
43 int vfs_dir_populate(struct vfsent
*ve
);
46 * @brief A fallback module that matches all files on disk (possibly
49 int vfs_file_match(struct vfsent
*ve
, int isdir
);
51 * @brief Create a file handle to the file
53 FILE *vfs_file_open(struct vfsent
*ve
);
57 * @brief Test whether the current node contains a HTTP address.
59 int vfs_http_match(struct vfsent
*ve
, int isdir
);
61 * @brief Return a filehandle to a HTTP audio stream.
63 FILE *vfs_http_open(struct vfsent
*ve
);
64 #endif /* BUILD_HTTP */
67 * @brief Test whether the current node is an M3U file.
69 int vfs_m3u_match(struct vfsent
*ve
, int isdir
);
71 * @brief Add all items in the M3U file to the population of the current
74 int vfs_m3u_populate(struct vfsent
*ve
);
76 * @brief Write the current list of VFS entries to a M3U formatted
79 int vfs_m3u_write(const struct vfslist
*vl
, const char *filename
);
82 * @brief Test whether the current node is an PLS file.
84 int vfs_pls_match(struct vfsent
*ve
, int isdir
);
86 * @brief Add all items in the PLS file to the population of the current
89 int vfs_pls_populate(struct vfsent
*ve
);
91 * @brief Write the current list of VFS entries to a PLS formatted
94 int vfs_pls_write(const struct vfslist
*vl
, const char *filename
);
98 * @brief Test whether the current node is an XSPF file.
100 int vfs_xspf_match(struct vfsent
*ve
, int isdir
);
102 * @brief Add all items in the XSPF file to the population of the
105 int vfs_xspf_populate(struct vfsent
*ve
);
107 * @brief Write the current list of VFS entries to a XSPF formatted
110 int vfs_xspf_write(const struct vfslist
*vl
, const char *filename
);
111 #endif /* BUILD_XSPF */