summaryrefslogtreecommitdiffstats
path: root/src
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
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')
-rw-r--r--src/iphone.c19
-rw-r--r--src/iphone.h2
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
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)
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
27struct iphone_device_int { 29struct iphone_device_int {
28 char *buffer; 30 char *buffer;
29 uint32_t handle; 31 uint32_t handle;