]> git.sesse.net Git - vlc/blob - modules/access/rar/rar.h
Added support for multiple files in RAR archives.
[vlc] / modules / access / rar / rar.h
1 /*****************************************************************************
2  * rar.h: uncompressed RAR parser
3  *****************************************************************************
4  * Copyright (C) 2008-2010 Laurent Aimar
5  * $Id$
6  *
7  * Author: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
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 General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 typedef struct {
25     uint64_t offset;
26     uint64_t size;
27     uint64_t cummulated_size;
28 } rar_file_chunk_t;
29
30 typedef struct {
31     char     *name;
32     uint64_t size;
33     bool     is_complete;
34
35     int              chunk_count;
36     rar_file_chunk_t **chunk;
37     uint64_t         real_size;  /* Gathered size */
38 } rar_file_t;
39
40 int  RarProbe(stream_t *);
41 void RarFileDelete(rar_file_t *);
42 int  RarParse(stream_t *, int *, rar_file_t ***);
43