summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/idevicerestore.c13
-rw-r--r--src/idevicerestore.h2
2 files changed, 14 insertions, 1 deletions
diff --git a/src/idevicerestore.c b/src/idevicerestore.c
index 3b95702..8c7ad83 100644
--- a/src/idevicerestore.c
+++ b/src/idevicerestore.c
@@ -941,6 +941,19 @@ void idevicerestore_set_ipsw(struct idevicerestore_client_t* client, const char*
}
}
+void idevicerestore_set_cache_path(struct idevicerestore_client_t* client, const char* path)
+{
+ if (!client)
+ return;
+ if (client->cache_dir) {
+ free(client->cache_dir);
+ client->cache_dir = NULL;
+ }
+ if (path) {
+ client->cache_dir = strdup(path);
+ }
+}
+
void idevicerestore_set_progress_callback(struct idevicerestore_client_t* client, idevicerestore_progress_cb_t cbfunc, void* userdata)
{
if (!client)
diff --git a/src/idevicerestore.h b/src/idevicerestore.h
index 5674665..37cbbc7 100644
--- a/src/idevicerestore.h
+++ b/src/idevicerestore.h
@@ -59,7 +59,7 @@ void idevicerestore_set_ecid(struct idevicerestore_client_t* client, unsigned lo
void idevicerestore_set_udid(struct idevicerestore_client_t* client, const char* udid);
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_cache_path(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);
void idevicerestore_set_info_stream(FILE* strm);
void idevicerestore_set_error_stream(FILE* strm);