summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/service.c6
-rw-r--r--src/service.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/service.c b/src/service.c
index 09a312b..af37a83 100644
--- a/src/service.c
+++ b/src/service.c
@@ -97,16 +97,18 @@ service_error_t service_client_new(idevice_t device, lockdownd_service_descripto
* @param client Pointer that will point to a newly allocated service_client_t
* upon successful return. Must be freed using service_client_free() after
* use.
+ * @param label The label to use for communication. Usually the program name.
+ * Pass NULL to disable sending the label in requests to lockdownd.
*
* @return SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code
* otherwise.
*/
-service_error_t service_client_start_service(idevice_t device, const char* service_name, service_client_t *client)
+service_error_t service_client_start_service(idevice_t device, const char* service_name, service_client_t *client, const char* label)
{
*client = NULL;
lockdownd_client_t lckd = NULL;
- if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, NULL)) {
+ if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(device, &lckd, label)) {
debug_info("Could not create a lockdown client.");
return SERVICE_E_START_SERVICE_ERROR;
}
diff --git a/src/service.h b/src/service.h
index e95d589..982f96a 100644
--- a/src/service.h
+++ b/src/service.h
@@ -42,7 +42,7 @@ typedef int16_t service_error_t;
/* creation and destruction */
service_error_t service_client_new(idevice_t device, lockdownd_service_descriptor_t service, service_client_t *client);
-service_error_t service_client_start_service(idevice_t device, const char* service_name, service_client_t *client);
+service_error_t service_client_start_service(idevice_t device, const char* service_name, service_client_t *client, const char* label);
service_error_t service_client_free(service_client_t client);
/* sending */