summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-09-05 20:15:43 +0200
committerGravatar Martin Szulecki2011-04-11 17:05:38 +0200
commitca7dba1c618ed499d0693427e89701cda1731ca9 (patch)
treeeb5f1d6de2779f43940c8cbd578b1b9de7c1745a /include/libimobiledevice
parentc5fe346717a449a6bfcdbd7477724d95cdeb85d5 (diff)
downloadlibimobiledevice-ca7dba1c618ed499d0693427e89701cda1731ca9.tar.gz
libimobiledevice-ca7dba1c618ed499d0693427e89701cda1731ca9.tar.bz2
Add initial mobilebackup2 support and idevicebackup4 tool
Diffstat (limited to 'include/libimobiledevice')
-rw-r--r--include/libimobiledevice/mobilebackup2.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/include/libimobiledevice/mobilebackup2.h b/include/libimobiledevice/mobilebackup2.h
new file mode 100644
index 0000000..ea49602
--- /dev/null
+++ b/include/libimobiledevice/mobilebackup2.h
@@ -0,0 +1,63 @@
1/**
2 * @file libimobiledevice/mobilebackup2.h
3 * @brief Backup and restore of all device data (mobilebackup2, iOS4+ only)
4 * \internal
5 *
6 * Copyright (c) 2010 Nikias Bassen All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef IMOBILEBACKUP2_H
24#define IMOBILEBACKUP2_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <libimobiledevice/libimobiledevice.h>
31
32/** @name Error Codes */
33/*@{*/
34#define MOBILEBACKUP2_E_SUCCESS 0
35#define MOBILEBACKUP2_E_INVALID_ARG -1
36#define MOBILEBACKUP2_E_PLIST_ERROR -2
37#define MOBILEBACKUP2_E_MUX_ERROR -3
38#define MOBILEBACKUP2_E_BAD_VERSION -4
39#define MOBILEBACKUP2_E_REPLY_NOT_OK -5
40
41#define MOBILEBACKUP2_E_UNKNOWN_ERROR -256
42/*@}*/
43
44/** Represents an error code. */
45typedef int16_t mobilebackup2_error_t;
46
47typedef struct mobilebackup2_client_private mobilebackup2_client_private;
48typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */
49
50mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, uint16_t port, mobilebackup2_client_t * client);
51mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client);
52mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage);
53mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes);
54mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes);
55mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client);
56mobilebackup2_error_t mobilebackup2_request_backup(mobilebackup2_client_t client, const char *uuid);
57mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2);
58
59#ifdef __cplusplus
60}
61#endif
62
63#endif