libimobiledevice  1.3.0
API Documentation - Return to Homepage

◆ lockdownd_cu_send_request_and_get_reply()

LIBIMOBILEDEVICE_API lockdownd_error_t lockdownd_cu_send_request_and_get_reply ( lockdownd_client_t  client,
const char *  request,
plist_t  request_payload,
plist_t *  reply 
)

Sends a request via lockdown client with established CU pairing session and attempts to retrieve a reply.

This function is used internally by lockdownd_get_value_cu() and lockdownd_pair_cu(), but exposed here to allow custom requests being sent and their replies being received.

Parameters
clientA lockdown client with an established CU pairing.
requestThe request to perform.
request_payloadThe payload for the request.
reply(Optional) If not NULL, the plist_t will be set to the reply dictionary that has been received. Consumer is responsible to free it using plist_free() when no longer required.
Returns
LOCKDOWN_E_SUCCESS on success, LOCKDOWN_E_INVALID_ARG if one of the parameters is invalid, LOCKDOWN_E_NO_RUNNING_SESSION if the current lockdown client does not have an established CU pairing session, or a LOCKDOWN_E_* error code otherwise.