diff options
Diffstat (limited to 'src/misagent.c')
| -rw-r--r-- | src/misagent.c | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/src/misagent.c b/src/misagent.c index 6edbadd..96dddba 100644 --- a/src/misagent.c +++ b/src/misagent.c | |||
| @@ -87,17 +87,6 @@ static misagent_error_t misagent_check_result(plist_t response, int* status_code | |||
| 87 | } | 87 | } |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | /** | ||
| 91 | * Connects to the misagent service on the specified device. | ||
| 92 | * | ||
| 93 | * @param device The device to connect to. | ||
| 94 | * @param service The service descriptor returned by lockdownd_start_service. | ||
| 95 | * @param client Pointer that will point to a newly allocated | ||
| 96 | * misagent_client_t upon successful return. | ||
| 97 | * | ||
| 98 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | ||
| 99 | * client is NULL, or an MISAGENT_E_* error code otherwise. | ||
| 100 | */ | ||
| 101 | misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client) | 90 | misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client) |
| 102 | { | 91 | { |
| 103 | property_list_service_client_t plistclient = NULL; | 92 | property_list_service_client_t plistclient = NULL; |
| @@ -114,19 +103,6 @@ misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descrip | |||
| 114 | return MISAGENT_E_SUCCESS; | 103 | return MISAGENT_E_SUCCESS; |
| 115 | } | 104 | } |
| 116 | 105 | ||
| 117 | /** | ||
| 118 | * Starts a new misagent service on the specified device and connects to it. | ||
| 119 | * | ||
| 120 | * @param device The device to connect to. | ||
| 121 | * @param client Pointer that will point to a newly allocated | ||
| 122 | * misagent_client_t upon successful return. Must be freed using | ||
| 123 | * misagent_client_free() after use. | ||
| 124 | * @param label The label to use for communication. Usually the program name. | ||
| 125 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 126 | * | ||
| 127 | * @return MISAGENT_E_SUCCESS on success, or an MISAGENT_E_* error | ||
| 128 | * code otherwise. | ||
| 129 | */ | ||
| 130 | misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t * client, const char* label) | 106 | misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t * client, const char* label) |
| 131 | { | 107 | { |
| 132 | misagent_error_t err = MISAGENT_E_UNKNOWN_ERROR; | 108 | misagent_error_t err = MISAGENT_E_UNKNOWN_ERROR; |
| @@ -134,15 +110,6 @@ misagent_error_t misagent_client_start_service(idevice_t device, misagent_client | |||
| 134 | return err; | 110 | return err; |
| 135 | } | 111 | } |
| 136 | 112 | ||
| 137 | /** | ||
| 138 | * Disconnects an misagent client from the device and frees up the | ||
| 139 | * misagent client data. | ||
| 140 | * | ||
| 141 | * @param client The misagent client to disconnect and free. | ||
| 142 | * | ||
| 143 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | ||
| 144 | * client is NULL, or an MISAGENT_E_* error code otherwise. | ||
| 145 | */ | ||
| 146 | misagent_error_t misagent_client_free(misagent_client_t client) | 113 | misagent_error_t misagent_client_free(misagent_client_t client) |
| 147 | { | 114 | { |
| 148 | if (!client) | 115 | if (!client) |
| @@ -158,16 +125,6 @@ misagent_error_t misagent_client_free(misagent_client_t client) | |||
| 158 | return err; | 125 | return err; |
| 159 | } | 126 | } |
| 160 | 127 | ||
| 161 | /** | ||
| 162 | * Installs the given provisioning profile. Only works with valid profiles. | ||
| 163 | * | ||
| 164 | * @param client The connected misagent to use for installation | ||
| 165 | * @param profile The valid provisioning profile to install. This has to be | ||
| 166 | * passed as a PLIST_DATA, otherwise the function will fail. | ||
| 167 | * | ||
| 168 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | ||
| 169 | * client is invalid, or an MISAGENT_E_* error code otherwise. | ||
| 170 | */ | ||
| 171 | misagent_error_t misagent_install(misagent_client_t client, plist_t profile) | 128 | misagent_error_t misagent_install(misagent_client_t client, plist_t profile) |
| 172 | { | 129 | { |
| 173 | if (!client || !client->parent || !profile || (plist_get_node_type(profile) != PLIST_DATA)) | 130 | if (!client || !client->parent || !profile || (plist_get_node_type(profile) != PLIST_DATA)) |
| @@ -205,20 +162,6 @@ misagent_error_t misagent_install(misagent_client_t client, plist_t profile) | |||
| 205 | return res; | 162 | return res; |
| 206 | } | 163 | } |
| 207 | 164 | ||
| 208 | /** | ||
| 209 | * Retrieves an array of all installed provisioning profiles. | ||
| 210 | * | ||
| 211 | * @param client The connected misagent to use. | ||
| 212 | * @param profiles Pointer to a plist_t that will be set to a PLIST_ARRAY | ||
| 213 | * if the function is successful. | ||
| 214 | * | ||
| 215 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | ||
| 216 | * client is invalid, or an MISAGENT_E_* error code otherwise. | ||
| 217 | * | ||
| 218 | * @note If no provisioning profiles are installed on the device, this function | ||
| 219 | * still returns MISAGENT_E_SUCCESS and profiles will just point to an | ||
| 220 | * empty array. | ||
| 221 | */ | ||
| 222 | misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles) | 165 | misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles) |
| 223 | { | 166 | { |
| 224 | if (!client || !client->parent || !profiles) | 167 | if (!client || !client->parent || !profiles) |
| @@ -259,17 +202,6 @@ misagent_error_t misagent_copy(misagent_client_t client, plist_t* profiles) | |||
| 259 | 202 | ||
| 260 | } | 203 | } |
| 261 | 204 | ||
| 262 | /** | ||
| 263 | * Removes a given provisioning profile. | ||
| 264 | * | ||
| 265 | * @param client The connected misagent to use. | ||
| 266 | * @param profileID Identifier of the provisioning profile to remove. | ||
| 267 | * This is a UUID that can be obtained from the provisioning profile data. | ||
| 268 | * @see misagent_copy | ||
| 269 | * | ||
| 270 | * @return MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when | ||
| 271 | * client is invalid, or an MISAGENT_E_* error code otherwise. | ||
| 272 | */ | ||
| 273 | misagent_error_t misagent_remove(misagent_client_t client, const char* profileID) | 205 | misagent_error_t misagent_remove(misagent_client_t client, const char* profileID) |
| 274 | { | 206 | { |
| 275 | if (!client || !client->parent || !profileID) | 207 | if (!client || !client->parent || !profileID) |
| @@ -307,13 +239,6 @@ misagent_error_t misagent_remove(misagent_client_t client, const char* profileID | |||
| 307 | return res; | 239 | return res; |
| 308 | } | 240 | } |
| 309 | 241 | ||
| 310 | /** | ||
| 311 | * Retrieves the status code from the last operation. | ||
| 312 | * | ||
| 313 | * @param client The misagent to use. | ||
| 314 | * | ||
| 315 | * @return -1 if client is invalid, or the status code from the last operation | ||
| 316 | */ | ||
| 317 | int misagent_get_status_code(misagent_client_t client) | 242 | int misagent_get_status_code(misagent_client_t client) |
| 318 | { | 243 | { |
| 319 | if (!client) { | 244 | if (!client) { |
