summaryrefslogtreecommitdiffstats
path: root/src/lockdown.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-05-10 08:27:53 -0700
committerGravatar Matt Colyer2009-05-10 08:28:04 -0700
commit1351b686d450112ae55d26d81d9d59c5f542f12e (patch)
tree442c7e48eb83f96a22f7c6d889e8fe26151d6cba /src/lockdown.c
parente91caeb1c9929f9dc8af747bb3a2e52ec06b03af (diff)
downloadlibimobiledevice-1351b686d450112ae55d26d81d9d59c5f542f12e.tar.gz
libimobiledevice-1351b686d450112ae55d26d81d9d59c5f542f12e.tar.bz2
NotificationProxy support added.0.9.0
[#27 state:resolved] Signed-off-by: Matt Colyer <matt@colyer.name>
Diffstat (limited to 'src/lockdown.c')
-rw-r--r--src/lockdown.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index c017cdf..5ade79a 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -472,6 +472,19 @@ iphone_error_t lockdownd_get_device_public_key(iphone_lckd_client_t control, gnu
return lockdownd_generic_get_value(control, "Key", "DevicePublicKey", public_key);
}
+/** Askes for the device's name.
+ *
+ * @return IPHONE_E_SUCCESS on succes or an error value < 0 on failure.
+ */
+iphone_error_t lockdownd_get_device_name(iphone_lckd_client_t control, char **device_name)
+{
+ gnutls_datum_t temp = { NULL, 0 };
+ iphone_error_t res = lockdownd_generic_get_value(control, "Key", "DeviceName", &temp);
+ log_debug_msg("%s: %s\n", __func__, temp.data);
+ *device_name = (char*)temp.data;
+ return res;
+}
+
/** Completes the entire lockdownd handshake.
*
* @param phone The iPhone