Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > ecb1fc03d151e18f121aacdd5ee9288b > files > 37

libimobiledevice-devel-1.0.6-1.fc14.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libimobiledevice: libimobiledevice/mobile_image_mounter.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libimobiledevice&#160;<span id="projectnumber">1.0.6</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>libimobiledevice/mobile_image_mounter.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>Implementation of the mobile image mounter service.  
<a href="#_details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int16_t&#160;</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>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Represents an error code.  <a href="#ae0b7c39de39769f44bba8dd94e9b03a8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
<a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_private</a> *&#160;</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>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The client handle.  <a href="#ae7690ee36890c0c64933107e86c1ab0f"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><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>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobile__image__mounter_8h.html#a44b66755d06202d4b592227106529ce4">mobile_image_mounter_new</a> (<a class="el" href="structidevice__private.html">idevice_t</a> device, uint16_t port, <a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a> *client)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Connects to the mobile_image_mounter service on the specified device.  <a href="#a44b66755d06202d4b592227106529ce4"></a><br/></td></tr>
<tr><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>&#160;</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="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a> client)</td></tr>
<tr><td class="mdescLeft">&#160;</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>
<tr><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>&#160;</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="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a> client, const char *image_type, plist_t *result)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells if the image of ImageType is already mounted.  <a href="#a36eaa679c99ce97b4d4101691cee5fc3"></a><br/></td></tr>
<tr><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>&#160;</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="structmobile__image__mounter__client__private.html">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>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Mounts an image on the device.  <a href="#a8b2d5a1a5aca62984095f5a5731ea9cb"></a><br/></td></tr>
<tr><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>&#160;</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="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a> client)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Hangs up the connection to the mobile_image_mounter service.  <a href="#a0b171083275b80170677f4e7c2b6200a"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="member-group"></a>
Error Codes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a009f8723f2cc02a019de2b15d750abe6"></a><!-- doxytag: member="include/libimobiledevice/mobile_image_mounter.h::MOBILE_IMAGE_MOUNTER_E_SUCCESS" ref="a009f8723f2cc02a019de2b15d750abe6" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_SUCCESS</b>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a217d6ea66fbb8d8759a0e7cb50244072"></a><!-- doxytag: member="include/libimobiledevice/mobile_image_mounter.h::MOBILE_IMAGE_MOUNTER_E_INVALID_ARG" ref="a217d6ea66fbb8d8759a0e7cb50244072" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_INVALID_ARG</b>&#160;&#160;&#160;-1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4f2241cb27ea2fbd00fe255945c5b33"></a><!-- doxytag: member="include/libimobiledevice/mobile_image_mounter.h::MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR" ref="ad4f2241cb27ea2fbd00fe255945c5b33" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_PLIST_ERROR</b>&#160;&#160;&#160;-2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad35bff9a902ebb2fdc5d97f1a61dc3c5"></a><!-- doxytag: member="include/libimobiledevice/mobile_image_mounter.h::MOBILE_IMAGE_MOUNTER_E_CONN_FAILED" ref="ad35bff9a902ebb2fdc5d97f1a61dc3c5" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_CONN_FAILED</b>&#160;&#160;&#160;-3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a81d6dc3bb4330021394173d6b5166623"></a><!-- doxytag: member="include/libimobiledevice/mobile_image_mounter.h::MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR" ref="a81d6dc3bb4330021394173d6b5166623" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR</b>&#160;&#160;&#160;-256</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Implementation of the mobile image mounter service. </p>
</div><hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ae7690ee36890c0c64933107e86c1ab0f"></a><!-- doxytag: member="mobile_image_mounter.h::mobile_image_mounter_client_t" ref="ae7690ee36890c0c64933107e86c1ab0f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef <a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_private</a>* <a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The client handle. </p>

</div>
</div>
<a class="anchor" id="ae0b7c39de39769f44bba8dd94e9b03a8"></a><!-- doxytag: member="mobile_image_mounter.h::mobile_image_mounter_error_t" ref="ae0b7c39de39769f44bba8dd94e9b03a8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <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>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Represents an error code. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a840a19c567f46f66f1731babb8c608d1"></a><!-- doxytag: member="mobile_image_mounter.h::mobile_image_mounter_free" ref="a840a19c567f46f66f1731babb8c608d1" args="(mobile_image_mounter_client_t client)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <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>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Disconnects a mobile_image_mounter client from the device and frees up the mobile_image_mounter client data. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>The mobile_image_mounter client to disconnect and free.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or MOBILE_IMAGE_MOUNTER_E_INVALID_ARG if client is NULL. </dd></dl>

</div>
</div>
<a class="anchor" id="a0b171083275b80170677f4e7c2b6200a"></a><!-- doxytag: member="mobile_image_mounter.h::mobile_image_mounter_hangup" ref="a0b171083275b80170677f4e7c2b6200a" args="(mobile_image_mounter_client_t client)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <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>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Hangs up the connection to the mobile_image_mounter service. </p>
<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>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>The client to hang up</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></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>

</div>
</div>
<a class="anchor" id="a36eaa679c99ce97b4d4101691cee5fc3"></a><!-- doxytag: member="mobile_image_mounter.h::mobile_image_mounter_lookup_image" ref="a36eaa679c99ce97b4d4101691cee5fc3" args="(mobile_image_mounter_client_t client, const char *image_type, plist_t *result)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <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>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>image_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">plist_t *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tells if the image of ImageType is already mounted. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>The client use </td></tr>
    <tr><td class="paramname">image_type</td><td>The type of the image to look up </td></tr>
    <tr><td class="paramname">result</td><td>Pointer to a plist that will receive the result of the operation.</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></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>
<dl class="return"><dt><b>Returns:</b></dt><dd>MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an error code on error </dd></dl>

</div>
</div>
<a class="anchor" id="a8b2d5a1a5aca62984095f5a5731ea9cb"></a><!-- doxytag: member="mobile_image_mounter.h::mobile_image_mounter_mount_image" ref="a8b2d5a1a5aca62984095f5a5731ea9cb" args="(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)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <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>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a>&#160;</td>
          <td class="paramname"><em>client</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>image_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>image_signature</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>signature_length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>image_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">plist_t *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Mounts an image on the device. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">client</td><td>The connected mobile_image_mounter client. </td></tr>
    <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>
    <tr><td class="paramname">image_signature</td><td>Pointer to a buffer holding the images' signature </td></tr>
    <tr><td class="paramname">signature_length</td><td>Length of the signature image_signature points to </td></tr>
    <tr><td class="paramname">image_type</td><td>Type of image to mount </td></tr>
    <tr><td class="paramname">result</td><td>Pointer to a plist that will receive the result of the operation.</td></tr>
  </table>
  </dd>
</dl>
<dl class="note"><dt><b>Note:</b></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>
<dl class="return"><dt><b>Returns:</b></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>

</div>
</div>
<a class="anchor" id="a44b66755d06202d4b592227106529ce4"></a><!-- doxytag: member="mobile_image_mounter.h::mobile_image_mounter_new" ref="a44b66755d06202d4b592227106529ce4" args="(idevice_t device, uint16_t port, mobile_image_mounter_client_t *client)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <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>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structidevice__private.html">idevice_t</a>&#160;</td>
          <td class="paramname"><em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structmobile__image__mounter__client__private.html">mobile_image_mounter_client_t</a> *&#160;</td>
          <td class="paramname"><em>client</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Connects to the mobile_image_mounter service on the specified device. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">device</td><td>The device to connect to. </td></tr>
    <tr><td class="paramname">port</td><td>Destination port (usually given by lockdownd_start_service). </td></tr>
    <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>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></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>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>