summaryrefslogtreecommitdiffstats
path: root/src/asr.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2012-07-17 18:49:28 +0200
committerGravatar Nikias Bassen2012-07-17 18:49:28 +0200
commit68e08c82e0ec549ce491786a95914d478d864c89 (patch)
treec6fc564568aaaac1bf8445f825a7e4c77f12a890 /src/asr.h
parent3f63b29d0d4ecf8ea2a5bdec3a743c306011415b (diff)
downloadidevicerestore-68e08c82e0ec549ce491786a95914d478d864c89.tar.gz
idevicerestore-68e08c82e0ec549ce491786a95914d478d864c89.tar.bz2
asr: implemented checksumming for filesystem upload
Diffstat (limited to 'src/asr.h')
-rw-r--r--src/asr.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/asr.h b/src/asr.h
index 1423496..f4752b1 100644
--- a/src/asr.h
+++ b/src/asr.h
@@ -28,14 +28,20 @@ extern "C" {
#include <libimobiledevice/libimobiledevice.h>
-int asr_open_with_timeout(idevice_t device, idevice_connection_t* asr);
-int asr_send(idevice_connection_t asr, plist_t* data);
-int asr_receive(idevice_connection_t asr, plist_t* data);
-int asr_send_buffer(idevice_connection_t asr, const char* data, uint32_t size);
-void asr_close(idevice_connection_t asr);
-int asr_perform_validation(idevice_connection_t asr, const char* filesystem);
-int asr_send_payload(idevice_connection_t asr, const char* filesystem);
-int asr_handle_oob_data_request(idevice_connection_t asr, plist_t packet, FILE* file);
+struct asr_client {
+ idevice_connection_t connection;
+ uint8_t checksum_chunks;
+};
+typedef struct asr_client *asr_client_t;
+
+int asr_open_with_timeout(idevice_t device, asr_client_t* asr);
+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);
+void asr_free(asr_client_t asr);
+int asr_perform_validation(asr_client_t asr, const char* filesystem);
+int asr_send_payload(asr_client_t asr, const char* filesystem);
+int asr_handle_oob_data_request(asr_client_t asr, plist_t packet, FILE* file);
#ifdef __cplusplus