diff options
| author | 2009-07-25 03:07:01 +0200 | |
|---|---|---|
| committer | 2009-07-25 03:07:01 +0200 | |
| commit | 1cfc2748d38eb97100cabced3b282108898099c2 (patch) | |
| tree | bed338cd9ade6ba6f2de902a7e185fab5ff0c91f /src | |
| parent | 5cb9ecc85240102402082c442d561d7350732027 (diff) | |
| download | libimobiledevice-1cfc2748d38eb97100cabced3b282108898099c2.tar.gz libimobiledevice-1cfc2748d38eb97100cabced3b282108898099c2.tar.bz2 | |
Rename iphone_get_device_handle to iphone_device_get_handle and update tools
Diffstat (limited to 'src')
| -rw-r--r-- | src/iphone.c | 19 | ||||
| -rw-r--r-- | src/iphone.h | 2 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/iphone.c b/src/iphone.c index bdabc35..e694373 100644 --- a/src/iphone.c +++ b/src/iphone.c | |||
| @@ -19,13 +19,12 @@ | |||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include "iphone.h" | ||
| 23 | #include "utils.h" | ||
| 24 | #include <stdio.h> | 22 | #include <stdio.h> |
| 25 | #include <stdlib.h> | 23 | #include <stdlib.h> |
| 26 | #include <string.h> | 24 | #include <string.h> |
| 27 | #include <errno.h> | 25 | |
| 28 | #include <libiphone/libiphone.h> | 26 | #include "iphone.h" |
| 27 | #include "utils.h" | ||
| 29 | 28 | ||
| 30 | /** | 29 | /** |
| 31 | * Retrieves a list of connected devices from usbmuxd and matches their | 30 | * Retrieves a list of connected devices from usbmuxd and matches their |
| @@ -95,13 +94,13 @@ iphone_error_t iphone_get_device(iphone_device_t * device) | |||
| 95 | return iphone_get_device_by_uuid(device, NULL); | 94 | return iphone_get_device_by_uuid(device, NULL); |
| 96 | } | 95 | } |
| 97 | 96 | ||
| 98 | uint32_t iphone_get_device_handle(iphone_device_t device) | 97 | iphone_error_t iphone_device_get_handle(iphone_device_t device, uint32_t *handle) |
| 99 | { | 98 | { |
| 100 | if (device) { | 99 | if (!device) |
| 101 | return device->handle; | 100 | return IPHONE_E_INVALID_ARG; |
| 102 | } else { | 101 | |
| 103 | return 0; | 102 | *handle = device->handle; |
| 104 | } | 103 | return IPHONE_E_SUCCESS; |
| 105 | } | 104 | } |
| 106 | 105 | ||
| 107 | iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid) | 106 | iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid) |
diff --git a/src/iphone.h b/src/iphone.h index 2ed0fba..6e14280 100644 --- a/src/iphone.h +++ b/src/iphone.h | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | 24 | ||
| 25 | #include <stdint.h> | 25 | #include <stdint.h> |
| 26 | 26 | ||
| 27 | #include "libiphone/libiphone.h" | ||
| 28 | |||
| 27 | struct iphone_device_int { | 29 | struct iphone_device_int { |
| 28 | char *buffer; | 30 | char *buffer; |
| 29 | uint32_t handle; | 31 | uint32_t handle; |
