summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2010-01-28 22:18:41 +0100
committerGravatar Martin Szulecki2010-01-29 02:16:00 +0100
commit96101a1231a4ddfeb40fd738a24e108a3a904048 (patch)
tree65a8f54354d9acbbba93dac2c8602d07e469482c /include
parent45b88ae3956de089fdc35605910f1359a1d3961c (diff)
downloadlibimobiledevice-96101a1231a4ddfeb40fd738a24e108a3a904048.tar.gz
libimobiledevice-96101a1231a4ddfeb40fd738a24e108a3a904048.tar.bz2
Global renames due to project rename to libimobiledevice
Diffstat (limited to 'include')
-rw-r--r--include/Makefile.am18
-rw-r--r--include/libimobiledevice/afc.h (renamed from include/libiphone/afc.h)6
-rw-r--r--include/libimobiledevice/file_relay.h (renamed from include/libiphone/file_relay.h)8
-rw-r--r--include/libimobiledevice/installation_proxy.h (renamed from include/libiphone/installation_proxy.h)6
-rw-r--r--include/libimobiledevice/libimobiledevice.h102
-rw-r--r--include/libimobiledevice/lockdown.h (renamed from include/libiphone/lockdown.h)8
-rw-r--r--include/libimobiledevice/mobilebackup.h (renamed from include/libiphone/mobilebackup.h)6
-rw-r--r--include/libimobiledevice/mobilesync.h (renamed from include/libiphone/mobilesync.h)6
-rw-r--r--include/libimobiledevice/notification_proxy.h (renamed from include/libiphone/notification_proxy.h)6
-rw-r--r--include/libimobiledevice/sbservices.h (renamed from include/libiphone/sbservices.h)6
-rw-r--r--include/libiphone/libiphone.h102
11 files changed, 137 insertions, 137 deletions
diff --git a/include/Makefile.am b/include/Makefile.am
index aced258..2e20332 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,9 +1,9 @@
1nobase_include_HEADERS = libiphone/libiphone.h \ 1nobase_include_HEADERS = libimobiledevice/libimobiledevice.h \
2 libiphone/lockdown.h \ 2 libimobiledevice/lockdown.h \
3 libiphone/afc.h \ 3 libimobiledevice/afc.h \
4 libiphone/file_relay.h \ 4 libimobiledevice/file_relay.h \
5 libiphone/notification_proxy.h \ 5 libimobiledevice/notification_proxy.h \
6 libiphone/installation_proxy.h \ 6 libimobiledevice/installation_proxy.h \
7 libiphone/sbservices.h \ 7 libimobiledevice/sbservices.h \
8 libiphone/mobilesync.h \ 8 libimobiledevice/mobilesync.h \
9 libiphone/mobilebackup.h 9 libimobiledevice/mobilebackup.h
diff --git a/include/libiphone/afc.h b/include/libimobiledevice/afc.h
index 5d09b40..5b61499 100644
--- a/include/libiphone/afc.h
+++ b/include/libimobiledevice/afc.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file libiphone/afc.h 2 * @file libimobiledevice/afc.h
3 * @brief AFC Implementation 3 * @brief AFC Implementation
4 * \internal 4 * \internal
5 * 5 *
@@ -27,7 +27,7 @@
27extern "C" { 27extern "C" {
28#endif 28#endif
29 29
30#include <libiphone/libiphone.h> 30#include <libimobiledevice/libimobiledevice.h>
31 31
32/* Error Codes */ 32/* Error Codes */
33#define AFC_E_SUCCESS 0 33#define AFC_E_SUCCESS 0
@@ -87,7 +87,7 @@ struct afc_client_int;
87typedef struct afc_client_int *afc_client_t; 87typedef struct afc_client_int *afc_client_t;
88 88
89/* Interface */ 89/* Interface */
90afc_error_t afc_client_new(iphone_device_t device, uint16_t port, afc_client_t *client); 90afc_error_t afc_client_new(idevice_t device, uint16_t port, afc_client_t *client);
91afc_error_t afc_client_free(afc_client_t client); 91afc_error_t afc_client_free(afc_client_t client);
92afc_error_t afc_get_device_info(afc_client_t client, char ***infos); 92afc_error_t afc_get_device_info(afc_client_t client, char ***infos);
93afc_error_t afc_read_directory(afc_client_t client, const char *dir, char ***list); 93afc_error_t afc_read_directory(afc_client_t client, const char *dir, char ***list);
diff --git a/include/libiphone/file_relay.h b/include/libimobiledevice/file_relay.h
index 672f1bd..268eed8 100644
--- a/include/libiphone/file_relay.h
+++ b/include/libimobiledevice/file_relay.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file libiphone/file_relay.h 2 * @file libimobiledevice/file_relay.h
3 * @brief file_relay Implementation 3 * @brief file_relay Implementation
4 * \internal 4 * \internal
5 * 5 *
@@ -27,7 +27,7 @@
27extern "C" { 27extern "C" {
28#endif 28#endif
29 29
30#include <libiphone/libiphone.h> 30#include <libimobiledevice/libimobiledevice.h>
31 31
32/* Error Codes */ 32/* Error Codes */
33#define FILE_RELAY_E_SUCCESS 0 33#define FILE_RELAY_E_SUCCESS 0
@@ -44,10 +44,10 @@ typedef int16_t file_relay_error_t;
44struct file_relay_client_int; 44struct file_relay_client_int;
45typedef struct file_relay_client_int *file_relay_client_t; 45typedef struct file_relay_client_int *file_relay_client_t;
46 46
47file_relay_error_t file_relay_client_new(iphone_device_t device, uint16_t port, file_relay_client_t *client); 47file_relay_error_t file_relay_client_new(idevice_t device, uint16_t port, file_relay_client_t *client);
48file_relay_error_t file_relay_client_free(file_relay_client_t client); 48file_relay_error_t file_relay_client_free(file_relay_client_t client);
49 49
50file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, iphone_connection_t *connection); 50file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection);
51 51
52#ifdef __cplusplus 52#ifdef __cplusplus
53} 53}
diff --git a/include/libiphone/installation_proxy.h b/include/libimobiledevice/installation_proxy.h
index b7bbb60..22e76b1 100644
--- a/include/libiphone/installation_proxy.h
+++ b/include/libimobiledevice/installation_proxy.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file libiphone/installation_proxy.h 2 * @file libimobiledevice/installation_proxy.h
3 * @brief Implementation to talk to the installation proxy on a device 3 * @brief Implementation to talk to the installation proxy on a device
4 * \internal 4 * \internal
5 * 5 *
@@ -27,7 +27,7 @@
27extern "C" { 27extern "C" {
28#endif 28#endif
29 29
30#include <libiphone/libiphone.h> 30#include <libimobiledevice/libimobiledevice.h>
31#include <glib.h> 31#include <glib.h>
32 32
33/* Error Codes */ 33/* Error Codes */
@@ -48,7 +48,7 @@ typedef struct instproxy_client_int *instproxy_client_t;
48typedef void (*instproxy_status_cb_t) (const char *operation, plist_t status); 48typedef void (*instproxy_status_cb_t) (const char *operation, plist_t status);
49 49
50/* Interface */ 50/* Interface */
51instproxy_error_t instproxy_client_new(iphone_device_t device, uint16_t port, instproxy_client_t *client); 51instproxy_error_t instproxy_client_new(idevice_t device, uint16_t port, instproxy_client_t *client);
52instproxy_error_t instproxy_client_free(instproxy_client_t client); 52instproxy_error_t instproxy_client_free(instproxy_client_t client);
53 53
54instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result); 54instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result);
diff --git a/include/libimobiledevice/libimobiledevice.h b/include/libimobiledevice/libimobiledevice.h
new file mode 100644
index 0000000..87b078a
--- /dev/null
+++ b/include/libimobiledevice/libimobiledevice.h
@@ -0,0 +1,102 @@
1/**
2 * @file libimobiledevice/libimobiledevice.h
3 * @brief Common code and device handling
4 * \internal
5 *
6 * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef LIBIMOBILEDEVICE_H
24#define LIBIMOBILEDEVICE_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <stdint.h>
31#include <sys/types.h>
32#include <sys/stat.h>
33#include <plist/plist.h>
34
35/* Error Codes */
36#define IDEVICE_E_SUCCESS 0
37#define IDEVICE_E_INVALID_ARG -1
38#define IDEVICE_E_UNKNOWN_ERROR -2
39#define IDEVICE_E_NO_DEVICE -3
40#define IDEVICE_E_NOT_ENOUGH_DATA -4
41#define IDEVICE_E_BAD_HEADER -5
42#define IDEVICE_E_SSL_ERROR -6
43
44typedef int16_t idevice_error_t;
45
46struct idevice_int;
47typedef struct idevice_int *idevice_t;
48
49struct idevice_connection_int;
50typedef struct idevice_connection_int *idevice_connection_t;
51
52/* generic */
53void idevice_set_debug_level(int level);
54
55/* discovery (events/asynchronous) */
56// event type
57enum idevice_event_type {
58 IDEVICE_DEVICE_ADD = 1,
59 IDEVICE_DEVICE_REMOVE
60};
61
62// event data structure
63typedef struct {
64 enum idevice_event_type event;
65 const char *uuid;
66 int conn_type;
67} idevice_event_t;
68
69// event callback function prototype
70typedef void (*idevice_event_cb_t) (const idevice_event_t *event, void *user_data);
71
72// functions
73idevice_error_t idevice_event_subscribe(idevice_event_cb_t callback, void *user_data);
74idevice_error_t idevice_event_unsubscribe();
75
76/* discovery (synchronous) */
77idevice_error_t idevice_get_device_list(char ***devices, int *count);
78idevice_error_t idevice_device_list_free(char **devices);
79
80/* device structure creation and destruction */
81idevice_error_t idevice_new(idevice_t *device, const char *uuid);
82idevice_error_t idevice_free(idevice_t device);
83
84/* connection/disconnection */
85idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connection_t *connection);
86idevice_error_t idevice_disconnect(idevice_connection_t connection);
87
88/* communication */
89idevice_error_t idevice_connection_send(idevice_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes);
90idevice_error_t idevice_connection_receive_timeout(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout);
91idevice_error_t idevice_connection_receive(idevice_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes);
92
93/* misc */
94idevice_error_t idevice_get_handle(idevice_t device, uint32_t *handle);
95idevice_error_t idevice_get_uuid(idevice_t device, char **uuid);
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif
102
diff --git a/include/libiphone/lockdown.h b/include/libimobiledevice/lockdown.h
index 003a99b..49c708d 100644
--- a/include/libiphone/lockdown.h
+++ b/include/libimobiledevice/lockdown.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file libiphone/lockdown.h 2 * @file libimobiledevice/lockdown.h
3 * @brief Communcation with the lockdown device daemon 3 * @brief Communcation with the lockdown device daemon
4 * \internal 4 * \internal
5 * 5 *
@@ -28,7 +28,7 @@
28extern "C" { 28extern "C" {
29#endif 29#endif
30 30
31#include <libiphone/libiphone.h> 31#include <libimobiledevice/libimobiledevice.h>
32 32
33/* Error Codes */ 33/* Error Codes */
34#define LOCKDOWN_E_SUCCESS 0 34#define LOCKDOWN_E_SUCCESS 0
@@ -66,8 +66,8 @@ struct lockdownd_pair_record {
66typedef struct lockdownd_pair_record *lockdownd_pair_record_t; 66typedef struct lockdownd_pair_record *lockdownd_pair_record_t;
67 67
68/* Interface */ 68/* Interface */
69lockdownd_error_t lockdownd_client_new(iphone_device_t device, lockdownd_client_t *client, const char *label); 69lockdownd_error_t lockdownd_client_new(idevice_t device, lockdownd_client_t *client, const char *label);
70lockdownd_error_t lockdownd_client_new_with_handshake(iphone_device_t device, lockdownd_client_t *client, const char *label); 70lockdownd_error_t lockdownd_client_new_with_handshake(idevice_t device, lockdownd_client_t *client, const char *label);
71lockdownd_error_t lockdownd_client_free(lockdownd_client_t client); 71lockdownd_error_t lockdownd_client_free(lockdownd_client_t client);
72 72
73lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type); 73lockdownd_error_t lockdownd_query_type(lockdownd_client_t client, char **type);
diff --git a/include/libiphone/mobilebackup.h b/include/libimobiledevice/mobilebackup.h
index 8db6758..e51d4c1 100644
--- a/include/libiphone/mobilebackup.h
+++ b/include/libimobiledevice/mobilebackup.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file libiphone/mobilebackup.h 2 * @file libimobiledevice/mobilebackup.h
3 * @brief MobileBackup Implementation 3 * @brief MobileBackup Implementation
4 * \internal 4 * \internal
5 * 5 *
@@ -27,7 +27,7 @@
27extern "C" { 27extern "C" {
28#endif 28#endif
29 29
30#include <libiphone/libiphone.h> 30#include <libimobiledevice/libimobiledevice.h>
31 31
32/* Error Codes */ 32/* Error Codes */
33#define MOBILEBACKUP_E_SUCCESS 0 33#define MOBILEBACKUP_E_SUCCESS 0
@@ -43,7 +43,7 @@ typedef int16_t mobilebackup_error_t;
43struct mobilebackup_client_int; 43struct mobilebackup_client_int;
44typedef struct mobilebackup_client_int *mobilebackup_client_t; 44typedef struct mobilebackup_client_int *mobilebackup_client_t;
45 45
46mobilebackup_error_t mobilebackup_client_new(iphone_device_t device, uint16_t port, mobilebackup_client_t * client); 46mobilebackup_error_t mobilebackup_client_new(idevice_t device, uint16_t port, mobilebackup_client_t * client);
47mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client); 47mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client);
48mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist); 48mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist);
49mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist); 49mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist);
diff --git a/include/libiphone/mobilesync.h b/include/libimobiledevice/mobilesync.h
index f85113d..349b6a3 100644
--- a/include/libiphone/mobilesync.h
+++ b/include/libimobiledevice/mobilesync.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file libiphone/mobilesync.h 2 * @file libimobiledevice/mobilesync.h
3 * @brief MobileSync Implementation 3 * @brief MobileSync Implementation
4 * \internal 4 * \internal
5 * 5 *
@@ -27,7 +27,7 @@
27extern "C" { 27extern "C" {
28#endif 28#endif
29 29
30#include <libiphone/libiphone.h> 30#include <libimobiledevice/libimobiledevice.h>
31 31
32/* Error Codes */ 32/* Error Codes */
33#define MOBILESYNC_E_SUCCESS 0 33#define MOBILESYNC_E_SUCCESS 0
@@ -43,7 +43,7 @@ typedef int16_t mobilesync_error_t;
43struct mobilesync_client_int; 43struct mobilesync_client_int;
44typedef struct mobilesync_client_int *mobilesync_client_t; 44typedef struct mobilesync_client_int *mobilesync_client_t;
45 45
46mobilesync_error_t mobilesync_client_new(iphone_device_t device, uint16_t port, mobilesync_client_t * client); 46mobilesync_error_t mobilesync_client_new(idevice_t device, uint16_t port, mobilesync_client_t * client);
47mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); 47mobilesync_error_t mobilesync_client_free(mobilesync_client_t client);
48mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); 48mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist);
49mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist); 49mobilesync_error_t mobilesync_send(mobilesync_client_t client, plist_t plist);
diff --git a/include/libiphone/notification_proxy.h b/include/libimobiledevice/notification_proxy.h
index 962dd9b..adbb4cc 100644
--- a/include/libiphone/notification_proxy.h
+++ b/include/libimobiledevice/notification_proxy.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file libiphone/notification_proxy.h 2 * @file libimobiledevice/notification_proxy.h
3 * @brief Implementation to talk to the notification proxy on a device 3 * @brief Implementation to talk to the notification proxy on a device
4 * \internal 4 * \internal
5 * 5 *
@@ -27,7 +27,7 @@
27extern "C" { 27extern "C" {
28#endif 28#endif
29 29
30#include <libiphone/libiphone.h> 30#include <libimobiledevice/libimobiledevice.h>
31 31
32/* Error Codes */ 32/* Error Codes */
33#define NP_E_SUCCESS 0 33#define NP_E_SUCCESS 0
@@ -74,7 +74,7 @@ typedef struct np_client_int *np_client_t;
74typedef void (*np_notify_cb_t) (const char *notification); 74typedef void (*np_notify_cb_t) (const char *notification);
75 75
76/* Interface */ 76/* Interface */
77np_error_t np_client_new(iphone_device_t device, uint16_t port, np_client_t *client); 77np_error_t np_client_new(idevice_t device, uint16_t port, np_client_t *client);
78np_error_t np_client_free(np_client_t client); 78np_error_t np_client_free(np_client_t client);
79np_error_t np_post_notification(np_client_t client, const char *notification); 79np_error_t np_post_notification(np_client_t client, const char *notification);
80np_error_t np_observe_notification(np_client_t client, const char *notification); 80np_error_t np_observe_notification(np_client_t client, const char *notification);
diff --git a/include/libiphone/sbservices.h b/include/libimobiledevice/sbservices.h
index 3e4accb..921d6be 100644
--- a/include/libiphone/sbservices.h
+++ b/include/libimobiledevice/sbservices.h
@@ -1,5 +1,5 @@
1/** 1/**
2 * @file libiphone/sbservices.h 2 * @file libimobiledevice/sbservices.h
3 * @brief Implementation to talk to com.apple.springboardservices on a device 3 * @brief Implementation to talk to com.apple.springboardservices on a device
4 * \internal 4 * \internal
5 * 5 *
@@ -27,7 +27,7 @@
27extern "C" { 27extern "C" {
28#endif 28#endif
29 29
30#include <libiphone/libiphone.h> 30#include <libimobiledevice/libimobiledevice.h>
31 31
32/* Error Codes */ 32/* Error Codes */
33#define SBSERVICES_E_SUCCESS 0 33#define SBSERVICES_E_SUCCESS 0
@@ -43,7 +43,7 @@ struct sbservices_client_int;
43typedef struct sbservices_client_int *sbservices_client_t; 43typedef struct sbservices_client_int *sbservices_client_t;
44 44
45/* Interface */ 45/* Interface */
46sbservices_error_t sbservices_client_new(iphone_device_t device, uint16_t port, sbservices_client_t *client); 46sbservices_error_t sbservices_client_new(idevice_t device, uint16_t port, sbservices_client_t *client);
47sbservices_error_t sbservices_client_free(sbservices_client_t client); 47sbservices_error_t sbservices_client_free(sbservices_client_t client);
48sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state); 48sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state);
49sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate); 49sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate);
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h
deleted file mode 100644
index efe9a63..0000000
--- a/include/libiphone/libiphone.h
+++ /dev/null
@@ -1,102 +0,0 @@
1/**
2 * @file libiphone/libiphone.h
3 * @brief Common code and device handling
4 * \internal
5 *
6 * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef LIBIPHONE_H
24#define LIBIPHONE_H
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
30#include <stdint.h>
31#include <sys/types.h>
32#include <sys/stat.h>
33#include <plist/plist.h>
34
35/* Error Codes */
36#define IPHONE_E_SUCCESS 0
37#define IPHONE_E_INVALID_ARG -1
38#define IPHONE_E_UNKNOWN_ERROR -2
39#define IPHONE_E_NO_DEVICE -3
40#define IPHONE_E_NOT_ENOUGH_DATA -4
41#define IPHONE_E_BAD_HEADER -5
42#define IPHONE_E_SSL_ERROR -6
43
44typedef int16_t iphone_error_t;
45
46struct iphone_device_int;
47typedef struct iphone_device_int *iphone_device_t;
48
49struct iphone_connection_int;
50typedef struct iphone_connection_int *iphone_connection_t;
51
52/* generic */
53void iphone_set_debug_level(int level);
54
55/* discovery (events/asynchronous) */
56// event type
57enum iphone_event_type {
58 IPHONE_DEVICE_ADD = 1,
59 IPHONE_DEVICE_REMOVE
60};
61
62// event data structure
63typedef struct {
64 enum iphone_event_type event;
65 const char *uuid;
66 int conn_type;
67} iphone_event_t;
68
69// event callback function prototype
70typedef void (*iphone_event_cb_t) (const iphone_event_t *event, void *user_data);
71
72// functions
73iphone_error_t iphone_event_subscribe(iphone_event_cb_t callback, void *user_data);
74iphone_error_t iphone_event_unsubscribe();
75
76/* discovery (synchronous) */
77iphone_error_t iphone_get_device_list(char ***devices, int *count);
78iphone_error_t iphone_device_list_free(char **devices);
79
80/* device structure creation and destruction */
81iphone_error_t iphone_device_new(iphone_device_t *device, const char *uuid);
82iphone_error_t iphone_device_free(iphone_device_t device);
83
84/* connection/disconnection */
85iphone_error_t iphone_device_connect(iphone_device_t device, uint16_t port, iphone_connection_t *connection);
86iphone_error_t iphone_device_disconnect(iphone_connection_t connection);
87
88/* communication */
89iphone_error_t iphone_connection_send(iphone_connection_t connection, const char *data, uint32_t len, uint32_t *sent_bytes);
90iphone_error_t iphone_connection_receive_timeout(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes, unsigned int timeout);
91iphone_error_t iphone_connection_receive(iphone_connection_t connection, char *data, uint32_t len, uint32_t *recv_bytes);
92
93/* misc */
94iphone_error_t iphone_device_get_handle(iphone_device_t device, uint32_t *handle);
95iphone_error_t iphone_device_get_uuid(iphone_device_t device, char **uuid);
96
97#ifdef __cplusplus
98}
99#endif
100
101#endif
102