浏览代码

app_python3: removal of legacy modules

S-P Chan 11 月之前
父节点
当前提交
16876cf3f8

+ 1 - 17
src/modules/app_python3/app_python3_mod.c

@@ -29,16 +29,10 @@
 #include "../../core/cfg/cfg_struct.h"
 
 #include "python_exec.h"
-#include "python_iface.h"
 #include "python_msgobj.h"
 #include "python_support.h"
 #include "app_python3_mod.h"
 
-#include "mod_Router.h"
-#include "mod_Core.h"
-#include "mod_Ranks.h"
-#include "mod_Logger.h"
-
 #include "apy_kemi.h"
 
 MODULE_VERSION
@@ -228,11 +222,6 @@ static void mod_destroy(void)
 		free(dname); // dname was strdup'ed
 	if(bname)
 		free(bname); // bname was strdup'ed
-
-	destroy_mod_Core();
-	destroy_mod_Ranks();
-	destroy_mod_Logger();
-	destroy_mod_Router();
 }
 
 
@@ -372,7 +361,7 @@ int apy_load_script(void)
 	PyGILState_STATE gstate;
 	int rc, rval = -1;
 
-	if(ap_init_modules() != 0) {
+	if(sr_apy_init_ksr() != 0) {
 		return -1;
 	}
 
@@ -386,15 +375,10 @@ int apy_load_script(void)
 
 	// Py3 does not create a package-like hierarchy of modules
 	// make legacy modules importable using Py2 syntax
-	// import Router.Logger
 
 	rc = PyRun_SimpleString("import sys\n"
-							"import Router\n"
 							"import KSR\n"
 							"KSR.__version__ = " INTERNAL_VERSION
-							"sys.modules['Router.Core'] = Router.Core\n"
-							"sys.modules['Router.Logger'] = Router.Logger\n"
-							"sys.modules['Router.Ranks'] = Router.Ranks\n"
 							"sys.modules['KSR.pv'] = KSR.pv\n"
 							"sys.modules['KSR.x'] = KSR.x\n");
 	if(rc) {

+ 0 - 68
src/modules/app_python3/mod_Core.c

@@ -1,68 +0,0 @@
-/**
- * Copyright (C) 2012 Konstantin Mosesov
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- *
- * This file 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-// Python includes
-#include <Python.h>
-#include "structmember.h"
-
-// Other/system includes
-#include <libgen.h>
-
-// router includes
-#include "../../core/str.h"
-#include "../../core/sr_module.h"
-
-// local includes
-#include "python_exec.h"
-#include "app_python3_mod.h"
-#include "python_iface.h"
-#include "python_msgobj.h"
-#include "python_support.h"
-
-#include "mod_Router.h"
-#include "mod_Core.h"
-
-PyObject *_sr_apy_core_module = NULL;
-
-PyMethodDef CoreMethods[] = {{NULL, NULL, 0, NULL}};
-
-static struct PyModuleDef Router_Core_moduledef = {PyModuleDef_HEAD_INIT,
-		"Router.Core", NULL, -1, CoreMethods, NULL, NULL, NULL, NULL};
-
-PyObject *get_core_module(void)
-{
-	_sr_apy_core_module = PyModule_Create(&Router_Core_moduledef);
-
-#ifdef WITH_EXTRA_DEBUG
-	LM_ERR("Module 'Router.Core' has been initialized\n");
-#endif
-
-	return _sr_apy_core_module;
-}
-
-void destroy_mod_Core(void)
-{
-	Py_XDECREF(_sr_apy_core_module);
-#ifdef WITH_EXTRA_DEBUG
-	LM_ERR("Module 'Router.Core' has been destroyed\n");
-#endif
-}

+ 0 - 36
src/modules/app_python3/mod_Core.h

@@ -1,36 +0,0 @@
-/**
- * Copyright (C) 2012 Konstantin Mosesov
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- *
- * This file 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifndef __API__MOD_CORE_H__
-#define __API__MOD_CORE_H__
-
-#include <Python.h>
-#include <libgen.h>
-
-extern PyObject *_sr_apy_core_module;
-
-extern PyMethodDef CoreMethods[];
-
-void init_mod_Core(void);
-void destroy_mod_Core(void);
-
-#endif

+ 0 - 266
src/modules/app_python3/mod_Logger.c

@@ -1,266 +0,0 @@
-/**
- * Copyright (C) 2012 Konstantin Mosesov
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- *
- * This file 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-// Python includes
-#include <Python.h>
-#include "structmember.h"
-
-// Other/system includes
-#include <libgen.h>
-
-// router includes
-#include "../../core/str.h"
-#include "../../core/sr_module.h"
-
-// local includes
-#include "python_exec.h"
-#include "app_python3_mod.h"
-#include "python_iface.h"
-#include "python_msgobj.h"
-#include "python_support.h"
-
-#include "mod_Router.h"
-#include "mod_Logger.h"
-
-PyObject *_sr_apy_logger_module = NULL;
-
-/*
- * Python method: LM_GEN1(self, int log_level, str msg)
- */
-static PyObject *logger_LM_GEN1(PyObject *self, PyObject *args)
-{
-	int log_level;
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "is:LM_GEN1", &log_level, &msg))
-		return NULL;
-
-	LM_GEN1(log_level, "%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-/*
- * Python method: LM_GEN2(self, int log_facility, int log_level, str msg)
- */
-static PyObject *logger_LM_GEN2(PyObject *self, PyObject *args)
-{
-	int log_facility;
-	int log_level;
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "iis:LM_GEN2", &log_facility, &log_level, &msg))
-		return NULL;
-
-	LM_GEN2(log_facility, log_level, "%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-/*
- * Python method: LM_ALERT(self, str msg)
- */
-static PyObject *logger_LM_ALERT(PyObject *self, PyObject *args)
-{
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "s:LM_ALERT", &msg))
-		return NULL;
-
-	LM_ALERT("%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-
-/*
- * Python method: LM_CRIT(self, str msg)
- */
-static PyObject *logger_LM_CRIT(PyObject *self, PyObject *args)
-{
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "s:LM_CRIT", &msg))
-		return NULL;
-
-	LM_CRIT("%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-/*
- * Python method: LM_WARN(self, str msg)
- */
-static PyObject *logger_LM_WARN(PyObject *self, PyObject *args)
-{
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "s:LM_WARN", &msg))
-		return NULL;
-
-	LM_WARN("%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-/*
- * Python method: LM_NOTICE(self, str msg)
- */
-static PyObject *logger_LM_NOTICE(PyObject *self, PyObject *args)
-{
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "s:LM_NOTICE", &msg))
-		return NULL;
-
-	LM_NOTICE("%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-/*
- * Python method: LM_ERR(self, str msg)
- */
-static PyObject *logger_LM_ERR(PyObject *self, PyObject *args)
-{
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "s:LM_ERR", &msg))
-		return NULL;
-
-	LM_ERR("%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-/*
- * Python method: LM_INFO(self, str msg)
- */
-static PyObject *logger_LM_INFO(PyObject *self, PyObject *args)
-{
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "s:LM_INFO", &msg))
-		return NULL;
-
-	LM_INFO("%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-/*
- * Python method: LM_DBG(self, str msg)
- */
-static PyObject *logger_LM_DBG(PyObject *self, PyObject *args)
-{
-	char *msg;
-
-	if(!PyArg_ParseTuple(args, "s:LM_DBG", &msg))
-		return NULL;
-
-	LM_DBG("%s", msg);
-
-	Py_INCREF(Py_None);
-	return Py_None;
-}
-
-PyMethodDef LoggerMethods[] = {{"LM_GEN1", (PyCFunction)logger_LM_GEN1,
-									   METH_VARARGS, "Print GEN1 message."},
-		{"LM_GEN2", (PyCFunction)logger_LM_GEN2, METH_VARARGS,
-				"Print GEN2 message."},
-		{"LM_ALERT", (PyCFunction)logger_LM_ALERT, METH_VARARGS,
-				"Print alert message."},
-		{"LM_CRIT", (PyCFunction)logger_LM_CRIT, METH_VARARGS,
-				"Print critical message."},
-		{"LM_ERR", (PyCFunction)logger_LM_ERR, METH_VARARGS,
-				"Print error message."},
-		{"LM_WARN", (PyCFunction)logger_LM_WARN, METH_VARARGS,
-				"Print warning message."},
-		{"LM_NOTICE", (PyCFunction)logger_LM_NOTICE, METH_VARARGS,
-				"Print notice message."},
-		{"LM_INFO", (PyCFunction)logger_LM_INFO, METH_VARARGS,
-				"Print info message."},
-		{"LM_DBG", (PyCFunction)logger_LM_DBG, METH_VARARGS,
-				"Print debug message."},
-		{NULL, NULL, 0, NULL}};
-
-static struct PyModuleDef Router_Logger_moduledef = {PyModuleDef_HEAD_INIT,
-		"Router.Logger", NULL, -1, LoggerMethods, NULL, NULL, NULL, NULL};
-
-PyObject *get_logger_module(void)
-{
-	_sr_apy_logger_module = PyModule_Create(&Router_Logger_moduledef);
-
-	/*
-	 * Log levels
-	 * Reference: dprint.h
-	 */
-	PyModule_AddObject(
-			_sr_apy_logger_module, "L_ALERT", PyLong_FromLong((long)L_ALERT));
-	PyModule_AddObject(
-			_sr_apy_logger_module, "L_BUG", PyLong_FromLong((long)L_BUG));
-	PyModule_AddObject(_sr_apy_logger_module, "L_CRIT2",
-			PyLong_FromLong((long)L_CRIT2)); /* like L_CRIT, but adds prefix */
-	PyModule_AddObject(_sr_apy_logger_module, "L_CRIT",
-			PyLong_FromLong((long)L_CRIT)); /* no prefix added */
-	PyModule_AddObject(
-			_sr_apy_logger_module, "L_ERR", PyLong_FromLong((long)L_ERR));
-	PyModule_AddObject(
-			_sr_apy_logger_module, "L_WARN", PyLong_FromLong((long)L_WARN));
-	PyModule_AddObject(
-			_sr_apy_logger_module, "L_NOTICE", PyLong_FromLong((long)L_NOTICE));
-	PyModule_AddObject(
-			_sr_apy_logger_module, "L_INFO", PyLong_FromLong((long)L_INFO));
-	PyModule_AddObject(
-			_sr_apy_logger_module, "L_DBG", PyLong_FromLong((long)L_DBG));
-
-	/*
-	 * Facility
-	 * Reference: dprint.h
-	 */
-	PyModule_AddObject(_sr_apy_logger_module, "DEFAULT_FACILITY",
-			PyLong_FromLong((long)DEFAULT_FACILITY));
-
-	Py_INCREF(_sr_apy_logger_module);
-
-#ifdef WITH_EXTRA_DEBUG
-	LM_ERR("Module 'Router.Logger' has been initialized\n");
-#endif
-	return _sr_apy_logger_module;
-}
-
-void destroy_mod_Logger(void)
-{
-	Py_XDECREF(_sr_apy_logger_module);
-
-#ifdef WITH_EXTRA_DEBUG
-	LM_ERR("Module 'Router.Logger' has been destroyed\n");
-#endif
-}

+ 0 - 37
src/modules/app_python3/mod_Logger.h

@@ -1,37 +0,0 @@
-/**
- * Copyright (C) 2012 Konstantin Mosesov
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- *
- * This file 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifndef __API__MOD_LOGGER_H__
-#define __API__MOD_LOGGER_H__
-
-#include <Python.h>
-#include <libgen.h>
-
-extern PyObject *_sr_apy_logger_module;
-
-extern PyMethodDef LoggerMethods[];
-
-void init_mod_Logger(void);
-void destroy_mod_Logger(void);
-
-
-#endif

+ 0 - 96
src/modules/app_python3/mod_Ranks.c

@@ -1,96 +0,0 @@
-/**
- * Copyright (C) 2012 Konstantin Mosesov
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- *
- * This file 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-// Python includes
-#include <Python.h>
-#include "structmember.h"
-
-// Other/system includes
-#include <libgen.h>
-
-// router includes
-#include "../../core/str.h"
-#include "../../core/sr_module.h"
-
-// local includes
-#include "python_exec.h"
-#include "app_python3_mod.h"
-#include "python_iface.h"
-#include "python_msgobj.h"
-#include "python_support.h"
-
-#include "mod_Router.h"
-#include "mod_Ranks.h"
-
-PyObject *_sr_apy_ranks_module = NULL;
-
-PyMethodDef RanksMethods[] = {{NULL, NULL, 0, NULL}};
-
-static struct PyModuleDef Router_Ranks_moduledef = {PyModuleDef_HEAD_INIT,
-		"Router.Ranks", NULL, -1, RanksMethods, NULL, NULL, NULL, NULL};
-
-PyObject *get_ranks_module(void)
-{
-	_sr_apy_ranks_module = PyModule_Create(&Router_Ranks_moduledef);
-
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_MAIN",
-			PyLong_FromLong((long)PROC_MAIN));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_TIMER",
-			PyLong_FromLong((long)PROC_TIMER));
-	PyModule_AddObject(
-			_sr_apy_ranks_module, "PROC_RPC", PyLong_FromLong((long)PROC_RPC));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_FIFO",
-			PyLong_FromLong((long)PROC_FIFO));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_TCP_MAIN",
-			PyLong_FromLong((long)PROC_TCP_MAIN));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_UNIXSOCK",
-			PyLong_FromLong((long)PROC_UNIXSOCK));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_ATTENDANT",
-			PyLong_FromLong((long)PROC_ATTENDANT));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_INIT",
-			PyLong_FromLong((long)PROC_INIT));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_NOCHLDINIT",
-			PyLong_FromLong((long)PROC_NOCHLDINIT));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_SIPINIT",
-			PyLong_FromLong((long)PROC_SIPINIT));
-	PyModule_AddObject(_sr_apy_ranks_module, "PROC_SIPRPC",
-			PyLong_FromLong((long)PROC_SIPRPC));
-	PyModule_AddObject(
-			_sr_apy_ranks_module, "PROC_MIN", PyLong_FromLong((long)PROC_MIN));
-
-	Py_INCREF(_sr_apy_ranks_module);
-
-#ifdef WITH_EXTRA_DEBUG
-	LM_ERR("Module 'Router.Ranks' has been initialized\n");
-#endif
-
-	return _sr_apy_ranks_module;
-}
-
-void destroy_mod_Ranks(void)
-{
-	Py_XDECREF(_sr_apy_ranks_module);
-
-#ifdef WITH_EXTRA_DEBUG
-	LM_ERR("Module 'Router.Ranks' has been destroyed\n");
-#endif
-}

+ 0 - 35
src/modules/app_python3/mod_Ranks.h

@@ -1,35 +0,0 @@
-/**
- * Copyright (C) 2012 Konstantin Mosesov
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * This file 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifndef __API__MOD_RANKS_H__
-#define __API__MOD_RANKS_H__
-
-#include <Python.h>
-#include <libgen.h>
-
-extern PyObject *_sr_apy_ranks_module;
-
-extern PyMethodDef RanksMethods[];
-
-void init_mod_Ranks(void);
-void destroy_mod_Ranks(void);
-
-#endif

+ 0 - 84
src/modules/app_python3/mod_Router.c

@@ -1,84 +0,0 @@
-/**
- * Copyright (C) 2012 Konstantin Mosesov
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * This file 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-// Python includes
-#include <Python.h>
-#include "structmember.h"
-
-// Other/system includes
-#include <libgen.h>
-
-// router includes
-#include "../../core/str.h"
-#include "../../core/sr_module.h"
-
-// local includes
-#include "python_exec.h"
-#include "app_python3_mod.h"
-#include "python_iface.h"
-#include "python_msgobj.h"
-#include "python_support.h"
-
-#include "mod_Router.h"
-#include "mod_Core.h"
-#include "mod_Logger.h"
-#include "mod_Ranks.h"
-
-PyObject *_sr_apy_main_module = NULL;
-
-PyMethodDef RouterMethods[] = {{NULL, NULL, 0, NULL}};
-
-static struct PyModuleDef Router_Core_moduledef = {PyModuleDef_HEAD_INIT,
-		"Router", NULL, -1, RouterMethods, NULL, NULL, NULL, NULL};
-
-extern PyObject *get_core_module();
-extern PyObject *get_logger_module();
-extern PyObject *get_ranks_module();
-static PyObject *init_Router(void)
-{
-	_sr_apy_main_module = PyModule_Create(&Router_Core_moduledef);
-	PyModule_AddObject(_sr_apy_main_module, "Core", get_core_module());
-	PyModule_AddObject(_sr_apy_main_module, "Logger", get_logger_module());
-	PyModule_AddObject(_sr_apy_main_module, "Ranks", get_ranks_module());
-
-	Py_INCREF(_sr_apy_main_module);
-
-	return _sr_apy_main_module;
-}
-
-extern void init_mod_Router(void)
-{
-
-	PyImport_AppendInittab("Router", &init_Router);
-
-#ifdef WITH_EXTRA_DEBUG
-	LM_ERR("Module 'Router' has been initialized\n");
-#endif
-}
-
-void destroy_mod_Router(void)
-{
-	Py_XDECREF(_sr_apy_main_module);
-
-#ifdef WITH_EXTRA_DEBUG
-	LM_ERR("Module 'Router' has been destroyed\n");
-#endif
-}

+ 0 - 36
src/modules/app_python3/mod_Router.h

@@ -1,36 +0,0 @@
-/**
- * Copyright (C) 2012 Konstantin Mosesov
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * This file 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
- */
-
-#ifndef __API__MOD_ROUTER_H__
-#define __API__MOD_ROUTER_H__
-
-#include <Python.h>
-#include <libgen.h>
-
-extern PyObject *_sr_apy_main_module;
-extern PyObject *_sr_apy_main_module_dict;
-
-extern PyMethodDef RouterMethods[];
-
-void init_mod_Router(void);
-void destroy_mod_Router(void);
-
-#endif

+ 0 - 54
src/modules/app_python3/python_iface.c

@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2009 Sippy Software, Inc., http://www.sippysoft.com
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * Kamailio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * Kamailio 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
-*/
-
-// Python includes
-#include <Python.h>
-
-// router includes
-#include "../../core/action.h"
-#include "../../core/dprint.h"
-#include "../../core/route_struct.h"
-#include "../../core/str.h"
-#include "../../core/sr_module.h"
-
-// local includes
-#include "mod_Router.h"
-#include "mod_Core.h"
-#include "mod_Ranks.h"
-#include "mod_Logger.h"
-
-#include "apy_kemi.h"
-
-
-int ap_init_modules(void)
-{
-	init_mod_Router();
-	/* Python 3:
-	 * this will be done in the Router module initialization
-	init_mod_Core();
-	init_mod_Ranks();
-	init_mod_Logger();
-	*/
-	if(sr_apy_init_ksr() < 0)
-		return -1;
-
-	return 0;
-}

+ 0 - 30
src/modules/app_python3/python_iface.h

@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2009 Sippy Software, Inc., http://www.sippysoft.com
- *
- * This file is part of Kamailio, a free SIP server.
- *
- * Kamailio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version
- *
- * Kamailio 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- *
-*/
-
-#ifndef _PYTHON_IFACE_H
-#define _PYTHON_IFACE_H
-
-#include <Python.h>
-
-extern PyMethodDef RouterMethods[];
-int ap_init_modules(void);
-
-#endif