summaryrefslogtreecommitdiffstats
path: root/src/notification_proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/notification_proxy.c')
-rw-r--r--src/notification_proxy.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/notification_proxy.c b/src/notification_proxy.c
index 410a519..88ff72b 100644
--- a/src/notification_proxy.c
+++ b/src/notification_proxy.c
@@ -117,6 +117,26 @@ np_error_t np_client_new(idevice_t device, lockdownd_service_descriptor_t servic
117} 117}
118 118
119/** 119/**
120 * Starts a new notification proxy service on the specified device and connects to it.
121 *
122 * @param device The device to connect to.
123 * @param client Pointer that will point to a newly allocated
124 * np_client_t upon successful return. Must be freed using
125 * np_client_free() after use.
126 * @param label The label to use for communication. Usually the program name.
127 * Pass NULL to disable sending the label in requests to lockdownd.
128 *
129 * @return NP_E_SUCCESS on success, or an NP_E_* error
130 * code otherwise.
131 */
132np_error_t np_client_start_service(idevice_t device, np_client_t* client, const char* label)
133{
134 np_error_t err = NP_E_UNKNOWN_ERROR;
135 service_client_factory_start_service(device, NP_SERVICE_NAME, (void**)client, label, SERVICE_CONSTRUCTOR(np_client_new), &err);
136 return err;
137}
138
139/**
120 * Disconnects a notification_proxy client from the device and frees up the 140 * Disconnects a notification_proxy client from the device and frees up the
121 * notification_proxy client data. 141 * notification_proxy client data.
122 * 142 *