Monado OpenXR Runtime
blockqueue.hpp
Go to the documentation of this file.
1// Copyright 2023, Shawn Wallace
2// SPDX-License-Identifier: BSL-1.0
3/*!
4 * @file
5 * @brief OpenVR IVRBlockQueue interface header.
6 * @author Shawn Wallace <yungwallace@live.com>
7 * @ingroup drv_steamvr_lh
8 */
9
10#pragma once
11
12#include "openvr_driver.h"
13
14/** Definitions missing from C++ header, present in C */
15namespace vr {
16inline const char *IVRBlockQueue_Version = "IVRBlockQueue_005";
17
18typedef enum EBlockQueueError
19{
20 EBlockQueueError_BlockQueueError_None = 0,
21 EBlockQueueError_BlockQueueError_QueueAlreadyExists = 1,
22 EBlockQueueError_BlockQueueError_QueueNotFound = 2,
23 EBlockQueueError_BlockQueueError_BlockNotAvailable = 3,
24 EBlockQueueError_BlockQueueError_InvalidHandle = 4,
25 EBlockQueueError_BlockQueueError_InvalidParam = 5,
26 EBlockQueueError_BlockQueueError_ParamMismatch = 6,
27 EBlockQueueError_BlockQueueError_InternalError = 7,
28 EBlockQueueError_BlockQueueError_AlreadyInitialized = 8,
29 EBlockQueueError_BlockQueueError_OperationIsServerOnly = 9,
30 EBlockQueueError_BlockQueueError_TooManyConnections = 10,
31} EBlockQueueError;
32
33typedef enum EBlockQueueReadType
34{
35 EBlockQueueReadType_BlockQueueRead_Latest = 0,
36 EBlockQueueReadType_BlockQueueRead_New = 1,
37 EBlockQueueReadType_BlockQueueRead_Next = 2,
38} EBlockQueueReadType;
39} // namespace vr
40
41/** This interface is missing in the C++ header but present in the C one, and the lighthouse driver requires it. */
43{
44public:
45 virtual vr::EBlockQueueError
46 Create(vr::PropertyContainerHandle_t *pulQueueHandle,
47 char *pchPath,
48 uint32_t unBlockDataSize,
49 uint32_t unBlockHeaderSize,
50 uint32_t unBlockCount,
51 uint32_t unFlags);
52 virtual vr::EBlockQueueError
53 Connect(vr::PropertyContainerHandle_t *pulQueueHandle, char *pchPath);
54 virtual vr::EBlockQueueError
55 Destroy(vr::PropertyContainerHandle_t ulQueueHandle);
56 virtual vr::EBlockQueueError
57 AcquireWriteOnlyBlock(vr::PropertyContainerHandle_t ulQueueHandle,
58 vr::PropertyContainerHandle_t *pulBlockHandle,
59 void **ppvBuffer);
60 virtual vr::EBlockQueueError
61 ReleaseWriteOnlyBlock(vr::PropertyContainerHandle_t ulQueueHandle, vr::PropertyContainerHandle_t ulBlockHandle);
62 virtual vr::EBlockQueueError
63 WaitAndAcquireReadOnlyBlock(vr::PropertyContainerHandle_t ulQueueHandle,
64 vr::PropertyContainerHandle_t *pulBlockHandle,
65 void **ppvBuffer,
66 vr::EBlockQueueReadType eReadType,
67 uint32_t unTimeoutMs);
68 virtual vr::EBlockQueueError
69 AcquireReadOnlyBlock(vr::PropertyContainerHandle_t ulQueueHandle,
70 vr::PropertyContainerHandle_t *pulBlockHandle,
71 void **ppvBuffer,
72 vr::EBlockQueueReadType eReadType);
73 virtual vr::EBlockQueueError
74 ReleaseReadOnlyBlock(vr::PropertyContainerHandle_t ulQueueHandle, vr::PropertyContainerHandle_t ulBlockHandle);
75 virtual vr::EBlockQueueError
76 QueueHasReader(vr::PropertyContainerHandle_t ulQueueHandle, bool *pbHasReaders);
77};
This interface is missing in the C++ header but present in the C one, and the lighthouse driver requi...
Definition: blockqueue.hpp:43
Definitions missing from C++ header, present in C.
Definition: blockqueue.hpp:15