MINOR: obj: introduce a new type appctx

The object type was added to "struct appctx". The purpose will be
to identify an appctx when the applet context is detached from the
stream interface. For now, it's still attached, so this patch only
adds the new type and does not replace its use.
diff --git a/include/proto/obj_type.h b/include/proto/obj_type.h
index 8b180f2..a02e1d6 100644
--- a/include/proto/obj_type.h
+++ b/include/proto/obj_type.h
@@ -45,6 +45,7 @@
 	case OBJ_TYPE_PROXY:    return "PROXY";
 	case OBJ_TYPE_SERVER:   return "SERVER";
 	case OBJ_TYPE_APPLET:   return "APPLET";
+	case OBJ_TYPE_APPCTX:   return "APPCTX";
 	case OBJ_TYPE_CONN:     return "CONN";
 	default:                return "NONE";
 	}
@@ -105,6 +106,18 @@
 	return __objt_applet(t);
 }
 
+static inline struct appctx *__objt_appctx(enum obj_type *t)
+{
+	return container_of(t, struct appctx, obj_type);
+}
+
+static inline struct appctx *objt_appctx(enum obj_type *t)
+{
+	if (!t || *t != OBJ_TYPE_APPCTX)
+		return NULL;
+	return __objt_appctx(t);
+}
+
 static inline struct connection *__objt_conn(enum obj_type *t)
 {
 	return container_of(t, struct connection, obj_type);
@@ -124,6 +137,7 @@
 	case OBJ_TYPE_PROXY:    return __objt_proxy(t);
 	case OBJ_TYPE_SERVER:   return __objt_server(t);
 	case OBJ_TYPE_APPLET:   return __objt_applet(t);
+	case OBJ_TYPE_APPCTX:   return __objt_appctx(t);
 	case OBJ_TYPE_CONN:     return __objt_conn(t);
 	default:                return NULL;
 	}
diff --git a/include/types/obj_type.h b/include/types/obj_type.h
index 88d8973..09eaf43 100644
--- a/include/types/obj_type.h
+++ b/include/types/obj_type.h
@@ -37,6 +37,7 @@
 	OBJ_TYPE_PROXY,        /* object is a struct proxy */
 	OBJ_TYPE_SERVER,       /* object is a struct server */
 	OBJ_TYPE_APPLET,       /* object is a struct si_applet */
+	OBJ_TYPE_APPCTX,       /* object is a struct appctx */
 	OBJ_TYPE_CONN,         /* object is a struct connection */
 	OBJ_TYPE_ENTRIES       /* last one : number of entries */
 };
diff --git a/include/types/stream_interface.h b/include/types/stream_interface.h
index 1c986ba..1af5be5 100644
--- a/include/types/stream_interface.h
+++ b/include/types/stream_interface.h
@@ -91,6 +91,7 @@
 
 /* Context of a running applet. */
 struct appctx {
+	enum obj_type obj_type;    /* OBJ_TYPE_APPCTX */
 	unsigned int st0;          /* CLI state for stats, session state for peers */
 	unsigned int st1;          /* prompt for stats, session error for peers */
 	unsigned int st2;          /* output state for stats, unused by peers  */