qt: playlist: use item title if available
[vlc.git] / include / vlc_access.h
blob587b66e7f0502629c0395a05a2107dae18c0c8c2
1 /*****************************************************************************
2 * vlc_access.h: Access descriptor, queries and methods
3 *****************************************************************************
4 * Copyright (C) 1999-2006 VLC authors and VideoLAN
6 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation; either version 2.1 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21 *****************************************************************************/
23 #ifndef VLC_ACCESS_H
24 #define VLC_ACCESS_H 1
26 #include <vlc_stream.h>
28 /**
29 * \defgroup access Access
30 * \ingroup stream
31 * Raw input byte streams
32 * @{
33 * \file
34 * Input byte stream modules interface
37 /**
38 * Special redirection error code.
40 * In case of redirection, the access open function should clean up (as in
41 * normal failure case), store the heap-allocated redirection URL in
42 * stream_t.psz_url, and return this value.
44 #define VLC_ACCESS_REDIRECT VLC_ETIMEOUT
46 /**
47 * Opens a new read-only byte stream.
49 * This function might block.
50 * The initial offset is of course always zero.
52 * \param obj parent VLC object
53 * \param mrl media resource location to read
54 * \return a new access object on success, NULL on failure
56 VLC_API stream_t *vlc_access_NewMRL(vlc_object_t *obj, const char *mrl);
58 /**
59 * \defgroup access_helper Access Helpers
60 * @{
63 /**
64 * Default pf_control callback for directory accesses.
66 VLC_API int access_vaDirectoryControlHelper( stream_t *p_access, int i_query, va_list args );
68 #define ACCESS_SET_CALLBACKS( read, block, control, seek ) \
69 do { \
70 p_access->pf_read = (read); \
71 p_access->pf_block = (block); \
72 p_access->pf_control = (control); \
73 p_access->pf_seek = (seek); \
74 } while(0)
76 /**
77 * @} @}
80 #endif