···2828struct xrt_fs;
2929struct xrt_frame_context;
3030struct xrt_prober;
3131+struct xrt_prober_entry;
3132struct xrt_prober_device;
3333+struct xrt_prober_entry_lists;
3434+struct xrt_auto_prober;
3235struct xrt_tracking_factory;
3336struct os_hid_device;
3437···4346#define XRT_MAX_DEVICES_PER_PROBE 16
44474548#define XRT_MAX_AUTO_PROBERS 16
4646-4747-/*!
4848- * Function pointer type for a handler that gets called when a device matching vendor and product ID is detected.
4949- *
5050- * @param xp Prober
5151- * @param devices The array of prober devices found by the prober.
5252- * @param num_devices The number of elements in @p devices
5353- * @param index Which element in the prober device array matches your query?
5454- * @param attached_data
5555- * @param out_xdevs An empty array of size @p XRT_MAX_DEVICES_PER_PROBE you may populate with @ref xrt_device
5656- * instances.
5757- *
5858- * @return the number of elements of @p out_xdevs populated by this call.
5959- */
6060-typedef int (*xrt_prober_found_func_t)(struct xrt_prober *xp,
6161- struct xrt_prober_device **devices,
6262- size_t num_devices,
6363- size_t index,
6464- cJSON *attached_data,
6565- struct xrt_device **out_xdevs);
6666-6767-/*!
6868- * Entry for a single device.
6969- *
7070- * @ingroup xrt_iface
7171- */
7272-struct xrt_prober_entry
7373-{
7474- /*!
7575- * USB/Bluetooth vendor ID (VID) to filter on.
7676- */
7777- uint16_t vendor_id;
7878-7979- /*!
8080- * USB/Bluetooth product ID (PID) to filter on.
8181- */
8282- uint16_t product_id;
8383-8484- /*!
8585- * Handler that gets called when a device matching vendor and product ID is detected.
8686- *
8787- * @see xrt_prober_found_func_t
8888- */
8989- xrt_prober_found_func_t found;
9090-9191- /*!
9292- * A human-readable name for the device associated with this VID/PID.
9393- */
9494- const char *name;
9595-9696- /*!
9797- * A human-readable name for the driver associated with this VID/PID.
9898- *
9999- * Separate because a single driver might handle multiple VID/PID entries.
100100- */
101101- const char *driver_name;
102102-};
103103-104104-/*!
105105- * Function pointer type for creating a auto prober.
106106- *
107107- * @ingroup xrt_iface
108108- */
109109-typedef struct xrt_auto_prober *(*xrt_auto_prober_create_func_t)();
1104911150/*!
11251 * Bus type of a device.
···431370432371/*
433372 *
373373+ * Found device interface.
374374+ *
375375+ */
376376+377377+/*!
378378+ * Function pointer type for a handler that gets called when a device matching vendor and product ID is detected.
379379+ *
380380+ * @param xp Prober
381381+ * @param devices The array of prober devices found by the prober.
382382+ * @param num_devices The number of elements in @p devices
383383+ * @param index Which element in the prober device array matches your query?
384384+ * @param attached_data
385385+ * @param out_xdevs An empty array of size @p XRT_MAX_DEVICES_PER_PROBE you may populate with @ref xrt_device
386386+ * instances.
387387+ *
388388+ * @return the number of elements of @p out_xdevs populated by this call.
389389+ */
390390+typedef int (*xrt_prober_found_func_t)(struct xrt_prober *xp,
391391+ struct xrt_prober_device **devices,
392392+ size_t num_devices,
393393+ size_t index,
394394+ cJSON *attached_data,
395395+ struct xrt_device **out_xdevs);
396396+397397+/*!
398398+ * Entry for a single device.
399399+ *
400400+ * @ingroup xrt_iface
401401+ */
402402+struct xrt_prober_entry
403403+{
404404+ /*!
405405+ * USB/Bluetooth vendor ID (VID) to filter on.
406406+ */
407407+ uint16_t vendor_id;
408408+409409+ /*!
410410+ * USB/Bluetooth product ID (PID) to filter on.
411411+ */
412412+ uint16_t product_id;
413413+414414+ /*!
415415+ * Handler that gets called when a device matching vendor and product ID is detected.
416416+ *
417417+ * @see xrt_prober_found_func_t
418418+ */
419419+ xrt_prober_found_func_t found;
420420+421421+ /*!
422422+ * A human-readable name for the device associated with this VID/PID.
423423+ */
424424+ const char *name;
425425+426426+ /*!
427427+ * A human-readable name for the driver associated with this VID/PID.
428428+ *
429429+ * Separate because a single driver might handle multiple VID/PID entries.
430430+ */
431431+ const char *driver_name;
432432+};
433433+434434+435435+/*
436436+ *
434437 * Auto prober.
435438 *
436439 */
440440+441441+/*!
442442+ * Function pointer type for creating a auto prober.
443443+ *
444444+ * @ingroup xrt_iface
445445+ */
446446+typedef struct xrt_auto_prober *(*xrt_auto_prober_create_func_t)();
437447438448/*!
439449 * @interface xrt_auto_prober