diff options
26 files changed, 280 insertions, 0 deletions
diff --git a/include/libimobiledevice/afc.h b/include/libimobiledevice/afc.h index 8cddcf0..289c749 100644 --- a/include/libimobiledevice/afc.h +++ b/include/libimobiledevice/afc.h | |||
| @@ -96,7 +96,9 @@ typedef afc_client_private *afc_client_t; /**< The client handle. */ | |||
| 96 | 96 | ||
| 97 | /* Interface */ | 97 | /* Interface */ |
| 98 | afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t *client); | 98 | afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t service, afc_client_t *client); |
| 99 | afc_error_t afc_client_start_service(idevice_t device, afc_client_t* client, const char* label); | ||
| 99 | afc_error_t afc_client_free(afc_client_t client); | 100 | afc_error_t afc_client_free(afc_client_t client); |
| 101 | |||
| 100 | afc_error_t afc_get_device_info(afc_client_t client, char ***infos); | 102 | afc_error_t afc_get_device_info(afc_client_t client, char ***infos); |
| 101 | afc_error_t afc_read_directory(afc_client_t client, const char *dir, char ***list); | 103 | afc_error_t afc_read_directory(afc_client_t client, const char *dir, char ***list); |
| 102 | afc_error_t afc_get_file_info(afc_client_t client, const char *filename, char ***infolist); | 104 | afc_error_t afc_get_file_info(afc_client_t client, const char *filename, char ***infolist); |
diff --git a/include/libimobiledevice/diagnostics_relay.h b/include/libimobiledevice/diagnostics_relay.h index a0455cb..17e73dd 100644 --- a/include/libimobiledevice/diagnostics_relay.h +++ b/include/libimobiledevice/diagnostics_relay.h | |||
| @@ -59,6 +59,7 @@ typedef struct diagnostics_relay_client_private diagnostics_relay_client_private | |||
| 59 | typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */ | 59 | typedef diagnostics_relay_client_private *diagnostics_relay_client_t; /**< The client handle. */ |
| 60 | 60 | ||
| 61 | diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_client_t *client); | 61 | diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, diagnostics_relay_client_t *client); |
| 62 | diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t* client, const char* label); | ||
| 62 | diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client); | 63 | diagnostics_relay_error_t diagnostics_relay_client_free(diagnostics_relay_client_t client); |
| 63 | 64 | ||
| 64 | diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client); | 65 | diagnostics_relay_error_t diagnostics_relay_goodbye(diagnostics_relay_client_t client); |
diff --git a/include/libimobiledevice/file_relay.h b/include/libimobiledevice/file_relay.h index ca18770..28ce2ab 100644 --- a/include/libimobiledevice/file_relay.h +++ b/include/libimobiledevice/file_relay.h | |||
| @@ -51,6 +51,7 @@ typedef struct file_relay_client_private file_relay_client_private; | |||
| 51 | typedef file_relay_client_private *file_relay_client_t; /**< The client handle. */ | 51 | typedef file_relay_client_private *file_relay_client_t; /**< The client handle. */ |
| 52 | 52 | ||
| 53 | file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client); | 53 | file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_descriptor_t service, file_relay_client_t *client); |
| 54 | file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t* client, const char* label); | ||
| 54 | file_relay_error_t file_relay_client_free(file_relay_client_t client); | 55 | file_relay_error_t file_relay_client_free(file_relay_client_t client); |
| 55 | 56 | ||
| 56 | file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection); | 57 | file_relay_error_t file_relay_request_sources(file_relay_client_t client, const char **sources, idevice_connection_t *connection); |
diff --git a/include/libimobiledevice/house_arrest.h b/include/libimobiledevice/house_arrest.h index c33c23b..ccd6ac7 100644 --- a/include/libimobiledevice/house_arrest.h +++ b/include/libimobiledevice/house_arrest.h | |||
| @@ -52,6 +52,7 @@ typedef house_arrest_client_private *house_arrest_client_t; /**< The client hand | |||
| 52 | 52 | ||
| 53 | /* Interface */ | 53 | /* Interface */ |
| 54 | house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client); | 54 | house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service_descriptor_t service, house_arrest_client_t *client); |
| 55 | house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t* client, const char* label); | ||
| 55 | house_arrest_error_t house_arrest_client_free(house_arrest_client_t client); | 56 | house_arrest_error_t house_arrest_client_free(house_arrest_client_t client); |
| 56 | 57 | ||
| 57 | house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict); | 58 | house_arrest_error_t house_arrest_send_request(house_arrest_client_t client, plist_t dict); |
diff --git a/include/libimobiledevice/installation_proxy.h b/include/libimobiledevice/installation_proxy.h index 3e373e3..1274884 100644 --- a/include/libimobiledevice/installation_proxy.h +++ b/include/libimobiledevice/installation_proxy.h | |||
| @@ -55,6 +55,7 @@ typedef void (*instproxy_status_cb_t) (const char *operation, plist_t status, vo | |||
| 55 | 55 | ||
| 56 | /* Interface */ | 56 | /* Interface */ |
| 57 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client); | 57 | instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descriptor_t service, instproxy_client_t *client); |
| 58 | instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label); | ||
| 58 | instproxy_error_t instproxy_client_free(instproxy_client_t client); | 59 | instproxy_error_t instproxy_client_free(instproxy_client_t client); |
| 59 | 60 | ||
| 60 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result); | 61 | instproxy_error_t instproxy_browse(instproxy_client_t client, plist_t client_options, plist_t *result); |
diff --git a/include/libimobiledevice/misagent.h b/include/libimobiledevice/misagent.h index 4a198c7..fe0acb2 100644 --- a/include/libimobiledevice/misagent.h +++ b/include/libimobiledevice/misagent.h | |||
| @@ -51,6 +51,7 @@ typedef misagent_client_private *misagent_client_t; /**< The client handle. */ | |||
| 51 | 51 | ||
| 52 | /* Interface */ | 52 | /* Interface */ |
| 53 | misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client); | 53 | misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descriptor_t service, misagent_client_t *client); |
| 54 | misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t* client, const char* label); | ||
| 54 | misagent_error_t misagent_client_free(misagent_client_t client); | 55 | misagent_error_t misagent_client_free(misagent_client_t client); |
| 55 | 56 | ||
| 56 | misagent_error_t misagent_install(misagent_client_t client, plist_t profile); | 57 | misagent_error_t misagent_install(misagent_client_t client, plist_t profile); |
diff --git a/include/libimobiledevice/mobile_image_mounter.h b/include/libimobiledevice/mobile_image_mounter.h index 2b44f2e..ceaf0c2 100644 --- a/include/libimobiledevice/mobile_image_mounter.h +++ b/include/libimobiledevice/mobile_image_mounter.h | |||
| @@ -50,7 +50,9 @@ typedef mobile_image_mounter_client_private *mobile_image_mounter_client_t; /**< | |||
| 50 | 50 | ||
| 51 | /* Interface */ | 51 | /* Interface */ |
| 52 | mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client); | 52 | mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdownd_service_descriptor_t service, mobile_image_mounter_client_t *client); |
| 53 | mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t* client, const char* label); | ||
| 53 | mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client); | 54 | mobile_image_mounter_error_t mobile_image_mounter_free(mobile_image_mounter_client_t client); |
| 55 | |||
| 54 | mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result); | 56 | mobile_image_mounter_error_t mobile_image_mounter_lookup_image(mobile_image_mounter_client_t client, const char *image_type, plist_t *result); |
| 55 | mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result); | 57 | mobile_image_mounter_error_t mobile_image_mounter_mount_image(mobile_image_mounter_client_t client, const char *image_path, const char *image_signature, uint16_t signature_length, const char *image_type, plist_t *result); |
| 56 | mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client); | 58 | mobile_image_mounter_error_t mobile_image_mounter_hangup(mobile_image_mounter_client_t client); |
diff --git a/include/libimobiledevice/mobilebackup.h b/include/libimobiledevice/mobilebackup.h index 2e2c38e..c62e99e 100644 --- a/include/libimobiledevice/mobilebackup.h +++ b/include/libimobiledevice/mobilebackup.h | |||
| @@ -57,7 +57,9 @@ typedef enum { | |||
| 57 | } mobilebackup_flags_t; | 57 | } mobilebackup_flags_t; |
| 58 | 58 | ||
| 59 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client); | 59 | mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup_client_t * client); |
| 60 | mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t* client, const char* label); | ||
| 60 | mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client); | 61 | mobilebackup_error_t mobilebackup_client_free(mobilebackup_client_t client); |
| 62 | |||
| 61 | mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist); | 63 | mobilebackup_error_t mobilebackup_receive(mobilebackup_client_t client, plist_t *plist); |
| 62 | mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist); | 64 | mobilebackup_error_t mobilebackup_send(mobilebackup_client_t client, plist_t plist); |
| 63 | mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version); | 65 | mobilebackup_error_t mobilebackup_request_backup(mobilebackup_client_t client, plist_t backup_manifest, const char *base_path, const char *proto_version); |
diff --git a/include/libimobiledevice/mobilebackup2.h b/include/libimobiledevice/mobilebackup2.h index 42d41a8..65bbfc7 100644 --- a/include/libimobiledevice/mobilebackup2.h +++ b/include/libimobiledevice/mobilebackup2.h | |||
| @@ -52,7 +52,9 @@ typedef struct mobilebackup2_client_private mobilebackup2_client_private; | |||
| 52 | typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */ | 52 | typedef mobilebackup2_client_private *mobilebackup2_client_t; /**< The client handle. */ |
| 53 | 53 | ||
| 54 | mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup2_client_t * client); | 54 | mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilebackup2_client_t * client); |
| 55 | mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t* client, const char* label); | ||
| 55 | mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client); | 56 | mobilebackup2_error_t mobilebackup2_client_free(mobilebackup2_client_t client); |
| 57 | |||
| 56 | mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options); | 58 | mobilebackup2_error_t mobilebackup2_send_message(mobilebackup2_client_t client, const char *message, plist_t options); |
| 57 | mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage); | 59 | mobilebackup2_error_t mobilebackup2_receive_message(mobilebackup2_client_t client, plist_t *msg_plist, char **dlmessage); |
| 58 | mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes); | 60 | mobilebackup2_error_t mobilebackup2_send_raw(mobilebackup2_client_t client, const char *data, uint32_t length, uint32_t *bytes); |
diff --git a/include/libimobiledevice/mobilesync.h b/include/libimobiledevice/mobilesync.h index 8fa4c58..8e263ce 100644 --- a/include/libimobiledevice/mobilesync.h +++ b/include/libimobiledevice/mobilesync.h | |||
| @@ -69,6 +69,7 @@ typedef mobilesync_anchors *mobilesync_anchors_t; /**< Anchors used by the devic | |||
| 69 | 69 | ||
| 70 | /* Interface */ | 70 | /* Interface */ |
| 71 | mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilesync_client_t * client); | 71 | mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_descriptor_t service, mobilesync_client_t * client); |
| 72 | mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t* client, const char* label); | ||
| 72 | mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); | 73 | mobilesync_error_t mobilesync_client_free(mobilesync_client_t client); |
| 73 | 74 | ||
| 74 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); | 75 | mobilesync_error_t mobilesync_receive(mobilesync_client_t client, plist_t *plist); |
diff --git a/include/libimobiledevice/notification_proxy.h b/include/libimobiledevice/notification_proxy.h index 00b0f8f..4f025ee 100644 --- a/include/libimobiledevice/notification_proxy.h +++ b/include/libimobiledevice/notification_proxy.h | |||
| @@ -94,7 +94,9 @@ typedef void (*np_notify_cb_t) (const char *notification, void *user_data); | |||
| 94 | 94 | ||
| 95 | /* Interface */ | 95 | /* Interface */ |
| 96 | np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client); | 96 | np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t service, np_client_t *client); |
| 97 | np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label); | ||
| 97 | np_error_t np_client_free(np_client_t client); | 98 | np_error_t np_client_free(np_client_t client); |
| 99 | |||
| 98 | np_error_t np_post_notification(np_client_t client, const char *notification); | 100 | np_error_t np_post_notification(np_client_t client, const char *notification); |
| 99 | np_error_t np_observe_notification(np_client_t client, const char *notification); | 101 | np_error_t np_observe_notification(np_client_t client, const char *notification); |
| 100 | np_error_t np_observe_notifications(np_client_t client, const char **notification_spec); | 102 | np_error_t np_observe_notifications(np_client_t client, const char **notification_spec); |
diff --git a/include/libimobiledevice/sbservices.h b/include/libimobiledevice/sbservices.h index ab3e966..f9d131b 100644 --- a/include/libimobiledevice/sbservices.h +++ b/include/libimobiledevice/sbservices.h | |||
| @@ -61,7 +61,9 @@ typedef sbservices_client_private *sbservices_client_t; /**< The client handle. | |||
| 61 | 61 | ||
| 62 | /* Interface */ | 62 | /* Interface */ |
| 63 | sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client); | 63 | sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_descriptor_t service, sbservices_client_t *client); |
| 64 | sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t* client, const char* label); | ||
| 64 | sbservices_error_t sbservices_client_free(sbservices_client_t client); | 65 | sbservices_error_t sbservices_client_free(sbservices_client_t client); |
| 66 | |||
| 65 | sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version); | 67 | sbservices_error_t sbservices_get_icon_state(sbservices_client_t client, plist_t *state, const char *format_version); |
| 66 | sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate); | 68 | sbservices_error_t sbservices_set_icon_state(sbservices_client_t client, plist_t newstate); |
| 67 | sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize); | 69 | sbservices_error_t sbservices_get_icon_pngdata(sbservices_client_t client, const char *bundleId, char **pngdata, uint64_t *pngsize); |
diff --git a/include/libimobiledevice/screenshotr.h b/include/libimobiledevice/screenshotr.h index 41b7ffa..c8679a9 100644 --- a/include/libimobiledevice/screenshotr.h +++ b/include/libimobiledevice/screenshotr.h | |||
| @@ -51,7 +51,9 @@ typedef struct screenshotr_client_private screenshotr_client_private; | |||
| 51 | typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */ | 51 | typedef screenshotr_client_private *screenshotr_client_t; /**< The client handle. */ |
| 52 | 52 | ||
| 53 | screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, screenshotr_client_t * client); | 53 | screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_descriptor_t service, screenshotr_client_t * client); |
| 54 | screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t* client, const char* label); | ||
| 54 | screenshotr_error_t screenshotr_client_free(screenshotr_client_t client); | 55 | screenshotr_error_t screenshotr_client_free(screenshotr_client_t client); |
| 56 | |||
| 55 | screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize); | 57 | screenshotr_error_t screenshotr_take_screenshot(screenshotr_client_t client, char **imgdata, uint64_t *imgsize); |
| 56 | 58 | ||
| 57 | #ifdef __cplusplus | 59 | #ifdef __cplusplus |
| @@ -129,6 +129,26 @@ afc_error_t afc_client_new(idevice_t device, lockdownd_service_descriptor_t serv | |||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | /** | 131 | /** |
| 132 | * Starts a new AFC service on the specified device and connects to it. | ||
| 133 | * | ||
| 134 | * @param device The device to connect to. | ||
| 135 | * @param client Pointer that will point to a newly allocated | ||
| 136 | * afc_client_t upon successful return. Must be freed using | ||
| 137 | * afc_client_free() after use. | ||
| 138 | * @param label The label to use for communication. Usually the program name. | ||
| 139 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 140 | * | ||
| 141 | * @return AFC_E_SUCCESS on success, or an AFC_E_* error | ||
| 142 | * code otherwise. | ||
| 143 | */ | ||
| 144 | afc_error_t afc_client_start_service(idevice_t device, afc_client_t * client, const char* label) | ||
| 145 | { | ||
| 146 | afc_error_t err = AFC_E_UNKNOWN_ERROR; | ||
| 147 | service_client_factory_start_service(device, AFC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(afc_client_new), &err); | ||
| 148 | return err; | ||
| 149 | } | ||
| 150 | |||
| 151 | /** | ||
| 132 | * Frees up an AFC client. If the connection was created by the | 152 | * Frees up an AFC client. If the connection was created by the |
| 133 | * client itself, the connection will be closed. | 153 | * client itself, the connection will be closed. |
| 134 | * | 154 | * |
diff --git a/src/diagnostics_relay.c b/src/diagnostics_relay.c index 6069169..9786f0e 100644 --- a/src/diagnostics_relay.c +++ b/src/diagnostics_relay.c | |||
| @@ -102,6 +102,26 @@ diagnostics_relay_error_t diagnostics_relay_client_new(idevice_t device, lockdow | |||
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | /** | 104 | /** |
| 105 | * Starts a new diagnostics_relay service on the specified device and connects to it. | ||
| 106 | * | ||
| 107 | * @param device The device to connect to. | ||
| 108 | * @param client Pointer that will point to a newly allocated | ||
| 109 | * diagnostics_relay_client_t upon successful return. Must be freed using | ||
| 110 | * diagnostics_relay_client_free() after use. | ||
| 111 | * @param label The label to use for communication. Usually the program name. | ||
| 112 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 113 | * | ||
| 114 | * @return DIAGNOSTICS_RELAY_E_SUCCESS on success, or an DIAGNOSTICS_RELAY_E_* error | ||
| 115 | * code otherwise. | ||
| 116 | */ | ||
| 117 | diagnostics_relay_error_t diagnostics_relay_client_start_service(idevice_t device, diagnostics_relay_client_t * client, const char* label) | ||
| 118 | { | ||
| 119 | diagnostics_relay_error_t err = DIAGNOSTICS_RELAY_E_UNKNOWN_ERROR; | ||
| 120 | service_client_factory_start_service(device, DIAGNOSTICS_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(diagnostics_relay_client_new), &err); | ||
| 121 | return err; | ||
| 122 | } | ||
| 123 | |||
| 124 | /** | ||
| 105 | * Disconnects a diagnostics_relay client from the device and frees up the | 125 | * Disconnects a diagnostics_relay client from the device and frees up the |
| 106 | * diagnostics_relay client data. | 126 | * diagnostics_relay client data. |
| 107 | * | 127 | * |
diff --git a/src/file_relay.c b/src/file_relay.c index 2b45d70..eacaa11 100644 --- a/src/file_relay.c +++ b/src/file_relay.c | |||
| @@ -57,6 +57,26 @@ file_relay_error_t file_relay_client_new(idevice_t device, lockdownd_service_des | |||
| 57 | } | 57 | } |
| 58 | 58 | ||
| 59 | /** | 59 | /** |
| 60 | * Starts a new file_relay service on the specified device and connects to it. | ||
| 61 | * | ||
| 62 | * @param device The device to connect to. | ||
| 63 | * @param client Pointer that will point to a newly allocated | ||
| 64 | * file_relay_client_t upon successful return. Must be freed using | ||
| 65 | * file_relay_client_free() after use. | ||
| 66 | * @param label The label to use for communication. Usually the program name. | ||
| 67 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 68 | * | ||
| 69 | * @return FILE_RELAY_E_SUCCESS on success, or an FILE_RELAY_E_* error | ||
| 70 | * code otherwise. | ||
| 71 | */ | ||
| 72 | file_relay_error_t file_relay_client_start_service(idevice_t device, file_relay_client_t * client, const char* label) | ||
| 73 | { | ||
| 74 | file_relay_error_t err = FILE_RELAY_E_UNKNOWN_ERROR; | ||
| 75 | service_client_factory_start_service(device, FILE_RELAY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(file_relay_client_new), &err); | ||
| 76 | return err; | ||
| 77 | } | ||
| 78 | |||
| 79 | /** | ||
| 60 | * Disconnects a file_relay client from the device and frees up the file_relay | 80 | * Disconnects a file_relay client from the device and frees up the file_relay |
| 61 | * client data. | 81 | * client data. |
| 62 | * | 82 | * |
diff --git a/src/house_arrest.c b/src/house_arrest.c index 4eaf5e3..f4314e7 100644 --- a/src/house_arrest.c +++ b/src/house_arrest.c | |||
| @@ -83,6 +83,26 @@ house_arrest_error_t house_arrest_client_new(idevice_t device, lockdownd_service | |||
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | /** | 85 | /** |
| 86 | * Starts a new house_arrest service on the specified device and connects to it. | ||
| 87 | * | ||
| 88 | * @param device The device to connect to. | ||
| 89 | * @param client Pointer that will point to a newly allocated | ||
| 90 | * house_arrest_client_t upon successful return. Must be freed using | ||
| 91 | * house_arrest_client_free() after use. | ||
| 92 | * @param label The label to use for communication. Usually the program name. | ||
| 93 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 94 | * | ||
| 95 | * @return HOUSE_ARREST_E_SUCCESS on success, or an HOUSE_ARREST_E_* error | ||
| 96 | * code otherwise. | ||
| 97 | */ | ||
| 98 | house_arrest_error_t house_arrest_client_start_service(idevice_t device, house_arrest_client_t * client, const char* label) | ||
| 99 | { | ||
| 100 | house_arrest_error_t err = HOUSE_ARREST_E_UNKNOWN_ERROR; | ||
| 101 | service_client_factory_start_service(device, HOUSE_ARREST_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(house_arrest_client_new), &err); | ||
| 102 | return err; | ||
| 103 | } | ||
| 104 | |||
| 105 | /** | ||
| 86 | * Disconnects an house_arrest client from the device and frees up the | 106 | * Disconnects an house_arrest client from the device and frees up the |
| 87 | * house_arrest client data. | 107 | * house_arrest client data. |
| 88 | * | 108 | * |
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index 6873f26..cffadd9 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
| @@ -112,6 +112,26 @@ instproxy_error_t instproxy_client_new(idevice_t device, lockdownd_service_descr | |||
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | /** | 114 | /** |
| 115 | * Starts a new installation_proxy service on the specified device and connects to it. | ||
| 116 | * | ||
| 117 | * @param device The device to connect to. | ||
| 118 | * @param client Pointer that will point to a newly allocated | ||
| 119 | * instproxy_client_t upon successful return. Must be freed using | ||
| 120 | * instproxy_client_free() after use. | ||
| 121 | * @param label The label to use for communication. Usually the program name. | ||
| 122 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 123 | * | ||
| 124 | * @return INSTPROXY_E_SUCCESS on success, or an INSTPROXY_E_* error | ||
| 125 | * code otherwise. | ||
| 126 | */ | ||
| 127 | instproxy_error_t instproxy_client_start_service(idevice_t device, instproxy_client_t * client, const char* label) | ||
| 128 | { | ||
| 129 | instproxy_error_t err = INSTPROXY_E_UNKNOWN_ERROR; | ||
| 130 | service_client_factory_start_service(device, INSTPROXY_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(instproxy_client_new), &err); | ||
| 131 | return err; | ||
| 132 | } | ||
| 133 | |||
| 134 | /** | ||
| 115 | * Disconnects an installation_proxy client from the device and frees up the | 135 | * Disconnects an installation_proxy client from the device and frees up the |
| 116 | * installation_proxy client data. | 136 | * installation_proxy client data. |
| 117 | * | 137 | * |
diff --git a/src/misagent.c b/src/misagent.c index 331fc6c..750cf52 100644 --- a/src/misagent.c +++ b/src/misagent.c | |||
| @@ -115,6 +115,26 @@ misagent_error_t misagent_client_new(idevice_t device, lockdownd_service_descrip | |||
| 115 | } | 115 | } |
| 116 | 116 | ||
| 117 | /** | 117 | /** |
| 118 | * Starts a new misagent service on the specified device and connects to it. | ||
| 119 | * | ||
| 120 | * @param device The device to connect to. | ||
| 121 | * @param client Pointer that will point to a newly allocated | ||
| 122 | * misagent_client_t upon successful return. Must be freed using | ||
| 123 | * misagent_client_free() after use. | ||
| 124 | * @param label The label to use for communication. Usually the program name. | ||
| 125 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 126 | * | ||
| 127 | * @return MISAGENT_E_SUCCESS on success, or an MISAGENT_E_* error | ||
| 128 | * code otherwise. | ||
| 129 | */ | ||
| 130 | misagent_error_t misagent_client_start_service(idevice_t device, misagent_client_t * client, const char* label) | ||
| 131 | { | ||
| 132 | misagent_error_t err = MISAGENT_E_UNKNOWN_ERROR; | ||
| 133 | service_client_factory_start_service(device, MISAGENT_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(misagent_client_new), &err); | ||
| 134 | return err; | ||
| 135 | } | ||
| 136 | |||
| 137 | /** | ||
| 118 | * Disconnects an misagent client from the device and frees up the | 138 | * Disconnects an misagent client from the device and frees up the |
| 119 | * misagent client data. | 139 | * misagent client data. |
| 120 | * | 140 | * |
diff --git a/src/mobile_image_mounter.c b/src/mobile_image_mounter.c index f2e423a..bc439f9 100644 --- a/src/mobile_image_mounter.c +++ b/src/mobile_image_mounter.c | |||
| @@ -106,6 +106,26 @@ mobile_image_mounter_error_t mobile_image_mounter_new(idevice_t device, lockdown | |||
| 106 | } | 106 | } |
| 107 | 107 | ||
| 108 | /** | 108 | /** |
| 109 | * Starts a new mobile_image_mounter service on the specified device and connects to it. | ||
| 110 | * | ||
| 111 | * @param device The device to connect to. | ||
| 112 | * @param client Pointer that will point to a newly allocated | ||
| 113 | * mobile_image_mounter_t upon successful return. Must be freed using | ||
| 114 | * mobile_image_mounter_free() after use. | ||
| 115 | * @param label The label to use for communication. Usually the program name. | ||
| 116 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 117 | * | ||
| 118 | * @return MOBILE_IMAGE_MOUNTER_E_SUCCESS on success, or an MOBILE_IMAGE_MOUNTER_E_* error | ||
| 119 | * code otherwise. | ||
| 120 | */ | ||
| 121 | mobile_image_mounter_error_t mobile_image_mounter_start_service(idevice_t device, mobile_image_mounter_client_t * client, const char* label) | ||
| 122 | { | ||
| 123 | mobile_image_mounter_error_t err = MOBILE_IMAGE_MOUNTER_E_UNKNOWN_ERROR; | ||
| 124 | service_client_factory_start_service(device, MOBILE_IMAGE_MOUNTER_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobile_image_mounter_new), &err); | ||
| 125 | return err; | ||
| 126 | } | ||
| 127 | |||
| 128 | /** | ||
| 109 | * Disconnects a mobile_image_mounter client from the device and frees up the | 129 | * Disconnects a mobile_image_mounter client from the device and frees up the |
| 110 | * mobile_image_mounter client data. | 130 | * mobile_image_mounter client data. |
| 111 | * | 131 | * |
diff --git a/src/mobilebackup.c b/src/mobilebackup.c index 6382b94..c53a2cb 100644 --- a/src/mobilebackup.c +++ b/src/mobilebackup.c | |||
| @@ -100,6 +100,26 @@ mobilebackup_error_t mobilebackup_client_new(idevice_t device, lockdownd_service | |||
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | /** | 102 | /** |
| 103 | * Starts a new mobilebackup service on the specified device and connects to it. | ||
| 104 | * | ||
| 105 | * @param device The device to connect to. | ||
| 106 | * @param client Pointer that will point to a newly allocated | ||
| 107 | * mobilebackup_client_t upon successful return. Must be freed using | ||
| 108 | * mobilebackup_client_free() after use. | ||
| 109 | * @param label The label to use for communication. Usually the program name. | ||
| 110 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 111 | * | ||
| 112 | * @return MOBILEBACKUP_E_SUCCESS on success, or an MOBILEBACKUP_E_* error | ||
| 113 | * code otherwise. | ||
| 114 | */ | ||
| 115 | mobilebackup_error_t mobilebackup_client_start_service(idevice_t device, mobilebackup_client_t * client, const char* label) | ||
| 116 | { | ||
| 117 | mobilebackup_error_t err = MOBILEBACKUP_E_UNKNOWN_ERROR; | ||
| 118 | service_client_factory_start_service(device, MOBILEBACKUP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup_client_new), &err); | ||
| 119 | return err; | ||
| 120 | } | ||
| 121 | |||
| 122 | /** | ||
| 103 | * Disconnects a mobilebackup client from the device and frees up the | 123 | * Disconnects a mobilebackup client from the device and frees up the |
| 104 | * mobilebackup client data. | 124 | * mobilebackup client data. |
| 105 | * | 125 | * |
diff --git a/src/mobilebackup2.c b/src/mobilebackup2.c index c1159e1..594ba84 100644 --- a/src/mobilebackup2.c +++ b/src/mobilebackup2.c | |||
| @@ -102,6 +102,26 @@ mobilebackup2_error_t mobilebackup2_client_new(idevice_t device, lockdownd_servi | |||
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | /** | 104 | /** |
| 105 | * Starts a new mobilebackup2 service on the specified device and connects to it. | ||
| 106 | * | ||
| 107 | * @param device The device to connect to. | ||
| 108 | * @param client Pointer that will point to a newly allocated | ||
| 109 | * mobilebackup2_client_t upon successful return. Must be freed using | ||
| 110 | * mobilebackup2_client_free() after use. | ||
| 111 | * @param label The label to use for communication. Usually the program name. | ||
| 112 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 113 | * | ||
| 114 | * @return MOBILEBACKUP2_E_SUCCESS on success, or an MOBILEBACKUP2_E_* error | ||
| 115 | * code otherwise. | ||
| 116 | */ | ||
| 117 | mobilebackup2_error_t mobilebackup2_client_start_service(idevice_t device, mobilebackup2_client_t * client, const char* label) | ||
| 118 | { | ||
| 119 | mobilebackup2_error_t err = MOBILEBACKUP2_E_UNKNOWN_ERROR; | ||
| 120 | service_client_factory_start_service(device, MOBILEBACKUP2_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilebackup2_client_new), &err); | ||
| 121 | return err; | ||
| 122 | } | ||
| 123 | |||
| 124 | /** | ||
| 105 | * Disconnects a mobilebackup2 client from the device and frees up the | 125 | * Disconnects a mobilebackup2 client from the device and frees up the |
| 106 | * mobilebackup2 client data. | 126 | * mobilebackup2 client data. |
| 107 | * | 127 | * |
diff --git a/src/mobilesync.c b/src/mobilesync.c index 0e98709..e9e05ee 100644 --- a/src/mobilesync.c +++ b/src/mobilesync.c | |||
| @@ -109,6 +109,26 @@ mobilesync_error_t mobilesync_client_new(idevice_t device, lockdownd_service_des | |||
| 109 | } | 109 | } |
| 110 | 110 | ||
| 111 | /** | 111 | /** |
| 112 | * Starts a new mobilesync service on the specified device and connects to it. | ||
| 113 | * | ||
| 114 | * @param device The device to connect to. | ||
| 115 | * @param client Pointer that will point to a newly allocated | ||
| 116 | * mobilesync_client_t upon successful return. Must be freed using | ||
| 117 | * mobilesync_client_free() after use. | ||
| 118 | * @param label The label to use for communication. Usually the program name. | ||
| 119 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 120 | * | ||
| 121 | * @return MOBILESYNC_E_SUCCESS on success, or an MOBILESYNC_E_* error | ||
| 122 | * code otherwise. | ||
| 123 | */ | ||
| 124 | mobilesync_error_t mobilesync_client_start_service(idevice_t device, mobilesync_client_t * client, const char* label) | ||
| 125 | { | ||
| 126 | mobilesync_error_t err = MOBILESYNC_E_UNKNOWN_ERROR; | ||
| 127 | service_client_factory_start_service(device, MOBILESYNC_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(mobilesync_client_new), &err); | ||
| 128 | return err; | ||
| 129 | } | ||
| 130 | |||
| 131 | /** | ||
| 112 | * Disconnects a mobilesync client from the device and frees up the | 132 | * Disconnects a mobilesync client from the device and frees up the |
| 113 | * mobilesync client data. | 133 | * mobilesync client data. |
| 114 | * | 134 | * |
diff --git a/src/notification_proxy.c b/src/notification_proxy.c index 410a519..88ff72b 100644 --- a/src/notification_proxy.c +++ b/src/notification_proxy.c | |||
| @@ -117,6 +117,26 @@ np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t servic | |||
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | /** | 119 | /** |
| 120 | * Starts a new notification proxy service on the specified device and connects to it. | ||
| 121 | * | ||
| 122 | * @param device The device to connect to. | ||
| 123 | * @param client Pointer that will point to a newly allocated | ||
| 124 | * np_client_t upon successful return. Must be freed using | ||
| 125 | * np_client_free() after use. | ||
| 126 | * @param label The label to use for communication. Usually the program name. | ||
| 127 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 128 | * | ||
| 129 | * @return NP_E_SUCCESS on success, or an NP_E_* error | ||
| 130 | * code otherwise. | ||
| 131 | */ | ||
| 132 | np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label) | ||
| 133 | { | ||
| 134 | np_error_t err = NP_E_UNKNOWN_ERROR; | ||
| 135 | service_client_factory_start_service(device, NP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(np_client_new), &err); | ||
| 136 | return err; | ||
| 137 | } | ||
| 138 | |||
| 139 | /** | ||
| 120 | * Disconnects a notification_proxy client from the device and frees up the | 140 | * Disconnects a notification_proxy client from the device and frees up the |
| 121 | * notification_proxy client data. | 141 | * notification_proxy client data. |
| 122 | * | 142 | * |
diff --git a/src/sbservices.c b/src/sbservices.c index dde8b9d..9b66c7f 100644 --- a/src/sbservices.c +++ b/src/sbservices.c | |||
| @@ -104,6 +104,26 @@ sbservices_error_t sbservices_client_new(idevice_t device, lockdownd_service_des | |||
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | /** | 106 | /** |
| 107 | * Starts a new sbservices service on the specified device and connects to it. | ||
| 108 | * | ||
| 109 | * @param device The device to connect to. | ||
| 110 | * @param client Pointer that will point to a newly allocated | ||
| 111 | * sbservices_client_t upon successful return. Must be freed using | ||
| 112 | * sbservices_client_free() after use. | ||
| 113 | * @param label The label to use for communication. Usually the program name. | ||
| 114 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 115 | * | ||
| 116 | * @return SBSERVICES_E_SUCCESS on success, or an SBSERVICES_E_* error | ||
| 117 | * code otherwise. | ||
| 118 | */ | ||
| 119 | sbservices_error_t sbservices_client_start_service(idevice_t device, sbservices_client_t * client, const char* label) | ||
| 120 | { | ||
| 121 | sbservices_error_t err = SBSERVICES_E_UNKNOWN_ERROR; | ||
| 122 | service_client_factory_start_service(device, SBSERVICES_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(sbservices_client_new), &err); | ||
| 123 | return err; | ||
| 124 | } | ||
| 125 | |||
| 126 | /** | ||
| 107 | * Disconnects an sbservices client from the device and frees up the | 127 | * Disconnects an sbservices client from the device and frees up the |
| 108 | * sbservices client data. | 128 | * sbservices client data. |
| 109 | * | 129 | * |
diff --git a/src/screenshotr.c b/src/screenshotr.c index 2e16032..5367450 100644 --- a/src/screenshotr.c +++ b/src/screenshotr.c | |||
| @@ -102,6 +102,26 @@ screenshotr_error_t screenshotr_client_new(idevice_t device, lockdownd_service_d | |||
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | /** | 104 | /** |
| 105 | * Starts a new screenshotr service on the specified device and connects to it. | ||
| 106 | * | ||
| 107 | * @param device The device to connect to. | ||
| 108 | * @param client Pointer that will point to a newly allocated | ||
| 109 | * screenshotr_client_t upon successful return. Must be freed using | ||
| 110 | * screenshotr_client_free() after use. | ||
| 111 | * @param label The label to use for communication. Usually the program name. | ||
| 112 | * Pass NULL to disable sending the label in requests to lockdownd. | ||
| 113 | * | ||
| 114 | * @return SCREENSHOTR_E_SUCCESS on success, or an SCREENSHOTR_E_* error | ||
| 115 | * code otherwise. | ||
| 116 | */ | ||
| 117 | screenshotr_error_t screenshotr_client_start_service(idevice_t device, screenshotr_client_t * client, const char* label) | ||
| 118 | { | ||
| 119 | screenshotr_error_t err = SCREENSHOTR_E_UNKNOWN_ERROR; | ||
| 120 | service_client_factory_start_service(device, SCREENSHOTR_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(screenshotr_client_new), &err); | ||
| 121 | return err; | ||
| 122 | } | ||
| 123 | |||
| 124 | /** | ||
| 105 | * Disconnects a screenshotr client from the device and frees up the | 125 | * Disconnects a screenshotr client from the device and frees up the |
| 106 | * screenshotr client data. | 126 | * screenshotr client data. |
| 107 | * | 127 | * |
