summaryrefslogtreecommitdiffstats
path: root/src/iphone.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-07-25 03:07:01 +0200
committerGravatar Martin Szulecki2009-07-25 03:07:01 +0200
commit1cfc2748d38eb97100cabced3b282108898099c2 (patch)
treebed338cd9ade6ba6f2de902a7e185fab5ff0c91f /src/iphone.c
parent5cb9ecc85240102402082c442d561d7350732027 (diff)
downloadlibimobiledevice-1cfc2748d38eb97100cabced3b282108898099c2.tar.gz
libimobiledevice-1cfc2748d38eb97100cabced3b282108898099c2.tar.bz2
Rename iphone_get_device_handle to iphone_device_get_handle and update tools
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 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "iphone.h"
-#include "utils.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <errno.h>
-#include <libiphone/libiphone.h>
+
+#include "iphone.h"
+#include "utils.h"
/**
* 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)
return iphone_get_device_by_uuid(device, NULL);
}
-uint32_t iphone_get_device_handle(iphone_device_t device)
+iphone_error_t iphone_device_get_handle(iphone_device_t device, uint32_t *handle)
{
- if (device) {
- return device->handle;
- } else {
- return 0;
- }
+ if (!device)
+ return IPHONE_E_INVALID_ARG;
+
+ *handle = device->handle;
+ return IPHONE_E_SUCCESS;
}
iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid)