Monado OpenXR Runtime
Enumerations | Functions

File for verifying app input into api functions. More...

#include <assert.h>
#include <stdio.h>
#include <string.h>
#include "xrt/xrt_compiler.h"
#include "util/u_debug.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_api_verify.h"
#include "oxr_chain.h"
Include dependency graph for oxr_verify.c:

Enumerations

enum  verify_state { VERIFY_START, VERIFY_MIDDLE, VERIFY_SLASH, VERIFY_SLASHDOTS }
 

Functions

XrResult oxr_verify_fixed_size_single_level_path (struct oxr_logger *log, const char *path, uint32_t array_size, const char *name)
 Verify a single path level that sits inside of a fixed sized array. More...
 
XrResult oxr_verify_localized_name (struct oxr_logger *log, const char *string, uint32_t array_size, const char *name)
 Verify an arbitrary UTF-8 string that sits inside of a fixed sized array. More...
 
XrResult oxr_verify_full_path_c (struct oxr_logger *log, const char *path, const char *name)
 
XrResult oxr_verify_full_path (struct oxr_logger *log, const char *path, size_t length, const char *name)
 Verify a full path. More...
 
XrResult oxr_verify_subaction_paths_create (struct oxr_logger *log, struct oxr_instance *inst, uint32_t countSubactionPaths, const XrPath *subactionPaths, const char *variable)
 Verify a set of subaction paths for action creation. More...
 
XrResult oxr_verify_subaction_path_sync (struct oxr_logger *log, struct oxr_instance *inst, XrPath path, uint32_t index)
 Verify a set of subaction paths for action sync. More...
 
XrResult oxr_verify_subaction_path_get (struct oxr_logger *log, struct oxr_instance *inst, XrPath path, const struct oxr_sub_paths *act_sub_paths, struct oxr_sub_paths *out_sub_paths, const char *variable)
 Verify a set of subaction paths for action state get. More...
 
XrResult oxr_verify_XrSessionCreateInfo (struct oxr_logger *log, const struct oxr_instance *inst, const XrSessionCreateInfo *createInfo)
 
XrResult oxr_verify_XrGraphicsBindingOpenGLXlibKHR (struct oxr_logger *log, const XrGraphicsBindingOpenGLXlibKHR *next)
 
XrResult oxr_verify_XrGraphicsBindingVulkanKHR (struct oxr_logger *log, const XrGraphicsBindingVulkanKHR *next)
 

Detailed Description

File for verifying app input into api functions.

Author
Ryan Pavlik ryan..nosp@m.pavl.nosp@m.ik@co.nosp@m.llab.nosp@m.ora.c.nosp@m.om
Jakob Bornecrantz jakob.nosp@m.@col.nosp@m.labor.nosp@m.a.co.nosp@m.m

Enumeration Type Documentation

◆ verify_state

Enumerator
VERIFY_START 
VERIFY_MIDDLE 
VERIFY_SLASH 
VERIFY_SLASHDOTS 

Function Documentation

◆ oxr_verify_fixed_size_single_level_path()

XrResult oxr_verify_fixed_size_single_level_path ( struct oxr_logger log,
const char *  path,
uint32_t  array_size,
const char *  name 
)

Verify a single path level that sits inside of a fixed sized array.

References oxr_error().

◆ oxr_verify_full_path()

XrResult oxr_verify_full_path ( struct oxr_logger log,
const char *  path,
size_t  length,
const char *  name 
)

Verify a full path.

Length not including zero terminator character but must be there.

References oxr_error(), VERIFY_SLASH, VERIFY_SLASHDOTS, and VERIFY_START.

Referenced by oxr_verify_full_path_c().

◆ oxr_verify_full_path_c()

XrResult oxr_verify_full_path_c ( struct oxr_logger log,
const char *  path,
const char *  name 
)

References oxr_verify_full_path().

Referenced by oxr_xrStringToPath().

◆ oxr_verify_localized_name()

XrResult oxr_verify_localized_name ( struct oxr_logger log,
const char *  string,
uint32_t  array_size,
const char *  name 
)

Verify an arbitrary UTF-8 string that sits inside of a fixed sized array.

References oxr_error().

◆ oxr_verify_subaction_path_get()

XrResult oxr_verify_subaction_path_get ( struct oxr_logger log,
struct oxr_instance inst,
XrPath  path,
const struct oxr_sub_paths act_sub_paths,
struct oxr_sub_paths out_sub_paths,
const char *  variable 
)

◆ oxr_verify_subaction_path_sync()

XrResult oxr_verify_subaction_path_sync ( struct oxr_logger log,
struct oxr_instance inst,
XrPath  path,
uint32_t  index 
)

◆ oxr_verify_subaction_paths_create()

XrResult oxr_verify_subaction_paths_create ( struct oxr_logger log,
struct oxr_instance inst,
uint32_t  countSubactionPaths,
const XrPath *  subactionPaths,
const char *  variable 
)

Verify a set of subaction paths for action creation.

Referenced by oxr_xrCreateAction().

◆ oxr_verify_XrGraphicsBindingOpenGLXlibKHR()

XrResult oxr_verify_XrGraphicsBindingOpenGLXlibKHR ( struct oxr_logger log,
const XrGraphicsBindingOpenGLXlibKHR *  next 
)

References oxr_error().

Referenced by oxr_verify_XrSessionCreateInfo().

◆ oxr_verify_XrGraphicsBindingVulkanKHR()

XrResult oxr_verify_XrGraphicsBindingVulkanKHR ( struct oxr_logger log,
const XrGraphicsBindingVulkanKHR *  next 
)

References oxr_error().

Referenced by oxr_verify_XrSessionCreateInfo().

◆ oxr_verify_XrSessionCreateInfo()

XrResult oxr_verify_XrSessionCreateInfo ( struct oxr_logger log,
const struct oxr_instance inst,
const XrSessionCreateInfo *  createInfo 
)