mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
ipc: Replace ipc_connection_t usage with struct ipc_connection
This commit is contained in:
parent
cf68e11b97
commit
687beddcca
|
@ -72,7 +72,7 @@ struct xrt_compositor_fd;
|
|||
/*!
|
||||
* Connection.
|
||||
*/
|
||||
typedef struct ipc_connection
|
||||
struct ipc_connection
|
||||
{
|
||||
int socket_fd;
|
||||
|
||||
|
@ -83,8 +83,7 @@ typedef struct ipc_connection
|
|||
|
||||
bool print_debug; // TODO: link to settings
|
||||
bool print_spew; // TODO: link to settings
|
||||
|
||||
} ipc_connection_t;
|
||||
};
|
||||
|
||||
/*!
|
||||
* @name IPC low-level interface
|
||||
|
@ -92,7 +91,9 @@ typedef struct ipc_connection
|
|||
* @{
|
||||
*/
|
||||
xrt_result_t
|
||||
ipc_client_send_message(ipc_connection_t *ipc_c, void *message, size_t size);
|
||||
ipc_client_send_message(struct ipc_connection *ipc_c,
|
||||
void *message,
|
||||
size_t size);
|
||||
|
||||
xrt_result_t
|
||||
ipc_client_send_and_get_reply(struct ipc_connection *ipc_c,
|
||||
|
@ -102,7 +103,7 @@ ipc_client_send_and_get_reply(struct ipc_connection *ipc_c,
|
|||
size_t reply_size);
|
||||
|
||||
xrt_result_t
|
||||
ipc_client_send_and_get_reply_fds(ipc_connection_t *ipc_c,
|
||||
ipc_client_send_and_get_reply_fds(struct ipc_connection *ipc_c,
|
||||
void *msg_ptr,
|
||||
size_t msg_size,
|
||||
void *reply_ptr,
|
||||
|
@ -120,17 +121,17 @@ ipc_client_send_and_get_reply_fds(ipc_connection_t *ipc_c,
|
|||
*/
|
||||
|
||||
int
|
||||
ipc_client_compositor_create(ipc_connection_t *ipc_c,
|
||||
ipc_client_compositor_create(struct ipc_connection *ipc_c,
|
||||
struct xrt_device *xdev,
|
||||
bool flip_y,
|
||||
struct xrt_compositor_fd **out_xcfd);
|
||||
|
||||
struct xrt_device *
|
||||
ipc_client_hmd_create(ipc_connection_t *ipc_c,
|
||||
ipc_client_hmd_create(struct ipc_connection *ipc_c,
|
||||
struct xrt_tracking_origin *xtrack,
|
||||
uint32_t device_id);
|
||||
|
||||
struct xrt_device *
|
||||
ipc_client_device_create(ipc_connection_t *ipc_c,
|
||||
ipc_client_device_create(struct ipc_connection *ipc_c,
|
||||
struct xrt_tracking_origin *xtrack,
|
||||
uint32_t device_id);
|
||||
|
|
|
@ -42,7 +42,7 @@ struct ipc_client_compositor
|
|||
{
|
||||
struct xrt_compositor_fd base;
|
||||
|
||||
ipc_connection_t *ipc_c;
|
||||
struct ipc_connection *ipc_c;
|
||||
|
||||
struct
|
||||
{
|
||||
|
@ -88,7 +88,7 @@ ipc_client_swapchain(struct xrt_swapchain *xs)
|
|||
*/
|
||||
|
||||
void
|
||||
compositor_disconnect(ipc_connection_t *ipc_c)
|
||||
compositor_disconnect(struct ipc_connection *ipc_c)
|
||||
{
|
||||
if (ipc_c->socket_fd < 0) {
|
||||
return;
|
||||
|
@ -458,7 +458,7 @@ ipc_compositor_destroy(struct xrt_compositor *xc)
|
|||
*/
|
||||
|
||||
int
|
||||
ipc_client_compositor_create(ipc_connection_t *ipc_c,
|
||||
ipc_client_compositor_create(struct ipc_connection *ipc_c,
|
||||
struct xrt_device *xdev,
|
||||
bool flip_y,
|
||||
struct xrt_compositor_fd **out_xcfd)
|
||||
|
|
|
@ -43,7 +43,7 @@ struct ipc_client_device
|
|||
{
|
||||
struct xrt_device base;
|
||||
|
||||
ipc_connection_t *ipc_c;
|
||||
struct ipc_connection *ipc_c;
|
||||
|
||||
uint32_t device_id;
|
||||
};
|
||||
|
@ -133,7 +133,7 @@ ipc_client_device_set_output(struct xrt_device *xdev,
|
|||
* @public @memberof ipc_client_device
|
||||
*/
|
||||
struct xrt_device *
|
||||
ipc_client_device_create(ipc_connection_t *ipc_c,
|
||||
ipc_client_device_create(struct ipc_connection *ipc_c,
|
||||
struct xrt_tracking_origin *xtrack,
|
||||
uint32_t device_id)
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ struct ipc_client_hmd
|
|||
{
|
||||
struct xrt_device base;
|
||||
|
||||
ipc_connection_t *ipc_c;
|
||||
struct ipc_connection *ipc_c;
|
||||
|
||||
uint32_t device_id;
|
||||
};
|
||||
|
@ -125,7 +125,7 @@ ipc_client_hmd_get_view_pose(struct xrt_device *xdev,
|
|||
* @public @memberof ipc_client_hmd
|
||||
*/
|
||||
struct xrt_device *
|
||||
ipc_client_hmd_create(ipc_connection_t *ipc_c,
|
||||
ipc_client_hmd_create(struct ipc_connection *ipc_c,
|
||||
struct xrt_tracking_origin *xtrack,
|
||||
uint32_t device_id)
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ struct ipc_client_instance
|
|||
//! @public Base
|
||||
struct xrt_instance base;
|
||||
|
||||
ipc_connection_t ipc_c;
|
||||
struct ipc_connection ipc_c;
|
||||
|
||||
struct xrt_tracking_origin *xtracks[8];
|
||||
size_t num_xtracks;
|
||||
|
@ -58,7 +58,7 @@ ipc_client_instance(struct xrt_instance *xinst)
|
|||
}
|
||||
|
||||
static bool
|
||||
ipc_connect(ipc_connection_t *ipc_c)
|
||||
ipc_connect(struct ipc_connection *ipc_c)
|
||||
{
|
||||
struct sockaddr_un addr;
|
||||
int ret;
|
||||
|
|
|
@ -75,7 +75,7 @@ ipc_client_send_and_get_reply(struct ipc_connection *ipc_c,
|
|||
}
|
||||
|
||||
xrt_result_t
|
||||
ipc_client_send_and_get_reply_fds(ipc_connection_t *ipc_c,
|
||||
ipc_client_send_and_get_reply_fds(struct ipc_connection *ipc_c,
|
||||
void *msg_ptr,
|
||||
size_t msg_size,
|
||||
void *reply_ptr,
|
||||
|
@ -138,7 +138,9 @@ ipc_client_send_and_get_reply_fds(ipc_connection_t *ipc_c,
|
|||
}
|
||||
|
||||
xrt_result_t
|
||||
ipc_client_send_message(ipc_connection_t *ipc_c, void *message, size_t size)
|
||||
ipc_client_send_message(struct ipc_connection *ipc_c,
|
||||
void *message,
|
||||
size_t size)
|
||||
{
|
||||
return ipc_client_send_and_get_reply(ipc_c, message, size, message,
|
||||
size);
|
||||
|
|
|
@ -27,7 +27,7 @@ typedef enum op_mode
|
|||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
ipc_connection_t ipc_c;
|
||||
struct ipc_connection ipc_c;
|
||||
os_mutex_init(&ipc_c.mutex);
|
||||
|
||||
op_mode_t op_mode = MODE_GET;
|
||||
|
|
Loading…
Reference in a new issue