Monado OpenXR Runtime
Loading...
Searching...
No Matches
ipc_client_interface.h
Go to the documentation of this file.
1// Copyright 2020-2023, Collabora, Ltd.
2// Copyright 2026, NVIDIA CORPORATION.
3// SPDX-License-Identifier: BSL-1.0
4/*!
5 * @file
6 * @brief Interface for IPC client instance code.
7 * @author Pete Black <pblack@collabora.com>
8 * @author Jakob Bornecrantz <jakob@collabora.com>
9 * @ingroup ipc_client
10 */
11
12#pragma once
13
14#include "xrt/xrt_results.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20
21struct xrt_instance;
23
24/*!
25 * Connection parameters chosen by the target that loads the IPC client.
26 *
27 * @ingroup ipc_client
28 */
30{
31 //! Socket filename (named pipe name on Windows) in the runtime dir, required except on Android.
32 const char *socket_filename;
33
34 //! Windows only: service executable to launch if no service is running, NULL disables launching.
35 const char *service_executable;
36};
37
38/*!
39 * Create a IPC client instance, connects to a IPC server.
40 *
41 * @param icci Which service to connect to, except on Android it must be set and have a socket_filename.
42 * @param i_info Instance info to send to the service.
43 * @param out_xinst Pointer to receive the created instance.
44 * @return XRT_SUCCESS on success, XRT_ERROR_INVALID_ARGUMENT if @p icci or its socket_filename is missing.
45 *
46 * @see ipc_design
47 * @ingroup ipc_client
48 */
51 const struct xrt_instance_info *i_info,
52 struct xrt_instance **out_xinst);
53
54
55#ifdef __cplusplus
56}
57#endif
xrt_result_t ipc_instance_create(const struct ipc_client_connection_info *icci, const struct xrt_instance_info *i_info, struct xrt_instance **out_xinst)
Create a IPC client instance, connects to a IPC server.
enum xrt_result xrt_result_t
Result type used across Monado.
Connection parameters chosen by the target that loads the IPC client.
Definition ipc_client_interface.h:30
const char * socket_filename
Socket filename (named pipe name on Windows) in the runtime dir, required except on Android.
Definition ipc_client_interface.h:32
const char * service_executable
Windows only: service executable to launch if no service is running, NULL disables launching.
Definition ipc_client_interface.h:35
Information provided by the application at instance create time.
Definition xrt_instance.h:98
This interface acts as a root object for Monado.
Definition xrt_instance.h:124
Internal result type for XRT.