diff options
author | Nikias Bassen | 2023-09-14 02:34:06 +0200 |
---|---|---|
committer | Nikias Bassen | 2023-09-14 02:34:06 +0200 |
commit | dbe7313260ddef6b2eb60b3772d1595bfd91f24c (patch) | |
tree | 2405ac44d7e4386a7b245d9230f17300d83195a3 /src/asr.h | |
parent | 17969ef91403f1a914d43584caf9fa0da89d649e (diff) | |
download | idevicerestore-dbe7313260ddef6b2eb60b3772d1595bfd91f24c.tar.gz idevicerestore-dbe7313260ddef6b2eb60b3772d1595bfd91f24c.tar.bz2 |
Refactor ipsw code to transparently stream images directly from ZIP or extracted ipsw
This allows flashing directly from IPSW archive without having to extract it
first, and ultimately removes the "Extracting filesystem from IPSW" part.
Restoring from extracted IPSW is also supported, just pass the path to the
directory that has all the files from a given IPSW.
Diffstat (limited to 'src/asr.h')
-rw-r--r-- | src/asr.h | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -41,15 +41,18 @@ struct asr_client { }; typedef struct asr_client *asr_client_t; +struct ipsw_file_handle; +typedef struct ipsw_file_handle* ipsw_file_handle_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); 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); +int asr_perform_validation(asr_client_t asr, ipsw_file_handle_t file); +int asr_send_payload(asr_client_t asr, ipsw_file_handle_t file); +int asr_handle_oob_data_request(asr_client_t asr, plist_t packet, ipsw_file_handle_t file); #ifdef __cplusplus |