diff options
Diffstat (limited to 'include/libimobiledevice/mobileactivation.h')
| -rw-r--r-- | include/libimobiledevice/mobileactivation.h | 47 |
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 | |||
| 104 | mobileactivation_error_t mobileactivation_get_activation_state(mobileactivation_client_t client, plist_t *state); | 104 | mobileactivation_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 | */ | ||
| 118 | mobileactivation_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_ | |||
| 118 | mobileactivation_error_t mobileactivation_create_activation_info(mobileactivation_client_t client, plist_t *info); | 132 | mobileactivation_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 | */ | ||
| 150 | mobileactivation_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 | |||
| 131 | mobileactivation_error_t mobileactivation_activate(mobileactivation_client_t client, plist_t activation_record); | 163 | mobileactivation_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 | */ | ||
| 176 | mobileactivation_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 |
