summaryrefslogtreecommitdiffstats
path: root/src/ipsw.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2019-02-14 00:26:25 +0100
committerGravatar Nikias Bassen2019-02-14 00:26:25 +0100
commit64e88489ee47f4e5dca458970688485a0a165c30 (patch)
tree6b54866538be3b62dd4e6b4896920c354787ce42 /src/ipsw.h
parentfbaafdaf87cc01197ad86812a46cf17b7b392b8e (diff)
downloadidevicerestore-64e88489ee47f4e5dca458970688485a0a165c30.tar.gz
idevicerestore-64e88489ee47f4e5dca458970688485a0a165c30.tar.bz2
Allow .ipsw files or extracted IPSW as source
Diffstat (limited to 'src/ipsw.h')
-rw-r--r--src/ipsw.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/ipsw.h b/src/ipsw.h
index 1c19e92..4c0087f 100644
--- a/src/ipsw.h
+++ b/src/ipsw.h
@@ -2,7 +2,7 @@
* ipsw.h
* Definitions for IPSW utilities
*
- * Copyright (c) 2012 Nikias Bassen. All Rights Reserved.
+ * Copyright (c) 2012-2019 Nikias Bassen. All Rights Reserved.
* Copyright (c) 2010 Martin Szulecki. All Rights Reserved.
* Copyright (c) 2010 Joshua Hill. All Rights Reserved.
*
@@ -28,24 +28,17 @@
extern "C" {
#endif
-#include <zip.h>
#include <stdint.h>
#include <plist/plist.h>
-typedef struct {
- int index;
- char* name;
- unsigned int size;
- unsigned char* data;
-} ipsw_file;
-
+int ipsw_is_directory(const char* ipsw);
+int ipsw_file_exists(const char* ipsw, const char* infile);
int ipsw_get_file_size(const char* ipsw, const char* infile, off_t* size);
int ipsw_extract_to_file(const char* ipsw, const char* infile, const char* outfile);
int ipsw_extract_to_file_with_progress(const char* ipsw, const char* infile, const char* outfile, int print_progress);
int ipsw_extract_to_memory(const char* ipsw, const char* infile, unsigned char** pbuffer, unsigned int* psize);
int ipsw_extract_build_manifest(const char* ipsw, plist_t* buildmanifest, int *tss_enabled);
int ipsw_extract_restore_plist(const char* ipsw, plist_t* restore_plist);
-void ipsw_free_file(ipsw_file* file);
int ipsw_get_signed_firmwares(const char* product, plist_t* firmwares);
int ipsw_download_fw(const char *fwurl, unsigned char* isha1, const char* todir, char** ipswfile);