summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/mobilebackup.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libimobiledevice/mobilebackup.h')
-rw-r--r--include/libimobiledevice/mobilebackup.h48
1 files changed, 26 insertions, 22 deletions
diff --git a/include/libimobiledevice/mobilebackup.h b/include/libimobiledevice/mobilebackup.h
index 6da3bed..2ecb60c 100644
--- a/include/libimobiledevice/mobilebackup.h
+++ b/include/libimobiledevice/mobilebackup.h
@@ -3,8 +3,8 @@
* @brief Backup and restore of all device data.
* \internal
*
- * Copyright (c) 2009-2014 Martin Szulecki All Rights Reserved.
- * Copyright (c) 2010 Nikias Bassen All Rights Reserved.
+ * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved.
+ * Copyright (c) 2009-2014 Martin Szulecki, All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -31,22 +31,26 @@ extern "C" {
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
+/** Service identifier passed to lockdownd_start_service() to start the mobilebackup service */
#define MOBILEBACKUP_SERVICE_NAME "com.apple.mobilebackup"
/** Error Codes */
typedef enum {
- MOBILEBACKUP_E_SUCCESS = 0,
- MOBILEBACKUP_E_INVALID_ARG = -1,
- MOBILEBACKUP_E_PLIST_ERROR = -2,
- MOBILEBACKUP_E_MUX_ERROR = -3,
- MOBILEBACKUP_E_BAD_VERSION = -4,
- MOBILEBACKUP_E_REPLY_NOT_OK = -5,
- MOBILEBACKUP_E_UNKNOWN_ERROR = -256
+ MOBILEBACKUP_E_SUCCESS = 0,
+ MOBILEBACKUP_E_INVALID_ARG = -1,
+ MOBILEBACKUP_E_PLIST_ERROR = -2,
+ MOBILEBACKUP_E_MUX_ERROR = -3,
+ MOBILEBACKUP_E_SSL_ERROR = -4,
+ MOBILEBACKUP_E_RECEIVE_TIMEOUT = -5,
+ MOBILEBACKUP_E_BAD_VERSION = -6,
+ MOBILEBACKUP_E_REPLY_NOT_OK = -7,
+ MOBILEBACKUP_E_UNKNOWN_ERROR = -256
} mobilebackup_error_t;
-typedef struct mobilebackup_client_private mobilebackup_client_private;
+typedef struct mobilebackup_client_private mobilebackup_client_private; /**< \private */
typedef mobilebackup_client_private *mobilebackup_client_t; /**< The client handle. */
+/** Available flags passed to #mobilebackup_request_restore */
typedef enum {
MB_RESTORE_NOTIFY_SPRINGBOARD = 1 << 0,
MB_RESTORE_PRESERVE_SETTINGS = 1 << 1,
@@ -65,7 +69,7 @@ typedef enum {
* or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if
* the mobilebackup version on the device is newer.
*/
-mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client);
/**
* Starts a new mobilebackup service on the specified device and connects to it.
@@ -80,7 +84,7 @@ mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service
* @return MOBILEBACKUP_E_SUCCESS on success, or an MOBILEBACKUP_E_* error
* code otherwise.
*/
-mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t* client, const char* label);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t* client, const char* label);
/**
* Disconnects a mobilebackup client from the device and frees up the
@@ -91,7 +95,7 @@ mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobileb
* @return MOBILEBACKUP_E_SUCCESS on success, or MOBILEBACKUP_E_INVALID_ARG
* if client is NULL.
*/
-mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client);
/**
@@ -102,7 +106,7 @@ mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client);
*
* @return an error code
*/
-mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist);
/**
* Sends mobilebackup data to the device
@@ -115,7 +119,7 @@ mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t
*
* @return an error code
*/
-mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist);
/**
* Request a backup from the connected device.
@@ -134,7 +138,7 @@ mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t pli
* backup_manifest is not of type PLIST_DICT, MOBILEBACKUP_E_MUX_ERROR
* if a communication error occurs, MOBILEBACKUP_E_REPLY_NOT_OK
*/
-mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version);
/**
* Sends a confirmation to the device that a backup file has been received.
@@ -145,7 +149,7 @@ mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, p
* client is invalid, or MOBILEBACKUP_E_MUX_ERROR if a communication error
* occurs.
*/
-mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_t client);
/**
* Request that a backup should be restored to the connected device.
@@ -168,7 +172,7 @@ mobilebackup_error_t mobilebackup_send_backup_file_received(mobilebackup_client_
* if a communication error occurs, or MOBILEBACKUP_E_REPLY_NOT_OK
* if the device did not accept the request.
*/
-mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client, plist_t backup_manifest, mobilebackup_flags_t flags, const char *proto_version);
/**
* Receive a confirmation from the device that it successfully received
@@ -188,7 +192,7 @@ mobilebackup_error_t mobilebackup_request_restore(mobilebackup_client_t client,
* message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error
* occurs.
*/
-mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_client_t client, plist_t *result);
/**
* Receive a confirmation from the device that it successfully received
@@ -208,7 +212,7 @@ mobilebackup_error_t mobilebackup_receive_restore_file_received(mobilebackup_cli
* message plist, or MOBILEBACKUP_E_MUX_ERROR if a communication error
* occurs.
*/
-mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebackup_client_t client, plist_t *result);
/**
* Tells the device that the restore process is complete and waits for the
@@ -221,7 +225,7 @@ mobilebackup_error_t mobilebackup_receive_restore_application_received(mobilebac
* message plist is invalid, or MOBILEBACKUP_E_MUX_ERROR if a communication
* error occurs.
*/
-mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t client);
/**
* Sends a backup error message to the device.
@@ -233,7 +237,7 @@ mobilebackup_error_t mobilebackup_send_restore_complete(mobilebackup_client_t cl
* one of the parameters is invalid, or MOBILEBACKUP_E_MUX_ERROR if a
* communication error occurs.
*/
-mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason);
+LIBIMOBILEDEVICE_API mobilebackup_error_t mobilebackup_send_error(mobilebackup_client_t client, const char *reason);
#ifdef __cplusplus
}