From 79a1fb1b29b79c2b100a8021bc397879d69c69c3 Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Thu, 8 Feb 2007 23:57:41 +0000 Subject: Move the command-line specific code into main.c, leaving the firmware manipulation code in ipodpatcher.c. No functional changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12238 a1c6a512-1295-4272-9138-f99709370657 --- tools/ipodpatcher/ipodpatcher.h | 51 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 tools/ipodpatcher/ipodpatcher.h (limited to 'tools/ipodpatcher/ipodpatcher.h') diff --git a/tools/ipodpatcher/ipodpatcher.h b/tools/ipodpatcher/ipodpatcher.h new file mode 100644 index 0000000000..c533f4c2dc --- /dev/null +++ b/tools/ipodpatcher/ipodpatcher.h @@ -0,0 +1,51 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id: ipodpatcher.c 12237 2007-02-08 21:31:38Z dave $ + * + * Copyright (C) 2006-2007 Dave Chapman + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef _IPODPATCHER_H +#define _IPODPATCHER_H + +#include "ipodio.h" + +/* Size of buffer for disk I/O - 8MB is large enough for any version + of the Apple firmware, but not the Nano's RSRC image. */ +#define BUFFER_SIZE 8*1024*1024 +extern unsigned char* sectorbuf; + +#define FILETYPE_DOT_IPOD 0 +#define FILETYPE_DOT_BIN 1 +#ifdef WITH_BOOTOBJS + #define FILETYPE_INTERNAL 2 +#endif + +void display_partinfo(struct ipod_t* ipod); +int read_partinfo(struct ipod_t* ipod, int silent); +int read_partition(struct ipod_t* ipod, int outfile); +int write_partition(struct ipod_t* ipod, int infile); +int diskmove(struct ipod_t* ipod, int delta); +int add_bootloader(struct ipod_t* ipod, char* filename, int type); +int delete_bootloader(struct ipod_t* ipod); +int write_firmware(struct ipod_t* ipod, char* filename, int type); +int read_firmware(struct ipod_t* ipod, char* filename); +int read_directory(struct ipod_t* ipod); +int list_images(struct ipod_t* ipod); +int getmodel(struct ipod_t* ipod, int ipod_version); +int ipod_scan(struct ipod_t* ipod); +off_t filesize(int fd); + +#endif -- cgit