summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2017-07-03 03:09:35 +0200
committerGravatar Nikias Bassen2017-07-03 03:09:35 +0200
commit0dbe76b4e75eef5d0e033aac99409fb6df36c512 (patch)
tree8e1be338944418ac92470610088a5d7f3bacd523 /include/libimobiledevice
parent5250024b53b799a427a486ae133ecb927f5c555e (diff)
downloadlibimobiledevice-0dbe76b4e75eef5d0e033aac99409fb6df36c512.tar.gz
libimobiledevice-0dbe76b4e75eef5d0e033aac99409fb6df36c512.tar.bz2
mobileactivation: Add new functions required for drmHandshake / session mode device activation
Diffstat (limited to 'include/libimobiledevice')
-rw-r--r--include/libimobiledevice/mobileactivation.h47
1 files changed, 46 insertions, 1 deletions
diff --git a/include/libimobiledevice/mobileactivation.h b/include/libimobiledevice/mobileactivation.h
index bb977fe..bb1f3f4 100644
--- a/include/libimobiledevice/mobileactivation.h
+++ b/include/libimobiledevice/mobileactivation.h
@@ -3,7 +3,7 @@
3 * @brief Handle device activation and deactivation. 3 * @brief Handle device activation and deactivation.
4 * \internal 4 * \internal
5 * 5 *
6 * Copyright (c) 2016 Nikias Bassen, All Rights Reserved. 6 * Copyright (c) 2016-2017 Nikias Bassen, All Rights Reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public 9 * modify it under the terms of the GNU Lesser General Public
@@ -104,6 +104,20 @@ mobileactivation_error_t mobileactivation_client_free(mobileactivation_client_t
104mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_client_t client, plist_t *state); 104mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_client_t client, plist_t *state);
105 105
106/** 106/**
107 * Retrieves a session blob required for 'drmHandshake' via albert.apple.com.
108 *
109 * @param client The mobileactivation client
110 * @param blob Pointer to a plist_t variable that will be set to the
111 * session blob created by the mobielactivation service. The
112 * consumer is responsible for freeing the returned object using
113 * plist_free().
114 *
115 * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
116 * error code otherwise.
117 */
118mobileactivation_error_t mobileactivation_create_activation_session_info(mobileactivation_client_t client, plist_t *blob);
119
120/**
107 * Retrieves the activation info required for device activation. 121 * Retrieves the activation info required for device activation.
108 * 122 *
109 * @param client The mobileactivation client 123 * @param client The mobileactivation client
@@ -118,6 +132,24 @@ mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_
118mobileactivation_error_t mobileactivation_create_activation_info(mobileactivation_client_t client, plist_t *info); 132mobileactivation_error_t mobileactivation_create_activation_info(mobileactivation_client_t client, plist_t *info);
119 133
120/** 134/**
135 * Retrieves the activation info required for device activation in 'session'
136 * mode. This function expects a handshake result retrieved from
137 * https://albert.apple.com/deviceservies/drmHandshake with a blob
138 * provided by mobileactivation_create_activation_session_info().
139 *
140 * @param client The mobileactivation client
141 * @aram handshake_result The handshake result returned from drmHandshake
142 * @param info Pointer to a plist_t variable that will be set to the
143 * activation info created by the mobileactivation service. The
144 * consumer is responsible for freeing the returned object using
145 * plist_free().
146 *
147 * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
148 * error code otherwise.
149 */
150mobileactivation_error_t mobileactivation_create_activation_info_with_session(mobileactivation_client_t client, plist_t handshake_result, plist_t *info);
151
152/**
121 * Activates the device with the given activation record. 153 * Activates the device with the given activation record.
122 * The activation record plist dictionary must be obtained using the 154 * The activation record plist dictionary must be obtained using the
123 * activation protocol requesting from Apple's https webservice. 155 * activation protocol requesting from Apple's https webservice.
@@ -131,6 +163,19 @@ mobileactivation_error_t mobileactivation_create_activation_info(mobileactivatio
131mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record); 163mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record);
132 164
133/** 165/**
166 * Activates the device with the given activation record in 'session' mode.
167 * The activation record plist dictionary must be obtained using the
168 * activation protocol requesting from Apple's https webservice.
169 *
170 * @param client The mobileactivation client
171 * @param activation_record The activation record plist dictionary
172 *
173 * @return MOBILEACTIVATION_E_SUCCESS on success, or an MOBILEACTIVATION_E_*
174 * error code otherwise.
175 */
176mobileactivation_error_t mobileactivation_activate_with_session(mobileactivation_client_t client, plist_t activation_record);
177
178/**
134 * Deactivates the device. 179 * Deactivates the device.
135 * 180 *
136 * @param client The mobileactivation client 181 * @param client The mobileactivation client