summaryrefslogtreecommitdiffstats
path: root/libusbmuxd/usbmuxd.h
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2009-09-08 20:42:00 +0200
committerGravatar Nikias Bassen2009-09-08 20:42:00 +0200
commita93c66e2bff0065ad2ac93998048f065e51a784c (patch)
tree8e56c01bdb584f5bbe1d3ef085ed7b68501b7c8a /libusbmuxd/usbmuxd.h
parent8bd54babbe6d3309f78f9d8729d93f83c14d23f5 (diff)
downloadusbmuxd-a93c66e2bff0065ad2ac93998048f065e51a784c.tar.gz
usbmuxd-a93c66e2bff0065ad2ac93998048f065e51a784c.tar.bz2
Protocol definition updated.
renamed: usbmuxd_scan() -> usbmuxd_get_device_list() new: usbmuxd_get_device_by_uuid()
Diffstat (limited to 'libusbmuxd/usbmuxd.h')
-rw-r--r--libusbmuxd/usbmuxd.h24
1 files changed, 20 insertions, 4 deletions
diff --git a/libusbmuxd/usbmuxd.h b/libusbmuxd/usbmuxd.h
index a4e7e4a..106f921 100644
--- a/libusbmuxd/usbmuxd.h
+++ b/libusbmuxd/usbmuxd.h
@@ -57,12 +57,28 @@ int usbmuxd_unsubscribe();
/**
* Contacts usbmuxd and retrieves a list of connected devices.
*
- * @param available_devices pointer to an array of usbmuxd_device_info_t
- * that will hold records of the connected devices.
+ * @param device_list A pointer to an array of usbmuxd_device_info_t
+ * that will hold records of the connected devices. The last record
+ * is a null-terminated record with all fields set to 0/NULL.
+ * @note The user has to free the list returned.
*
- * @return number of available devices, zero on no devices, or negative on error
+ * @return number of attached devices, zero on no devices, or negative
+ * if an error occured.
*/
-int usbmuxd_scan(usbmuxd_device_info_t **available_devices);
+int usbmuxd_get_device_list(usbmuxd_device_info_t **device_list);
+
+/**
+ * Gets device information for the device specified by uuid.
+ *
+ * @param uuid A device uuid of the device to look for. If uuid is NULL,
+ * This function will return the first device found.
+ * @param device Pointer to a previously allocated (or static)
+ * usbmuxd_device_info_t that will be filled with the device info.
+ *
+ * @return 0 if no matching device is connected, 1 if the device was found,
+ * or a negative value on error.
+ */
+int usbmuxd_get_device_by_uuid(const char *uuid, usbmuxd_device_info_t *device);
/**
* Request proxy connect to