summaryrefslogtreecommitdiffstats
path: root/src/idevicerestore.h
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2012-11-07 22:08:53 +0100
committerGravatar Martin Szulecki2012-11-07 22:08:53 +0100
commitb65a7ce7ebca6730fce5dcbfd820d8ef4124e18f (patch)
tree3aaa3a68931bbaf3ec31bef6fad18c951cf7d32f /src/idevicerestore.h
parentb44ad07bec397f6cd1c597946efe86e5ed2a490b (diff)
downloadidevicerestore-b65a7ce7ebca6730fce5dcbfd820d8ef4124e18f.tar.gz
idevicerestore-b65a7ce7ebca6730fce5dcbfd820d8ef4124e18f.tar.bz2
libidevicerecovery: implemented progress callback logic
Diffstat (limited to 'src/idevicerestore.h')
-rw-r--r--src/idevicerestore.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/idevicerestore.h b/src/idevicerestore.h
index 3201280..c7c80dc 100644
--- a/src/idevicerestore.h
+++ b/src/idevicerestore.h
@@ -29,8 +29,6 @@ extern "C" {
#include <stdint.h>
#include <plist/plist.h>
-#include "common.h"
-
// the flag with value 1 is reserved for internal use only. don't use it.
#define FLAG_DEBUG 1 << 1
#define FLAG_ERASE 1 << 2
@@ -43,6 +41,17 @@ extern "C" {
struct idevicerestore_client_t;
+enum {
+ RESTORE_STEP_DETECT = 0,
+ RESTORE_STEP_PREPARE,
+ RESTORE_STEP_UPLOAD_FS,
+ RESTORE_STEP_FLASH_FS,
+ RESTORE_STEP_FLASH_NOR,
+ RESTORE_NUM_STEPS
+};
+
+typedef void (*idevicerestore_progress_cb_t)(int step, double step_progress, void* userdata);
+
struct idevicerestore_client_t* idevicerestore_client_new();
void idevicerestore_client_free(struct idevicerestore_client_t* client);
@@ -51,6 +60,8 @@ void idevicerestore_set_udid(struct idevicerestore_client_t* client, const char*
void idevicerestore_set_flags(struct idevicerestore_client_t* client, int flags);
void idevicerestore_set_ipsw(struct idevicerestore_client_t* client, const char* path);
+void idevicerestore_set_progress_callback(struct idevicerestore_client_t* client, idevicerestore_progress_cb_t cbfunc, void* userdata);
+
int idevicerestore_start(struct idevicerestore_client_t* client);
void usage(int argc, char* argv[]);