necouchman commented on code in PR #610:
URL: https://github.com/apache/guacamole-server/pull/610#discussion_r2725811947
##########
src/libguac/guacamole/user-fntypes.h:
##########
@@ -499,5 +499,95 @@ typedef int guac_user_get_handler(guac_user* user,
guac_object* object,
typedef int guac_user_put_handler(guac_user* user, guac_object* object,
guac_stream* stream, char* mimetype, char* name);
-#endif
+/**
+ * Handler for Guacamole USB connect events, invoked when a "usbconnect"
+ * instruction has been received from a user. This indicates that the user
+ * has connected a USB device via WebUSB and it is available for redirection.
+ *
+ * @param device_id
+ * The unique identifier for the USB device. Required.
+ *
+ * @param vendor_id
+ * The vendor ID of the USB device. Required.
+ *
+ * @param product_id
+ * The product ID of the USB device. Required.
+ *
+ * @param device_name
+ * The human-readable name of the device. Required (may be empty string).
+ *
+ * @param serial_number
+ * The serial number of the device. Optional (may be NULL or empty string
+ * if not available).
+ *
+ * @param device_class
+ * The USB device class. Required.
+ *
+ * @param device_subclass
+ * The USB device subclass. Required.
+ *
+ * @param device_protocol
+ * The USB device protocol. Required.
+ *
+ * @param interface_data
+ * Encoded string containing interface and endpoint information. Required.
+ * Format:
"ifaceNum:class:subclass:protocol:ep1Num:ep1Dir:ep1Type:ep1Size;ep2...,iface2..."
+ * where multiple endpoints within an interface are separated by semicolons
+ * and multiple interfaces are separated by commas.
Review Comment:
Okay - I'd suggest this all of this - both the encoding of the fields for
Guacamole, and the way composite devices are handled - get documented
_somewhere_ - I'm not really sure if the code is the best place, or the manual,
but I think it'd be useful for folks looking to implement USB functionality
with Guacamole to know how we're handling this data.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]