summaryrefslogtreecommitdiffstats
path: root/include/libimobiledevice/installation_proxy.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libimobiledevice/installation_proxy.h')
-rw-r--r--include/libimobiledevice/installation_proxy.h57
1 files changed, 29 insertions, 28 deletions
diff --git a/include/libimobiledevice/installation_proxy.h b/include/libimobiledevice/installation_proxy.h
index e96e224..44331aa 100644
--- a/include/libimobiledevice/installation_proxy.h
+++ b/include/libimobiledevice/installation_proxy.h
@@ -33,6 +33,7 @@ extern "C" {
#include <libimobiledevice/libimobiledevice.h>
#include <libimobiledevice/lockdown.h>
+/** Service identifier passed to lockdownd_start_service() to start the installation proxy service */
#define INSTPROXY_SERVICE_NAME "com.apple.mobile.installation_proxy"
/** Error Codes */
@@ -107,7 +108,7 @@ typedef enum {
INSTPROXY_E_UNKNOWN_ERROR = -256
} instproxy_error_t;
-typedef struct instproxy_client_private instproxy_client_private;
+typedef struct instproxy_client_private instproxy_client_private; /**< \private */
typedef instproxy_client_private *instproxy_client_t; /**< The client handle. */
/** Reports the status response of the given command */
@@ -126,7 +127,7 @@ typedef void (*instproxy_status_cb_t) (plist_t command, plist_t status, void *us
* @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error value
* when an error occurred.
*/
-instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client);
/**
* Starts a new installation_proxy service on the specified device and connects to it.
@@ -141,7 +142,7 @@ instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descr
* @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error
* code otherwise.
*/
-instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label);
/**
* Disconnects an installation_proxy client from the device and frees up the
@@ -152,7 +153,7 @@ instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_cli
* @return INSTPROXY_E_SUCCESS on success
* or INSTPROXY_E_INVALID_ARG if client is NULL.
*/
-instproxy_error_t instproxy_client_free(instproxy_client_t client);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_free(instproxy_client_t client);
/**
* List installed applications. This function runs synchronously.
@@ -170,7 +171,7 @@ instproxy_error_t instproxy_client_free(instproxy_client_t client);
* @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if
* an error occurred.
*/
-instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result);
/**
* List pages of installed applications in a callback.
@@ -189,7 +190,7 @@ instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_opt
* @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if
* an error occurred.
*/
-instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plist_t client_options, instproxy_status_cb_t status_cb, void *user_data);
/**
* Lookup information about specific applications from the device.
@@ -205,7 +206,7 @@ instproxy_error_t instproxy_browse_with_callback(instproxy_client_t client, plis
* @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if
* an error occurred.
*/
-instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appids, plist_t client_options, plist_t *result);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appids, plist_t client_options, plist_t *result);
/**
* Install an application on the device.
@@ -231,7 +232,7 @@ instproxy_error_t instproxy_lookup(instproxy_client_t client, const char** appid
* created successfully; any error occurring during the command has to be
* handled inside the specified callback function.
*/
-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);
+LIBIMOBILEDEVICE_API 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);
/**
* Upgrade an application on the device. This function is nearly the same as
@@ -259,7 +260,7 @@ instproxy_error_t instproxy_install(instproxy_client_t client, const char *pkg_p
* created successfully; any error occurring during the command has to be
* handled inside the specified callback function.
*/
-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);
+LIBIMOBILEDEVICE_API 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);
/**
* Uninstall an application from the device.
@@ -280,7 +281,7 @@ instproxy_error_t instproxy_upgrade(instproxy_client_t client, const char *pkg_p
* created successfully; any error occurring during the command has to be
* handled inside the specified callback function.
*/
-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);
+LIBIMOBILEDEVICE_API 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);
/**
* List archived applications. This function runs synchronously.
@@ -296,7 +297,7 @@ instproxy_error_t instproxy_uninstall(instproxy_client_t client, const char *app
* @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if
* an error occurred.
*/
-instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t client_options, plist_t *result);
/**
* Archive an application on the device.
@@ -322,7 +323,7 @@ instproxy_error_t instproxy_lookup_archives(instproxy_client_t client, plist_t c
* created successfully; any error occurring during the command has to be
* handled inside the specified callback function.
*/
-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);
+LIBIMOBILEDEVICE_API 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);
/**
* Restore a previously archived application on the device.
@@ -346,7 +347,7 @@ instproxy_error_t instproxy_archive(instproxy_client_t client, const char *appid
* created successfully; any error occurring during the command has to be
* handled inside the specified callback function.
*/
-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);
+LIBIMOBILEDEVICE_API 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);
/**
* Removes a previously archived application from the device.
@@ -369,7 +370,7 @@ instproxy_error_t instproxy_restore(instproxy_client_t client, const char *appid
* created successfully; any error occurring during the command has to be
* handled inside the specified callback function.
*/
-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);
+LIBIMOBILEDEVICE_API 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);
/**
* Checks a device for certain capabilities.
@@ -385,7 +386,7 @@ instproxy_error_t instproxy_remove_archive(instproxy_client_t client, const char
* @return INSTPROXY_E_SUCCESS on success or an INSTPROXY_E_* error value if
* an error occurred.
*/
-instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, const char** capabilities, plist_t client_options, plist_t *result);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client, const char** capabilities, plist_t client_options, plist_t *result);
/* Helper */
@@ -395,7 +396,7 @@ instproxy_error_t instproxy_check_capabilities_match(instproxy_client_t client,
* @param command The dictionary describing the command.
* @param name Pointer to store the name of the command.
*/
-void instproxy_command_get_name(plist_t command, char** name);
+LIBIMOBILEDEVICE_API void instproxy_command_get_name(plist_t command, char** name);
/**
* Gets the name of a status.
@@ -403,7 +404,7 @@ void instproxy_command_get_name(plist_t command, char** name);
* @param status The dictionary status response to use.
* @param name Pointer to store the name of the status.
*/
-void instproxy_status_get_name(plist_t status, char **name);
+LIBIMOBILEDEVICE_API void instproxy_status_get_name(plist_t status, char **name);
/**
* Gets error name, code and description from a response if available.
@@ -419,7 +420,7 @@ void instproxy_status_get_name(plist_t status, char **name);
* @return INSTPROXY_E_SUCCESS if no error is found or an INSTPROXY_E_* error
* value matching the error that ẃas found in the status.
*/
-instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** description, uint64_t* code);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char** description, uint64_t* code);
/**
* Gets total and current item information from a browse response if available.
@@ -434,24 +435,24 @@ instproxy_error_t instproxy_status_get_error(plist_t status, char **name, char**
* If NULL is passed no list will be returned. If NULL is returned no
* list was found in the status.
*/
-void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t* current_index, uint64_t* current_amount, plist_t* list);
+LIBIMOBILEDEVICE_API void instproxy_status_get_current_list(plist_t status, uint64_t* total, uint64_t* current_index, uint64_t* current_amount, plist_t* list);
/**
* Gets progress in percentage from a status if available.
*
* @param status The dictionary status response to use.
- * @param name Pointer to store the progress in percent (0-100) or -1 if not
- * progress was found in the status.
+ * @param percent Pointer to an int to store the progress in percent (0-100)
+ * or -1 if no progress was found in the status.
*/
-void instproxy_status_get_percent_complete(plist_t status, int *percent);
+LIBIMOBILEDEVICE_API void instproxy_status_get_percent_complete(plist_t status, int *percent);
/**
* Creates a new client_options plist.
*
* @return A new plist_t of type PLIST_DICT.
*/
-plist_t instproxy_client_options_new(void);
+LIBIMOBILEDEVICE_API plist_t instproxy_client_options_new(void);
/**
* Adds one or more new key:value pairs to the given client_options.
@@ -463,7 +464,7 @@ plist_t instproxy_client_options_new(void);
* keys "ApplicationSINF", "iTunesMetadata", "ReturnAttributes" which are
* expecting a plist_t node as value and "SkipUninstall" expects int.
*/
-void instproxy_client_options_add(plist_t client_options, ...);
+LIBIMOBILEDEVICE_API void instproxy_client_options_add(plist_t client_options, ...);
/**
* Adds attributes to the given client_options to filter browse results.
@@ -473,7 +474,7 @@ void instproxy_client_options_add(plist_t client_options, ...);
*
* @note The values passed are expected to be strings.
*/
-void instproxy_client_options_set_return_attributes(plist_t client_options, ...);
+LIBIMOBILEDEVICE_API void instproxy_client_options_set_return_attributes(plist_t client_options, ...);
/**
* Frees client_options plist.
@@ -481,13 +482,13 @@ void instproxy_client_options_set_return_attributes(plist_t client_options, ...)
* @param client_options The client options plist to free. Does nothing if NULL
* is passed.
*/
-void instproxy_client_options_free(plist_t client_options);
+LIBIMOBILEDEVICE_API void instproxy_client_options_free(plist_t client_options);
/**
* Queries the device for the path of an application.
*
* @param client The connected installation proxy client.
- * @param appid ApplicationIdentifier of app to retrieve the path for.
+ * @param bundle_id ApplicationIdentifier of app to retrieve the path for.
* @param path Pointer to store the device path for the application
* which is set to NULL if it could not be determined.
*
@@ -495,7 +496,7 @@ void instproxy_client_options_free(plist_t client_options);
* the path could not be determined or an INSTPROXY_E_* error
* value if an error occurred.
*/
-instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path);
+LIBIMOBILEDEVICE_API instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_client_t client, const char* bundle_id, char** path);
#ifdef __cplusplus
}