--- /dev/null
+/*\r
+ * GPAC - Multimedia Framework C SDK\r
+ *\r
+ * Copyright (c) Jean Le Feuvre 2000-2005\r
+ * All rights reserved\r
+ *\r
+ * This file is part of GPAC / modules interfaces\r
+ *\r
+ * GPAC is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU Lesser General Public License as published by\r
+ * the Free Software Foundation; either version 2, or (at your option)\r
+ * any later version.\r
+ * \r
+ * GPAC is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU Lesser General Public License for more details.\r
+ * \r
+ * You should have received a copy of the GNU Lesser General Public\r
+ * License along with this library; see the file COPYING. If not, write to\r
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
+ *\r
+ */\r
+\r
+\r
+#ifndef _GF_MODULE_TERM_EXT_H_\r
+#define _GF_MODULE_TERM_EXT_H_\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
+#include <gpac/terminal.h>\r
+\r
+/*interface name and version for Terminal Extensions services*/\r
+#define GF_TERM_EXT_INTERFACE GF_4CC('G','T','E', 0x01)\r
+\r
+typedef struct _term_ext GF_TermExt;\r
+\r
+\r
+enum\r
+{\r
+ /*start terminal extension. If 0 is returned, the module will be unloaded*/\r
+ GF_TERM_EXT_START = 1,\r
+ /*stop terminal extension*/\r
+ GF_TERM_EXT_STOP,\r
+ /*process extension - the GF_TERM_EXT_CAP_NOT_THREADED capability MUST be set*/\r
+ GF_TERM_EXT_PROCESS,\r
+};\r
+\r
+enum\r
+{\r
+ /*signal the extension is to be called on regular basis (once per simulation tick). This MUST be set during\r
+ the GF_TERM_EXT_START command and cannot be changed at run-time*/\r
+ GF_TERM_EXT_CAP_NOT_THREADED = 1<<1,\r
+};\r
+\r
+\r
+struct _term_ext\r
+{\r
+ /* interface declaration*/\r
+ GF_DECL_MODULE_INTERFACE\r
+\r
+ /*caps of the module*/\r
+ u32 caps;\r
+\r
+ /*load JS extension\r
+ termext: pointer to the module\r
+ term: pointer to GPAC terminal\r
+ */\r
+ Bool (*process)(GF_TermExt *termext, GF_Terminal *term, u32 action);\r
+\r
+ /*module private*/\r
+ void *udta;\r
+};\r
+\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
+\r
+#endif /*#define _GF_MODULE_TERM_EXT_H_*/\r
+\r