diff options
| author | 2013-02-26 03:20:56 +0100 | |
|---|---|---|
| committer | 2013-02-26 03:20:56 +0100 | |
| commit | fcc1bb855efb6860417ed827d3b50feba24a9a8b (patch) | |
| tree | 47d3c7d6a985dc647f7962329014c8116d657cc9 /src/mobilebackup.c | |
| parent | 3b54aac30447bc02fafd721a63a752968628e7e0 (diff) | |
| download | libimobiledevice-fcc1bb855efb6860417ed827d3b50feba24a9a8b.tar.gz libimobiledevice-fcc1bb855efb6860417ed827d3b50feba24a9a8b.tar.bz2 | |
Refactor port number use into service descriptor to enable SSL for services
This is a major change which breaks API but is required in order to support
SSL communication for services as used by network connections.
Diffstat (limited to 'src/mobilebackup.c')
| -rw-r--r-- | src/mobilebackup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mobilebackup.c b/src/mobilebackup.c index 78f9a5c..ab4dec0 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c | |||
| @@ -64,7 +64,7 @@ static mobilebackup_error_t mobilebackup_error(device_link_service_error_t err) | |||
| 64 | * Connects to the mobilebackup service on the specified device. | 64 | * Connects to the mobilebackup service on the specified device. |
| 65 | * | 65 | * |
| 66 | * @param device The device to connect to. | 66 | * @param device The device to connect to. |
| 67 | * @param port Destination port (usually given by lockdownd_start_service). | 67 | * @param service The service descriptor returned by lockdownd_start_service. |
| 68 | * @param client Pointer that will be set to a newly allocated | 68 | * @param client Pointer that will be set to a newly allocated |
| 69 | * mobilebackup_client_t upon successful return. | 69 | * mobilebackup_client_t upon successful return. |
| 70 | * | 70 | * |
| @@ -72,14 +72,14 @@ static mobilebackup_error_t mobilebackup_error(device_link_service_error_t err) | |||
| 72 | * or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if | 72 | * or more parameters are invalid, or DEVICE_LINK_SERVICE_E_BAD_VERSION if |
| 73 | * the mobilebackup version on the device is newer. | 73 | * the mobilebackup version on the device is newer. |
| 74 | */ | 74 | */ |
| 75 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port, | 75 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, |
| 76 | mobilebackup_client_t * client) | 76 | mobilebackup_client_t * client) |
| 77 | { | 77 | { |
| 78 | if (!device || port == 0 || !client || *client) | 78 | if (!device || service->port == 0 || !client || *client) |
| 79 | return MOBILEBACKUP_E_INVALID_ARG; | 79 | return MOBILEBACKUP_E_INVALID_ARG; |
| 80 | 80 | ||
| 81 | device_link_service_client_t dlclient = NULL; | 81 | device_link_service_client_t dlclient = NULL; |
| 82 | mobilebackup_error_t ret = mobilebackup_error(device_link_service_client_new(device, port, &dlclient)); | 82 | mobilebackup_error_t ret = mobilebackup_error(device_link_service_client_new(device, service, &dlclient)); |
| 83 | if (ret != MOBILEBACKUP_E_SUCCESS) { | 83 | if (ret != MOBILEBACKUP_E_SUCCESS) { |
| 84 | return ret; | 84 | return ret; |
| 85 | } | 85 | } |
