Add -W to CFLAGS in Makefile and fix generated warnings. Also close a file handle...
[Rockbox.git] / rbutil / rbutilqt / irivertools / irivertools.h
blobdda84b1c759317dd6d52caf56da6b7693c3325e0
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * Module: rbutil
9 * File: irivertools.h
11 * Copyright (C) 2007 Dominik Wenger
13 * All files in this archive are subject to the GNU General Public License.
14 * See the file COPYING in the source tree root for full license agreement.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
22 #ifndef IRIVERTOOLS_H_INCLUDED
23 #define IRIVERTOOLS_H_INCLUDED
25 #include <QtGui>
27 #include "md5sum.h"
28 #include "progressloggerinterface.h"
30 #define ESTF_SIZE 32
32 struct sumpairs {
33 char *unpatched;
34 char *patched;
37 /* precalculated checksums for H110/H115 */
38 static struct sumpairs h100pairs[] = {
39 #include "h100sums.h"
42 /* precalculated checksums for H120/H140 */
43 static struct sumpairs h120pairs[] = {
44 #include "h120sums.h"
47 /* precalculated checksums for H320/H340 */
48 static struct sumpairs h300pairs[] = {
49 #include "h300sums.h"
53 enum striptype
55 STRIP_NONE,
56 STRIP_HEADER_CHECKSUM,
57 STRIP_HEADER_CHECKSUM_ESTF
60 /* protos for iriver.c */
62 int intable(char *md5, struct sumpairs *table, int len);
64 bool mkboot(QString infile, QString outfile,QString bootloader,int origin,ProgressloggerInterface* dp);
65 int iriver_decode(QString infile_name, QString outfile_name, unsigned int modify,
66 enum striptype stripmode,ProgressloggerInterface* dp );
67 int iriver_encode(QString infile_name, QString outfile_name, unsigned int modify,ProgressloggerInterface* dp);
69 #endif // IRIVERTOOLS_H_INCLUDED