summaryrefslogtreecommitdiffstats
path: root/tools/ipodpatcher/ipodpatcher.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-02-08 23:57:41 +0000
committerDave Chapman <dave@dchapman.com>2007-02-08 23:57:41 +0000
commit79a1fb1b29b79c2b100a8021bc397879d69c69c3 (patch)
tree0628570c5af8b1e907b7f4aef6fc9751d7b0dcf4 /tools/ipodpatcher/ipodpatcher.h
parenteca5222cadbc6595470bb9c3a295d7fcb7d1e99b (diff)
downloadrockbox-79a1fb1b29b79c2b100a8021bc397879d69c69c3.tar.gz
rockbox-79a1fb1b29b79c2b100a8021bc397879d69c69c3.tar.bz2
rockbox-79a1fb1b29b79c2b100a8021bc397879d69c69c3.zip
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
Diffstat (limited to 'tools/ipodpatcher/ipodpatcher.h')
-rw-r--r--tools/ipodpatcher/ipodpatcher.h51
1 files changed, 51 insertions, 0 deletions
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