A little more detail regarding using my github copies of the code with where it's...
[vlc/adversarial.git] / modules / access / zip / zip.h
blob7ef1460dba99fc9cb6271ed8524bee0feab8f8f3
1 /*****************************************************************************
2 * zip.h: Module (access+filter) to extract different archives, based on zlib
3 *****************************************************************************
4 * Copyright (C) 2009 VLC authors and VideoLAN
5 * $Id$
7 * Authors: Jean-Philippe André <jpeg@videolan.org>
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Lesser General Public License as published by
11 * the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this program; if not, write to the Free Software Foundation,
21 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 /** **************************************************************************
25 * Common includes and shared headers
26 *****************************************************************************/
28 #ifndef ZIP_ACCESSDEMUX_H
29 #define ZIP_ACCESSDEMUX_H
31 #include <vlc_common.h>
32 #include <vlc_url.h>
33 #include <vlc_strings.h>
34 #include <vlc_arrays.h>
35 #include <vlc_plugin.h>
36 #include <vlc_stream.h>
37 #include "unzip.h"
38 #include "ioapi.h"
40 #include <assert.h>
42 #define ZIP_FILENAME_LEN 512
43 #define ZIP_BUFFER_LEN 32768
44 #define ZIP_SEP "!/"
45 #define ZIP_SEP_LEN 2
48 /** **************************************************************************
49 * Module access points: stream_filter
50 *****************************************************************************/
51 int StreamOpen( vlc_object_t* );
52 void StreamClose( vlc_object_t* );
54 /** **************************************************************************
55 * Module access points: access
56 *****************************************************************************/
57 int AccessOpen( vlc_object_t *p_this );
58 void AccessClose( vlc_object_t *p_this );
60 /** Common function */
61 bool isAllowedChar( char c );
63 /** **************************************************************************
64 * zipIO function headers : how to use vlc_stream to read the zip
65 * Note: static because the implementations differ
66 *****************************************************************************/
67 static void* ZCALLBACK ZipIO_Open( void* opaque, const char* filename, int m );
68 static uLong ZCALLBACK ZipIO_Read( void*, void* stream, void* buf, uLong sz );
69 static uLong ZCALLBACK ZipIO_Write( void*, void* stream, const void*, uLong );
70 static long ZCALLBACK ZipIO_Tell( void*, void* stream );
71 static long ZCALLBACK ZipIO_Seek( void*, void* stream, uLong offset, int ori );
72 static int ZCALLBACK ZipIO_Close( void*, void* stream );
73 static int ZCALLBACK ZipIO_Error( void*, void* stream );
75 #endif /* ZIP_ACCESSDEMUX_H */