mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
ipc: Add a interface header for ipc_server_main[_android]
This commit is contained in:
parent
5be0767aa9
commit
3de99b63d9
|
@ -355,31 +355,6 @@ struct ipc_server
|
|||
};
|
||||
|
||||
|
||||
#ifndef XRT_OS_ANDROID
|
||||
/*!
|
||||
* Main entrypoint to the compositor process.
|
||||
*
|
||||
* @ingroup ipc_server
|
||||
*/
|
||||
int
|
||||
ipc_server_main(int argc, char **argv);
|
||||
#endif
|
||||
|
||||
#ifdef XRT_OS_ANDROID
|
||||
/*!
|
||||
* Main entrypoint to the server process.
|
||||
*
|
||||
* @param ps Pointer to populate with the server struct.
|
||||
* @param startup_complete_callback Function to call upon completing startup and populating *ps, but before entering the
|
||||
* mainloop.
|
||||
* @param data user data to pass to your callback.
|
||||
*
|
||||
* @ingroup ipc_server
|
||||
*/
|
||||
int
|
||||
ipc_server_main_android(struct ipc_server **ps, void (*startup_complete_callback)(void *data), void *data);
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* Get the current state of a client.
|
||||
*
|
||||
|
|
54
src/xrt/ipc/server/ipc_server_interface.h
Normal file
54
src/xrt/ipc/server/ipc_server_interface.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
// Copyright 2020-2023, Collabora, Ltd.
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/*!
|
||||
* @file
|
||||
* @brief Interface for IPC server code.
|
||||
* @author Pete Black <pblack@collabora.com>
|
||||
* @author Jakob Bornecrantz <jakob@collabora.com>
|
||||
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
* @ingroup ipc_server
|
||||
*/
|
||||
|
||||
#include "xrt/xrt_compiler.h"
|
||||
#include "xrt/xrt_config_os.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef XRT_OS_ANDROID
|
||||
|
||||
/*!
|
||||
* Main entrypoint to the compositor process.
|
||||
*
|
||||
* @ingroup ipc_server
|
||||
*/
|
||||
int
|
||||
ipc_server_main(int argc, char **argv);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef XRT_OS_ANDROID
|
||||
|
||||
/*!
|
||||
* Main entrypoint to the server process.
|
||||
*
|
||||
* @param ps Pointer to populate with the server struct.
|
||||
* @param startup_complete_callback Function to call upon completing startup
|
||||
* and populating *ps, but before entering
|
||||
* the mainloop.
|
||||
* @param data user data to pass to your callback.
|
||||
*
|
||||
* @ingroup ipc_server
|
||||
*/
|
||||
int
|
||||
ipc_server_main_android(struct ipc_server **ps, void (*startup_complete_callback)(void *data), void *data);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "shared/ipc_shmem.h"
|
||||
#include "server/ipc_server.h"
|
||||
#include "server/ipc_server_interface.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "wrap/android.view.h"
|
||||
|
||||
#include "server/ipc_server.h"
|
||||
#include "server/ipc_server_interface.h"
|
||||
#include "server/ipc_server_mainloop_android.h"
|
||||
#include "util/u_logging.h"
|
||||
|
||||
|
|
|
@ -18,15 +18,14 @@
|
|||
#include "util/u_windows.h"
|
||||
#endif
|
||||
|
||||
#include "server/ipc_server_interface.h"
|
||||
|
||||
#include "target_lists.h"
|
||||
|
||||
|
||||
// Insert the on load constructor to init trace marker.
|
||||
U_TRACE_TARGET_SETUP(U_TRACE_WHICH_SERVICE)
|
||||
|
||||
int
|
||||
ipc_server_main(int argc, char *argv[]);
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
Loading…
Reference in a new issue