REORG: include: move hlua.h to haproxy/hlua{,-t}.h
This one required a few more includes as it uses list and ebpt_node.
It still references lots of types/ files for now.
diff --git a/include/types/hlua.h b/include/haproxy/hlua-t.h
similarity index 81%
rename from include/types/hlua.h
rename to include/haproxy/hlua-t.h
index 990f9bc..a49de51 100644
--- a/include/types/hlua.h
+++ b/include/haproxy/hlua-t.h
@@ -1,11 +1,35 @@
-#ifndef _TYPES_HLUA_H
-#define _TYPES_HLUA_H
+/*
+ * include/haproxy/hlua-t.h
+ * Lua core types definitions
+ *
+ * Copyright (C) 2015-2016 Thierry Fournier <tfournier@arpalert.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _HAPROXY_HLUA_T_H
+#define _HAPROXY_HLUA_T_H
#ifdef USE_LUA
#include <lua.h>
#include <lauxlib.h>
+#include <import/ebpttree.h>
+
+#include <haproxy/list-t.h>
#include <haproxy/regex-t.h>
#include <haproxy/xref-t.h>
@@ -168,6 +192,7 @@
};
#else /* USE_LUA */
+/************************ For use when Lua is disabled ********************/
/* Empty struct for compilation compatibility */
struct hlua { };
@@ -176,4 +201,4 @@
#endif /* USE_LUA */
-#endif /* _TYPES_HLUA_H */
+#endif /* _HAPROXY_HLUA_T_H */
diff --git a/include/proto/hlua.h b/include/haproxy/hlua.h
similarity index 62%
rename from include/proto/hlua.h
rename to include/haproxy/hlua.h
index 32468b7..5d1153b 100644
--- a/include/proto/hlua.h
+++ b/include/haproxy/hlua.h
@@ -1,11 +1,30 @@
-#ifndef _PROTO_HLUA_H
-#define _PROTO_HLUA_H
+/*
+ * include/haproxy/hlua.h
+ * Lua core management functions
+ *
+ * Copyright (C) 2015-2016 Thierry Fournier <tfournier@arpalert.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
-#ifdef USE_LUA
+#ifndef _HAPROXY_HLUA_H
+#define _HAPROXY_HLUA_H
-#include <lua.h>
+#include <haproxy/hlua-t.h>
-#include <types/hlua.h>
+#ifdef USE_LUA
/* The following macros are used to set flags. */
#define HLUA_SET_RUN(__hlua) do {(__hlua)->flags |= HLUA_RUN;} while(0)
@@ -33,6 +52,8 @@
#else /* USE_LUA */
+/************************ For use when Lua is disabled ********************/
+
#define HLUA_IS_RUNNING(__hlua) 0
#define HLUA_INIT(__hlua)
@@ -44,4 +65,4 @@
#endif /* USE_LUA */
-#endif /* _PROTO_HLUA_H */
+#endif /* _HAPROXY_HLUA_H */
diff --git a/include/types/applet.h b/include/types/applet.h
index d6b34a3..a67827b 100644
--- a/include/types/applet.h
+++ b/include/types/applet.h
@@ -26,8 +26,8 @@
#include <haproxy/buf.h>
#include <haproxy/dynbuf-t.h>
#include <haproxy/freq_ctr-t.h>
+#include <haproxy/hlua-t.h>
#include <haproxy/xref-t.h>
-#include <types/hlua.h>
#include <types/obj_type.h>
#include <types/proxy.h>
#include <types/stream.h>
diff --git a/include/types/stream.h b/include/types/stream.h
index 08e0f12..c7db75e 100644
--- a/include/types/stream.h
+++ b/include/types/stream.h
@@ -30,11 +30,11 @@
#include <haproxy/api-t.h>
#include <haproxy/dynbuf-t.h>
+#include <haproxy/hlua-t.h>
#include <haproxy/list-t.h>
#include <types/channel.h>
#include <types/filters.h>
-#include <types/hlua.h>
#include <types/obj_type.h>
#include <types/http_ana.h>
#include <types/proxy.h>