]> git.sur5r.net Git - i3/i3/blobdiff - include/load_layout.h
Merge branch 'release-4.16.1'
[i3/i3] / include / load_layout.h
index f8b7da20a6f7ac58144f8cc53e0a891351a015bc..9205800f6fd3c4d390db4119010a702f3b6cd3d8 100644 (file)
@@ -10,6 +10,8 @@
  */
 #pragma once
 
+#include <config.h>
+
 typedef enum {
     // We could not determine the content of the JSON file. This typically
     // means it’s unreadable or contains garbage.
@@ -29,6 +31,12 @@ typedef enum {
  * determine whether the file contains workspaces or regular containers, which
  * is important to know when deciding where (and how) to append the contents.
  * */
-json_content_t json_determine_content(const char *filename);
+json_content_t json_determine_content(const char *buf, const size_t len);
+
+/**
+ * Returns true if the provided JSON could be parsed by yajl.
+ *
+ */
+bool json_validate(const char *buf, const size_t len);
 
-void tree_append_json(Con *con, const char *filename, char **errormsg);
+void tree_append_json(Con *con, const char *buf, const size_t len, char **errormsg);