diff options
Diffstat (limited to 'utils/ipodpatcher/ipodpatcher.h')
-rw-r--r-- | utils/ipodpatcher/ipodpatcher.h | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/utils/ipodpatcher/ipodpatcher.h b/utils/ipodpatcher/ipodpatcher.h new file mode 100644 index 0000000000..2cd2331666 --- /dev/null +++ b/utils/ipodpatcher/ipodpatcher.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2006-2007 Dave Chapman | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #ifndef IPODPATCHER_H | ||
23 | #define IPODPATCHER_H | ||
24 | |||
25 | #ifdef __cplusplus | ||
26 | extern "C" { | ||
27 | #endif | ||
28 | |||
29 | #include "ipodio.h" | ||
30 | |||
31 | /* exit codes */ | ||
32 | #define IPOD_OK 0 | ||
33 | #define IPOD_WRONG_ARGUMENTS 1 | ||
34 | #define IPOD_OPEN_INFILE_FAILED 2 | ||
35 | #define IPOD_PARTITION_ERROR 3 | ||
36 | #define IPOD_OPEN_OUTFILE_FAILED 4 | ||
37 | #define IPOD_CANNOT_REOPEN 5 | ||
38 | #define IPOD_ACCESS_DENIED 10 | ||
39 | #define IPOD_NOT_FOUND 11 | ||
40 | #define IPOD_WRONG_DEVICE_COUNT 12 | ||
41 | #define IPOD_IMAGE_ERROR 13 | ||
42 | #define IPOD_DUMP_FAILED 14 | ||
43 | #define IPOD_MULTIPLE_DEVICES 15 | ||
44 | #define IPOD_WRONG_TYPE 16 | ||
45 | #define IPOD_UNKNOWN_FW_VERSION -1 | ||
46 | |||
47 | /* Size of buffer for disk I/O - 8MB is large enough for any version | ||
48 | of the Apple firmware, but not the Nano's RSRC image. */ | ||
49 | #define BUFFER_SIZE 8*1024*1024 | ||
50 | |||
51 | extern int ipod_verbose; | ||
52 | |||
53 | #define FILETYPE_DOT_IPOD 0 | ||
54 | #define FILETYPE_DOT_BIN 1 | ||
55 | #ifdef WITH_BOOTOBJS | ||
56 | #define FILETYPE_INTERNAL 2 | ||
57 | #endif | ||
58 | |||
59 | char* get_parttype(unsigned int pt); | ||
60 | int read_partinfo(struct ipod_t* ipod, int silent); | ||
61 | int read_partition(struct ipod_t* ipod, int outfile); | ||
62 | int write_partition(struct ipod_t* ipod, int infile); | ||
63 | int diskmove(struct ipod_t* ipod, int delta); | ||
64 | int add_bootloader(struct ipod_t* ipod, char* filename, int type); | ||
65 | int delete_bootloader(struct ipod_t* ipod); | ||
66 | int write_firmware(struct ipod_t* ipod, char* filename, int type); | ||
67 | int read_firmware(struct ipod_t* ipod, char* filename, int type); | ||
68 | int read_directory(struct ipod_t* ipod); | ||
69 | int list_images(struct ipod_t* ipod); | ||
70 | int getmodel(struct ipod_t* ipod, int ipod_version); | ||
71 | int ipod_scan(struct ipod_t* ipod); | ||
72 | int write_dos_partition_table(struct ipod_t* ipod); | ||
73 | int ipod_get_xmlinfo(struct ipod_t* ipod); | ||
74 | void ipod_get_ramsize(struct ipod_t* ipod); | ||
75 | int read_aupd(struct ipod_t* ipod, char* filename); | ||
76 | int write_aupd(struct ipod_t* ipod, char* filename); | ||
77 | off_t filesize(int fd); | ||
78 | int ipod_has_bootloader(struct ipod_t* ipod); | ||
79 | |||
80 | #ifdef __cplusplus | ||
81 | } | ||
82 | #endif | ||
83 | #endif | ||
84 | |||