diff options
Diffstat (limited to 'include/libimobiledevice/installation_proxy.h')
| -rw-r--r-- | include/libimobiledevice/installation_proxy.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/include/libimobiledevice/installation_proxy.h b/include/libimobiledevice/installation_proxy.h new file mode 100644 index 0000000..22e76b1 --- /dev/null +++ b/include/libimobiledevice/installation_proxy.h | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | /** | ||
| 2 | * @file libimobiledevice/installation_proxy.h | ||
| 3 | * @brief Implementation to talk to the installation proxy on a device | ||
| 4 | * \internal | ||
| 5 | * | ||
| 6 | * Copyright (c) 2009 Nikias Bassen 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 INSTALLATION_PROXY_H | ||
| 24 | #define INSTALLATION_PROXY_H | ||
| 25 | |||
| 26 | #ifdef __cplusplus | ||
| 27 | extern "C" { | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #include <libimobiledevice/libimobiledevice.h> | ||
| 31 | #include <glib.h> | ||
| 32 | |||
| 33 | /* Error Codes */ | ||
| 34 | #define INSTPROXY_E_SUCCESS 0 | ||
| 35 | #define INSTPROXY_E_INVALID_ARG -1 | ||
| 36 | #define INSTPROXY_E_PLIST_ERROR -2 | ||
| 37 | #define INSTPROXY_E_CONN_FAILED -3 | ||
| 38 | #define INSTPROXY_E_OP_IN_PROGRESS -4 | ||
| 39 | #define INSTPROXY_E_OP_FAILED -5 | ||
| 40 | |||
| 41 | #define INSTPROXY_E_UNKNOWN_ERROR -256 | ||
| 42 | |||
| 43 | typedef int16_t instproxy_error_t; | ||
| 44 | |||
| 45 | struct instproxy_client_int; | ||
| 46 | typedef struct instproxy_client_int *instproxy_client_t; | ||
| 47 | |||
| 48 | typedef void (*instproxy_status_cb_t) (const char *operation, plist_t status); | ||
| 49 | |||
| 50 | /* Interface */ | ||
| 51 | instproxy_error_t instproxy_client_new(idevice_t device, uint16_t port, instproxy_client_t *client); | ||
| 52 | instproxy_error_t instproxy_client_free(instproxy_client_t client); | ||
| 53 | |||
| 54 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result); | ||
| 55 | instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb); | ||
| 56 | instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb); | ||
| 57 | instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb); | ||
| 58 | |||
| 59 | instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result); | ||
| 60 | instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb); | ||
| 61 | instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb); | ||
| 62 | instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb); | ||
| 63 | |||
| 64 | plist_t instproxy_client_options_new(); | ||
| 65 | void instproxy_client_options_add(plist_t client_options, ...) G_GNUC_NULL_TERMINATED; | ||
| 66 | void instproxy_client_options_free(plist_t client_options); | ||
| 67 | |||
| 68 | #ifdef __cplusplus | ||
| 69 | } | ||
| 70 | #endif | ||
| 71 | |||
| 72 | #endif | ||
