libimobiledevice 1.1.5

- Main Page
- Data Structures
- Files

- File List
- Globals

Typedefs | Functions
mobile_image_mounter.h File Reference

Mount developer/debug disk images on the device. More...

## Typedefs
typedef int16_t | mobile_image_mounter_error_t
| Represents an error code.
typedef mobile_image_mounter_client_private * | mobile_image_mounter_client_t
| The client handle.

## Functions
mobile_image_mounter_error_t | mobile_image_mounter_new (idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client)
| Connects to the mobile_image_mounter service on the specified device.
mobile_image_mounter_error_t | mobile_image_mounter_free (mobile_image_mounter_client_t client)
| Disconnects a mobile_image_mounter client from the device and frees up the mobile_image_mounter client data.
mobile_image_mounter_error_t | mobile_image_mounter_lookup_image (mobile_image_mounter_client_t client, const char *image_type, plist_t *result)
| Tells if the image of ImageType is already mounted.
mobile_image_mounter_error_t | mobile_image_mounter_mount_image (mobile_image_mounter_client_t client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result)
| Mounts an image on the device.
mobile_image_mounter_error_t | mobile_image_mounter_hangup (mobile_image_mounter_client_t client)
| Hangs up the connection to the mobile_image_mounter service.

## Error Codes
#define | MOBILE_IMAGE_MOUNTER_E_SUCCESS 0
#define | MOBILE_IMAGE_MOUNTER_E_INVALID_ARG -1
#define | MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR -2
#define | MOBILE_IMAGE_MOUNTER_E_CONN_FAILED -3
#define | MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR -256

## Detailed Description

Mount developer/debug disk images on the device.

## Typedef Documentation

typedef mobile_image_mounter_client_private* mobile_image_mounter_client_t

The client handle.

typedef int16_t mobile_image_mounter_error_t

Represents an error code.

## Function Documentation

mobile_image_mounter_error_t mobile_image_mounter_free | ( | mobile_image_mounter_client_t | client | ) |

Disconnects a mobile_image_mounter client from the device and frees up the mobile_image_mounter client data.

Parameters:

  client | The mobile_image_mounter client to disconnect and free.

Returns:
  MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is NULL.

mobile_image_mounter_error_t mobile_image_mounter_hangup | ( | mobile_image_mounter_client_t | client | ) |

Hangs up the connection to the mobile_image_mounter service.

This functions has to be called before freeing up a mobile_image_mounter instance. If not, errors appear in the device's syslog.

Parameters:

  client | The client to hang up

Returns:
  MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is invalid, or another error code otherwise.

mobile_image_mounter_error_t mobile_image_mounter_lookup_image | ( | mobile_image_mounter_client_t | client,
|  | const char * | image_type,
|  | plist_t * | result
| ) |  |

Tells if the image of ImageType is already mounted.

Parameters:

  client | The client use
  image_type | The type of the image to look up
  result | Pointer to a plist that will receive the result of the operation.

Note:
  This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the operation has failed. Check the resulting plist for further information.

Returns:
  MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an error code on error

mobile_image_mounter_error_t mobile_image_mounter_mount_image | ( | mobile_image_mounter_client_t | client,
|  | const char * | image_path,
|  | const char * | image_signature,
|  | uint16_t | signature_length,
|  | const char * | image_type,
|  | plist_t * | result
| ) |  |

Mounts an image on the device.

Parameters:

  client | The connected mobile_image_mounter client.
  image_path | The absolute path of the image to mount. The image must be present before calling this function.
  image_signature | Pointer to a buffer holding the images' signature
  signature_length | Length of the signature image_signature points to
  image_type | Type of image to mount
  result | Pointer to a plist that will receive the result of the operation.

Note:
  This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the operation has failed. Check the resulting plist for further information. Note that there is no unmounting function. The mount persists until the device is rebooted.

Returns:
  MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if on ore more parameters are invalid, or another error code otherwise.

mobile_image_mounter_error_t mobile_image_mounter_new | ( | idevice_t | device,
|  | lockdownd_service_descriptor_t | service,
|  | mobile_image_mounter_client_t * | client
| ) |  |

Connects to the mobile_image_mounter 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 be set to a newly allocated mobile_image_mounter_client_t upon successful return.

Returns:
  MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if device is NULL, or MOBILE_IMAGE_MOUNTER_E_CONN_FAILED if the connection to the device could not be established.