REORG: include: move vars.h to haproxy/vars{,-t}.h

A few includes (sessions.h, stream.h, api-t.h) were added for arguments
that were first declared in function prototypes.
diff --git a/include/haproxy/arg-t.h b/include/haproxy/arg-t.h
index d63d60f..a283eff 100644
--- a/include/haproxy/arg-t.h
+++ b/include/haproxy/arg-t.h
@@ -28,8 +28,8 @@
 #include <haproxy/buf-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/protobuf-t.h>
+#include <haproxy/vars-t.h>
 
-#include <types/vars.h>
 #include <types/stick_table.h>
 
 /* encoding of each arg type : up to 31 types are supported */
diff --git a/include/haproxy/vars-t.h b/include/haproxy/vars-t.h
new file mode 100644
index 0000000..0d8f337
--- /dev/null
+++ b/include/haproxy/vars-t.h
@@ -0,0 +1,57 @@
+/*
+ * include/haproxy/vars-t.h
+ * Macros and structures definitions for variables.
+ *
+ * Copyright (C) 2015 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_VARS_T_H
+#define _HAPROXY_VARS_T_H
+
+#include <haproxy/list-t.h>
+#include <haproxy/sample-t.h>
+#include <haproxy/thread-t.h>
+
+enum vars_scope {
+	SCOPE_SESS = 0,
+	SCOPE_TXN,
+	SCOPE_REQ,
+	SCOPE_RES,
+	SCOPE_PROC,
+	SCOPE_CHECK,
+};
+
+struct vars {
+	struct list head;
+	enum vars_scope scope;
+	unsigned int size;
+	__decl_thread(HA_RWLOCK_T rwlock);
+};
+
+/* This struct describes a variable. */
+struct var_desc {
+	const char *name; /* Contains the normalized variable name. */
+	enum vars_scope scope;
+};
+
+struct var {
+	struct list l; /* Used for chaining vars. */
+	const char *name; /* Contains the variable name. */
+	struct sample_data data; /* data storage. */
+};
+
+#endif
diff --git a/include/haproxy/vars.h b/include/haproxy/vars.h
new file mode 100644
index 0000000..32172a8
--- /dev/null
+++ b/include/haproxy/vars.h
@@ -0,0 +1,40 @@
+/*
+ * include/haproxy/vars.h
+ * Prototypes for variables.
+ *
+ * Copyright (C) 2015 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_VARS_H
+#define _HAPROXY_VARS_H
+
+#include <types/session.h>
+#include <types/stream.h>
+#include <haproxy/api-t.h>
+#include <haproxy/vars-t.h>
+
+void vars_init(struct vars *vars, enum vars_scope scope);
+void vars_prune(struct vars *vars, struct session *sess, struct stream *strm);
+void vars_prune_per_sess(struct vars *vars);
+int vars_get_by_name(const char *name, size_t len, struct sample *smp);
+int vars_set_by_name_ifexist(const char *name, size_t len, struct sample *smp);
+int vars_set_by_name(const char *name, size_t len, struct sample *smp);
+int vars_unset_by_name_ifexist(const char *name, size_t len, struct sample *smp);
+int vars_get_by_desc(const struct var_desc *var_desc, struct sample *smp);
+int vars_check_arg(struct arg *arg, char **err);
+
+#endif
diff --git a/include/proto/vars.h b/include/proto/vars.h
deleted file mode 100644
index 81f99df..0000000
--- a/include/proto/vars.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef _PROTO_VARS_H
-#define _PROTO_VARS_H
-
-#include <types/vars.h>
-
-void vars_init(struct vars *vars, enum vars_scope scope);
-void vars_prune(struct vars *vars, struct session *sess, struct stream *strm);
-void vars_prune_per_sess(struct vars *vars);
-int vars_get_by_name(const char *name, size_t len, struct sample *smp);
-int vars_set_by_name_ifexist(const char *name, size_t len, struct sample *smp);
-int vars_set_by_name(const char *name, size_t len, struct sample *smp);
-int vars_unset_by_name_ifexist(const char *name, size_t len, struct sample *smp);
-int vars_get_by_desc(const struct var_desc *var_desc, struct sample *smp);
-int vars_check_arg(struct arg *arg, char **err);
-
-#endif
diff --git a/include/types/global.h b/include/types/global.h
index f753660..56e7678 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -26,11 +26,11 @@
 
 #include <haproxy/api-t.h>
 #include <haproxy/thread.h>
+#include <haproxy/vars-t.h>
 
 #include <haproxy/freq_ctr-t.h>
 #include <types/proxy.h>
 #include <types/task.h>
-#include <types/vars.h>
 
 #ifndef UNIX_MAX_PATH
 #define UNIX_MAX_PATH 108
diff --git a/include/types/session.h b/include/types/session.h
index 66911f3..70d10a8 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -31,11 +31,11 @@
 #include <haproxy/api-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/vars-t.h>
 
 #include <types/proxy.h>
 #include <types/stick_table.h>
 #include <types/task.h>
-#include <types/vars.h>
 
 struct sess_srv_list {
 	void *target;
diff --git a/include/types/stream.h b/include/types/stream.h
index e86b6d6..8870842 100644
--- a/include/types/stream.h
+++ b/include/types/stream.h
@@ -33,6 +33,7 @@
 #include <haproxy/hlua-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/obj_type-t.h>
+#include <haproxy/vars-t.h>
 
 #include <types/channel.h>
 #include <types/filters.h>
@@ -44,7 +45,6 @@
 #include <types/stream_interface.h>
 #include <types/task.h>
 #include <types/stick_table.h>
-#include <types/vars.h>
 
 /* Various Stream Flags, bits values 0x01 to 0x100 (shift 0) */
 #define SF_DIRECT	0x00000001	/* connection made on the server matching the client cookie */
diff --git a/include/types/vars.h b/include/types/vars.h
deleted file mode 100644
index d8ec71c..0000000
--- a/include/types/vars.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef _TYPES_VARS_H
-#define _TYPES_VARS_H
-
-#include <haproxy/list-t.h>
-#include <haproxy/thread.h>
-
-#include <haproxy/sample-t.h>
-
-enum vars_scope {
-	SCOPE_SESS = 0,
-	SCOPE_TXN,
-	SCOPE_REQ,
-	SCOPE_RES,
-	SCOPE_PROC,
-	SCOPE_CHECK,
-};
-
-struct vars {
-	struct list head;
-	enum vars_scope scope;
-	unsigned int size;
-	__decl_thread(HA_RWLOCK_T rwlock);
-};
-
-/* This struct describes a variable. */
-struct var_desc {
-	const char *name; /* Contains the normalized variable name. */
-	enum vars_scope scope;
-};
-
-struct var {
-	struct list l; /* Used for chaining vars. */
-	const char *name; /* Contains the variable name. */
-	struct sample_data data; /* data storage. */
-};
-
-#endif