From 5be0767aa9379a0c5a0cfe9f908f8153e8d7e6a5 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Mon, 31 Jul 2023 17:00:17 +0100 Subject: [PATCH] ipc: Add a interface header for ipc_instance_create --- src/xrt/ipc/client/ipc_client_instance.c | 1 + src/xrt/ipc/client/ipc_client_interface.h | 33 +++++++++++++++++++++++ src/xrt/targets/openxr/target.c | 4 +-- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 src/xrt/ipc/client/ipc_client_interface.h diff --git a/src/xrt/ipc/client/ipc_client_instance.c b/src/xrt/ipc/client/ipc_client_instance.c index 75146361c..38c194a51 100644 --- a/src/xrt/ipc/client/ipc_client_instance.c +++ b/src/xrt/ipc/client/ipc_client_instance.c @@ -27,6 +27,7 @@ #include "shared/ipc_protocol.h" #include "shared/ipc_shmem.h" #include "client/ipc_client.h" +#include "client/ipc_client_interface.h" #include "client/ipc_client_connection.h" #include "ipc_client_generated.h" diff --git a/src/xrt/ipc/client/ipc_client_interface.h b/src/xrt/ipc/client/ipc_client_interface.h new file mode 100644 index 000000000..434400671 --- /dev/null +++ b/src/xrt/ipc/client/ipc_client_interface.h @@ -0,0 +1,33 @@ +// Copyright 2020-2023, Collabora, Ltd. +// SPDX-License-Identifier: BSL-1.0 +/*! + * @file + * @brief Interface for IPC client instance code. + * @author Pete Black + * @author Jakob Bornecrantz + * @ingroup ipc_client + */ + +#include "xrt/xrt_results.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +struct xrt_instance; +struct xrt_instance_info; + +/*! + * Create a IPC client instance, connects to a IPC server. + * + * @see ipc_design + * @ingroup ipc_client + */ +xrt_result_t +ipc_instance_create(struct xrt_instance_info *ii, struct xrt_instance **out_xinst); + + +#ifdef __cplusplus +} +#endif diff --git a/src/xrt/targets/openxr/target.c b/src/xrt/targets/openxr/target.c index 6e79a6783..df1c80e74 100644 --- a/src/xrt/targets/openxr/target.c +++ b/src/xrt/targets/openxr/target.c @@ -17,10 +17,8 @@ U_TRACE_TARGET_SETUP(U_TRACE_WHICH_OPENXR) #include "xrt/xrt_instance.h" +#include "client/ipc_client_interface.h" -// Forward declaration -xrt_result_t -ipc_instance_create(struct xrt_instance_info *i_info, struct xrt_instance **out_xinst); xrt_result_t xrt_instance_create(struct xrt_instance_info *ii, struct xrt_instance **out_xinst)