snake charming

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8998 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2008-07-11 19:42:52 +00:00
parent 0f873e692b
commit a3ccefa7e1
23 changed files with 2318 additions and 4906 deletions
@@ -0,0 +1,65 @@
SWITCH_BEGIN_EXTERN_C
PyObject *mod_python_conjure_event(PyObject *module, switch_event_t *event, const char *name)
{
PyObject *obj;
Event *result = new Event(event, 0);
obj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN );
if (module && name) {
PyDict_SetItem(PyModule_GetDict(module), Py_BuildValue("s", name), obj);
Py_DECREF(obj);
}
return obj;
}
PyObject *mod_python_conjure_stream(PyObject *module, switch_stream_handle_t *stream, const char *name)
{
PyObject *obj;
Stream *result = new Stream(stream);
obj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_POINTER_OWN );
if (module && name) {
PyDict_SetItem(PyModule_GetDict(module), Py_BuildValue("s", name), obj);
Py_DECREF(obj);
}
return obj;
}
PyObject *mod_python_conjure_session(PyObject *module, switch_core_session_t *session, const char *name)
{
PyObject *obj;
PYTHON::Session *result = new PYTHON::Session(session);
obj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PYTHON__Session, SWIG_POINTER_OWN);
result->setPython(module);
result->setSelf(obj);
if (module && name) {
PyDict_SetItem(PyModule_GetDict(module), Py_BuildValue("s", name), obj);
Py_DECREF(obj);
}
return obj;
}
PyObject *mod_python_conjure_DTMF(char digit, int32_t duration)
{
PyObject *obj;
DTMF *result = new DTMF(digit, duration);
obj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_DTMF, SWIG_POINTER_OWN);
return obj;
}
SWITCH_END_EXTERN_C