libimobiledevice 1.1.1
|
Manage applications on a device. More...
Typedefs | |
typedef int16_t | instproxy_error_t |
Represents an error code. | |
typedef instproxy_client_private * | instproxy_client_t |
The client handle. | |
typedef void(* | instproxy_status_cb_t )(const char *operation, plist_t status, void *user_data) |
Reports the status of the given operation. | |
Functions | |
instproxy_error_t | instproxy_client_new (idevice_t device, uint16_t port, instproxy_client_t *client) |
Connects to the installation_proxy service on the specified device. | |
instproxy_error_t | instproxy_client_free (instproxy_client_t client) |
Disconnects an installation_proxy client from the device and frees up the installation_proxy client data. | |
instproxy_error_t | instproxy_browse (instproxy_client_t client, plist_t client_options, plist_t *result) |
List installed applications. | |
instproxy_error_t | instproxy_install (instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
Install an application on the device. | |
instproxy_error_t | instproxy_upgrade (instproxy_client_t client, const char *pkg_path, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
Upgrade an application on the device. | |
instproxy_error_t | instproxy_uninstall (instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
Uninstall an application from the device. | |
instproxy_error_t | instproxy_lookup_archives (instproxy_client_t client, plist_t client_options, plist_t *result) |
List archived applications. | |
instproxy_error_t | instproxy_archive (instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
Archive an application on the device. | |
instproxy_error_t | instproxy_restore (instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
Restore a previously archived application on the device. | |
instproxy_error_t | instproxy_remove_archive (instproxy_client_t client, const char *appid, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data) |
Removes a previously archived application from the device. | |
plist_t | instproxy_client_options_new () |
Create a new client_options plist. | |
void | instproxy_client_options_add (plist_t client_options,...) G_GNUC_NULL_TERMINATED |
Add one or more new key:value pairs to the given client_options. | |
void | instproxy_client_options_free (plist_t client_options) |
Free client_options plist. | |
Error Codes | |
#define | INSTPROXY_E_SUCCESS 0 |
#define | INSTPROXY_E_INVALID_ARG -1 |
#define | INSTPROXY_E_PLIST_ERROR -2 |
#define | INSTPROXY_E_CONN_FAILED -3 |
#define | INSTPROXY_E_OP_IN_PROGRESS -4 |
#define | INSTPROXY_E_OP_FAILED -5 |
#define | INSTPROXY_E_UNKNOWN_ERROR -256 |
Manage applications on a device.
The client handle.
typedef int16_t instproxy_error_t |
Represents an error code.
instproxy_error_t instproxy_archive | ( | instproxy_client_t | client, |
const char * | appid, | ||
plist_t | client_options, | ||
instproxy_status_cb_t | status_cb, | ||
void * | user_data | ||
) |
Archive an application on the device.
This function tells the device to make an archive of the specified application. This results in the device creating a ZIP archive in the 'ApplicationArchives' directory and uninstalling the application.
client | The connected installation proxy client |
appid | ApplicationIdentifier of the app to archive. |
client_options | The client options to use, as PLIST_DICT, or NULL. Valid options include: "SkipUninstall" -> Boolean "ArchiveType" -> "ApplicationOnly" |
status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
user_data | Callback data passed to status_cb. |
instproxy_error_t instproxy_browse | ( | instproxy_client_t | client, |
plist_t | client_options, | ||
plist_t * | result | ||
) |
List installed applications.
This function runs synchronously.
client | The connected installation_proxy client |
client_options | The client options to use, as PLIST_DICT, or NULL. Valid client options include: "ApplicationType" -> "User" "ApplicationType" -> "System" |
result | Pointer that will be set to a plist that will hold an array of PLIST_DICT holding information about the applications found. |
instproxy_error_t instproxy_client_free | ( | instproxy_client_t | client | ) |
Disconnects an installation_proxy client from the device and frees up the installation_proxy client data.
client | The installation_proxy client to disconnect and free. |
instproxy_error_t instproxy_client_new | ( | idevice_t | device, |
uint16_t | port, | ||
instproxy_client_t * | client | ||
) |
Connects to the installation_proxy service on the specified device.
device | The device to connect to |
port | Destination port (usually given by lockdownd_start_service). |
client | Pointer that will be set to a newly allocated instproxy_client_t upon successful return. |
void instproxy_client_options_add | ( | plist_t | client_options, |
... | |||
) |
Add one or more new key:value pairs to the given client_options.
client_options | The client options to modify. |
... | KEY, VALUE, [KEY, VALUE], NULL |
void instproxy_client_options_free | ( | plist_t | client_options | ) |
Free client_options plist.
client_options | The client options plist to free. Does nothing if NULL is passed. |
plist_t instproxy_client_options_new | ( | ) |
Create a new client_options plist.
instproxy_error_t instproxy_install | ( | instproxy_client_t | client, |
const char * | pkg_path, | ||
plist_t | client_options, | ||
instproxy_status_cb_t | status_cb, | ||
void * | user_data | ||
) |
Install an application on the device.
client | The connected installation_proxy client |
pkg_path | Path of the installation package (inside the AFC jail) |
client_options | The client options to use, as PLIST_DICT, or NULL. Valid options include: "iTunesMetadata" -> PLIST_DATA "ApplicationSINF" -> PLIST_DATA "PackageType" -> "Developer" If PackageType -> Developer is specified, then pkg_path points to an .app directory instead of an install package. |
status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
user_data | Callback data passed to status_cb. |
instproxy_error_t instproxy_lookup_archives | ( | instproxy_client_t | client, |
plist_t | client_options, | ||
plist_t * | result | ||
) |
List archived applications.
This function runs synchronously.
client | The connected installation_proxy client |
client_options | The client options to use, as PLIST_DICT, or NULL. Currently there are no known client options, so pass NULL here. |
result | Pointer that will be set to a plist containing a PLIST_DICT holding information about the archived applications found. |
instproxy_error_t instproxy_remove_archive | ( | instproxy_client_t | client, |
const char * | appid, | ||
plist_t | client_options, | ||
instproxy_status_cb_t | status_cb, | ||
void * | user_data | ||
) |
Removes a previously archived application from the device.
This function removes the ZIP archive from the 'ApplicationArchives' directory.
client | The connected installation proxy client |
appid | ApplicationIdentifier of the archived app to remove. |
client_options | The client options to use, as PLIST_DICT, or NULL. Currently there are no known client options, so passing NULL is fine. |
status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
user_data | Callback data passed to status_cb. |
instproxy_error_t instproxy_restore | ( | instproxy_client_t | client, |
const char * | appid, | ||
plist_t | client_options, | ||
instproxy_status_cb_t | status_cb, | ||
void * | user_data | ||
) |
Restore a previously archived application on the device.
This function is the counterpart to instproxy_archive.
client | The connected installation proxy client |
appid | ApplicationIdentifier of the app to restore. |
client_options | The client options to use, as PLIST_DICT, or NULL. Currently there are no known client options, so pass NULL here. |
status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
user_data | Callback data passed to status_cb. |
instproxy_error_t instproxy_uninstall | ( | instproxy_client_t | client, |
const char * | appid, | ||
plist_t | client_options, | ||
instproxy_status_cb_t | status_cb, | ||
void * | user_data | ||
) |
Uninstall an application from the device.
client | The connected installation proxy client |
appid | ApplicationIdentifier of the app to uninstall |
client_options | The client options to use, as PLIST_DICT, or NULL. Currently there are no known client options, so pass NULL here. |
status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
user_data | Callback data passed to status_cb. |
instproxy_error_t instproxy_upgrade | ( | instproxy_client_t | client, |
const char * | pkg_path, | ||
plist_t | client_options, | ||
instproxy_status_cb_t | status_cb, | ||
void * | user_data | ||
) |
Upgrade an application on the device.
This function is nearly the same as instproxy_install; the difference is that the installation progress on the device is faster if the application is already installed.
client | The connected installation_proxy client |
pkg_path | Path of the installation package (inside the AFC jail) |
client_options | The client options to use, as PLIST_DICT, or NULL. Valid options include: "iTunesMetadata" -> PLIST_DATA "ApplicationSINF" -> PLIST_DATA "PackageType" -> "Developer" If PackageType -> Developer is specified, then pkg_path points to an .app directory instead of an install package. |
status_cb | Callback function for progress and status information. If NULL is passed, this function will run synchronously. |
user_data | Callback data passed to status_cb. |