libimobiledevice 1.1.5

- Main Page
- Data Structures
- Files

- File List
- Globals

Typedefs | Functions
misagent.h File Reference

Manage provisioning profiles. More...

## Typedefs
typedef int16_t | misagent_error_t
| Represents an error code.
typedef misagent_client_private * | misagent_client_t
| The client handle.

## Functions
misagent_error_t | misagent_client_new (idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client)
| Connects to the misagent service on the specified device.
misagent_error_t | misagent_client_free (misagent_client_t client)
| Disconnects an misagent client from the device and frees up the misagent client data.
misagent_error_t | misagent_install (misagent_client_t client, plist_t profile)
| Installs the given provisioning profile.
misagent_error_t | misagent_copy (misagent_client_t client, plist_t *profiles)
| Retrieves an array of all installed provisioning profiles.
misagent_error_t | misagent_remove (misagent_client_t client, const char *profileID)
| Removes a given provisioning profile.
int | misagent_get_status_code (misagent_client_t client)
| Retrieves the status code from the last operation.

## Error Codes
#define | MISAGENT_E_SUCCESS 0
#define | MISAGENT_E_INVALID_ARG -1
#define | MISAGENT_E_PLIST_ERROR -2
#define | MISAGENT_E_CONN_FAILED -3
#define | MISAGENT_E_REQUEST_FAILED -4
#define | MISAGENT_E_UNKNOWN_ERROR -256

## Detailed Description

Manage provisioning profiles.

## Typedef Documentation

typedef misagent_client_private* misagent_client_t

The client handle.

typedef int16_t misagent_error_t

Represents an error code.

## Function Documentation

misagent_error_t misagent_client_free | ( | misagent_client_t | client | ) |

Disconnects an misagent client from the device and frees up the misagent client data.

Parameters:

  client | The misagent client to disconnect and free.

Returns:
  MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is NULL, or an MISAGENT_E_* error code otherwise.

misagent_error_t misagent_client_new | ( | idevice_t | device,
|  | lockdownd_service_descriptor_t | service,
|  | misagent_client_t * | client
| ) |  |

Connects to the misagent service on the specified device.

Parameters:

  device | The device to connect to.
  service | The service descriptor returned by lockdownd_start_service.
  client | Pointer that will point to a newly allocated misagent_client_t upon successful return.

Returns:
  MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is NULL, or an MISAGENT_E_* error code otherwise.

misagent_error_t misagent_copy | ( | misagent_client_t | client,
|  | plist_t * | profiles
| ) |  |

Retrieves an array of all installed provisioning profiles.

Parameters:

  client | The connected misagent to use.
  profiles | Pointer to a plist_t that will be set to a PLIST_ARRAY if the function is successful.

Returns:
  MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is invalid, or an MISAGENT_E_* error code otherwise.

Note:
  If no provisioning profiles are installed on the device, this function still returns MISAGENT_E_SUCCESS and profiles will just point to an empty array.

int misagent_get_status_code | ( | misagent_client_t | client | ) |

Retrieves the status code from the last operation.

Parameters:

  client | The misagent to use.

Returns:
  -1 if client is invalid, or the status code from the last operation

misagent_error_t misagent_install | ( | misagent_client_t | client,
|  | plist_t | profile
| ) |  |

Installs the given provisioning profile.

Only works with valid profiles.

Parameters:

  client | The connected misagent to use for installation
  profile | The valid provisioning profile to install. This has to be passed as a PLIST_DATA, otherwise the function will fail.

Returns:
  MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is invalid, or an MISAGENT_E_* error code otherwise.

misagent_error_t misagent_remove | ( | misagent_client_t | client,
|  | const char * | profileID
| ) |  |

Removes a given provisioning profile.

Parameters:

  client | The connected misagent to use.
  profileID | Identifier of the provisioning profile to remove. This is a UUID that can be obtained from the provisioning profile data.

See also:
  misagent_copy

Returns:
  MISAGENT_E_SUCCESS on success, MISAGENT_E_INVALID_ARG when client is invalid, or an MISAGENT_E_* error code otherwise.