summaryrefslogtreecommitdiffstats
path: root/src/asr.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/asr.h
parentb44ad07bec397f6cd1c597946efe86e5ed2a490b (diff)
downloadidevicerestore-b65a7ce7ebca6730fce5dcbfd820d8ef4124e18f.tar.gz
idevicerestore-b65a7ce7ebca6730fce5dcbfd820d8ef4124e18f.tar.bz2
libidevicerecovery: implemented progress callback logic
Diffstat (limited to 'src/asr.h')
-rw-r--r--src/asr.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/asr.h b/src/asr.h
index f4752b1..2524d48 100644
--- a/src/asr.h
+++ b/src/asr.h
@@ -28,13 +28,19 @@ extern "C" {
#include <libimobiledevice/libimobiledevice.h>
+typedef void (*asr_progress_cb_t)(double, void*);
+
struct asr_client {
idevice_connection_t connection;
uint8_t checksum_chunks;
+ int lastprogress;
+ asr_progress_cb_t progress_cb;
+ void* progress_cb_data;
};
typedef struct asr_client *asr_client_t;
int asr_open_with_timeout(idevice_t device, asr_client_t* asr);
+void asr_set_progress_callback(asr_client_t asr, asr_progress_cb_t, void* userdata);
int asr_send(asr_client_t asr, plist_t* data);
int asr_receive(asr_client_t asr, plist_t* data);
int asr_send_buffer(asr_client_t asr, const char* data, uint32_t size);