diff options
| author | 2009-04-24 18:40:11 +0200 | |
|---|---|---|
| committer | 2009-04-24 18:40:11 +0200 | |
| commit | 25273957cbfa16dc908c4a56f48f2c847d5e7ab2 (patch) | |
| tree | 561be098ac1ffa9bce6a79666173a065832b54e2 /iphone.h | |
| parent | f7a7b349947235a0fac57159e3883b05dd51db29 (diff) | |
| download | usbmuxd-25273957cbfa16dc908c4a56f48f2c847d5e7ab2.tar.gz usbmuxd-25273957cbfa16dc908c4a56f48f2c847d5e7ab2.tar.bz2 | |
1. renamed iphone.c to usbmux.c and iphone.h to usbmux.h
2. renamed iphone* function to usbmux*
3. got rid of iphone_error_t type and constants
4. indentation adjustments
Diffstat (limited to 'iphone.h')
| -rw-r--r-- | iphone.h | 79 |
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 | |||
| 53 | void iphone_set_debug(int e); | ||
| 54 | |||
| 55 | typedef int16_t iphone_error_t; | ||
| 56 | |||
| 57 | struct iphone_device_int; | ||
| 58 | typedef struct iphone_device_int *iphone_device_t; | ||
| 59 | |||
| 60 | struct iphone_umux_client_int; | ||
| 61 | typedef struct iphone_umux_client_int *iphone_umux_client_t; | ||
| 62 | |||
| 63 | iphone_error_t iphone_get_device ( iphone_device_t *device ); | ||
| 64 | iphone_error_t iphone_get_specific_device(int bus_n, int dev_n, iphone_device_t * device); | ||
| 65 | iphone_error_t iphone_free_device ( iphone_device_t device ); | ||
| 66 | |||
| 67 | |||
| 68 | iphone_error_t iphone_mux_new_client ( iphone_device_t device, uint16_t src_port, uint16_t dst_port, iphone_umux_client_t *client ); | ||
| 69 | iphone_error_t iphone_mux_free_client ( iphone_umux_client_t client ); | ||
| 70 | |||
| 71 | iphone_error_t iphone_mux_send(iphone_umux_client_t client, const char *data, uint32_t datalen, uint32_t * sent_bytes); | ||
| 72 | |||
| 73 | iphone_error_t iphone_mux_recv_timeout(iphone_umux_client_t client, char *data, uint32_t datalen, uint32_t * recv_bytes, int timeout); | ||
| 74 | |||
| 75 | int iphone_mux_pullbulk(iphone_device_t phone); | ||
| 76 | |||
| 77 | iphone_error_t iphone_mux_get_error(iphone_umux_client_t client); | ||
| 78 | |||
| 79 | #endif | ||
