summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.h
diff options
context:
space:
mode:
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