libimobiledevice  1.3.0-dirty
API Documentation - Return to Homepage

◆ mobilebackup2_receive_raw()

mobilebackup2_error_t mobilebackup2_receive_raw ( mobilebackup2_client_t client,
char * data,
uint32_t length,
uint32_t * bytes )

Receive binary from the device.

Note
This function returns MOBILEBACKUP2_E_SUCCESS even if no data has been received (unless a communication error occurred). The fourth parameter is required and must be checked to know how many bytes were actually received.
Parameters
clientThe MobileBackup client to receive from.
dataPointer to a buffer that will be filled with the received data.
lengthNumber of bytes to receive. The data buffer needs to be large enough to store this amount of data.
bytesNumber of bytes actually received.
Returns
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.