diff options
Diffstat (limited to 'utils/sansapatcher/sansapatcher.h')
-rw-r--r-- | utils/sansapatcher/sansapatcher.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/utils/sansapatcher/sansapatcher.h b/utils/sansapatcher/sansapatcher.h new file mode 100644 index 0000000000..259143e38a --- /dev/null +++ b/utils/sansapatcher/sansapatcher.h | |||
@@ -0,0 +1,67 @@ | |||
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 _SANSAPATCHER_H | ||
23 | #define _SANSAPATCHER_H | ||
24 | |||
25 | #ifdef __cplusplus | ||
26 | extern "C" { | ||
27 | #endif | ||
28 | |||
29 | #include "sansaio.h" | ||
30 | |||
31 | /* exit codes */ | ||
32 | #define SANSA_OK 0 | ||
33 | #define SANSA_WRONG_ARGUMENTS 1 | ||
34 | #define SANSA_OPEN_INFILE_FAILED 2 | ||
35 | #define SANSA_PARTITION_ERROR 3 | ||
36 | #define SANSA_CANNOT_REOPEN 5 | ||
37 | #define SANSA_INSTALL_FAILED 6 | ||
38 | #define SANSA_UNINSTALL_FAILED 7 | ||
39 | #define SANSA_ACCESS_DENIED 10 | ||
40 | #define SANSA_NOT_FOUND 11 | ||
41 | #define SANSA_WRONG_DEVICE_COUNT 12 | ||
42 | #define SANSA_MULTIPLE_DEVICES 15 | ||
43 | #define SANSA_WRONG_TYPE 16 | ||
44 | #define SANSA_OLD_INSTALL 17 | ||
45 | #define SANSA_INTERNAL_ERROR 20 | ||
46 | |||
47 | extern int sansa_verbose; | ||
48 | /* Size of buffer for disk I/O - 8MB is large enough for any version | ||
49 | of the Apple firmware, but not the Nano's RSRC image. */ | ||
50 | #define BUFFER_SIZE 8*1024*1024 | ||
51 | |||
52 | int sansa_read_partinfo(struct sansa_t* sansa, int silent); | ||
53 | int is_sansa(struct sansa_t* sansa); | ||
54 | int sansa_scan(struct sansa_t* sansa); | ||
55 | int sansa_read_firmware(struct sansa_t* sansa, const char* filename); | ||
56 | unsigned int sansa_read_bootloader(struct sansa_t* sansa, const char* filename, unsigned char** bl_buffer); | ||
57 | int sansa_add_bootloader(struct sansa_t* sansa, const unsigned char* buf, unsigned int len); | ||
58 | int sansa_delete_bootloader(struct sansa_t* sansa); | ||
59 | int sansa_update_of(struct sansa_t* sansa,const char* filename); | ||
60 | int sansa_update_ppbl(struct sansa_t* sansa,const char* filename); | ||
61 | int sansa_list_images(struct sansa_t* sansa); | ||
62 | |||
63 | #ifdef __cplusplus | ||
64 | } | ||
65 | #endif | ||
66 | #endif | ||
67 | |||