Monado OpenXR Runtime
|
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"
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) |
File for verifying app input into api functions.
enum verify_state |
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().
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().
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().
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().
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.
References oxr_sub_paths::any, oxr_instance::gamepad, oxr_sub_paths::gamepad, oxr_instance::head, oxr_sub_paths::head, oxr_instance::left, oxr_sub_paths::left, oxr_error(), oxr_path_get_string(), oxr_instance::path_cache, oxr_instance::right, oxr_sub_paths::right, oxr_instance::user, and oxr_sub_paths::user.
Referenced by oxr_xrApplyHapticFeedback(), oxr_xrGetActionStateBoolean(), oxr_xrGetActionStateFloat(), oxr_xrGetActionStatePose(), oxr_xrGetActionStateVector2f(), and oxr_xrStopHapticFeedback().
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.
References oxr_instance::gamepad, oxr_instance::head, oxr_instance::left, oxr_error(), oxr_path_get_string(), oxr_instance::path_cache, oxr_instance::right, and oxr_instance::user.
Referenced by oxr_xrSyncActions().
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().
XrResult oxr_verify_XrGraphicsBindingOpenGLXlibKHR | ( | struct oxr_logger * | log, |
const XrGraphicsBindingOpenGLXlibKHR * | next | ||
) |
References oxr_error().
Referenced by oxr_verify_XrSessionCreateInfo().
XrResult oxr_verify_XrGraphicsBindingVulkanKHR | ( | struct oxr_logger * | log, |
const XrGraphicsBindingVulkanKHR * | next | ||
) |
References oxr_error().
Referenced by oxr_verify_XrSessionCreateInfo().
XrResult oxr_verify_XrSessionCreateInfo | ( | struct oxr_logger * | log, |
const struct oxr_instance * | inst, | ||
const XrSessionCreateInfo * | createInfo | ||
) |