33
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>
37
47
<div class="header">
38
48
<div class="summary">
39
49
<a href="#typedef-members">Typedefs</a> |
40
50
<a href="#func-members">Functions</a> </div>
41
51
<div class="headertitle">
42
<h1>libimobiledevice/mobilebackup2.h File Reference</h1> </div>
52
<div class="title">mobilebackup2.h File Reference</div> </div>
44
54
<div class="contents">
46
56
<p>Backup and restore of all device data (mobilebackup2, iOS4+ only)
47
<a href="#_details">More...</a></p>
57
<a href="#details">More...</a></p>
48
58
<table class="memberdecls">
49
<tr><td colspan="2"><h2><a name="typedef-members"></a>
59
<tr class="heading"><td colspan="2"><h2><a name="typedef-members"></a>
50
60
Typedefs</h2></td></tr>
51
<tr><td class="memItemLeft" align="right" valign="top">typedef int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a></td></tr>
52
<tr><td class="mdescLeft"> </td><td class="mdescRight">Represents an error code. <a href="#aeae49da50c4638bd5a3178e9a4b00a2e"></a><br/></td></tr>
53
<tr><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
61
<tr class="memitem:aeae49da50c4638bd5a3178e9a4b00a2e"><td class="memItemLeft" align="right" valign="top">typedef int16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a></td></tr>
62
<tr class="memdesc:aeae49da50c4638bd5a3178e9a4b00a2e"><td class="mdescLeft"> </td><td class="mdescRight">Represents an error code. <a href="#aeae49da50c4638bd5a3178e9a4b00a2e"></a><br/></td></tr>
63
<tr class="memitem:a0cf69d4c02a02f37f1f864946aa4670a"><td class="memItemLeft" align="right" valign="top">typedef <br class="typebreak"/>
54
64
<a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_private</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a></td></tr>
55
<tr><td class="mdescLeft"> </td><td class="mdescRight">The client handle. <a href="#a0cf69d4c02a02f37f1f864946aa4670a"></a><br/></td></tr>
56
<tr><td colspan="2"><h2><a name="func-members"></a>
65
<tr class="memdesc:a0cf69d4c02a02f37f1f864946aa4670a"><td class="mdescLeft"> </td><td class="mdescRight">The client handle. <a href="#a0cf69d4c02a02f37f1f864946aa4670a"></a><br/></td></tr>
66
</table><table class="memberdecls">
67
<tr class="heading"><td colspan="2"><h2><a name="func-members"></a>
57
68
Functions</h2></td></tr>
58
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#acafbe3a637937faead8c2d00526a7678">mobilebackup2_client_new</a> (<a class="el" href="structidevice__private.html">idevice_t</a> device, uint16_t port, <a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> *client)</td></tr>
59
<tr><td class="mdescLeft"> </td><td class="mdescRight">Connects to the mobilebackup2 service on the specified device. <a href="#acafbe3a637937faead8c2d00526a7678"></a><br/></td></tr>
60
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a6476ab467a7319cf3d4882d995af41f6">mobilebackup2_client_free</a> (<a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> client)</td></tr>
61
<tr><td class="mdescLeft"> </td><td class="mdescRight">Disconnects a mobilebackup2 client from the device and frees up the mobilebackup2 client data. <a href="#a6476ab467a7319cf3d4882d995af41f6"></a><br/></td></tr>
62
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a127bbac1f1c6a0e289011902e3a7a3b0">mobilebackup2_receive_message</a> (<a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> client, plist_t *msg_plist, char **dlmessage)</td></tr>
63
<tr><td class="mdescLeft"> </td><td class="mdescRight">Receives a DL* message plist from the device. <a href="#a127bbac1f1c6a0e289011902e3a7a3b0"></a><br/></td></tr>
64
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#ac1c37c17849bf4f3f3240e7cc7b3514b">mobilebackup2_send_raw</a> (<a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> client, const char *data, uint32_t length, uint32_t *bytes)</td></tr>
65
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send binary data to the device. <a href="#ac1c37c17849bf4f3f3240e7cc7b3514b"></a><br/></td></tr>
66
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a27469291309887a60abbbafd1d90eac3">mobilebackup2_receive_raw</a> (<a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> client, char *data, uint32_t length, uint32_t *bytes)</td></tr>
67
<tr><td class="mdescLeft"> </td><td class="mdescRight">Receive binary from the device. <a href="#a27469291309887a60abbbafd1d90eac3"></a><br/></td></tr>
68
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a46e04c64ba6f996c1bdea8e20f28cde2">mobilebackup2_version_exchange</a> (<a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> client, double local_versions[], char count, double *remote_version)</td></tr>
69
<tr><td class="mdescLeft"> </td><td class="mdescRight">Performs the mobilebackup2 protocol version exchange. <a href="#a46e04c64ba6f996c1bdea8e20f28cde2"></a><br/></td></tr>
70
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aad817475256ae8216718b32e1e6fd97d">mobilebackup2_send_request</a> (<a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options)</td></tr>
71
<tr><td class="mdescLeft"> </td><td class="mdescRight">Send a request to the connected mobilebackup2 service. <a href="#aad817475256ae8216718b32e1e6fd97d"></a><br/></td></tr>
72
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeeb2bec4278c62a20b72bc31f8ac3329">mobilebackup2_send_status_response</a> (<a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> client, int status_code, const char *status1, plist_t status2)</td></tr>
73
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sends a DLMessageStatusResponse to the device. <a href="#aeeb2bec4278c62a20b72bc31f8ac3329"></a><br/></td></tr>
74
<tr><td colspan="2"><h2><a name="member-group"></a>
69
<tr class="memitem:a7b563b99e3eba6d528f14f4948920085"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a7b563b99e3eba6d528f14f4948920085">mobilebackup2_client_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_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> *client)</td></tr>
70
<tr class="memdesc:a7b563b99e3eba6d528f14f4948920085"><td class="mdescLeft"> </td><td class="mdescRight">Connects to the mobilebackup2 service on the specified device. <a href="#a7b563b99e3eba6d528f14f4948920085"></a><br/></td></tr>
71
<tr class="memitem:a6476ab467a7319cf3d4882d995af41f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a6476ab467a7319cf3d4882d995af41f6">mobilebackup2_client_free</a> (<a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> client)</td></tr>
72
<tr class="memdesc:a6476ab467a7319cf3d4882d995af41f6"><td class="mdescLeft"> </td><td class="mdescRight">Disconnects a mobilebackup2 client from the device and frees up the mobilebackup2 client data. <a href="#a6476ab467a7319cf3d4882d995af41f6"></a><br/></td></tr>
73
<tr class="memitem:a408732ff5a488ee2f72b4b7b3c671b24"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a408732ff5a488ee2f72b4b7b3c671b24">mobilebackup2_send_message</a> (<a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> client, const char *message, plist_t options)</td></tr>
74
<tr class="memdesc:a408732ff5a488ee2f72b4b7b3c671b24"><td class="mdescLeft"> </td><td class="mdescRight">Sends a backup message plist. <a href="#a408732ff5a488ee2f72b4b7b3c671b24"></a><br/></td></tr>
75
<tr class="memitem:a127bbac1f1c6a0e289011902e3a7a3b0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a127bbac1f1c6a0e289011902e3a7a3b0">mobilebackup2_receive_message</a> (<a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> client, plist_t *msg_plist, char **dlmessage)</td></tr>
76
<tr class="memdesc:a127bbac1f1c6a0e289011902e3a7a3b0"><td class="mdescLeft"> </td><td class="mdescRight">Receives a DL* message plist from the device. <a href="#a127bbac1f1c6a0e289011902e3a7a3b0"></a><br/></td></tr>
77
<tr class="memitem:ac1c37c17849bf4f3f3240e7cc7b3514b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#ac1c37c17849bf4f3f3240e7cc7b3514b">mobilebackup2_send_raw</a> (<a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> client, const char *data, uint32_t length, uint32_t *bytes)</td></tr>
78
<tr class="memdesc:ac1c37c17849bf4f3f3240e7cc7b3514b"><td class="mdescLeft"> </td><td class="mdescRight">Send binary data to the device. <a href="#ac1c37c17849bf4f3f3240e7cc7b3514b"></a><br/></td></tr>
79
<tr class="memitem:a27469291309887a60abbbafd1d90eac3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a27469291309887a60abbbafd1d90eac3">mobilebackup2_receive_raw</a> (<a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> client, char *data, uint32_t length, uint32_t *bytes)</td></tr>
80
<tr class="memdesc:a27469291309887a60abbbafd1d90eac3"><td class="mdescLeft"> </td><td class="mdescRight">Receive binary from the device. <a href="#a27469291309887a60abbbafd1d90eac3"></a><br/></td></tr>
81
<tr class="memitem:a46e04c64ba6f996c1bdea8e20f28cde2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a46e04c64ba6f996c1bdea8e20f28cde2">mobilebackup2_version_exchange</a> (<a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> client, double local_versions[], char count, double *remote_version)</td></tr>
82
<tr class="memdesc:a46e04c64ba6f996c1bdea8e20f28cde2"><td class="mdescLeft"> </td><td class="mdescRight">Performs the mobilebackup2 protocol version exchange. <a href="#a46e04c64ba6f996c1bdea8e20f28cde2"></a><br/></td></tr>
83
<tr class="memitem:aad817475256ae8216718b32e1e6fd97d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aad817475256ae8216718b32e1e6fd97d">mobilebackup2_send_request</a> (<a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options)</td></tr>
84
<tr class="memdesc:aad817475256ae8216718b32e1e6fd97d"><td class="mdescLeft"> </td><td class="mdescRight">Send a request to the connected mobilebackup2 service. <a href="#aad817475256ae8216718b32e1e6fd97d"></a><br/></td></tr>
85
<tr class="memitem:aeeb2bec4278c62a20b72bc31f8ac3329"><td class="memItemLeft" align="right" valign="top"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeeb2bec4278c62a20b72bc31f8ac3329">mobilebackup2_send_status_response</a> (<a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> client, int status_code, const char *status1, plist_t status2)</td></tr>
86
<tr class="memdesc:aeeb2bec4278c62a20b72bc31f8ac3329"><td class="mdescLeft"> </td><td class="mdescRight">Sends a DLMessageStatusResponse to the device. <a href="#aeeb2bec4278c62a20b72bc31f8ac3329"></a><br/></td></tr>
87
</table><table class="memberdecls">
88
<tr class="heading"><td colspan="2"><h2><a name="member-group"></a>
75
89
Error Codes</h2></td></tr>
76
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af3f9e4ac7e3b77cfeee993e2507989cc"></a><!-- doxytag: member="include/libimobiledevice/mobilebackup2.h::MOBILEBACKUP2_E_SUCCESS" ref="af3f9e4ac7e3b77cfeee993e2507989cc" args="" -->
90
<tr class="memitem:af3f9e4ac7e3b77cfeee993e2507989cc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af3f9e4ac7e3b77cfeee993e2507989cc"></a>
77
91
#define </td><td class="memItemRight" valign="bottom"><b>MOBILEBACKUP2_E_SUCCESS</b>   0</td></tr>
78
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab5f45440c865c20f4a8ac6afed6c063b"></a><!-- doxytag: member="include/libimobiledevice/mobilebackup2.h::MOBILEBACKUP2_E_INVALID_ARG" ref="ab5f45440c865c20f4a8ac6afed6c063b" args="" -->
92
<tr class="memitem:ab5f45440c865c20f4a8ac6afed6c063b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab5f45440c865c20f4a8ac6afed6c063b"></a>
79
93
#define </td><td class="memItemRight" valign="bottom"><b>MOBILEBACKUP2_E_INVALID_ARG</b>   -1</td></tr>
80
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a789e6fc3b41ea74a5048da8b5c389952"></a><!-- doxytag: member="include/libimobiledevice/mobilebackup2.h::MOBILEBACKUP2_E_PLIST_ERROR" ref="a789e6fc3b41ea74a5048da8b5c389952" args="" -->
94
<tr class="memitem:a789e6fc3b41ea74a5048da8b5c389952"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a789e6fc3b41ea74a5048da8b5c389952"></a>
81
95
#define </td><td class="memItemRight" valign="bottom"><b>MOBILEBACKUP2_E_PLIST_ERROR</b>   -2</td></tr>
82
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3501f127fa0d5e9105f168b9d21b5079"></a><!-- doxytag: member="include/libimobiledevice/mobilebackup2.h::MOBILEBACKUP2_E_MUX_ERROR" ref="a3501f127fa0d5e9105f168b9d21b5079" args="" -->
96
<tr class="memitem:a3501f127fa0d5e9105f168b9d21b5079"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3501f127fa0d5e9105f168b9d21b5079"></a>
83
97
#define </td><td class="memItemRight" valign="bottom"><b>MOBILEBACKUP2_E_MUX_ERROR</b>   -3</td></tr>
84
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a817fa6e750c2f3d780b9e4c47d201eb2"></a><!-- doxytag: member="include/libimobiledevice/mobilebackup2.h::MOBILEBACKUP2_E_BAD_VERSION" ref="a817fa6e750c2f3d780b9e4c47d201eb2" args="" -->
98
<tr class="memitem:a817fa6e750c2f3d780b9e4c47d201eb2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a817fa6e750c2f3d780b9e4c47d201eb2"></a>
85
99
#define </td><td class="memItemRight" valign="bottom"><b>MOBILEBACKUP2_E_BAD_VERSION</b>   -4</td></tr>
86
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1241acd9624acdea8d615c7220468090"></a><!-- doxytag: member="include/libimobiledevice/mobilebackup2.h::MOBILEBACKUP2_E_REPLY_NOT_OK" ref="a1241acd9624acdea8d615c7220468090" args="" -->
100
<tr class="memitem:a1241acd9624acdea8d615c7220468090"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1241acd9624acdea8d615c7220468090"></a>
87
101
#define </td><td class="memItemRight" valign="bottom"><b>MOBILEBACKUP2_E_REPLY_NOT_OK</b>   -5</td></tr>
88
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3c98cd4a42452f1eeb5edeb39d8d725c"></a><!-- doxytag: member="include/libimobiledevice/mobilebackup2.h::MOBILEBACKUP2_E_NO_COMMON_VERSION" ref="a3c98cd4a42452f1eeb5edeb39d8d725c" args="" -->
102
<tr class="memitem:a3c98cd4a42452f1eeb5edeb39d8d725c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3c98cd4a42452f1eeb5edeb39d8d725c"></a>
89
103
#define </td><td class="memItemRight" valign="bottom"><b>MOBILEBACKUP2_E_NO_COMMON_VERSION</b>   -6</td></tr>
90
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8bfa574f38e1f397a5af7a2dd6ee526e"></a><!-- doxytag: member="include/libimobiledevice/mobilebackup2.h::MOBILEBACKUP2_E_UNKNOWN_ERROR" ref="a8bfa574f38e1f397a5af7a2dd6ee526e" args="" -->
104
<tr class="memitem:a8bfa574f38e1f397a5af7a2dd6ee526e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8bfa574f38e1f397a5af7a2dd6ee526e"></a>
91
105
#define </td><td class="memItemRight" valign="bottom"><b>MOBILEBACKUP2_E_UNKNOWN_ERROR</b>   -256</td></tr>
93
<hr/><a name="_details"></a><h2>Detailed Description</h2>
107
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
94
108
<div class="textblock"><p>Backup and restore of all device data (mobilebackup2, iOS4+ only) </p>
95
109
</div><hr/><h2>Typedef Documentation</h2>
96
<a class="anchor" id="a0cf69d4c02a02f37f1f864946aa4670a"></a><!-- doxytag: member="mobilebackup2.h::mobilebackup2_client_t" ref="a0cf69d4c02a02f37f1f864946aa4670a" args="" -->
110
<a class="anchor" id="a0cf69d4c02a02f37f1f864946aa4670a"></a>
97
111
<div class="memitem">
98
112
<div class="memproto">
99
113
<table class="memname">
101
<td class="memname">typedef <a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_private</a>* <a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a></td>
115
<td class="memname">typedef <a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_private</a>* <a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a></td>
118
</div><div class="memdoc">
107
120
<p>The client handle. </p>
111
<a class="anchor" id="aeae49da50c4638bd5a3178e9a4b00a2e"></a><!-- doxytag: member="mobilebackup2.h::mobilebackup2_error_t" ref="aeae49da50c4638bd5a3178e9a4b00a2e" args="" -->
124
<a class="anchor" id="aeae49da50c4638bd5a3178e9a4b00a2e"></a>
112
125
<div class="memitem">
113
126
<div class="memproto">
114
127
<table class="memname">
116
129
<td class="memname">typedef int16_t <a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a></td>
132
</div><div class="memdoc">
122
134
<p>Represents an error code. </p>
126
138
<hr/><h2>Function Documentation</h2>
127
<a class="anchor" id="a6476ab467a7319cf3d4882d995af41f6"></a><!-- doxytag: member="mobilebackup2.h::mobilebackup2_client_free" ref="a6476ab467a7319cf3d4882d995af41f6" args="(mobilebackup2_client_t client)" -->
139
<a class="anchor" id="a6476ab467a7319cf3d4882d995af41f6"></a>
128
140
<div class="memitem">
129
141
<div class="memproto">
130
142
<table class="memname">
132
144
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> mobilebackup2_client_free </td>
134
<td class="paramtype"><a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> </td>
146
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> </td>
135
147
<td class="paramname"><em>client</em></td><td>)</td>
151
</div><div class="memdoc">
142
153
<p>Disconnects a mobilebackup2 client from the device and frees up the mobilebackup2 client data. </p>
143
<dl><dt><b>Parameters:</b></dt><dd>
154
<dl class="params"><dt>Parameters:</dt><dd>
144
155
<table class="params">
145
156
<tr><td class="paramname">client</td><td>The mobilebackup2 client to disconnect and free.</td></tr>
149
<dl class="return"><dt><b>Returns:</b></dt><dd>MOBILEBACKUP2_E_SUCCESS on success, or MOBILEBACKUP2_E_INVALID_ARG if client is NULL. </dd></dl>
160
<dl class="section return"><dt>Returns:</dt><dd>MOBILEBACKUP2_E_SUCCESS on success, or MOBILEBACKUP2_E_INVALID_ARG if client is NULL. </dd></dl>
153
<a class="anchor" id="acafbe3a637937faead8c2d00526a7678"></a><!-- doxytag: member="mobilebackup2.h::mobilebackup2_client_new" ref="acafbe3a637937faead8c2d00526a7678" args="(idevice_t device, uint16_t port, mobilebackup2_client_t *client)" -->
164
<a class="anchor" id="a7b563b99e3eba6d528f14f4948920085"></a>
154
165
<div class="memitem">
155
166
<div class="memproto">
156
167
<table class="memname">
158
169
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> mobilebackup2_client_new </td>
160
<td class="paramtype"><a class="el" href="structidevice__private.html">idevice_t</a> </td>
171
<td class="paramtype"><a class="el" href="libimobiledevice_8h.html#ae5bc0e9aa2f3b5023755f5e1c5039a60">idevice_t</a> </td>
161
172
<td class="paramname"><em>device</em>, </td>
164
175
<td class="paramkey"></td>
166
<td class="paramtype">uint16_t </td>
167
<td class="paramname"><em>port</em>, </td>
177
<td class="paramtype">lockdownd_service_descriptor_t </td>
178
<td class="paramname"><em>service</em>, </td>
170
181
<td class="paramkey"></td>
172
<td class="paramtype"><a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> * </td>
183
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> * </td>
173
184
<td class="paramname"><em>client</em> </td>
289
<dl class="return"><dt><b>Returns:</b></dt><dd>MOBILEBACKUP2_E_SUCCESS if any or no data was received, MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid, or MOBILEBACKUP2_E_MUX_ERROR if receiving the data failed. </dd></dl>
293
<a class="anchor" id="ac1c37c17849bf4f3f3240e7cc7b3514b"></a><!-- doxytag: member="mobilebackup2.h::mobilebackup2_send_raw" ref="ac1c37c17849bf4f3f3240e7cc7b3514b" args="(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes)" -->
297
<dl class="section return"><dt>Returns:</dt><dd>MOBILEBACKUP2_E_SUCCESS if any or no data was received, MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid, or MOBILEBACKUP2_E_MUX_ERROR if receiving the data failed. </dd></dl>
301
<a class="anchor" id="a408732ff5a488ee2f72b4b7b3c671b24"></a>
302
<div class="memitem">
303
<div class="memproto">
304
<table class="memname">
306
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> mobilebackup2_send_message </td>
308
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> </td>
309
<td class="paramname"><em>client</em>, </td>
312
<td class="paramkey"></td>
314
<td class="paramtype">const char * </td>
315
<td class="paramname"><em>message</em>, </td>
318
<td class="paramkey"></td>
320
<td class="paramtype">plist_t </td>
321
<td class="paramname"><em>options</em> </td>
329
</div><div class="memdoc">
331
<p>Sends a backup message plist. </p>
332
<dl class="params"><dt>Parameters:</dt><dd>
333
<table class="params">
334
<tr><td class="paramname">client</td><td>The connected MobileBackup client to use. </td></tr>
335
<tr><td class="paramname">message</td><td>The message to send. This will be inserted into the request plist as value for MessageName. If this parameter is NULL, the plist passed in the options parameter will be sent directly. </td></tr>
336
<tr><td class="paramname">options</td><td>Additional options as PLIST_DICT to add to the request. The MessageName key with the value passed in the message parameter will be inserted into this plist before sending it. This parameter can be NULL if message is not NULL. </td></tr>
343
<a class="anchor" id="ac1c37c17849bf4f3f3240e7cc7b3514b"></a>
294
344
<div class="memitem">
295
345
<div class="memproto">
296
346
<table class="memname">
298
348
<td class="memname"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#aeae49da50c4638bd5a3178e9a4b00a2e">mobilebackup2_error_t</a> mobilebackup2_send_raw </td>
300
<td class="paramtype"><a class="el" href="structmobilebackup2__client__private.html">mobilebackup2_client_t</a> </td>
350
<td class="paramtype"><a class="el" href="include_2libimobiledevice_2mobilebackup2_8h.html#a0cf69d4c02a02f37f1f864946aa4670a">mobilebackup2_client_t</a> </td>
301
351
<td class="paramname"><em>client</em>, </td>