File for verifying app input into api functions.
More...
#include "xrt/xrt_compiler.h"
#include "math/m_mathinclude.h"
#include "util/u_debug.h"
#include "oxr_objects.h"
#include "oxr_logger.h"
#include "oxr_api_verify.h"
#include "oxr_chain.h"
#include "oxr_subaction.h"
#include <assert.h>
#include <stdio.h>
#include <string.h>
|
#define | HANDLE_SUBACTION_PATH(X) |
|
#define | GET_PATH(X) |
|
#define | CHECK_CREATION_TIME(X) |
|
|
enum | verify_state { VERIFY_START
, VERIFY_MIDDLE
, VERIFY_SLASH
, VERIFY_SLASHDOTS
} |
|
|
static bool | valid_path_char (const char c) |
|
static bool | contains_zero (const char *path, uint32_t size) |
|
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...
|
|
static XrResult | subaction_path_no_dups (struct oxr_logger *log, struct oxr_instance *inst, struct oxr_subaction_paths *subaction_paths, XrPath path, const char *variable, uint32_t index) |
|
◆ CHECK_CREATION_TIME
#define CHECK_CREATION_TIME |
( |
|
X | ) |
|
Value: if (subaction_paths.X && !act_subaction_paths->X) { \
fail = true; \
}
◆ GET_PATH
Value: else if (path == inst->path_cache.X) \
{ \
subaction_paths.X = true; \
}
◆ HANDLE_SUBACTION_PATH
#define HANDLE_SUBACTION_PATH |
( |
|
X | ) |
|
Value: if (path == inst->path_cache.X) { \
if (subaction_paths->X) { \
duplicate = true; \
} else { \
subaction_paths->X = true; \
} \
} else