diff options
Diffstat (limited to 'src/mobile_image_mounter.c')
| -rw-r--r-- | src/mobile_image_mounter.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mobile_image_mounter.c b/src/mobile_image_mounter.c index f2e423a..bc439f9 100644 --- a/src/mobile_image_mounter.c +++ b/src/mobile_image_mounter.c | |||
| @@ -106,6 +106,26 @@ mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdown | |||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | /** | 108 | /** |
| 109 | * Starts a new mobile_image_mounter service on the specified device and connects to it. | ||
| 110 | * | ||
| 111 | * @param device The device to connect to. | ||
| 112 | * @param client Pointer that will point to a newly allocated | ||
| 113 | * mobile_image_mounter_t upon successful return. Must be freed using | ||
| 114 | * mobile_image_mounter_free() after use. | ||
| 115 | * @param label The label to use for communication. Usually the program name. | ||
| 116 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 117 | * | ||
| 118 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an MOBILE_IMAGE_MOUNTER_E_* error | ||
| 119 | * code otherwise. | ||
| 120 | */ | ||
| 121 | mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t * client, const char* label) | ||
| 122 | { | ||
| 123 | mobile_image_mounter_error_t err = MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; | ||
| 124 | service_client_factory_start_service(device, MOBILE_IMAGE_MOUNTER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobile_image_mounter_new), &err); | ||
| 125 | return err; | ||
| 126 | } | ||
| 127 | |||
| 128 | /** | ||
| 109 | * Disconnects a mobile_image_mounter client from the device and frees up the | 129 | * Disconnects a mobile_image_mounter client from the device and frees up the |
| 110 | * mobile_image_mounter client data. | 130 | * mobile_image_mounter client data. |
| 111 | * | 131 | * |
