summaryrefslogtreecommitdiffstats
path: root/src/restore.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/restore.h')
-rw-r--r--src/restore.h32
1 files changed, 26 insertions, 6 deletions
diff --git a/src/restore.h b/src/restore.h
index cf9cf51..5446aa8 100644
--- a/src/restore.h
+++ b/src/restore.h
@@ -1,4 +1,4 @@
-/*
+ /*
* restore.h
* Functions for handling idevices in restore mode
*
@@ -22,21 +22,41 @@
#ifndef IDEVICERESTORE_RESTORE_H
#define IDEVICERESTORE_RESTORE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <plist/plist.h>
#include <libimobiledevice/restore.h>
#include <libimobiledevice/libimobiledevice.h>
-int restore_reboot(const char* uuid);
+struct restore_client_t {
+ plist_t tss;
+ idevice_t device;
+ const char* uuid;
+ unsigned int operation;
+ const char* filesystem;
+ restored_client_t client;
+};
+
int restore_check_mode(const char* uuid);
int restore_check_device(const char* uuid);
+int restore_client_new(struct idevicerestore_client_t* client);
+void restore_client_free(struct idevicerestore_client_t* client);
+int restore_reboot(struct idevicerestore_client_t* client);
const char* restore_progress_string(unsigned int operation);
-void restore_close(idevice_t device, restored_client_t restore);
int restore_handle_status_msg(restored_client_t client, plist_t msg);
int restore_handle_progress_msg(restored_client_t client, plist_t msg);
+int restore_handle_data_request_msg(struct idevicerestore_client_t* client, idevice_t device, restored_client_t restore, plist_t message, plist_t tss, const char* ipsw, const char* filesystem);
int restore_send_nor(restored_client_t client, const char* ipsw, plist_t tss);
-int restore_send_kernelcache(restored_client_t client, char *kernel_data, int len);
-int restore_device(const char* uuid, const char* ipsw, plist_t tss, const char* filesystem);
-int restore_open_with_timeout(const char* uuid, idevice_t* device, restored_client_t* client);
+int restore_send_kernelcache(restored_client_t client, const char* ipsw, plist_t tss);
+int restore_device(struct idevicerestore_client_t* client, const char* uuid, const char* ipsw, plist_t tss, const char* filesystem);
+int restore_open_with_timeout(struct idevicerestore_client_t* client);
int restore_send_filesystem(idevice_t device, const char* filesystem);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif