mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-24 18:41:57 +00:00
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5374 d0543943-73ff-0310-b7d9-9358b9ac24b2
46 lines
952 B
C++
46 lines
952 B
C++
#ifndef FREESWITCH_PYTHON_H
|
|
#define FREESWITCH_PYTHON_H
|
|
|
|
#include <Python.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#ifdef DOH
|
|
}
|
|
#endif
|
|
|
|
#include <switch_cpp.h>
|
|
|
|
|
|
|
|
// declaration for function that is defined in mod_python.i
|
|
extern switch_status_t PythonDTMFCallback(switch_core_session *session,
|
|
void *input,
|
|
switch_input_type_t itype,
|
|
void *buf,
|
|
unsigned int buflen);
|
|
|
|
void console_log(char *level_str, char *msg);
|
|
void console_clean_log(char *msg);
|
|
char *api_execute(char *cmd, char *arg);
|
|
void api_reply_delete(char *reply);
|
|
|
|
class PySession : public CoreSession {
|
|
private:
|
|
void *threadState;
|
|
public:
|
|
PySession(char *uuid) : CoreSession(uuid) {}
|
|
PySession(switch_core_session_t *session) : CoreSession(session) {}
|
|
~PySession();
|
|
void setDTMFCallback(PyObject *pyfunc, char *funcargs);
|
|
void begin_allow_threads();
|
|
void end_allow_threads();
|
|
|
|
};
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|