diff options
| author | 2008-12-13 12:21:03 +0100 | |
|---|---|---|
| committer | 2008-12-13 12:21:03 +0100 | |
| commit | 3fdd24aea06a9bf38d9d34fb8bccbb7023ed3100 (patch) | |
| tree | 1080d26eca01c885efb33f3f98821a981a25e8b4 /include/libiphone/libiphone.h | |
| parent | 3d8ba053deeacd74e621469d3d45d1db38ee411a (diff) | |
| download | libplist-3fdd24aea06a9bf38d9d34fb8bccbb7023ed3100.tar.gz libplist-3fdd24aea06a9bf38d9d34fb8bccbb7023ed3100.tar.bz2 | |
Fork libiphone and remove anything non plist specific.
Update library and make related files acordingly .
Diffstat (limited to 'include/libiphone/libiphone.h')
| -rw-r--r-- | include/libiphone/libiphone.h | 127 |
1 files changed, 0 insertions, 127 deletions
diff --git a/include/libiphone/libiphone.h b/include/libiphone/libiphone.h deleted file mode 100644 index b3e3f95..0000000 --- a/include/libiphone/libiphone.h +++ /dev/null | |||
| @@ -1,127 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * libiphone.h | ||
| 3 | * Main include of libiphone | ||
| 4 | * | ||
| 5 | * Copyright (c) 2008 Jonathan Beck All Rights Reserved. | ||
| 6 | * | ||
| 7 | * This library is free software; you can redistribute it and/or | ||
| 8 | * modify it under the terms of the GNU Lesser General Public | ||
| 9 | * License as published by the Free Software Foundation; either | ||
| 10 | * version 2.1 of the License, or (at your option) any later version. | ||
| 11 | * | ||
| 12 | * This library is distributed in the hope that it will be useful, | ||
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 15 | * Lesser General Public License for more details. | ||
| 16 | * | ||
| 17 | * You should have received a copy of the GNU Lesser General Public | ||
| 18 | * License along with this library; if not, write to the Free Software | ||
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
| 20 | */ | ||
| 21 | |||
| 22 | #ifndef LIBIPHONE_H | ||
| 23 | #define LIBIPHONE_H | ||
| 24 | |||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #include <stdint.h> | ||
| 30 | #include <sys/types.h> | ||
| 31 | #include <sys/stat.h> | ||
| 32 | |||
| 33 | //general errors | ||
| 34 | #define IPHONE_E_SUCCESS 0 | ||
| 35 | #define IPHONE_E_INVALID_ARG -1 | ||
| 36 | #define IPHONE_E_UNKNOWN_ERROR -2 | ||
| 37 | #define IPHONE_E_NO_DEVICE -3 | ||
| 38 | #define IPHONE_E_TIMEOUT -4 | ||
| 39 | #define IPHONE_E_NOT_ENOUGH_DATA -5 | ||
| 40 | #define IPHONE_E_BAD_HEADER -6 | ||
| 41 | |||
| 42 | //lockdownd specific error | ||
| 43 | #define IPHONE_E_INVALID_CONF -7 | ||
| 44 | #define IPHONE_E_PAIRING_FAILED -8 | ||
| 45 | #define IPHONE_E_SSL_ERROR -9 | ||
| 46 | #define IPHONE_E_PLIST_ERROR -10 | ||
| 47 | #define IPHONE_E_DICT_ERROR -11 | ||
| 48 | |||
| 49 | //afc specific error | ||
| 50 | #define IPHONE_E_NO_SUCH_FILE -12 | ||
| 51 | |||
| 52 | typedef int16_t iphone_error_t; | ||
| 53 | |||
| 54 | typedef enum { | ||
| 55 | IPHONE_AFC_FILE_READ = 0x00000002, // seems to be able to read and write files | ||
| 56 | IPHONE_AFC_FILE_WRITE = 0x00000003, // writes and creates a file, blanks it out, etc. | ||
| 57 | IPHONE_AFC_FILE_RW = 0x00000005, // seems to do the same as 2. Might even create the file. | ||
| 58 | IPHONE_AFC_FILE_OP4 = 0x00000004, // no idea -- appears to be "write" -- clears file beforehand like 3 | ||
| 59 | IPHONE_AFC_FILE_OP6 = 0x00000006, // no idea yet -- appears to be the same as 5. | ||
| 60 | IPHONE_AFC_FILE_OP1 = 0x00000001, // no idea juuust yet... probably read. | ||
| 61 | IPHONE_AFC_FILE_OP0 = 0x00000000, | ||
| 62 | IPHONE_AFC_FILE_OP10 = 0x0000000a | ||
| 63 | } iphone_afc_file_mode_t; | ||
| 64 | |||
| 65 | struct iphone_device_int; | ||
| 66 | typedef struct iphone_device_int *iphone_device_t; | ||
| 67 | |||
| 68 | struct iphone_lckd_client_int; | ||
| 69 | typedef struct iphone_lckd_client_int *iphone_lckd_client_t; | ||
| 70 | |||
| 71 | struct iphone_umux_client_int; | ||
| 72 | typedef struct iphone_umux_client_int *iphone_umux_client_t; | ||
| 73 | |||
| 74 | struct iphone_afc_client_int; | ||
| 75 | typedef struct iphone_afc_client_int *iphone_afc_client_t; | ||
| 76 | |||
| 77 | struct iphone_afc_file_int; | ||
| 78 | typedef struct iphone_afc_file_int *iphone_afc_file_t; | ||
| 79 | |||
| 80 | //device related functions | ||
| 81 | void iphone_set_debug(int level); | ||
| 82 | iphone_error_t iphone_get_device ( iphone_device_t *device ); | ||
| 83 | iphone_error_t iphone_free_device ( iphone_device_t device ); | ||
| 84 | |||
| 85 | |||
| 86 | //lockdownd related functions | ||
| 87 | iphone_error_t iphone_lckd_new_client ( iphone_device_t device, iphone_lckd_client_t *client ); | ||
| 88 | iphone_error_t iphone_lckd_free_client( iphone_lckd_client_t client ); | ||
| 89 | |||
| 90 | iphone_error_t iphone_lckd_start_service ( iphone_lckd_client_t client, const char *service, int *port ); | ||
| 91 | iphone_error_t iphone_lckd_recv ( iphone_lckd_client_t client, char **dump_data, uint32_t *recv_bytes ); | ||
| 92 | iphone_error_t iphone_lckd_send ( iphone_lckd_client_t client, char *raw_data, uint32_t length, uint32_t *recv_bytes ); | ||
| 93 | |||
| 94 | |||
| 95 | //usbmux related functions | ||
| 96 | iphone_error_t iphone_mux_new_client ( iphone_device_t device, uint16_t src_port, uint16_t dst_port, iphone_umux_client_t *client ); | ||
| 97 | iphone_error_t iphone_mux_free_client ( iphone_umux_client_t client ); | ||
| 98 | |||
| 99 | iphone_error_t iphone_mux_send ( iphone_umux_client_t client, const char *data, uint32_t datalen, uint32_t *sent_bytes ); | ||
| 100 | iphone_error_t iphone_mux_recv ( iphone_umux_client_t client, char *data, uint32_t datalen, uint32_t *recv_bytes ); | ||
| 101 | |||
| 102 | |||
| 103 | //afc related functions | ||
| 104 | iphone_error_t iphone_afc_new_client ( iphone_device_t device, int src_port, int dst_port, iphone_afc_client_t *client ); | ||
| 105 | iphone_error_t iphone_afc_free_client ( iphone_afc_client_t client ); | ||
| 106 | |||
| 107 | iphone_error_t iphone_afc_get_devinfo ( iphone_afc_client_t client, char ***infos ); | ||
| 108 | iphone_error_t iphone_afc_get_dir_list ( iphone_afc_client_t client, const char *dir, char ***list); | ||
| 109 | |||
| 110 | iphone_error_t iphone_afc_get_file_attr ( iphone_afc_client_t client, const char *filename, struct stat *stbuf ); | ||
| 111 | iphone_error_t iphone_afc_open_file ( iphone_afc_client_t client, const char *filename, iphone_afc_file_mode_t file_mode, iphone_afc_file_t *file ); | ||
| 112 | iphone_error_t iphone_afc_close_file ( iphone_afc_client_t client, iphone_afc_file_t file); | ||
| 113 | iphone_error_t iphone_afc_read_file ( iphone_afc_client_t client, iphone_afc_file_t file, char *data, int length, uint32_t *bytes); | ||
| 114 | iphone_error_t iphone_afc_write_file ( iphone_afc_client_t client, iphone_afc_file_t file, const char *data, int length, uint32_t *bytes); | ||
| 115 | iphone_error_t iphone_afc_seek_file ( iphone_afc_client_t client, iphone_afc_file_t file, int seekpos); | ||
| 116 | iphone_error_t iphone_afc_truncate_file ( iphone_afc_client_t client, iphone_afc_file_t file, uint32_t newsize); | ||
| 117 | iphone_error_t iphone_afc_delete_file ( iphone_afc_client_t client, const char *path); | ||
| 118 | iphone_error_t iphone_afc_rename_file ( iphone_afc_client_t client, const char *from, const char *to); | ||
| 119 | iphone_error_t iphone_afc_mkdir ( iphone_afc_client_t client, const char *dir); | ||
| 120 | |||
| 121 | |||
| 122 | #ifdef __cplusplus | ||
| 123 | } | ||
| 124 | #endif | ||
| 125 | |||
| 126 | #endif | ||
| 127 | |||
