1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6
<title>libimobiledevice: libimobiledevice/mobile_image_mounter.h File Reference</title>
7
<link href="tabs.css" rel="stylesheet" type="text/css"/>
8
<script type="text/javascript" src="jquery.js"></script>
9
<script type="text/javascript" src="dynsections.js"></script>
10
<link href="doxygen.css" rel="stylesheet" type="text/css" />
13
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
15
<table cellspacing="0" cellpadding="0">
17
<tr style="height: 56px;">
18
<td style="padding-left: 0.5em;">
19
<div id="projectname">libimobiledevice
20
 <span id="projectnumber">1.1.5</span>
27
<!-- end header part -->
28
<!-- Generated by Doxygen 1.8.1 -->
29
<div id="navrow1" class="tabs">
31
<li><a href="index.html"><span>Main Page</span></a></li>
32
<li><a href="annotated.html"><span>Data Structures</span></a></li>
33
<li class="current"><a href="files.html"><span>Files</span></a></li>
36
<div id="navrow2" class="tabs2">
38
<li><a href="files.html"><span>File List</span></a></li>
39
<li><a href="globals.html"><span>Globals</span></a></li>
42
<div id="nav-path" class="navpath">
44
<li class="navelem"><a class="el" href="dir_0839347dbfd1d6806a2d090799a179ba.html">libimobiledevice</a></li> </ul>
49
<a href="#typedef-members">Typedefs</a> |
50
<a href="#func-members">Functions</a> </div>
51
<div class="headertitle">
52
<div class="title">mobile_image_mounter.h File Reference</div> </div>
54
<div class="contents">
56
<p>Mount developer/debug disk images on the device.
57
<a href="#details">More...</a></p>
58
<table class="memberdecls">
59
<tr class="heading"><td colspan="2"><h2><a name="typedef-members"></a>
60
Typedefs</h2></td></tr>
61
<tr class="memitem:ae0b7c39de39769f44bba8dd94e9b03a8"><td class="memItemLeft" align="right" valign="top">typedef int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a></td></tr>
62
<tr class="memdesc:ae0b7c39de39769f44bba8dd94e9b03a8"><td class="mdescLeft"> </td><td class="mdescRight">Represents an error code. <a href="#ae0b7c39de39769f44bba8dd94e9b03a8"></a><br/></td></tr>
63
<tr class="memitem:ae7690ee36890c0c64933107e86c1ab0f"><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
64
<a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_private</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a></td></tr>
65
<tr class="memdesc:ae7690ee36890c0c64933107e86c1ab0f"><td class="mdescLeft"> </td><td class="mdescRight">The client handle. <a href="#ae7690ee36890c0c64933107e86c1ab0f"></a><br/></td></tr>
66
</table><table class="memberdecls">
67
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
68
Functions</h2></td></tr>
69
<tr class="memitem:a09b35b0b95d7bd4259ead615c2bae205"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#a09b35b0b95d7bd4259ead615c2bae205">mobile_image_mounter_new</a> (<a class="el" href="libimobiledevice_8h.html#ae5bc0e9aa2f3b5023755f5e1c5039a60">idevice_t</a> device, lockdownd_service_descriptor_t service, <a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> *client)</td></tr>
70
<tr class="memdesc:a09b35b0b95d7bd4259ead615c2bae205"><td class="mdescLeft"> </td><td class="mdescRight">Connects to the mobile_image_mounter service on the specified device. <a href="#a09b35b0b95d7bd4259ead615c2bae205"></a><br/></td></tr>
71
<tr class="memitem:a840a19c567f46f66f1731babb8c608d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#a840a19c567f46f66f1731babb8c608d1">mobile_image_mounter_free</a> (<a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> client)</td></tr>
72
<tr class="memdesc:a840a19c567f46f66f1731babb8c608d1"><td class="mdescLeft"> </td><td class="mdescRight">Disconnects a mobile_image_mounter client from the device and frees up the mobile_image_mounter client data. <a href="#a840a19c567f46f66f1731babb8c608d1"></a><br/></td></tr>
73
<tr class="memitem:a36eaa679c99ce97b4d4101691cee5fc3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#a36eaa679c99ce97b4d4101691cee5fc3">mobile_image_mounter_lookup_image</a> (<a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> client, const char *image_type, plist_t *result)</td></tr>
74
<tr class="memdesc:a36eaa679c99ce97b4d4101691cee5fc3"><td class="mdescLeft"> </td><td class="mdescRight">Tells if the image of ImageType is already mounted. <a href="#a36eaa679c99ce97b4d4101691cee5fc3"></a><br/></td></tr>
75
<tr class="memitem:a8b2d5a1a5aca62984095f5a5731ea9cb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#a8b2d5a1a5aca62984095f5a5731ea9cb">mobile_image_mounter_mount_image</a> (<a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result)</td></tr>
76
<tr class="memdesc:a8b2d5a1a5aca62984095f5a5731ea9cb"><td class="mdescLeft"> </td><td class="mdescRight">Mounts an image on the device. <a href="#a8b2d5a1a5aca62984095f5a5731ea9cb"></a><br/></td></tr>
77
<tr class="memitem:a0b171083275b80170677f4e7c2b6200a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#a0b171083275b80170677f4e7c2b6200a">mobile_image_mounter_hangup</a> (<a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> client)</td></tr>
78
<tr class="memdesc:a0b171083275b80170677f4e7c2b6200a"><td class="mdescLeft"> </td><td class="mdescRight">Hangs up the connection to the mobile_image_mounter service. <a href="#a0b171083275b80170677f4e7c2b6200a"></a><br/></td></tr>
79
</table><table class="memberdecls">
80
<tr class="heading"><td colspan="2"><h2><a name="member-group"></a>
81
Error Codes</h2></td></tr>
82
<tr class="memitem:a009f8723f2cc02a019de2b15d750abe6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a009f8723f2cc02a019de2b15d750abe6"></a>
83
#define </td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_SUCCESS</b>   0</td></tr>
84
<tr class="memitem:a217d6ea66fbb8d8759a0e7cb50244072"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a217d6ea66fbb8d8759a0e7cb50244072"></a>
85
#define </td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_INVALID_ARG</b>   -1</td></tr>
86
<tr class="memitem:ad4f2241cb27ea2fbd00fe255945c5b33"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4f2241cb27ea2fbd00fe255945c5b33"></a>
87
#define </td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR</b>   -2</td></tr>
88
<tr class="memitem:ad35bff9a902ebb2fdc5d97f1a61dc3c5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad35bff9a902ebb2fdc5d97f1a61dc3c5"></a>
89
#define </td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_CONN_FAILED</b>   -3</td></tr>
90
<tr class="memitem:a81d6dc3bb4330021394173d6b5166623"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a81d6dc3bb4330021394173d6b5166623"></a>
91
#define </td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR</b>   -256</td></tr>
93
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
94
<div class="textblock"><p>Mount developer/debug disk images on the device. </p>
95
</div><hr/><h2>Typedef Documentation</h2>
96
<a class="anchor" id="ae7690ee36890c0c64933107e86c1ab0f"></a>
98
<div class="memproto">
99
<table class="memname">
101
<td class="memname">typedef <a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_private</a>* <a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a></td>
104
</div><div class="memdoc">
106
<p>The client handle. </p>
110
<a class="anchor" id="ae0b7c39de39769f44bba8dd94e9b03a8"></a>
111
<div class="memitem">
112
<div class="memproto">
113
<table class="memname">
115
<td class="memname">typedef int16_t <a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a></td>
118
</div><div class="memdoc">
120
<p>Represents an error code. </p>
124
<hr/><h2>Function Documentation</h2>
125
<a class="anchor" id="a840a19c567f46f66f1731babb8c608d1"></a>
126
<div class="memitem">
127
<div class="memproto">
128
<table class="memname">
130
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> mobile_image_mounter_free </td>
132
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> </td>
133
<td class="paramname"><em>client</em></td><td>)</td>
137
</div><div class="memdoc">
139
<p>Disconnects a mobile_image_mounter client from the device and frees up the mobile_image_mounter client data. </p>
140
<dl class="params"><dt>Parameters:</dt><dd>
141
<table class="params">
142
<tr><td class="paramname">client</td><td>The mobile_image_mounter client to disconnect and free.</td></tr>
146
<dl class="section return"><dt>Returns:</dt><dd>MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is NULL. </dd></dl>
150
<a class="anchor" id="a0b171083275b80170677f4e7c2b6200a"></a>
151
<div class="memitem">
152
<div class="memproto">
153
<table class="memname">
155
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> mobile_image_mounter_hangup </td>
157
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> </td>
158
<td class="paramname"><em>client</em></td><td>)</td>
162
</div><div class="memdoc">
164
<p>Hangs up the connection to the mobile_image_mounter service. </p>
165
<p>This functions has to be called before freeing up a mobile_image_mounter instance. If not, errors appear in the device's syslog.</p>
166
<dl class="params"><dt>Parameters:</dt><dd>
167
<table class="params">
168
<tr><td class="paramname">client</td><td>The client to hang up</td></tr>
172
<dl class="section return"><dt>Returns:</dt><dd>MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is invalid, or another error code otherwise. </dd></dl>
176
<a class="anchor" id="a36eaa679c99ce97b4d4101691cee5fc3"></a>
177
<div class="memitem">
178
<div class="memproto">
179
<table class="memname">
181
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> mobile_image_mounter_lookup_image </td>
183
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> </td>
184
<td class="paramname"><em>client</em>, </td>
187
<td class="paramkey"></td>
189
<td class="paramtype">const char * </td>
190
<td class="paramname"><em>image_type</em>, </td>
193
<td class="paramkey"></td>
195
<td class="paramtype">plist_t * </td>
196
<td class="paramname"><em>result</em> </td>
204
</div><div class="memdoc">
206
<p>Tells if the image of ImageType is already mounted. </p>
207
<dl class="params"><dt>Parameters:</dt><dd>
208
<table class="params">
209
<tr><td class="paramname">client</td><td>The client use </td></tr>
210
<tr><td class="paramname">image_type</td><td>The type of the image to look up </td></tr>
211
<tr><td class="paramname">result</td><td>Pointer to a plist that will receive the result of the operation.</td></tr>
215
<dl class="section note"><dt>Note:</dt><dd>This function may return MOBILE_IMAGE_MOUNTER_E_SUCCESS even if the operation has failed. Check the resulting plist for further information.</dd></dl>
216
<dl class="section return"><dt>Returns:</dt><dd>MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an error code on error </dd></dl>
220
<a class="anchor" id="a8b2d5a1a5aca62984095f5a5731ea9cb"></a>
221
<div class="memitem">
222
<div class="memproto">
223
<table class="memname">
225
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> mobile_image_mounter_mount_image </td>
227
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> </td>
228
<td class="paramname"><em>client</em>, </td>
231
<td class="paramkey"></td>
233
<td class="paramtype">const char * </td>
234
<td class="paramname"><em>image_path</em>, </td>
237
<td class="paramkey"></td>
239
<td class="paramtype">const char * </td>
240
<td class="paramname"><em>image_signature</em>, </td>
243
<td class="paramkey"></td>
245
<td class="paramtype">uint16_t </td>
246
<td class="paramname"><em>signature_length</em>, </td>
249
<td class="paramkey"></td>
251
<td class="paramtype">const char * </td>
252
<td class="paramname"><em>image_type</em>, </td>
255
<td class="paramkey"></td>
257
<td class="paramtype">plist_t * </td>
258
<td class="paramname"><em>result</em> </td>
266
</div><div class="memdoc">
268
<p>Mounts an image on the device. </p>
269
<dl class="params"><dt>Parameters:</dt><dd>
270
<table class="params">
271
<tr><td class="paramname">client</td><td>The connected mobile_image_mounter client. </td></tr>
272
<tr><td class="paramname">image_path</td><td>The absolute path of the image to mount. The image must be present before calling this function. </td></tr>
273
<tr><td class="paramname">image_signature</td><td>Pointer to a buffer holding the images' signature </td></tr>
274
<tr><td class="paramname">signature_length</td><td>Length of the signature image_signature points to </td></tr>
275
<tr><td class="paramname">image_type</td><td>Type of image to mount </td></tr>
276
<tr><td class="paramname">result</td><td>Pointer to a plist that will receive the result of the operation.</td></tr>
280
<dl class="section note"><dt>Note:</dt><dd>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.</dd></dl>
281
<dl class="section return"><dt>Returns:</dt><dd>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. </dd></dl>
285
<a class="anchor" id="a09b35b0b95d7bd4259ead615c2bae205"></a>
286
<div class="memitem">
287
<div class="memproto">
288
<table class="memname">
290
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae0b7c39de39769f44bba8dd94e9b03a8">mobile_image_mounter_error_t</a> mobile_image_mounter_new </td>
292
<td class="paramtype"><a class="el" href="libimobiledevice_8h.html#ae5bc0e9aa2f3b5023755f5e1c5039a60">idevice_t</a> </td>
293
<td class="paramname"><em>device</em>, </td>
296
<td class="paramkey"></td>
298
<td class="paramtype">lockdownd_service_descriptor_t </td>
299
<td class="paramname"><em>service</em>, </td>
302
<td class="paramkey"></td>
304
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#ae7690ee36890c0c64933107e86c1ab0f">mobile_image_mounter_client_t</a> * </td>
305
<td class="paramname"><em>client</em> </td>
313
</div><div class="memdoc">
315
<p>Connects to the mobile_image_mounter service on the specified device. </p>
316
<dl class="params"><dt>Parameters:</dt><dd>
317
<table class="params">
318
<tr><td class="paramname">device</td><td>The device to connect to. </td></tr>
319
<tr><td class="paramname">service</td><td>The service descriptor returned by lockdownd_start_service. </td></tr>
320
<tr><td class="paramname">client</td><td>Pointer that will be set to a newly allocated mobile_image_mounter_client_t upon successful return.</td></tr>
324
<dl class="section return"><dt>Returns:</dt><dd>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. </dd></dl>
328
</div><!-- contents -->
329
<!-- start footer part -->
330
<hr class="footer"/><address class="footer"><small>
331
Generated by  <a href="http://www.doxygen.org/index.html">
332
<img class="footer" src="doxygen.png" alt="doxygen"/>