summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2010-01-13 01:26:25 +0100
committerGravatar Martin Szulecki2010-01-13 01:26:25 +0100
commitde6251f720b242d42a434bb3aa614d3c5bee65df (patch)
treed005f46635d9034e4656074cd72d6eb1d3bbb460 /include
parentbdc857bcd4488b8e135b189022e210b5b841e409 (diff)
downloadlibimobiledevice-de6251f720b242d42a434bb3aa614d3c5bee65df.tar.gz
libimobiledevice-de6251f720b242d42a434bb3aa614d3c5bee65df.tar.bz2
Refactor pairing to allow implementations to fully handle pairing
Implementations can now supply a full pair record and thus use their own preferred method of managing pairing records if needed.
Diffstat (limited to 'include')
-rw-r--r--include/libiphone/lockdown.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/libiphone/lockdown.h b/include/libiphone/lockdown.h
index f4b3f6a..fb6b0c6 100644
--- a/include/libiphone/lockdown.h
+++ b/include/libiphone/lockdown.h
@@ -56,6 +56,14 @@ typedef int16_t lockdownd_error_t;
struct lockdownd_client_int;
typedef struct lockdownd_client_int *lockdownd_client_t;
+struct lockdownd_pair_record {
+ char *device_certificate;
+ char *host_certificate;
+ char *host_id;
+ char *root_certificate;
+};
+typedef struct lockdownd_pair_record *lockdownd_pair_record_t;
+
/* Interface */
lockdownd_error_t lockdownd_client_new(iphone_device_t device, lockdownd_client_t *client, const char *label);
lockdownd_error_t lockdownd_client_new_with_handshake(iphone_device_t device, lockdownd_client_t *client, const char *label);
@@ -70,9 +78,9 @@ lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char
lockdownd_error_t lockdownd_stop_session(lockdownd_client_t client, const char *session_id);
lockdownd_error_t lockdownd_send(lockdownd_client_t client, plist_t plist);
lockdownd_error_t lockdownd_recv(lockdownd_client_t client, plist_t *plist);
-lockdownd_error_t lockdownd_pair(lockdownd_client_t client, char *host_id);
-lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, char *host_id);
-lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, char *host_id);
+lockdownd_error_t lockdownd_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
+lockdownd_error_t lockdownd_validate_pair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
+lockdownd_error_t lockdownd_unpair(lockdownd_client_t client, lockdownd_pair_record_t pair_record);
lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activation_record);
lockdownd_error_t lockdownd_deactivate(lockdownd_client_t client);
lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client);