Commit dc9ab44a authored by Jakob Bornecrantz's avatar Jakob Bornecrantz

xrt: Rename xrt_prober to xrt_auto_prober

parent ade05949
......@@ -26,16 +26,16 @@ extern "C" {
#endif
typedef struct xrt_prober *(*prober_creator)();
typedef struct xrt_auto_prober *(*prober_creator)();
static const prober_creator DRIVERS[] = {
#ifdef XRT_BUILD_HDK
// Returns NULL if none found, so OK to go first.
hdk_create_prober,
hdk_create_auto_prober,
#endif
#ifdef XRT_BUILD_OHMD
oh_create_prober,
oh_create_auto_prober,
#endif
};
......@@ -43,23 +43,23 @@ static const prober_creator DRIVERS[] = {
#define NUM_PROBERS (ARRAY_SIZE(DRIVERS))
/*!
* An xrt_prober that contains other xrt_probers.
* An xrt_auto_prober that contains other xrt_auto_probers.
*/
struct u_meta_prober
{
struct xrt_prober base;
struct xrt_prober *probers[NUM_PROBERS];
struct xrt_auto_prober base;
struct xrt_auto_prober *probers[NUM_PROBERS];
};
static inline struct u_meta_prober *
u_meta_prober(struct xrt_prober *p)
u_meta_prober(struct xrt_auto_prober *p)
{
return (struct u_meta_prober *)p;
}
static void
u_meta_prober_destroy(struct xrt_prober *p)
u_meta_prober_destroy(struct xrt_auto_prober *p)
{
struct u_meta_prober *mp = u_meta_prober(p);
......@@ -74,7 +74,7 @@ u_meta_prober_destroy(struct xrt_prober *p)
}
static struct xrt_device *
u_meta_prober_autoprobe(struct xrt_prober *p)
u_meta_prober_autoprobe(struct xrt_auto_prober *p)
{
struct u_meta_prober *mp = u_meta_prober(p);
......@@ -93,7 +93,7 @@ u_meta_prober_autoprobe(struct xrt_prober *p)
return NULL;
}
static struct xrt_prober *
static struct xrt_auto_prober *
u_meta_prober_create()
{
struct u_meta_prober *p =
......
......@@ -27,8 +27,8 @@ extern "C" {
*
* @ingroup drv_hdk
*/
struct xrt_prober*
hdk_create_prober();
struct xrt_auto_prober*
hdk_create_auto_prober();
/*!
* @dir drivers/hdk
......
......@@ -26,17 +26,17 @@ DEBUG_GET_ONCE_BOOL_OPTION(hdk_debug, "HDK_PRINT_DEBUG", false)
struct hdk_prober
{
struct xrt_prober base;
struct xrt_auto_prober base;
};
static inline struct hdk_prober *
hdk_prober(struct xrt_prober *p)
hdk_prober(struct xrt_auto_prober *p)
{
return (struct hdk_prober *)p;
}
static void
hdk_prober_destroy(struct xrt_prober *p)
hdk_prober_destroy(struct xrt_auto_prober *p)
{
struct hdk_prober *hhp = hdk_prober(p);
......@@ -56,7 +56,7 @@ static const uint16_t HDK_VID = 0x1532;
static const uint16_t HDK_PID = 0x0b00;
static struct xrt_device *
hdk_prober_autoprobe(struct xrt_prober *p)
hdk_prober_autoprobe(struct xrt_auto_prober *p)
{
struct hdk_prober *hhp = hdk_prober(p);
......@@ -131,8 +131,8 @@ hdk_prober_autoprobe(struct xrt_prober *p)
return &hd->base;
}
struct xrt_prober *
hdk_create_prober()
struct xrt_auto_prober *
hdk_create_auto_prober()
{
struct hdk_prober *hhp = U_TYPED_CALLOC(struct hdk_prober);
hhp->base.destroy = hdk_prober_destroy;
......
......@@ -25,8 +25,8 @@ extern "C" {
*
* @ingroup drv_ohmd
*/
struct xrt_prober*
oh_create_prober();
struct xrt_auto_prober*
oh_create_auto_prober();
/*!
* @dir drivers/ohmd
......
......@@ -24,20 +24,20 @@ DEBUG_GET_ONCE_BOOL_OPTION(oh_debug, "OH_PRINT_DEBUG", false)
struct oh_prober
{
struct xrt_prober base;
struct xrt_auto_prober base;
ohmd_context *ctx;
bool print_spew;
bool print_debug;
};
static inline struct oh_prober *
oh_prober(struct xrt_prober *p)
oh_prober(struct xrt_auto_prober *p)
{
return (struct oh_prober *)p;
}
static void
oh_prober_destroy(struct xrt_prober *p)
oh_prober_destroy(struct xrt_auto_prober *p)
{
struct oh_prober *ohp = oh_prober(p);
......@@ -50,7 +50,7 @@ oh_prober_destroy(struct xrt_prober *p)
}
static struct xrt_device *
oh_prober_autoprobe(struct xrt_prober *p)
oh_prober_autoprobe(struct xrt_auto_prober *p)
{
struct oh_prober *ohp = oh_prober(p);
......@@ -99,8 +99,8 @@ oh_prober_autoprobe(struct xrt_prober *p)
return &ohd->base;
}
struct xrt_prober *
oh_create_prober()
struct xrt_auto_prober *
oh_create_auto_prober()
{
struct oh_prober *ohp = U_TYPED_CALLOC(struct oh_prober);
ohp->base.destroy = oh_prober_destroy;
......
......@@ -17,24 +17,25 @@ extern "C" {
/*!
* A prober for HMD devices connected to the system.
* A simple prober to probe for a HMD device connected to the system.
*
* @ingroup xrt_iface
*/
struct xrt_prober
struct xrt_auto_prober
{
struct xrt_device *(*lelo_dallas_autoprobe)(struct xrt_prober *xdev);
void (*destroy)(struct xrt_prober *xdev);
struct xrt_device *(*lelo_dallas_autoprobe)(
struct xrt_auto_prober *xdev);
void (*destroy)(struct xrt_auto_prober *xdev);
};
/*!
* Call this function to create the prober. This function is setup in the the
* very small target wrapper.c for each binary.
* Call this function to create the @ref xrt_auto_prober. This function is setup
* in the the very small target wrapper.c for each binary.
*
* @ingroup xrt_iface
*/
struct xrt_prober *
xrt_create_prober();
struct xrt_auto_prober *
xrt_auto_prober_create();
#ifdef __cplusplus
......
......@@ -38,7 +38,7 @@ static XrResult
oxr_instance_destroy(struct oxr_logger *log, struct oxr_handle_base *hb)
{
struct oxr_instance *inst = (struct oxr_instance *)hb;
struct xrt_prober *prober = inst->prober;
struct xrt_auto_prober *prober = inst->prober;
struct xrt_device *dev = inst->system.device;
oxr_path_destroy_all(log, inst);
......@@ -83,7 +83,7 @@ oxr_instance_create(struct oxr_logger *log,
"Failed to create hashset");
}
inst->prober = xrt_create_prober();
inst->prober = xrt_auto_prober_create();
struct xrt_device *dev =
inst->prober->lelo_dallas_autoprobe(inst->prober);
......
......@@ -582,7 +582,7 @@ struct oxr_instance
//! Common structure for things referred to by OpenXR handles.
struct oxr_handle_base handle;
struct xrt_prober *prober;
struct xrt_auto_prober *prober;
// Enabled extensions
bool headless;
......
......@@ -9,8 +9,8 @@
#include "util/u_meta_prober.h"
struct xrt_prober*
xrt_create_prober()
struct xrt_auto_prober*
xrt_auto_prober_create()
{
return u_meta_prober_create();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment