aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-11-27 09:50:04 -0500
committerDrew DeVault <sir@cmpwn.com>2015-11-27 09:50:04 -0500
commit27f03c705d8851a8ef6ca9e8f7828c1a2bfd9a88 (patch)
tree740a9e384149879a2c106220212bef36c05f58f3 /include
parent5ae359279ba2b72acc93c907c31850e16d10b358 (diff)
Move IPC client into common, refactor IPC
Diffstat (limited to 'include')
-rw-r--r--include/ipc-client.h9
-rw-r--r--include/ipc-server.h13
-rw-r--r--include/ipc.h8
3 files changed, 22 insertions, 8 deletions
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