diff options
author | Martin Szulecki | 2013-02-26 20:17:32 +0100 |
---|---|---|
committer | Martin Szulecki | 2013-02-27 16:18:48 +0100 |
commit | 63e70332393e4fb6ae275abf1e1baea0235f08e9 (patch) | |
tree | 4a5545bc4d40f2c5e1cc1b96498ca5af9c74977d /src | |
parent | a3cdb72ecf938b474174d5fd7cad348ec170dc4b (diff) | |
download | libimobiledevice-63e70332393e4fb6ae275abf1e1baea0235f08e9.tar.gz libimobiledevice-63e70332393e4fb6ae275abf1e1baea0235f08e9.tar.bz2 |
Add label argument to *_client_start_service() helpers
Diffstat (limited to 'src')
-rw-r--r-- | src/heartbeat.c | 6 | ||||
-rw-r--r-- | src/webinspector.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/heartbeat.c b/src/heartbeat.c index 30fb8af..817c6ad 100644 --- a/src/heartbeat.c +++ b/src/heartbeat.c @@ -104,16 +104,18 @@ heartbeat_error_t heartbeat_client_new(idevice_t device, lockdownd_service_descr * @param client Pointer that will point to a newly allocated * heartbeat_client_t upon successful return. Must be freed using * heartbeat_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 HEARTBEAT_E_SUCCESS on success, or an HEARTBEAT_E_* error * code otherwise. */ -heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_client_t * client) +heartbeat_error_t heartbeat_client_start_service(idevice_t device, heartbeat_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)) { idevice_free(device); debug_info("Could not create a lockdown client."); return HEARTBEAT_E_UNKNOWN_ERROR; diff --git a/src/webinspector.c b/src/webinspector.c index 1b39ea0..8d05082 100644 --- a/src/webinspector.c +++ b/src/webinspector.c @@ -104,16 +104,18 @@ webinspector_error_t webinspector_client_new(idevice_t device, lockdownd_service * @param client Pointer that will point to a newly allocated * webinspector_client_t upon successful return. Must be freed using * webinspector_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 WEBINSPECTOR_E_SUCCESS on success, or an WEBINSPECTOR_E_* error * code otherwise. */ -webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_client_t * client) +webinspector_error_t webinspector_client_start_service(idevice_t device, webinspector_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)) { idevice_free(device); debug_info("Could not create a lockdown client."); return WEBINSPECTOR_E_UNKNOWN_ERROR; |