···2424#include "shared/ipc_protocol.h"
2525#include "shared/ipc_message_channel.h"
26262727+#include "ipc_server_interface.h"
2828+2729#include <stdio.h>
28302931···411413412414 struct os_mutex lock;
413415 } global_state;
416416+417417+ /*!
418418+ * Callbacks for server events.
419419+ */
420420+ const struct ipc_server_callbacks *callbacks;
421421+422422+ /*!
423423+ * User data passed to callbacks.
424424+ */
425425+ void *callback_data;
414426};
415427416428/*!
+18
src/xrt/ipc/server/ipc_server_interface.h
···7373 * @param[in] data User data given passed into the main function.
7474 */
7575 void (*mainloop_leaving)(struct ipc_server *s, struct xrt_instance *xinst, void *data);
7676+7777+ /*!
7878+ * A new client has connected to the IPC server.
7979+ *
8080+ * param s The IPC server.
8181+ * param client_id The ID of the newly connected client.
8282+ * param data User data given passed into the main function.
8383+ */
8484+ void (*client_connected)(struct ipc_server *s, uint32_t client_id, void *data);
8585+8686+ /*!
8787+ * A client has disconnected from the IPC server.
8888+ *
8989+ * param s The IPC server.
9090+ * param client_id The ID of the newly connected client.
9191+ * param data User data given passed into the main function.
9292+ */
9393+ void (*client_disconnected)(struct ipc_server *s, uint32_t client_id, void *data);
7694};
77957896/*!