From 062c74b7d01a543c69d206a036deff75bc9f7cf1 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 27 Nov 2015 10:10:29 -0500 Subject: Add command line to swaygrab Also modifies IPC client so that we can work with persistent connections. --- include/ipc-client.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'include/ipc-client.h') diff --git a/include/ipc-client.h b/include/ipc-client.h index a56fee43..e6c988c2 100644 --- a/include/ipc-client.h +++ b/include/ipc-client.h @@ -3,7 +3,18 @@ #include "ipc.h" +/** + * Gets the path to the IPC socket from sway. + */ char *get_socketpath(void); -char *ipc_single_command(const char *socket_path, uint32_t type, const char *payload, uint32_t len); +/** + * Opens the sway socket. + */ +int ipc_open_socket(const char *socket_path); +/** + * Issues a single IPC command and returns the buffer. len will be updated with + * the length of the buffer returned from sway. + */ +char *ipc_single_command(int socketfd, uint32_t type, const char *payload, uint32_t *len); #endif -- cgit v1.2.3-54-g00ecf