summaryrefslogtreecommitdiffstats
path: root/src/iphone.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/iphone.c')
-rw-r--r--src/iphone.c19
1 files changed, 9 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
98uint32_t iphone_get_device_handle(iphone_device_t device) 97iphone_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
107iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid) 106iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid)