libimobiledevice  1.3.0
API Documentation - Return to Homepage

◆ mobilebackup_request_restore()

mobilebackup_error_t mobilebackup_request_restore ( mobilebackup_client_t  client,
plist_t  backup_manifest,
mobilebackup_flags_t  flags,
const char *  proto_version 
)

Request that a backup should be restored to the connected device.

Parameters
clientThe connected MobileBackup client to use.
backup_manifestThe backup manifest, a plist_t of type PLIST_DICT containing the backup state to be restored.
flagsFlags to send with the request. Currently this is a combination of the following mobilebackup_flags_t: MB_RESTORE_NOTIFY_SPRINGBOARD - let SpringBoard show a 'Restore' screen MB_RESTORE_PRESERVE_SETTINGS - do not overwrite any settings MB_RESTORE_PRESERVE_CAMERA_ROLL - preserve the photos of the camera roll
proto_versionA string denoting the version of the backup protocol to use. Latest known version is "1.6". Ideally this value should be extracted from the given manifest plist.
Returns
MOBILEBACKUP_E_SUCCESS on success, MOBILEBACKUP_E_INVALID_ARG if one of the parameters is invalid, MOBILEBACKUP_E_PLIST_ERROR if backup_manifest is not of type PLIST_DICT, MOBILEBACKUP_E_MUX_ERROR if a communication error occurs, or MOBILEBACKUP_E_REPLY_NOT_OK if the device did not accept the request.