summaryrefslogtreecommitdiffstats
path: root/iphone.h
diff options
context:
space:
mode:
Diffstat (limited to 'iphone.h')
-rw-r--r--iphone.h79
1 files changed, 0 insertions, 79 deletions
diff --git a/iphone.h b/iphone.h
deleted file mode 100644
index 9900b99..0000000
--- a/iphone.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/*
2 * Copyright (c) 2008 Jing Su. All Rights Reserved.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18
19#ifndef __IPHONE_H__
20#define __IPHONE_H__
21
22#include <stdint.h>
23#include <sys/types.h>
24#include <sys/stat.h>
25
26//general errors
27#define IPHONE_E_SUCCESS 0
28#define IPHONE_E_INVALID_ARG -1
29#define IPHONE_E_UNKNOWN_ERROR -2
30#define IPHONE_E_NO_DEVICE -3
31#define IPHONE_E_TIMEOUT -4
32#define IPHONE_E_NOT_ENOUGH_DATA -5
33#define IPHONE_E_BAD_HEADER -6
34
35//lockdownd specific error
36#define IPHONE_E_INVALID_CONF -7
37#define IPHONE_E_PAIRING_FAILED -8
38#define IPHONE_E_SSL_ERROR -9
39#define IPHONE_E_PLIST_ERROR -10
40#define IPHONE_E_DICT_ERROR -11
41
42//afc specific error
43#define IPHONE_E_NO_SUCH_FILE -12
44
45//general TCP-style errors and conditions
46#define IPHONE_E_ECONNABORTED -ECONNABORTED
47#define IPHONE_E_ECONNRESET -ECONNRESET
48#define IPHONE_E_ENOTCONN -ENOTCONN
49#define IPHONE_E_ESHUTDOWN -ESHUTDOWN
50#define IPHONE_E_ETIMEDOUT -ETIMEDOUT
51#define IPHONE_E_ECONNREFUSED -ECONNREFUSED
52
53void iphone_set_debug(int e);
54
55typedef int16_t iphone_error_t;
56
57struct iphone_device_int;
58typedef struct iphone_device_int *iphone_device_t;
59
60struct iphone_umux_client_int;
61typedef struct iphone_umux_client_int *iphone_umux_client_t;
62
63iphone_error_t iphone_get_device ( iphone_device_t *device );
64iphone_error_t iphone_get_specific_device(int bus_n, int dev_n, iphone_device_t * device);
65iphone_error_t iphone_free_device ( iphone_device_t device );
66
67
68iphone_error_t iphone_mux_new_client ( iphone_device_t device, uint16_t src_port, uint16_t dst_port, iphone_umux_client_t *client );
69iphone_error_t iphone_mux_free_client ( iphone_umux_client_t client );
70
71iphone_error_t iphone_mux_send(iphone_umux_client_t client, const char *data, uint32_t datalen, uint32_t * sent_bytes);
72
73iphone_error_t iphone_mux_recv_timeout(iphone_umux_client_t client, char *data, uint32_t datalen, uint32_t * recv_bytes, int timeout);
74
75int iphone_mux_pullbulk(iphone_device_t phone);
76
77iphone_error_t iphone_mux_get_error(iphone_umux_client_t client);
78
79#endif