summaryrefslogtreecommitdiffstats
path: root/src/screenshotr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screenshotr.c')
-rw-r--r--src/screenshotr.c20
1 files changed, 20 insertions, 0 deletions
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 */
117screenshotr_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 *