summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.h
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-07-08 23:40:26 -0400
committerGravatar Joshua Hill2010-07-08 23:40:26 -0400
commit4bc0f4d97a767d1291ac9f09780198d5680f3e3f (patch)
tree62b132e669be7319d749635a9b6d8fb842401810 /src/idevicerestore.h
parent38c965c16625d26915b3d4998a8a7e790c834d89 (diff)
parent4090b98d9e8cdaada701ac320e20f7c8b0cf88f6 (diff)
downloadidevicerestore-4bc0f4d97a767d1291ac9f09780198d5680f3e3f.tar.gz
idevicerestore-4bc0f4d97a767d1291ac9f09780198d5680f3e3f.tar.bz2
Merge branch 'martin'
Diffstat (limited to 'src/idevicerestore.h')
-rw-r--r--src/idevicerestore.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/src/idevicerestore.h b/src/idevicerestore.h
index 3dcf1d5..f529b5b 100644
--- a/src/idevicerestore.h
+++ b/src/idevicerestore.h
@@ -1,5 +1,5 @@
/*
- * idevicerestore.g
+ * idevicerestore.h
* Restore device firmware and filesystem
*
* Copyright (c) 2010 Joshua Hill. All Rights Reserved.
@@ -22,10 +22,31 @@
#ifndef IDEVICERESTORE_H
#define IDEVICERESTORE_H
-#define error(...) fprintf(stderr, __VA_ARGS__)
-#define info(...) if(idevicerestore_debug >= 1) fprintf(stderr, __VA_ARGS__)
-#define debug(...) if(idevicerestore_debug >= 2) fprintf(stderr, __VA_ARGS__)
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <plist/plist.h>
+
+#include "common.h"
-extern int idevicerestore_debug;
+void usage(int argc, char* argv[]);
+int check_mode(struct idevicerestore_client_t* client);
+int check_device(struct idevicerestore_client_t* client);
+int get_build_count(plist_t buildmanifest);
+int get_ecid(struct idevicerestore_client_t* client, uint64_t* ecid);
+int get_bdid(struct idevicerestore_client_t* client, uint32_t* bdid);
+int get_cpid(struct idevicerestore_client_t* client, uint32_t* cpid);
+int extract_buildmanifest(struct idevicerestore_client_t* client, const char* ipsw, plist_t* buildmanifest);
+plist_t get_build_identity(struct idevicerestore_client_t* client, plist_t buildmanifest, uint32_t identity);
+int get_shsh_blobs(struct idevicerestore_client_t* client, uint64_t ecid, plist_t build_identity, plist_t* tss);
+int extract_filesystem(struct idevicerestore_client_t* client, const char* ipsw, plist_t buildmanifest, char** filesystem);
+int ipsw_get_component_by_path(const char* ipsw, plist_t tss, const char* path, char** data, uint32_t* size);
+int build_identity_get_component_path(plist_t build_identity, const char* component, char** path);
+
+#ifdef __cplusplus
+}
+#endif
#endif