Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
Dave Chapman | 4a81291 | 2007-03-15 23:02:37 +0000 | [diff] [blame] | 8 | * $Id$ |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 9 | * |
| 10 | * Copyright (C) 2006-2007 Dave Chapman |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 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. |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | |
Dave Chapman | be29716 | 2007-03-16 00:23:23 +0000 | [diff] [blame] | 22 | #ifndef _SANSAPATCHER_H |
| 23 | #define _SANSAPATCHER_H |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 24 | |
Dominik Riebeling | 3f65a70 | 2008-05-22 17:51:35 +0000 | [diff] [blame] | 25 | #ifdef __cplusplus |
| 26 | extern "C" { |
| 27 | #endif |
| 28 | |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 29 | #include "sansaio.h" |
| 30 | |
Dominik Riebeling | d131a31 | 2008-06-17 17:52:13 +0000 | [diff] [blame] | 31 | extern int sansa_verbose; |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 32 | /* Size of buffer for disk I/O - 8MB is large enough for any version |
| 33 | of the Apple firmware, but not the Nano's RSRC image. */ |
| 34 | #define BUFFER_SIZE 8*1024*1024 |
Dominik Riebeling | d131a31 | 2008-06-17 17:52:13 +0000 | [diff] [blame] | 35 | extern unsigned char* sansa_sectorbuf; |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 36 | |
| 37 | #define FILETYPE_MI4 0 |
Dave Chapman | e815601 | 2007-03-15 23:26:47 +0000 | [diff] [blame] | 38 | #define FILETYPE_INTERNAL 1 |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 39 | |
Dave Chapman | be29716 | 2007-03-16 00:23:23 +0000 | [diff] [blame] | 40 | int sansa_read_partinfo(struct sansa_t* sansa, int silent); |
Dave Chapman | 8d145a5 | 2007-09-19 18:46:54 +0000 | [diff] [blame] | 41 | int is_sansa(struct sansa_t* sansa); |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 42 | int sansa_scan(struct sansa_t* sansa); |
Dave Chapman | be29716 | 2007-03-16 00:23:23 +0000 | [diff] [blame] | 43 | int sansa_read_firmware(struct sansa_t* sansa, char* filename); |
| 44 | int sansa_add_bootloader(struct sansa_t* sansa, char* filename, int type); |
| 45 | int sansa_delete_bootloader(struct sansa_t* sansa); |
Barry Wardell | 6a0ec8b | 2007-08-02 11:39:43 +0000 | [diff] [blame] | 46 | int sansa_update_of(struct sansa_t* sansa,char* filename); |
Barry Wardell | 080889a | 2007-10-14 18:09:40 +0000 | [diff] [blame] | 47 | int sansa_update_ppbl(struct sansa_t* sansa,char* filename); |
Dave Chapman | be29716 | 2007-03-16 00:23:23 +0000 | [diff] [blame] | 48 | void sansa_list_images(struct sansa_t* sansa); |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 49 | |
Dominik Riebeling | 3f65a70 | 2008-05-22 17:51:35 +0000 | [diff] [blame] | 50 | #ifdef __cplusplus |
| 51 | } |
Dave Chapman | e17043e | 2007-03-15 22:55:36 +0000 | [diff] [blame] | 52 | #endif |
Dominik Riebeling | 3f65a70 | 2008-05-22 17:51:35 +0000 | [diff] [blame] | 53 | #endif |
| 54 | |