summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/mobilebackup2.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libimobiledevice/mobilebackup2.h')
-rw-r--r--include/libimobiledevice/mobilebackup2.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/include/libimobiledevice/mobilebackup2.h b/include/libimobiledevice/mobilebackup2.h
index 0c42334..2e9222d 100644
--- a/include/libimobiledevice/mobilebackup2.h
+++ b/include/libimobiledevice/mobilebackup2.h
@@ -3,8 +3,8 @@
* @brief Backup and restore of all device data (mobilebackup2, iOS4+ only)
* \internal
*
- * Copyright (c) 2011-2014 Martin Szulecki All Rights Reserved.
- * Copyright (c) 2010-2012 Nikias Bassen All Rights Reserved.
+ * Copyright (c) 2010-2019 Nikias Bassen, All Rights Reserved.
+ * Copyright (c) 2011-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,6 +31,7 @@ extern "C" {
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
+/** Service identifier passed to lockdownd_start_service() to start the mobilebackup2 service */
#define MOBILEBACKUP2_SERVICE_NAME "com.apple.mobilebackup2"
/** Error Codes */
@@ -39,13 +40,15 @@ typedef enum {
MOBILEBACKUP2_E_INVALID_ARG = -1,
MOBILEBACKUP2_E_PLIST_ERROR = -2,
MOBILEBACKUP2_E_MUX_ERROR = -3,
- MOBILEBACKUP2_E_BAD_VERSION = -4,
- MOBILEBACKUP2_E_REPLY_NOT_OK = -5,
- MOBILEBACKUP2_E_NO_COMMON_VERSION = -6,
+ MOBILEBACKUP2_E_SSL_ERROR = -4,
+ MOBILEBACKUP2_E_RECEIVE_TIMEOUT = -5,
+ MOBILEBACKUP2_E_BAD_VERSION = -6,
+ MOBILEBACKUP2_E_REPLY_NOT_OK = -7,
+ MOBILEBACKUP2_E_NO_COMMON_VERSION = -8,
MOBILEBACKUP2_E_UNKNOWN_ERROR = -256
} mobilebackup2_error_t;
-typedef struct mobilebackup2_client_private mobilebackup2_client_private;
+typedef struct mobilebackup2_client_private mobilebackup2_client_private; /**< \private */
typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */
@@ -61,7 +64,7 @@ typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client ha
* if one or more parameter is invalid, or MOBILEBACKUP2_E_BAD_VERSION
* if the mobilebackup2 version on the device is newer.
*/
-mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup2_client_t * client);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup2_client_t * client);
/**
* Starts a new mobilebackup2 service on the specified device and connects to it.
@@ -76,7 +79,7 @@ mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_servi
* @return MOBILEBACKUP2_E_SUCCESS on success, or an MOBILEBACKUP2_E_* error
* code otherwise.
*/
-mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t* client, const char* label);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t* client, const char* label);
/**
* Disconnects a mobilebackup2 client from the device and frees up the
@@ -87,7 +90,7 @@ mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobil
* @return MOBILEBACKUP2_E_SUCCESS on success, or MOBILEBACKUP2_E_INVALID_ARG
* if client is NULL.
*/
-mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client);
/**
@@ -102,7 +105,7 @@ mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client);
* will be inserted into this plist before sending it. This parameter
* can be NULL if message is not NULL.
*/
-mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options);
/**
* Receives a DL* message plist from the device.
@@ -122,7 +125,7 @@ mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client,
* or is not a DL* message plist, or MOBILEBACKUP2_E_MUX_ERROR if
* receiving from the device failed.
*/
-mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage);
/**
* Send binary data to the device.
@@ -140,7 +143,7 @@ mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t clien
* MOBILEBACKUP2_E_INVALID_ARG if one of the parameters is invalid,
* or MOBILEBACKUP2_E_MUX_ERROR if sending of the data failed.
*/
-mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes);
/**
* Receive binary from the device.
@@ -154,13 +157,13 @@ mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, cons
* @param data Pointer to a buffer that will be filled with the received data.
* @param length Number of bytes to receive. The data buffer needs to be large
* enough to store this amount of data.
- * @paran bytes Number of bytes actually received.
+ * @param bytes Number of bytes actually received.
*
* @return 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.
*/
-mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, char *data, uint32_t length, uint32_t *bytes);
/**
* Performs the mobilebackup2 protocol version exchange.
@@ -173,7 +176,7 @@ mobilebackup2_error_t mobilebackup2_receive_raw(mobilebackup2_client_t client, c
* @return MOBILEBACKUP2_E_SUCCESS on success, or a MOBILEBACKUP2_E_* error
* code otherwise.
*/
-mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t client, double local_versions[], char count, double *remote_version);
/**
* Send a request to the connected mobilebackup2 service.
@@ -188,7 +191,7 @@ mobilebackup2_error_t mobilebackup2_version_exchange(mobilebackup2_client_t clie
* @return MOBILEBACKUP2_E_SUCCESS if the request was successfully sent,
* or a MOBILEBACKUP2_E_* error value otherwise.
*/
-mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client, const char *request, const char *target_identifier, const char *source_identifier, plist_t options);
/**
* Sends a DLMessageStatusResponse to the device.
@@ -202,7 +205,7 @@ mobilebackup2_error_t mobilebackup2_send_request(mobilebackup2_client_t client,
* @return MOBILEBACKUP2_E_SUCCESS on success, MOBILEBACKUP2_E_INVALID_ARG
* if client is invalid, or another MOBILEBACKUP2_E_* otherwise.
*/
-mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2);
+LIBIMOBILEDEVICE_API mobilebackup2_error_t mobilebackup2_send_status_response(mobilebackup2_client_t client, int status_code, const char *status1, plist_t status2);
#ifdef __cplusplus
}