From 27f03c705d8851a8ef6ca9e8f7828c1a2bfd9a88 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 27 Nov 2015 09:50:04 -0500 Subject: Move IPC client into common, refactor IPC --- include/ipc-client.h | 9 +++++++++ include/ipc-server.h | 13 +++++++++++++ include/ipc.h | 8 -------- 3 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 include/ipc-client.h create mode 100644 include/ipc-server.h (limited to 'include') diff --git a/include/ipc-client.h b/include/ipc-client.h new file mode 100644 index 00000000..a56fee43 --- /dev/null +++ b/include/ipc-client.h @@ -0,0 +1,9 @@ +#ifndef _SWAY_IPC_CLIENT_H +#define _SWAY_IPC_CLIENT_H + +#include "ipc.h" + +char *get_socketpath(void); +char *ipc_single_command(const char *socket_path, uint32_t type, const char *payload, uint32_t len); + +#endif diff --git a/include/ipc-server.h b/include/ipc-server.h new file mode 100644 index 00000000..35b3748b --- /dev/null +++ b/include/ipc-server.h @@ -0,0 +1,13 @@ +#ifndef _SWAY_IPC_SERVER_H +#define _SWAY_IPC_SERVER_H + +#include "container.h" +#include "ipc.h" + +void ipc_init(void); +void ipc_terminate(void); +struct sockaddr_un *ipc_user_sockaddr(void); + +void ipc_event_workspace(swayc_t *old, swayc_t *new); + +#endif diff --git a/include/ipc.h b/include/ipc.h index 02aa1c1e..75be58a6 100644 --- a/include/ipc.h +++ b/include/ipc.h @@ -1,8 +1,6 @@ #ifndef _SWAY_IPC_H #define _SWAY_IPC_H -#include "container.h" - enum ipc_command_type { IPC_COMMAND = 0, IPC_GET_WORKSPACES = 1, @@ -15,10 +13,4 @@ enum ipc_command_type { IPC_SWAY_GET_PIXELS = 0x81 }; -void ipc_init(void); -void ipc_terminate(void); -struct sockaddr_un *ipc_user_sockaddr(void); - -void ipc_event_workspace(swayc_t *old, swayc_t *new); - #endif -- cgit v1.2.3