libimobiledevice  1.3.0-dirty
API Documentation - Return to Homepage

◆ service_client_factory_start_service()

service_error_t service_client_factory_start_service ( idevice_t device,
const char * service_name,
void ** client,
const char * label,
int32_t(* constructor_func )(idevice_t, lockdownd_service_descriptor_t, void **),
int32_t * error_code )

Starts a new service on the specified device with given name and connects to it.

Parameters
deviceThe device to connect to.
service_nameThe name of the service to start.
clientPointer that will point to a newly allocated service_client_t upon successful return. Must be freed using service_client_free() after use.
labelThe label to use for communication. Usually the program name. Pass NULL to disable sending the label in requests to lockdownd.
constructor_funcConstructor function for the service client to create (e.g. afc_client_new())
error_codePointer to an int32_t that will receive the service start error code.
Returns
SERVICE_E_SUCCESS on success, or a SERVICE_E_* error code otherwise.