<!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/file_relay.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.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> </div> <div class="contents"> <h1>libimobiledevice/file_relay.h File Reference</h1> <p>file_relay Implementation <a href="#_details">More...</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ac4160cb873a9a4bc9306a41b756720db">file_relay_error_t</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Represents an error code. <a href="#ac4160cb873a9a4bc9306a41b756720db"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="structfile__relay__client__private.html">file_relay_client_private</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ab3be437eb59c3a5684ee572d554ac044">file_relay_client_t</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">The client handle. <a href="#ab3be437eb59c3a5684ee572d554ac044"></a><br/></td></tr> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ac4160cb873a9a4bc9306a41b756720db">file_relay_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#a5ed9c9cb19e792e19063360d291f0c64">file_relay_client_new</a> (<a class="el" href="structidevice__private.html">idevice_t</a> device, uint16_t port, <a class="el" href="structfile__relay__client__private.html">file_relay_client_t</a> *client)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Connects to the file_relay service on the specified device. <a href="#a5ed9c9cb19e792e19063360d291f0c64"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ac4160cb873a9a4bc9306a41b756720db">file_relay_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#a505e17a6a1184d65c0cb30119d169d2b">file_relay_client_free</a> (<a class="el" href="structfile__relay__client__private.html">file_relay_client_t</a> client)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Disconnects a file_relay client from the device and frees up the file_relay client data. <a href="#a505e17a6a1184d65c0cb30119d169d2b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ac4160cb873a9a4bc9306a41b756720db">file_relay_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ab96cd1495725dd5adfd65573048cf86f">file_relay_request_sources</a> (<a class="el" href="structfile__relay__client__private.html">file_relay_client_t</a> client, const char **sources, <a class="el" href="structidevice__connection__private.html">idevice_connection_t</a> *connection)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Request data for the given sources. <a href="#ab96cd1495725dd5adfd65573048cf86f"></a><br/></td></tr> <tr><td colspan="2"><h2>Error Codes</h2></td></tr> <tr><td colspan="2"><p><a class="anchor" id="amgrp5c244138ac975df1b1cec1afc71a6c9a"></a> </p> <br/><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a53d40e041e2ee387d502e9f3116b705e"></a><!-- doxytag: member="include/libimobiledevice/file_relay.h::FILE_RELAY_E_SUCCESS" ref="a53d40e041e2ee387d502e9f3116b705e" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>FILE_RELAY_E_SUCCESS</b> 0</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a401ad1a9a246bdec61866b86ec33c24e"></a><!-- doxytag: member="include/libimobiledevice/file_relay.h::FILE_RELAY_E_INVALID_ARG" ref="a401ad1a9a246bdec61866b86ec33c24e" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>FILE_RELAY_E_INVALID_ARG</b> -1</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9d04a9bfcd8f7ef0b3dbefd1547249e"></a><!-- doxytag: member="include/libimobiledevice/file_relay.h::FILE_RELAY_E_PLIST_ERROR" ref="ab9d04a9bfcd8f7ef0b3dbefd1547249e" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>FILE_RELAY_E_PLIST_ERROR</b> -2</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab65939f06e68f22f3c4a5b1132211978"></a><!-- doxytag: member="include/libimobiledevice/file_relay.h::FILE_RELAY_E_MUX_ERROR" ref="ab65939f06e68f22f3c4a5b1132211978" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>FILE_RELAY_E_MUX_ERROR</b> -3</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7da7b3c10b36c01582a911e2fc1bf2bf"></a><!-- doxytag: member="include/libimobiledevice/file_relay.h::FILE_RELAY_E_INVALID_SOURCE" ref="a7da7b3c10b36c01582a911e2fc1bf2bf" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>FILE_RELAY_E_INVALID_SOURCE</b> -4</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aef65bb203c4aa1cab19c96a38fb051b8"></a><!-- doxytag: member="include/libimobiledevice/file_relay.h::FILE_RELAY_E_STAGING_EMPTY" ref="aef65bb203c4aa1cab19c96a38fb051b8" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>FILE_RELAY_E_STAGING_EMPTY</b> -5</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab542d6de82ddd1122c17587cc00461cf"></a><!-- doxytag: member="include/libimobiledevice/file_relay.h::FILE_RELAY_E_UNKNOWN_ERROR" ref="ab542d6de82ddd1122c17587cc00461cf" args="" --> #define </td><td class="memItemRight" valign="bottom"><b>FILE_RELAY_E_UNKNOWN_ERROR</b> -256</td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>file_relay Implementation </p> <hr/><h2>Typedef Documentation</h2> <a class="anchor" id="ab3be437eb59c3a5684ee572d554ac044"></a><!-- doxytag: member="file_relay.h::file_relay_client_t" ref="ab3be437eb59c3a5684ee572d554ac044" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef <a class="el" href="structfile__relay__client__private.html">file_relay_client_private</a>* <a class="el" href="structfile__relay__client__private.html">file_relay_client_t</a></td> </tr> </table> </div> <div class="memdoc"> <p>The client handle. </p> </div> </div> <a class="anchor" id="ac4160cb873a9a4bc9306a41b756720db"></a><!-- doxytag: member="file_relay.h::file_relay_error_t" ref="ac4160cb873a9a4bc9306a41b756720db" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef int16_t <a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ac4160cb873a9a4bc9306a41b756720db">file_relay_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="a505e17a6a1184d65c0cb30119d169d2b"></a><!-- doxytag: member="file_relay.h::file_relay_client_free" ref="a505e17a6a1184d65c0cb30119d169d2b" args="(file_relay_client_t client)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ac4160cb873a9a4bc9306a41b756720db">file_relay_error_t</a> file_relay_client_free </td> <td>(</td> <td class="paramtype"><a class="el" href="structfile__relay__client__private.html">file_relay_client_t</a> </td> <td class="paramname"> <em>client</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Disconnects a file_relay client from the device and frees up the file_relay client data. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>client</em> </td><td>The file_relay client to disconnect and free.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>FILE_RELAY_E_SUCCESS on success, FILE_RELAY_E_INVALID_ARG when one of client or client->parent is invalid, or FILE_RELAY_E_UNKNOWN_ERROR when the was an error freeing the parent property_list_service client. </dd></dl> </div> </div> <a class="anchor" id="a5ed9c9cb19e792e19063360d291f0c64"></a><!-- doxytag: member="file_relay.h::file_relay_client_new" ref="a5ed9c9cb19e792e19063360d291f0c64" args="(idevice_t device, uint16_t port, file_relay_client_t *client)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ac4160cb873a9a4bc9306a41b756720db">file_relay_error_t</a> file_relay_client_new </td> <td>(</td> <td class="paramtype"><a class="el" href="structidevice__private.html">idevice_t</a> </td> <td class="paramname"> <em>device</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">uint16_t </td> <td class="paramname"> <em>port</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structfile__relay__client__private.html">file_relay_client_t</a> * </td> <td class="paramname"> <em>client</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Connects to the file_relay service on the specified device. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>device</em> </td><td>The device to connect to. </td></tr> <tr><td valign="top"></td><td valign="top"><em>port</em> </td><td>Destination port (usually given by lockdownd_start_service). </td></tr> <tr><td valign="top"></td><td valign="top"><em>client</em> </td><td>Reference that will point to a newly allocated file_relay_client_t upon successful return.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>FILE_RELAY_E_SUCCESS on success, FILE_RELAY_E_INVALID_ARG when one of the parameters is invalid, or FILE_RELAY_E_MUX_ERROR when the connection failed. </dd></dl> </div> </div> <a class="anchor" id="ab96cd1495725dd5adfd65573048cf86f"></a><!-- doxytag: member="file_relay.h::file_relay_request_sources" ref="ab96cd1495725dd5adfd65573048cf86f" args="(file_relay_client_t client, const char **sources, idevice_connection_t *connection)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="include_2libimobiledevice_2file__relay_8h.html#ac4160cb873a9a4bc9306a41b756720db">file_relay_error_t</a> file_relay_request_sources </td> <td>(</td> <td class="paramtype"><a class="el" href="structfile__relay__client__private.html">file_relay_client_t</a> </td> <td class="paramname"> <em>client</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const char ** </td> <td class="paramname"> <em>sources</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structidevice__connection__private.html">idevice_connection_t</a> * </td> <td class="paramname"> <em>connection</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Request data for the given sources. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>client</em> </td><td>The connected file_relay client. </td></tr> <tr><td valign="top"></td><td valign="top"><em>sources</em> </td><td>A NULL-terminated list of sources to retrieve. Valid sources are:</p> <ul> <li>AppleSupport</li> <li>Network</li> <li>VPN</li> <li>WiFi</li> <li>UserDatabases</li> <li>CrashReporter</li> <li>tmp</li> <li>SystemConfiguration </li> </ul> </td></tr> <tr><td valign="top"></td><td valign="top"><em>connection</em> </td><td>The connection that has to be used for receiving the data using <a class="el" href="libimobiledevice_8h.html#a0f40ec458db4f77449f67e41bd14170d" title="Receive data from a device via the given connection.">idevice_connection_receive()</a>. The connection will be closed automatically by the device, but use <a class="el" href="include_2libimobiledevice_2file__relay_8h.html#a505e17a6a1184d65c0cb30119d169d2b" title="Disconnects a file_relay client from the device and frees up the file_relay client...">file_relay_client_free()</a> to clean up properly.</td></tr> </table> </dd> </dl> <dl class="note"><dt><b>Note:</b></dt><dd>WARNING: Don't call this function without reading the data afterwards. A directory mobile_file_relay.XXXX used for creating the archive will remain in the /tmp directory otherwise.</dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>FILE_RELAY_E_SUCCESS on succes, FILE_RELAY_E_INVALID_ARG when one or more parameters are invalid, FILE_RELAY_E_MUX_ERROR if a communication error occurs, FILE_RELAY_E_PLIST_ERROR when the received result is NULL or is not a valid plist, FILE_RELAY_E_INVALID_SOURCE if one or more sources are invalid, FILE_RELAY_E_STAGING_EMPTY if no data is available for the given sources, or FILE_RELAY_E_UNKNOWN_ERROR otherwise. </dd></dl> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Mon Oct 4 16:38:48 2010 for libimobiledevice by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>