2008-04-28 17:33:58 +00:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
2010-09-10 01:36:27 +02:00
|
|
|
* Version 1.3.29
|
2008-04-28 17:33:58 +00:00
|
|
|
*
|
|
|
|
* This file is not intended to be easily readable and contains a number of
|
|
|
|
* coding conventions designed to improve portability and efficiency. Do not make
|
|
|
|
* changes to this file unless you know what you are doing--modify the SWIG
|
|
|
|
* interface file instead.
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2010-09-10 01:36:27 +02:00
|
|
|
template<class T> class SwigValueWrapper {
|
2008-06-02 23:37:12 +00:00
|
|
|
T *tt;
|
|
|
|
public:
|
|
|
|
SwigValueWrapper() : tt(0) { }
|
|
|
|
SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
|
|
|
|
SwigValueWrapper(const T& t) : tt(new T(t)) { }
|
|
|
|
~SwigValueWrapper() { delete tt; }
|
|
|
|
SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
|
|
|
|
operator T&() const { return *tt; }
|
|
|
|
T *operator&() { return tt; }
|
|
|
|
private:
|
|
|
|
SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
|
2008-04-28 17:33:58 +00:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* This section contains generic SWIG labels for method/variable
|
|
|
|
* declarations/attributes, and other compiler dependent labels.
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/* template workaround for compilers that cannot correctly implement the C++ standard */
|
|
|
|
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
2010-09-10 01:36:27 +02:00
|
|
|
# if defined(__SUNPRO_CC)
|
|
|
|
# if (__SUNPRO_CC <= 0x560)
|
|
|
|
# define SWIGTEMPLATEDISAMBIGUATOR template
|
|
|
|
# else
|
|
|
|
# define SWIGTEMPLATEDISAMBIGUATOR
|
|
|
|
# endif
|
2008-04-28 17:33:58 +00:00
|
|
|
# else
|
2010-09-10 01:36:27 +02:00
|
|
|
# define SWIGTEMPLATEDISAMBIGUATOR
|
2008-04-28 17:33:58 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* inline attribute */
|
|
|
|
#ifndef SWIGINLINE
|
|
|
|
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
|
|
|
|
# define SWIGINLINE inline
|
|
|
|
# else
|
|
|
|
# define SWIGINLINE
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* attribute recognised by some compilers to avoid 'unused' warnings */
|
|
|
|
#ifndef SWIGUNUSED
|
|
|
|
# if defined(__GNUC__)
|
|
|
|
# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
2008-06-02 23:37:12 +00:00
|
|
|
# define SWIGUNUSED __attribute__ ((__unused__))
|
2008-04-28 17:33:58 +00:00
|
|
|
# else
|
|
|
|
# define SWIGUNUSED
|
|
|
|
# endif
|
|
|
|
# elif defined(__ICC)
|
2008-06-02 23:37:12 +00:00
|
|
|
# define SWIGUNUSED __attribute__ ((__unused__))
|
2008-04-28 17:33:58 +00:00
|
|
|
# else
|
2008-06-02 23:37:12 +00:00
|
|
|
# define SWIGUNUSED
|
2008-04-28 17:33:58 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SWIGUNUSEDPARM
|
|
|
|
# ifdef __cplusplus
|
|
|
|
# define SWIGUNUSEDPARM(p)
|
|
|
|
# else
|
2008-06-02 23:37:12 +00:00
|
|
|
# define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
2008-04-28 17:33:58 +00:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* internal SWIG method */
|
|
|
|
#ifndef SWIGINTERN
|
|
|
|
# define SWIGINTERN static SWIGUNUSED
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* internal inline SWIG method */
|
|
|
|
#ifndef SWIGINTERNINLINE
|
|
|
|
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* exporting methods */
|
|
|
|
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
|
|
|
# ifndef GCC_HASCLASSVISIBILITY
|
|
|
|
# define GCC_HASCLASSVISIBILITY
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SWIGEXPORT
|
|
|
|
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
|
|
|
# if defined(STATIC_LINKED)
|
|
|
|
# define SWIGEXPORT
|
|
|
|
# else
|
|
|
|
# define SWIGEXPORT __declspec(dllexport)
|
|
|
|
# endif
|
|
|
|
# else
|
|
|
|
# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
|
|
|
|
# define SWIGEXPORT __attribute__ ((visibility("default")))
|
|
|
|
# else
|
|
|
|
# define SWIGEXPORT
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* calling conventions for Windows */
|
|
|
|
#ifndef SWIGSTDCALL
|
|
|
|
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
|
|
|
# define SWIGSTDCALL __stdcall
|
|
|
|
# else
|
|
|
|
# define SWIGSTDCALL
|
2008-06-02 23:37:12 +00:00
|
|
|
# endif
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
2010-09-10 01:36:27 +02:00
|
|
|
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER)
|
2008-04-28 17:33:58 +00:00
|
|
|
# define _CRT_SECURE_NO_DEPRECATE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* swigrun.swg
|
|
|
|
*
|
|
|
|
* This file contains generic CAPI SWIG runtime support for pointer
|
|
|
|
* type checking.
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/* This should only be incremented when either the layout of swig_type_info changes,
|
|
|
|
or for whatever reason, the runtime changes incompatibly */
|
2010-09-10 01:36:27 +02:00
|
|
|
#define SWIG_RUNTIME_VERSION "2"
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
|
|
|
|
#ifdef SWIG_TYPE_TABLE
|
|
|
|
# define SWIG_QUOTE_STRING(x) #x
|
|
|
|
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
|
|
|
|
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
|
|
|
|
#else
|
|
|
|
# define SWIG_TYPE_TABLE_NAME
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
|
|
|
creating a static or dynamic library from the swig runtime code.
|
|
|
|
In 99.9% of the cases, swig just needs to declare them as 'static'.
|
|
|
|
|
|
|
|
But only do this if is strictly necessary, ie, if you have problems
|
|
|
|
with your compiler or so.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SWIGRUNTIME
|
|
|
|
# define SWIGRUNTIME SWIGINTERN
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef SWIGRUNTIMEINLINE
|
|
|
|
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Generic buffer size */
|
|
|
|
#ifndef SWIG_BUFFER_SIZE
|
|
|
|
# define SWIG_BUFFER_SIZE 1024
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Flags for pointer conversions */
|
|
|
|
#define SWIG_POINTER_DISOWN 0x1
|
|
|
|
|
|
|
|
/* Flags for new pointer objects */
|
|
|
|
#define SWIG_POINTER_OWN 0x1
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
Flags/methods for returning states.
|
|
|
|
|
|
|
|
The swig conversion methods, as ConvertPtr, return and integer
|
|
|
|
that tells if the conversion was successful or not. And if not,
|
|
|
|
an error code can be returned (see swigerrors.swg for the codes).
|
|
|
|
|
|
|
|
Use the following macros/flags to set or process the returning
|
|
|
|
states.
|
|
|
|
|
|
|
|
In old swig versions, you usually write code as:
|
|
|
|
|
|
|
|
if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
|
|
|
// success code
|
|
|
|
} else {
|
|
|
|
//fail code
|
|
|
|
}
|
|
|
|
|
|
|
|
Now you can be more explicit as:
|
|
|
|
|
|
|
|
int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
|
|
|
|
if (SWIG_IsOK(res)) {
|
|
|
|
// success code
|
|
|
|
} else {
|
|
|
|
// fail code
|
|
|
|
}
|
|
|
|
|
|
|
|
that seems to be the same, but now you can also do
|
|
|
|
|
|
|
|
Type *ptr;
|
|
|
|
int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
|
|
|
|
if (SWIG_IsOK(res)) {
|
|
|
|
// success code
|
|
|
|
if (SWIG_IsNewObj(res) {
|
|
|
|
...
|
|
|
|
delete *ptr;
|
|
|
|
} else {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
// fail code
|
|
|
|
}
|
|
|
|
|
|
|
|
I.e., now SWIG_ConvertPtr can return new objects and you can
|
|
|
|
identify the case and take care of the deallocation. Of course that
|
|
|
|
requires also to SWIG_ConvertPtr to return new result values, as
|
|
|
|
|
|
|
|
int SWIG_ConvertPtr(obj, ptr,...) {
|
|
|
|
if (<obj is ok>) {
|
|
|
|
if (<need new object>) {
|
|
|
|
*ptr = <ptr to new allocated object>;
|
|
|
|
return SWIG_NEWOBJ;
|
|
|
|
} else {
|
|
|
|
*ptr = <ptr to old object>;
|
|
|
|
return SWIG_OLDOBJ;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return SWIG_BADOBJ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
|
|
|
more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
|
|
|
|
swig errors code.
|
|
|
|
|
|
|
|
Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
|
|
|
|
allows to return the 'cast rank', for example, if you have this
|
|
|
|
|
|
|
|
int food(double)
|
|
|
|
int fooi(int);
|
|
|
|
|
|
|
|
and you call
|
|
|
|
|
|
|
|
food(1) // cast rank '1' (1 -> 1.0)
|
|
|
|
fooi(1) // cast rank '0'
|
|
|
|
|
|
|
|
just use the SWIG_AddCast()/SWIG_CheckState()
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
#define SWIG_OK (0)
|
2008-04-28 17:33:58 +00:00
|
|
|
#define SWIG_ERROR (-1)
|
|
|
|
#define SWIG_IsOK(r) (r >= 0)
|
2008-06-02 23:37:12 +00:00
|
|
|
#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* The CastRankLimit says how many bits are used for the cast rank */
|
|
|
|
#define SWIG_CASTRANKLIMIT (1 << 8)
|
|
|
|
/* The NewMask denotes the object was created (using new/malloc) */
|
|
|
|
#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
|
|
|
|
/* The TmpMask is for in/out typemaps that use temporal objects */
|
|
|
|
#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
|
|
|
|
/* Simple returning values */
|
|
|
|
#define SWIG_BADOBJ (SWIG_ERROR)
|
|
|
|
#define SWIG_OLDOBJ (SWIG_OK)
|
|
|
|
#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
|
|
|
|
#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
|
|
|
|
/* Check, add and del mask methods */
|
|
|
|
#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
|
|
|
|
#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
|
|
|
|
#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
|
|
|
|
#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
|
|
|
|
#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
|
|
|
|
#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
|
|
|
|
|
|
|
|
|
|
|
|
/* Cast-Rank Mode */
|
|
|
|
#if defined(SWIG_CASTRANK_MODE)
|
|
|
|
# ifndef SWIG_TypeRank
|
|
|
|
# define SWIG_TypeRank unsigned long
|
|
|
|
# endif
|
2008-06-02 23:37:12 +00:00
|
|
|
# ifndef SWIG_MAXCASTRANK /* Default cast allowed */
|
2008-04-28 17:33:58 +00:00
|
|
|
# define SWIG_MAXCASTRANK (2)
|
|
|
|
# endif
|
|
|
|
# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
|
|
|
# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
|
|
|
return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
2008-04-28 17:33:58 +00:00
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
|
|
|
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
2008-04-28 17:33:58 +00:00
|
|
|
}
|
|
|
|
#else /* no cast-rank mode */
|
|
|
|
# define SWIG_AddCast
|
|
|
|
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
typedef void *(*swig_converter_func)(void *);
|
2008-06-02 23:37:12 +00:00
|
|
|
typedef struct swig_type_info *(*swig_dycast_func)(void **);
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
/* Structure to store inforomation on one type */
|
2008-06-02 23:37:12 +00:00
|
|
|
typedef struct swig_type_info {
|
|
|
|
const char *name; /* mangled name of this type */
|
|
|
|
const char *str; /* human readable name of this type */
|
|
|
|
swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
|
|
|
|
struct swig_cast_info *cast; /* linked list of types that can cast into this type */
|
|
|
|
void *clientdata; /* language specific type data */
|
|
|
|
int owndata; /* flag if the structure owns the clientdata */
|
|
|
|
} swig_type_info;
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* Structure to store a type and conversion function used for casting */
|
2008-06-02 23:37:12 +00:00
|
|
|
typedef struct swig_cast_info {
|
|
|
|
swig_type_info *type; /* pointer to type that is equivalent to this type */
|
|
|
|
swig_converter_func converter; /* function to cast the void pointers */
|
|
|
|
struct swig_cast_info *next; /* pointer to next cast in linked list */
|
|
|
|
struct swig_cast_info *prev; /* pointer to the previous cast */
|
|
|
|
} swig_cast_info;
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* Structure used to store module information
|
|
|
|
* Each module generates one structure like this, and the runtime collects
|
|
|
|
* all of these structures and stores them in a circularly linked list.*/
|
2008-06-02 23:37:12 +00:00
|
|
|
typedef struct swig_module_info {
|
|
|
|
swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
|
|
|
|
size_t size; /* Number of types in this module */
|
|
|
|
struct swig_module_info *next; /* Pointer to next element in circularly linked list */
|
|
|
|
swig_type_info **type_initial; /* Array of initially generated type structures */
|
|
|
|
swig_cast_info **cast_initial; /* Array of initially generated casting structures */
|
|
|
|
void *clientdata; /* Language specific module data */
|
|
|
|
} swig_module_info;
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Compare two type names skipping the space characters, therefore
|
|
|
|
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
|
|
|
|
|
|
|
Return 0 when the two name types are equivalent, as in
|
|
|
|
strncmp, but skipping ' '.
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME int
|
|
|
|
SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
|
|
const char *f2, const char *l2) {
|
|
|
|
for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
|
|
|
|
while ((*f1 == ' ') && (f1 != l1)) ++f1;
|
|
|
|
while ((*f2 == ' ') && (f2 != l2)) ++f2;
|
|
|
|
if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
|
|
|
|
}
|
2010-09-10 01:36:27 +02:00
|
|
|
return (l1 - f1) - (l2 - f2);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Check type equivalence in a name list like <name1>|<name2>|...
|
|
|
|
Return 0 if not equal, 1 if equal
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME int
|
|
|
|
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|
|
|
int equiv = 0;
|
|
|
|
const char* te = tb + strlen(tb);
|
|
|
|
const char* ne = nb;
|
|
|
|
while (!equiv && *ne) {
|
|
|
|
for (nb = ne; *ne; ++ne) {
|
|
|
|
if (*ne == '|') break;
|
|
|
|
}
|
|
|
|
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
|
|
|
|
if (*ne) ++ne;
|
|
|
|
}
|
|
|
|
return equiv;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Check type equivalence in a name list like <name1>|<name2>|...
|
|
|
|
Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME int
|
|
|
|
SWIG_TypeCompare(const char *nb, const char *tb) {
|
|
|
|
int equiv = 0;
|
|
|
|
const char* te = tb + strlen(tb);
|
|
|
|
const char* ne = nb;
|
|
|
|
while (!equiv && *ne) {
|
|
|
|
for (nb = ne; *ne; ++ne) {
|
|
|
|
if (*ne == '|') break;
|
|
|
|
}
|
|
|
|
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
|
|
|
|
if (*ne) ++ne;
|
|
|
|
}
|
|
|
|
return equiv;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* think of this as a c++ template<> or a scheme macro */
|
|
|
|
#define SWIG_TypeCheck_Template(comparison, ty) \
|
|
|
|
if (ty) { \
|
|
|
|
swig_cast_info *iter = ty->cast; \
|
|
|
|
while (iter) { \
|
|
|
|
if (comparison) { \
|
|
|
|
if (iter == ty->cast) return iter; \
|
|
|
|
/* Move iter to the top of the linked list */ \
|
|
|
|
iter->prev->next = iter->next; \
|
|
|
|
if (iter->next) \
|
|
|
|
iter->next->prev = iter->prev; \
|
|
|
|
iter->next = ty->cast; \
|
|
|
|
iter->prev = 0; \
|
|
|
|
if (ty->cast) ty->cast->prev = iter; \
|
|
|
|
ty->cast = iter; \
|
|
|
|
return iter; \
|
|
|
|
} \
|
|
|
|
iter = iter->next; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
return 0
|
|
|
|
|
|
|
|
/*
|
|
|
|
Check the typename
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME swig_cast_info *
|
|
|
|
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|
|
|
SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* Same as previous function, except strcmp is replaced with a pointer comparison */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME swig_cast_info *
|
|
|
|
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
|
|
|
|
SWIG_TypeCheck_Template(iter->type == from, into);
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Cast a pointer up an inheritance hierarchy
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIMEINLINE void *
|
2010-09-10 01:36:27 +02:00
|
|
|
SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
|
|
|
|
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Dynamic pointer casting. Down an inheritance hierarchy
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME swig_type_info *
|
|
|
|
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
|
|
|
|
swig_type_info *lastty = ty;
|
|
|
|
if (!ty || !ty->dcast) return ty;
|
|
|
|
while (ty && (ty->dcast)) {
|
|
|
|
ty = (*ty->dcast)(ptr);
|
|
|
|
if (ty) lastty = ty;
|
|
|
|
}
|
|
|
|
return lastty;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Return the name associated with this type
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIMEINLINE const char *
|
|
|
|
SWIG_TypeName(const swig_type_info *ty) {
|
|
|
|
return ty->name;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Return the pretty name associated with this type,
|
|
|
|
that is an unmangled type name in a form presentable to the user.
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME const char *
|
|
|
|
SWIG_TypePrettyName(const swig_type_info *type) {
|
|
|
|
/* The "str" field contains the equivalent pretty names of the
|
|
|
|
type, separated by vertical-bar characters. We choose
|
|
|
|
to print the last name, as it is often (?) the most
|
|
|
|
specific. */
|
|
|
|
if (!type) return NULL;
|
|
|
|
if (type->str != NULL) {
|
|
|
|
const char *last_name = type->str;
|
|
|
|
const char *s;
|
|
|
|
for (s = type->str; *s; s++)
|
|
|
|
if (*s == '|') last_name = s+1;
|
|
|
|
return last_name;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return type->name;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Set the clientdata field for a type
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME void
|
|
|
|
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|
|
|
swig_cast_info *cast = ti->cast;
|
|
|
|
/* if (ti->clientdata == clientdata) return; */
|
|
|
|
ti->clientdata = clientdata;
|
|
|
|
|
|
|
|
while (cast) {
|
|
|
|
if (!cast->converter) {
|
|
|
|
swig_type_info *tc = cast->type;
|
|
|
|
if (!tc->clientdata) {
|
|
|
|
SWIG_TypeClientData(tc, clientdata);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
cast = cast->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIGRUNTIME void
|
|
|
|
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
|
|
|
|
SWIG_TypeClientData(ti, clientdata);
|
|
|
|
ti->owndata = 1;
|
|
|
|
}
|
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
/*
|
|
|
|
Search for a swig_type_info structure only by mangled name
|
|
|
|
Search is a O(log #types)
|
|
|
|
|
|
|
|
We start searching at module start, and finish searching when start == end.
|
|
|
|
Note: if start == end at the beginning of the function, we go all the way around
|
|
|
|
the circular list.
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME swig_type_info *
|
|
|
|
SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|
|
|
swig_module_info *end,
|
|
|
|
const char *name) {
|
|
|
|
swig_module_info *iter = start;
|
|
|
|
do {
|
|
|
|
if (iter->size) {
|
|
|
|
register size_t l = 0;
|
|
|
|
register size_t r = iter->size - 1;
|
|
|
|
do {
|
|
|
|
/* since l+r >= 0, we can (>> 1) instead (/ 2) */
|
|
|
|
register size_t i = (l + r) >> 1;
|
|
|
|
const char *iname = iter->types[i]->name;
|
|
|
|
if (iname) {
|
|
|
|
register int compare = strcmp(name, iname);
|
|
|
|
if (compare == 0) {
|
|
|
|
return iter->types[i];
|
|
|
|
} else if (compare < 0) {
|
|
|
|
if (i) {
|
|
|
|
r = i - 1;
|
|
|
|
} else {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
} else if (compare > 0) {
|
|
|
|
l = i + 1;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
break; /* should never happen */
|
2008-04-28 17:33:58 +00:00
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
} while (l <= r);
|
|
|
|
}
|
|
|
|
iter = iter->next;
|
|
|
|
} while (iter != end);
|
|
|
|
return 0;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Search for a swig_type_info structure for either a mangled name or a human readable name.
|
|
|
|
It first searches the mangled names of the types, which is a O(log #types)
|
|
|
|
If a type is not found it then searches the human readable names, which is O(#types).
|
|
|
|
|
|
|
|
We start searching at module start, and finish searching when start == end.
|
|
|
|
Note: if start == end at the beginning of the function, we go all the way around
|
|
|
|
the circular list.
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME swig_type_info *
|
|
|
|
SWIG_TypeQueryModule(swig_module_info *start,
|
|
|
|
swig_module_info *end,
|
|
|
|
const char *name) {
|
|
|
|
/* STEP 1: Search the name field using binary search */
|
|
|
|
swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
|
|
|
|
if (ret) {
|
|
|
|
return ret;
|
|
|
|
} else {
|
|
|
|
/* STEP 2: If the type hasn't been found, do a complete search
|
|
|
|
of the str field (the human readable name) */
|
|
|
|
swig_module_info *iter = start;
|
|
|
|
do {
|
|
|
|
register size_t i = 0;
|
|
|
|
for (; i < iter->size; ++i) {
|
|
|
|
if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
|
|
|
|
return iter->types[i];
|
|
|
|
}
|
|
|
|
iter = iter->next;
|
|
|
|
} while (iter != end);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* neither found a match */
|
|
|
|
return 0;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Pack binary data into a string
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME char *
|
|
|
|
SWIG_PackData(char *c, void *ptr, size_t sz) {
|
|
|
|
static const char hex[17] = "0123456789abcdef";
|
|
|
|
register const unsigned char *u = (unsigned char *) ptr;
|
|
|
|
register const unsigned char *eu = u + sz;
|
|
|
|
for (; u != eu; ++u) {
|
|
|
|
register unsigned char uu = *u;
|
|
|
|
*(c++) = hex[(uu & 0xf0) >> 4];
|
|
|
|
*(c++) = hex[uu & 0xf];
|
|
|
|
}
|
|
|
|
return c;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Unpack binary data from a string
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME const char *
|
|
|
|
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|
|
|
register unsigned char *u = (unsigned char *) ptr;
|
|
|
|
register const unsigned char *eu = u + sz;
|
|
|
|
for (; u != eu; ++u) {
|
|
|
|
register char d = *(c++);
|
|
|
|
register unsigned char uu;
|
|
|
|
if ((d >= '0') && (d <= '9'))
|
|
|
|
uu = ((d - '0') << 4);
|
|
|
|
else if ((d >= 'a') && (d <= 'f'))
|
|
|
|
uu = ((d - ('a'-10)) << 4);
|
|
|
|
else
|
|
|
|
return (char *) 0;
|
|
|
|
d = *(c++);
|
|
|
|
if ((d >= '0') && (d <= '9'))
|
|
|
|
uu |= (d - '0');
|
|
|
|
else if ((d >= 'a') && (d <= 'f'))
|
|
|
|
uu |= (d - ('a'-10));
|
|
|
|
else
|
|
|
|
return (char *) 0;
|
|
|
|
*u = uu;
|
|
|
|
}
|
|
|
|
return c;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Pack 'void *' into a string buffer.
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME char *
|
|
|
|
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
|
|
|
|
char *r = buff;
|
|
|
|
if ((2*sizeof(void *) + 2) > bsz) return 0;
|
|
|
|
*(r++) = '_';
|
|
|
|
r = SWIG_PackData(r,&ptr,sizeof(void *));
|
|
|
|
if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
|
|
|
|
strcpy(r,name);
|
|
|
|
return buff;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME const char *
|
|
|
|
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
|
|
|
|
if (*c != '_') {
|
|
|
|
if (strcmp(c,"NULL") == 0) {
|
|
|
|
*ptr = (void *) 0;
|
|
|
|
return name;
|
|
|
|
} else {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return SWIG_UnpackData(++c,ptr,sizeof(void *));
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME char *
|
|
|
|
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
|
|
|
|
char *r = buff;
|
|
|
|
size_t lname = (name ? strlen(name) : 0);
|
|
|
|
if ((2*sz + 2 + lname) > bsz) return 0;
|
|
|
|
*(r++) = '_';
|
|
|
|
r = SWIG_PackData(r,ptr,sz);
|
|
|
|
if (lname) {
|
|
|
|
strncpy(r,name,lname+1);
|
|
|
|
} else {
|
|
|
|
*r = 0;
|
|
|
|
}
|
|
|
|
return buff;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME const char *
|
|
|
|
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|
|
|
if (*c != '_') {
|
|
|
|
if (strcmp(c,"NULL") == 0) {
|
|
|
|
memset(ptr,0,sz);
|
|
|
|
return name;
|
|
|
|
} else {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return SWIG_UnpackData(++c,ptr,sz);
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* See the LICENSE file for information on copyright, usage and redistribution
|
|
|
|
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
|
|
|
|
*
|
|
|
|
* luarun.swg
|
|
|
|
*
|
|
|
|
* This file contains the runtime support for Lua modules
|
|
|
|
* and includes code for managing global variables and pointer
|
|
|
|
* type checking.
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "lua.h"
|
|
|
|
#include "lauxlib.h"
|
2010-09-10 01:36:27 +02:00
|
|
|
#include <assert.h> /* for a few sanity tests */
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* global swig types
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
/* Constant table */
|
|
|
|
#define SWIG_LUA_INT 1
|
|
|
|
#define SWIG_LUA_FLOAT 2
|
|
|
|
#define SWIG_LUA_STRING 3
|
|
|
|
#define SWIG_LUA_POINTER 4
|
|
|
|
#define SWIG_LUA_BINARY 5
|
2010-09-10 01:36:27 +02:00
|
|
|
|
|
|
|
/* Structure for command table (replaced by luaLib's luaL_reg) */
|
|
|
|
/*typedef struct {
|
|
|
|
const char *name;
|
|
|
|
lua_CFunction wrapper;
|
|
|
|
} swig_lua_command_info;*/
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* Structure for variable linking table */
|
2008-06-02 23:37:12 +00:00
|
|
|
typedef struct {
|
|
|
|
const char *name;
|
|
|
|
lua_CFunction get;
|
|
|
|
lua_CFunction set;
|
|
|
|
} swig_lua_var_info;
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* Constant information structure */
|
2008-06-02 23:37:12 +00:00
|
|
|
typedef struct {
|
|
|
|
int type;
|
|
|
|
char *name;
|
|
|
|
long lvalue;
|
|
|
|
double dvalue;
|
|
|
|
void *pvalue;
|
|
|
|
swig_type_info **ptype;
|
|
|
|
} swig_lua_const_info;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const char *name;
|
|
|
|
lua_CFunction method;
|
|
|
|
} swig_lua_method;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
const char *name;
|
|
|
|
lua_CFunction getmethod;
|
|
|
|
lua_CFunction setmethod;
|
|
|
|
} swig_lua_attribute;
|
|
|
|
|
|
|
|
typedef struct swig_lua_class {
|
2010-09-10 01:36:27 +02:00
|
|
|
const char *name;
|
2008-06-02 23:37:12 +00:00
|
|
|
swig_type_info **type;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_CFunction constructor;
|
|
|
|
void (*destructor)(void *);
|
|
|
|
swig_lua_method *methods;
|
2008-06-02 23:37:12 +00:00
|
|
|
swig_lua_attribute *attributes;
|
|
|
|
struct swig_lua_class **bases;
|
|
|
|
} swig_lua_class;
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
typedef struct {
|
2010-09-10 01:36:27 +02:00
|
|
|
void *ptr;
|
2008-06-02 23:37:12 +00:00
|
|
|
swig_type_info *type;
|
2010-09-10 01:36:27 +02:00
|
|
|
int own; /* 1 if owned & must be destroyed */
|
2008-06-02 23:37:12 +00:00
|
|
|
} swig_lua_userdata;
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Common SWIG API */
|
2010-09-10 01:36:27 +02:00
|
|
|
#define SWIG_NewPointerObj(L, ptr, type, owner) \
|
|
|
|
SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner)
|
|
|
|
#define SWIG_ConvertPtr(L,idx, ptr, type, flags) \
|
|
|
|
SWIG_Lua_ConvertPtr(L,idx,ptr,type,flags)
|
|
|
|
#define SWIG_MustGetPtr(L,idx, type,flags, argnum,fnname) \
|
|
|
|
SWIG_Lua_MustGetPtr(L,idx, type,flags, argnum,fnname)
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* Runtime API */
|
|
|
|
#define SWIG_GetModule(clientdata) SWIG_Lua_GetModule((lua_State*)(clientdata))
|
|
|
|
#define SWIG_SetModule(clientdata, pointer) SWIG_Lua_SetModule((lua_State*) (clientdata), pointer)
|
|
|
|
#define SWIG_MODULE_CLIENTDATA_TYPE lua_State*
|
|
|
|
|
|
|
|
/* Contract support */
|
|
|
|
#define SWIG_contract_assert(expr, msg) \
|
|
|
|
if (!(expr)) { lua_pushstring(L, (char *) msg); goto fail; } else
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
|
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
/* helper #defines */
|
|
|
|
#define SWIG_fail {goto fail;}
|
2010-09-10 01:36:27 +02:00
|
|
|
#define SWIG_fail_arg(I) {lua_pushfstring(L,"argument %d incorrect/missing",I);goto fail;}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
#define SWIG_Lua_get_table(L,n) \
|
2010-09-10 01:36:27 +02:00
|
|
|
(lua_pushstring(L, n), lua_rawget(L,-2))
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
#define SWIG_Lua_add_function(L,n,f) \
|
2010-09-10 01:36:27 +02:00
|
|
|
(lua_pushstring(L, n), \
|
|
|
|
lua_pushcfunction(L, f), \
|
|
|
|
lua_rawset(L,-3))
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* global variable support code: modules
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/* the module.get method used for getting linked data */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN int SWIG_Lua_module_get(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
/* there should be 2 params passed in
|
|
|
|
(1) table (not the meta table)
|
|
|
|
(2) string name of the attribute
|
|
|
|
printf("SWIG_Lua_module_get %p(%s) '%s'\n",
|
|
|
|
lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
|
|
|
|
lua_tostring(L,2));
|
2008-04-28 17:33:58 +00:00
|
|
|
*/
|
2010-09-10 01:36:27 +02:00
|
|
|
/* get the metatable */
|
|
|
|
assert(lua_istable(L,1)); /* just in case */
|
|
|
|
lua_getmetatable(L,1); /* get the metatable */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
SWIG_Lua_get_table(L,".get"); /* get the .get table */
|
|
|
|
lua_remove(L,3); /* remove metatable */
|
|
|
|
if (lua_istable(L,-1))
|
|
|
|
{
|
|
|
|
/* look for the key in the .get table */
|
|
|
|
lua_pushvalue(L,2); /* key */
|
|
|
|
lua_rawget(L,-2);
|
|
|
|
lua_remove(L,3); /* remove .get */
|
|
|
|
if (lua_iscfunction(L,-1))
|
|
|
|
{ /* found it so call the fn & return its value */
|
|
|
|
lua_call(L,0,1);
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* remove the top */
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* remove the .get */
|
|
|
|
lua_pushnil(L); /* return a nil */
|
2008-06-02 23:37:12 +00:00
|
|
|
return 1;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* the module.set method used for setting linked data */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN int SWIG_Lua_module_set(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
/* there should be 3 params passed in
|
|
|
|
(1) table (not the meta table)
|
|
|
|
(2) string name of the attribute
|
|
|
|
(3) any for the new value
|
2008-04-28 17:33:58 +00:00
|
|
|
*/
|
2010-09-10 01:36:27 +02:00
|
|
|
/* get the metatable */
|
|
|
|
assert(lua_istable(L,1)); /* just in case */
|
|
|
|
lua_getmetatable(L,1); /* get the metatable */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
SWIG_Lua_get_table(L,".set"); /* get the .set table */
|
|
|
|
lua_remove(L,4); /* remove metatable */
|
|
|
|
if (lua_istable(L,-1))
|
|
|
|
{
|
|
|
|
/* look for the key in the .set table */
|
|
|
|
lua_pushvalue(L,2); /* key */
|
|
|
|
lua_rawget(L,-2);
|
|
|
|
lua_remove(L,4); /* remove .set */
|
|
|
|
if (lua_iscfunction(L,-1))
|
|
|
|
{ /* found it so call the fn & return its value */
|
|
|
|
lua_pushvalue(L,3); /* value */
|
|
|
|
lua_call(L,1,0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* remove the top */
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* remove the .set */
|
|
|
|
return 0;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* registering a module in lua */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_module_begin(lua_State* L,const char* name)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
lua_pushstring(L,name);
|
|
|
|
lua_newtable(L); /* the table */
|
|
|
|
/* add meta table */
|
|
|
|
lua_newtable(L); /* the meta table */
|
|
|
|
SWIG_Lua_add_function(L,"__index",SWIG_Lua_module_get);
|
|
|
|
SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_module_set);
|
|
|
|
lua_pushstring(L,".get");
|
|
|
|
lua_newtable(L); /* the .get table */
|
|
|
|
lua_rawset(L,-3); /* add .get into metatable */
|
|
|
|
lua_pushstring(L,".set");
|
|
|
|
lua_newtable(L); /* the .set table */
|
|
|
|
lua_rawset(L,-3); /* add .set into metatable */
|
|
|
|
lua_setmetatable(L,-2); /* sets meta table in module */
|
|
|
|
lua_rawset(L,-3); /* add module into parent */
|
|
|
|
SWIG_Lua_get_table(L,name); /* get the table back out */
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* ending the register */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_module_end(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pop(L,1); /* tidy stack (remove module) */
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* adding a linked variable to the module */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
lua_getmetatable(L,-1); /* get the metatable */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
SWIG_Lua_get_table(L,".get"); /* find the .get table */
|
|
|
|
assert(lua_istable(L,-1)); /* should be a table: */
|
|
|
|
SWIG_Lua_add_function(L,name,getFn);
|
|
|
|
lua_pop(L,1); /* tidy stack (remove table) */
|
|
|
|
if (setFn) /* if there is a set fn */
|
|
|
|
{
|
|
|
|
SWIG_Lua_get_table(L,".set"); /* find the .set table */
|
|
|
|
assert(lua_istable(L,-1)); /* should be a table: */
|
|
|
|
SWIG_Lua_add_function(L,name,setFn);
|
|
|
|
lua_pop(L,1); /* tidy stack (remove table) */
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* tidy stack (remove meta) */
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* adding a function module */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
SWIG_Lua_add_function(L,name,fn);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* global variable support code: classes
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/* the class.get method, performs the lookup of class attributes */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN int SWIG_Lua_class_get(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
/* there should be 2 params passed in
|
|
|
|
(1) userdata (not the meta table)
|
|
|
|
(2) string name of the attribute
|
2008-04-28 17:33:58 +00:00
|
|
|
*/
|
2010-09-10 01:36:27 +02:00
|
|
|
assert(lua_isuserdata(L,-2)); /* just in case */
|
|
|
|
lua_getmetatable(L,-2); /* get the meta table */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
SWIG_Lua_get_table(L,".get"); /* find the .get table */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
/* look for the key in the .get table */
|
|
|
|
lua_pushvalue(L,2); /* key */
|
|
|
|
lua_rawget(L,-2);
|
|
|
|
lua_remove(L,-2); /* stack tidy, remove .get table */
|
|
|
|
if (lua_iscfunction(L,-1))
|
|
|
|
{ /* found it so call the fn & return its value */
|
|
|
|
lua_pushvalue(L,1); /* the userdata */
|
|
|
|
lua_call(L,1,1); /* 1 value in (userdata),1 out (result) */
|
|
|
|
lua_remove(L,-2); /* stack tidy, remove metatable */
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* remove whatever was there */
|
|
|
|
/* ok, so try the .fn table */
|
|
|
|
SWIG_Lua_get_table(L,".fn"); /* find the .get table */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
lua_pushvalue(L,2); /* key */
|
|
|
|
lua_rawget(L,-2); /* look for the fn */
|
|
|
|
lua_remove(L,-2); /* stack tidy, remove .fn table */
|
|
|
|
if (lua_iscfunction(L,-1))
|
|
|
|
{ /* found it so return the fn & let lua call it */
|
|
|
|
lua_remove(L,-2); /* stack tidy, remove metatable */
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* remove whatever was there */
|
|
|
|
/* NEW: looks for the __getitem() fn
|
|
|
|
this is a user provided get fn */
|
|
|
|
SWIG_Lua_get_table(L,"__getitem"); /* find the __getitem fn */
|
|
|
|
if (lua_iscfunction(L,-1)) /* if its there */
|
|
|
|
{ /* found it so call the fn & return its value */
|
|
|
|
lua_pushvalue(L,1); /* the userdata */
|
|
|
|
lua_pushvalue(L,2); /* the parameter */
|
|
|
|
lua_call(L,2,1); /* 2 value in (userdata),1 out (result) */
|
|
|
|
lua_remove(L,-2); /* stack tidy, remove metatable */
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0; /* sorry not known */
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* the class.set method, performs the lookup of class attributes */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN int SWIG_Lua_class_set(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
/* there should be 3 params passed in
|
|
|
|
(1) table (not the meta table)
|
|
|
|
(2) string name of the attribute
|
|
|
|
(3) any for the new value
|
2008-04-28 17:33:58 +00:00
|
|
|
printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n",
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_topointer(L,1),lua_typename(L,lua_type(L,1)),
|
|
|
|
lua_tostring(L,2),
|
|
|
|
lua_topointer(L,3),lua_typename(L,lua_type(L,3)));*/
|
|
|
|
|
|
|
|
assert(lua_isuserdata(L,1)); /* just in case */
|
|
|
|
lua_getmetatable(L,1); /* get the meta table */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
|
|
|
|
SWIG_Lua_get_table(L,".set"); /* find the .set table */
|
|
|
|
if (lua_istable(L,-1))
|
|
|
|
{
|
|
|
|
/* look for the key in the .set table */
|
|
|
|
lua_pushvalue(L,2); /* key */
|
|
|
|
lua_rawget(L,-2);
|
|
|
|
if (lua_iscfunction(L,-1))
|
|
|
|
{ /* found it so call the fn & return its value */
|
|
|
|
lua_pushvalue(L,1); /* userdata */
|
|
|
|
lua_pushvalue(L,3); /* value */
|
|
|
|
lua_call(L,2,0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* remove the value */
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* remove the value .set table */
|
|
|
|
/* NEW: looks for the __setitem() fn
|
|
|
|
this is a user provided set fn */
|
|
|
|
SWIG_Lua_get_table(L,"__setitem"); /* find the fn */
|
|
|
|
if (lua_iscfunction(L,-1)) /* if its there */
|
|
|
|
{ /* found it so call the fn & return its value */
|
|
|
|
lua_pushvalue(L,1); /* the userdata */
|
|
|
|
lua_pushvalue(L,2); /* the parameter */
|
|
|
|
lua_pushvalue(L,3); /* the value */
|
|
|
|
lua_call(L,3,0); /* 3 values in ,0 out */
|
|
|
|
lua_remove(L,-2); /* stack tidy, remove metatable */
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* the class.destruct method called by the interpreter */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN int SWIG_Lua_class_destruct(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
/* there should be 1 params passed in
|
|
|
|
(1) userdata (not the meta table) */
|
|
|
|
swig_lua_userdata* usr;
|
|
|
|
swig_lua_class* clss;
|
|
|
|
assert(lua_isuserdata(L,-1)); /* just in case */
|
|
|
|
usr=(swig_lua_userdata*)lua_touserdata(L,-1); /* get it */
|
|
|
|
/* if must be destroyed & has a destructor */
|
|
|
|
if (usr->own) /* if must be destroyed */
|
|
|
|
{
|
|
|
|
clss=(swig_lua_class*)usr->type->clientdata; /* get the class */
|
|
|
|
if (clss && clss->destructor) /* there is a destroy fn */
|
|
|
|
{
|
|
|
|
clss->destructor(usr->ptr); /* bye bye */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* gets the swig class registry (or creates it) */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_get_class_registry(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
/* add this all into the swig registry: */
|
|
|
|
lua_pushstring(L,"SWIG");
|
|
|
|
lua_rawget(L,LUA_REGISTRYINDEX); /* get the registry */
|
|
|
|
if (!lua_istable(L,-1)) /* not there */
|
|
|
|
{ /* must be first time, so add it */
|
|
|
|
lua_pop(L,1); /* remove the result */
|
|
|
|
lua_pushstring(L,"SWIG");
|
|
|
|
lua_newtable(L);
|
|
|
|
lua_rawset(L,LUA_REGISTRYINDEX);
|
|
|
|
/* then get it */
|
|
|
|
lua_pushstring(L,"SWIG");
|
|
|
|
lua_rawget(L,LUA_REGISTRYINDEX);
|
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* helper fn to get the classes metatable from the register */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State* L,const char* cname)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
SWIG_Lua_get_class_registry(L); /* get the registry */
|
|
|
|
lua_pushstring(L,cname); /* get the name */
|
|
|
|
lua_rawget(L,-2); /* get it */
|
|
|
|
lua_remove(L,-2); /* tidy up (remove registry) */
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* helper add a variable to a registered class */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
SWIG_Lua_get_table(L,".get"); /* find the .get table */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
SWIG_Lua_add_function(L,name,getFn);
|
|
|
|
lua_pop(L,1); /* tidy stack (remove table) */
|
|
|
|
if (setFn)
|
|
|
|
{
|
|
|
|
SWIG_Lua_get_table(L,".set"); /* find the .set table */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
SWIG_Lua_add_function(L,name,setFn);
|
|
|
|
lua_pop(L,1); /* tidy stack (remove table) */
|
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* helper to recursively add class details (attributes & operations) */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
int i;
|
|
|
|
/* call all the base classes first: we can then override these later: */
|
|
|
|
for(i=0;clss->bases[i];i++)
|
|
|
|
{
|
|
|
|
SWIG_Lua_add_class_details(L,clss->bases[i]);
|
|
|
|
}
|
|
|
|
/* add fns */
|
|
|
|
for(i=0;clss->attributes[i].name;i++){
|
|
|
|
SWIG_Lua_add_class_variable(L,clss->attributes[i].name,clss->attributes[i].getmethod,clss->attributes[i].setmethod);
|
|
|
|
}
|
|
|
|
/* add methods to the metatable */
|
|
|
|
SWIG_Lua_get_table(L,".fn"); /* find the .fn table */
|
|
|
|
assert(lua_istable(L,-1)); /* just in case */
|
|
|
|
for(i=0;clss->methods[i].name;i++){
|
|
|
|
SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
|
|
|
|
}
|
|
|
|
lua_pop(L,1); /* tidy stack (remove table) */
|
|
|
|
/* add operator overloads
|
|
|
|
these look ANY method which start with "__" and assume they
|
|
|
|
are operator overloads & add them to the metatable
|
|
|
|
(this might mess up is someone defines a method __gc (the destructor)*/
|
|
|
|
for(i=0;clss->methods[i].name;i++){
|
|
|
|
if (clss->methods[i].name[0]=='_' && clss->methods[i].name[1]=='_'){
|
|
|
|
SWIG_Lua_add_function(L,clss->methods[i].name,clss->methods[i].method);
|
|
|
|
}
|
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* performs the entire class registration process */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
/* add its constructor to module with the name of the class
|
|
|
|
so you can do MyClass(...) as well as new_MyClass(...)
|
|
|
|
BUT only if a constructor is defined
|
|
|
|
(this overcomes the problem of pure virtual classes without constructors)*/
|
|
|
|
if (clss->constructor)
|
|
|
|
SWIG_Lua_add_function(L,clss->name,clss->constructor);
|
|
|
|
|
|
|
|
SWIG_Lua_get_class_registry(L); /* get the registry */
|
|
|
|
lua_pushstring(L,clss->name); /* get the name */
|
|
|
|
lua_newtable(L); /* create the metatable */
|
|
|
|
/* add string of class name called ".type" */
|
|
|
|
lua_pushstring(L,".type");
|
|
|
|
lua_pushstring(L,clss->name);
|
|
|
|
lua_rawset(L,-3);
|
|
|
|
/* add a table called ".get" */
|
|
|
|
lua_pushstring(L,".get");
|
|
|
|
lua_newtable(L);
|
|
|
|
lua_rawset(L,-3);
|
|
|
|
/* add a table called ".set" */
|
|
|
|
lua_pushstring(L,".set");
|
|
|
|
lua_newtable(L);
|
|
|
|
lua_rawset(L,-3);
|
|
|
|
/* add a table called ".fn" */
|
|
|
|
lua_pushstring(L,".fn");
|
|
|
|
lua_newtable(L);
|
|
|
|
lua_rawset(L,-3);
|
|
|
|
/* add accessor fns for using the .get,.set&.fn */
|
|
|
|
SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
|
|
|
|
SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
|
|
|
|
SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
|
|
|
|
/* add it */
|
|
|
|
lua_rawset(L,-3); /* metatable into registry */
|
|
|
|
lua_pop(L,1); /* tidy stack (remove registry) */
|
|
|
|
|
|
|
|
SWIG_Lua_get_class_metatable(L,clss->name);
|
|
|
|
SWIG_Lua_add_class_details(L,clss); /* recursive adding of details (atts & ops) */
|
|
|
|
lua_pop(L,1); /* tidy stack (remove class metatable) */
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* Class/structure conversion fns
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/* pushes a new object into the lua stack */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_userdata* usr;
|
|
|
|
if (!ptr){
|
|
|
|
lua_pushnil(L);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
usr=(swig_lua_userdata*)lua_newuserdata(L,sizeof(swig_lua_userdata)); /* get data */
|
|
|
|
usr->ptr=ptr; /* set the ptr */
|
|
|
|
usr->type=type;
|
|
|
|
usr->own=own;
|
|
|
|
if (type->clientdata) /* there is clientdata: so add the metatable */
|
|
|
|
{
|
|
|
|
SWIG_Lua_get_class_metatable(L,((swig_lua_class*)(type->clientdata))->name);
|
|
|
|
if (lua_istable(L,-1))
|
|
|
|
{
|
|
|
|
lua_setmetatable(L,-2);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
lua_pop(L,1);
|
|
|
|
}
|
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* takes a object from the lua stack & converts it into an object of the correct type
|
|
|
|
(if possible) */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_userdata* usr;
|
|
|
|
swig_cast_info *cast;
|
|
|
|
usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */
|
|
|
|
if (usr)
|
|
|
|
{
|
|
|
|
cast=SWIG_TypeCheckStruct(usr->type,type);
|
|
|
|
if (cast)
|
|
|
|
{
|
|
|
|
*ptr=SWIG_TypeCast(cast,usr->ptr);
|
|
|
|
return 0; /* ok */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 1; /* error */
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags,
|
2010-09-10 01:36:27 +02:00
|
|
|
int argnum,const char* func_name){
|
|
|
|
void* result;
|
|
|
|
if (SWIG_ConvertPtr(L,index,&result,type,flags)){
|
|
|
|
lua_pushfstring(L,"Error in %s, expected a %s at argument number %d\n",
|
|
|
|
func_name,(type && type->str)?type->str:"void*",argnum);
|
|
|
|
lua_error(L);
|
|
|
|
}
|
|
|
|
return result;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* lua callable function to get the userdata's type */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME int SWIG_Lua_type(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_userdata* usr;
|
|
|
|
if (!lua_isuserdata(L,1)) /* just in case */
|
|
|
|
return 0; /* nil reply */
|
|
|
|
usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
|
|
|
|
lua_pushstring(L,usr->type->name);
|
|
|
|
return 1;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
/* lua callable function to compare userdata's value
|
|
|
|
the issue is that two userdata may point to the same thing
|
|
|
|
but to lua, they are different objects */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME int SWIG_Lua_equal(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
int result;
|
|
|
|
swig_lua_userdata *usr1,*usr2;
|
|
|
|
if (!lua_isuserdata(L,1) || !lua_isuserdata(L,2)) /* just in case */
|
|
|
|
return 0; /* nil reply */
|
|
|
|
usr1=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */
|
|
|
|
usr2=(swig_lua_userdata*)lua_touserdata(L,2); /* get data */
|
|
|
|
result=(usr1->ptr==usr2->ptr && usr1->type==usr2->type);
|
|
|
|
lua_pushboolean(L,result);
|
|
|
|
return 1;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* global variable support code: class/struct typemap functions
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
/* Install Constants */
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGINTERN void
|
|
|
|
SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
|
|
|
|
int i;
|
|
|
|
for (i = 0; constants[i].type; i++) {
|
|
|
|
switch(constants[i].type) {
|
|
|
|
case SWIG_LUA_INT:
|
|
|
|
lua_pushstring(L,constants[i].name);
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushnumber(L,(double)constants[i].lvalue);
|
2008-06-02 23:37:12 +00:00
|
|
|
lua_rawset(L,-3);
|
|
|
|
break;
|
|
|
|
case SWIG_LUA_FLOAT:
|
|
|
|
lua_pushstring(L,constants[i].name);
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushnumber(L,(double)constants[i].dvalue);
|
2008-06-02 23:37:12 +00:00
|
|
|
lua_rawset(L,-3);
|
|
|
|
break;
|
|
|
|
case SWIG_LUA_STRING:
|
|
|
|
lua_pushstring(L,constants[i].name);
|
|
|
|
lua_pushstring(L,(char *) constants[i].pvalue);
|
|
|
|
lua_rawset(L,-3);
|
|
|
|
break;
|
|
|
|
case SWIG_LUA_POINTER:
|
|
|
|
lua_pushstring(L,constants[i].name);
|
|
|
|
SWIG_NewPointerObj(L,constants[i].pvalue, *(constants[i]).ptype,0);
|
|
|
|
lua_rawset(L,-3);
|
|
|
|
break;
|
|
|
|
case SWIG_LUA_BINARY:
|
2010-09-10 01:36:27 +02:00
|
|
|
/* TODO?? */
|
|
|
|
/* obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); */
|
2008-06-02 23:37:12 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
/* storing/access of swig_module_info */
|
|
|
|
SWIGRUNTIME swig_module_info *
|
|
|
|
SWIG_Lua_GetModule(lua_State* L) {
|
|
|
|
swig_module_info *ret = 0;
|
|
|
|
lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
|
|
|
|
lua_rawget(L,LUA_REGISTRYINDEX);
|
|
|
|
if (lua_islightuserdata(L,-1))
|
|
|
|
ret=(swig_module_info*)lua_touserdata(L,-1);
|
|
|
|
lua_pop(L,1); /* tidy */
|
|
|
|
return ret;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
SWIGRUNTIME void
|
|
|
|
SWIG_Lua_SetModule(lua_State* L, swig_module_info *module) {
|
|
|
|
/* add this all into the Lua registry: */
|
|
|
|
lua_pushstring(L,"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
|
|
|
|
lua_pushlightuserdata(L,(void*)module);
|
|
|
|
lua_rawset(L,LUA_REGISTRYINDEX);
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* ------------------------------ end luarun.swg ------------------------------ */
|
|
|
|
|
|
|
|
|
|
|
|
/* -------- TYPES TABLE (BEGIN) -------- */
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
#define SWIGTYPE_SWIGLUA_FN swig_types[0]
|
|
|
|
#define SWIGTYPE_p_API swig_types[1]
|
|
|
|
#define SWIGTYPE_p_CoreSession swig_types[2]
|
|
|
|
#define SWIGTYPE_p_DTMF swig_types[3]
|
|
|
|
#define SWIGTYPE_p_Event swig_types[4]
|
|
|
|
#define SWIGTYPE_p_EventConsumer swig_types[5]
|
|
|
|
#define SWIGTYPE_p_IVRMenu swig_types[6]
|
|
|
|
#define SWIGTYPE_p_LUA__Dbh swig_types[7]
|
|
|
|
#define SWIGTYPE_p_LUA__Session swig_types[8]
|
2010-09-07 11:45:56 -05:00
|
|
|
#define SWIGTYPE_p_Stream swig_types[9]
|
|
|
|
#define SWIGTYPE_p_input_callback_state swig_types[10]
|
|
|
|
#define SWIGTYPE_p_lua_State swig_types[11]
|
|
|
|
#define SWIGTYPE_p_p_switch_event_node_t swig_types[12]
|
|
|
|
#define SWIGTYPE_p_session_flag_t swig_types[13]
|
|
|
|
#define SWIGTYPE_p_switch_call_cause_t swig_types[14]
|
|
|
|
#define SWIGTYPE_p_switch_channel_state_t swig_types[15]
|
|
|
|
#define SWIGTYPE_p_switch_channel_t swig_types[16]
|
|
|
|
#define SWIGTYPE_p_switch_core_session_t swig_types[17]
|
|
|
|
#define SWIGTYPE_p_switch_event_t swig_types[18]
|
|
|
|
#define SWIGTYPE_p_switch_event_types_t swig_types[19]
|
|
|
|
#define SWIGTYPE_p_switch_input_args_t swig_types[20]
|
|
|
|
#define SWIGTYPE_p_switch_input_type_t swig_types[21]
|
|
|
|
#define SWIGTYPE_p_switch_priority_t swig_types[22]
|
|
|
|
#define SWIGTYPE_p_switch_queue_t swig_types[23]
|
|
|
|
#define SWIGTYPE_p_switch_state_handler_table_t swig_types[24]
|
|
|
|
#define SWIGTYPE_p_switch_status_t swig_types[25]
|
|
|
|
#define SWIGTYPE_p_switch_stream_handle_t swig_types[26]
|
|
|
|
#define SWIGTYPE_p_uint32_t swig_types[27]
|
|
|
|
#define SWIGTYPE_p_void swig_types[28]
|
2010-09-10 01:36:27 +02:00
|
|
|
#define SWIGTYPE_switch_call_cause_t swig_types[29]
|
|
|
|
#define SWIGTYPE_switch_channel_state_t swig_types[30]
|
|
|
|
#define SWIGTYPE_switch_event_types_t swig_types[31]
|
|
|
|
#define SWIGTYPE_switch_input_type_t swig_types[32]
|
|
|
|
#define SWIGTYPE_switch_priority_t swig_types[33]
|
|
|
|
#define SWIGTYPE_uint32_t swig_types[34]
|
|
|
|
static swig_type_info *swig_types[36];
|
|
|
|
static swig_module_info swig_module = {swig_types, 35, 0, 0, 0, 0};
|
2008-04-28 17:33:58 +00:00
|
|
|
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
|
|
|
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
|
|
|
|
|
|
|
/* -------- TYPES TABLE (END) -------- */
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
#define SWIG_init Freeswitch_Init
|
|
|
|
#define SWIG_name "freeswitch"
|
|
|
|
#define SWIG_import luaopen_freeswitch
|
2008-06-02 23:37:12 +00:00
|
|
|
|
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
#include "switch.h"
|
2008-04-28 17:33:58 +00:00
|
|
|
#include "switch_cpp.h"
|
|
|
|
#include "freeswitch_lua.h"
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_consoleLog(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
consoleLog(arg1,arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-02 16:43:54 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_consoleCleanLog(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
2008-06-02 23:37:12 +00:00
|
|
|
consoleCleanLog(arg1);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-02 16:43:54 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_IVRMenu(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
char *arg4 = (char *) 0 ;
|
|
|
|
char *arg5 = (char *) 0 ;
|
|
|
|
char *arg6 = (char *) 0 ;
|
|
|
|
char *arg7 = (char *) 0 ;
|
|
|
|
char *arg8 = (char *) 0 ;
|
2009-02-25 16:49:42 +00:00
|
|
|
char *arg9 = (char *) 0 ;
|
|
|
|
char *arg10 = (char *) 0 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
int arg11 ;
|
|
|
|
int arg12 ;
|
|
|
|
int arg13 ;
|
2008-10-01 18:27:29 +00:00
|
|
|
int arg14 ;
|
2009-02-25 16:49:42 +00:00
|
|
|
int arg15 ;
|
|
|
|
int arg16 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
IVRMenu *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isstring(L,4)) SWIG_fail_arg(4);
|
|
|
|
if(!lua_isstring(L,5)) SWIG_fail_arg(5);
|
|
|
|
if(!lua_isstring(L,6)) SWIG_fail_arg(6);
|
|
|
|
if(!lua_isstring(L,7)) SWIG_fail_arg(7);
|
|
|
|
if(!lua_isstring(L,8)) SWIG_fail_arg(8);
|
|
|
|
if(!lua_isstring(L,9)) SWIG_fail_arg(9);
|
|
|
|
if(!lua_isstring(L,10)) SWIG_fail_arg(10);
|
|
|
|
if(!lua_isnumber(L,11)) SWIG_fail_arg(11);
|
|
|
|
if(!lua_isnumber(L,12)) SWIG_fail_arg(12);
|
|
|
|
if(!lua_isnumber(L,13)) SWIG_fail_arg(13);
|
|
|
|
if(!lua_isnumber(L,14)) SWIG_fail_arg(14);
|
|
|
|
if(!lua_isnumber(L,15)) SWIG_fail_arg(15);
|
|
|
|
if(!lua_isnumber(L,16)) SWIG_fail_arg(16);
|
|
|
|
arg1=(IVRMenu *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_IVRMenu,0,1,"new_IVRMenu");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
|
|
|
arg4 = (char*)lua_tostring(L, 4);
|
|
|
|
arg5 = (char*)lua_tostring(L, 5);
|
|
|
|
arg6 = (char*)lua_tostring(L, 6);
|
|
|
|
arg7 = (char*)lua_tostring(L, 7);
|
|
|
|
arg8 = (char*)lua_tostring(L, 8);
|
|
|
|
arg9 = (char*)lua_tostring(L, 9);
|
|
|
|
arg10 = (char*)lua_tostring(L, 10);
|
2008-06-02 23:37:12 +00:00
|
|
|
arg11 = (int)lua_tonumber(L, 11);
|
|
|
|
arg12 = (int)lua_tonumber(L, 12);
|
|
|
|
arg13 = (int)lua_tonumber(L, 13);
|
2008-10-01 18:27:29 +00:00
|
|
|
arg14 = (int)lua_tonumber(L, 14);
|
2009-02-25 16:49:42 +00:00
|
|
|
arg15 = (int)lua_tonumber(L, 15);
|
|
|
|
arg16 = (int)lua_tonumber(L, 16);
|
|
|
|
result = (IVRMenu *)new IVRMenu(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8,(char const *)arg9,(char const *)arg10,arg11,arg12,arg13,arg14,arg15,arg16);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_IVRMenu,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-02 16:43:54 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_delete_IVRMenu(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(IVRMenu *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_IVRMenu,0,1,"delete_IVRMenu");
|
2008-06-02 23:37:12 +00:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-02 16:43:54 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_IVRMenu_bindAction(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
char *arg4 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isstring(L,4)) SWIG_fail_arg(4);
|
|
|
|
arg1=(IVRMenu *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_IVRMenu,0,1,"IVRMenu_bindAction");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
|
|
|
arg4 = (char*)lua_tostring(L, 4);
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->bindAction(arg2,(char const *)arg3,(char const *)arg4);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 23:42:37 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_IVRMenu_execute(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
IVRMenu *arg1 = (IVRMenu *) 0 ;
|
|
|
|
CoreSession *arg2 = (CoreSession *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(IVRMenu *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_IVRMenu,0,1,"IVRMenu_execute");
|
|
|
|
arg2=(CoreSession *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_CoreSession,0,2,"IVRMenu_execute");
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->execute(arg2,(char const *)arg3);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 23:42:37 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static void swig_delete_IVRMenu(void *obj) {
|
|
|
|
IVRMenu *arg1 = (IVRMenu *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_IVRMenu_methods[] = {
|
|
|
|
{"bindAction", _wrap_IVRMenu_bindAction},
|
|
|
|
{"execute", _wrap_IVRMenu_execute},
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_IVRMenu_attributes[] = {
|
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_IVRMenu_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_IVRMenu = { "IVRMenu", &SWIGTYPE_p_IVRMenu,_wrap_new_IVRMenu, swig_delete_IVRMenu, swig_IVRMenu_methods, swig_IVRMenu_attributes, swig_IVRMenu_bases };
|
2008-04-30 23:42:37 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_API(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
API *result = 0 ;
|
|
|
|
|
|
|
|
result = (API *)new API();
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_API,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 23:42:37 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_delete_API(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
API *arg1 = (API *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(API *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_API,0,1,"delete_API");
|
2008-06-02 23:37:12 +00:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 23:42:37 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_API_execute(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
API *arg1 = (API *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg3 = (char *) NULL ;
|
2008-06-02 23:37:12 +00:00
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(API *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_API,0,1,"API_execute");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=3){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2009-09-02 18:33:33 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3);
|
2009-09-02 18:33:33 +00:00
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2009-09-02 18:33:33 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_API_executeString(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
API *arg1 = (API *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(API *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_API,0,1,"API_executeString");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *)(arg1)->executeString((char const *)arg2);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2009-02-19 00:43:11 +00:00
|
|
|
static int _wrap_API_getTime(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
API *arg1 = (API *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(API *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_API,0,1,"API_getTime");
|
2009-02-19 00:43:11 +00:00
|
|
|
result = (char *)(arg1)->getTime();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2009-02-19 00:43:11 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static void swig_delete_API(void *obj) {
|
|
|
|
API *arg1 = (API *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_API_methods[] = {
|
|
|
|
{"execute", _wrap_API_execute},
|
|
|
|
{"executeString", _wrap_API_executeString},
|
2009-02-19 00:43:11 +00:00
|
|
|
{"getTime", _wrap_API_getTime},
|
2008-06-02 23:37:12 +00:00
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_API_attributes[] = {
|
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_API_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_API = { "API", &SWIGTYPE_p_API,_wrap_new_API, swig_delete_API, swig_API_methods, swig_API_attributes, swig_API_bases };
|
2008-06-02 23:37:12 +00:00
|
|
|
|
|
|
|
static int _wrap_input_callback_state_t_function_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
void *arg2 = (void *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"input_callback_state_t_function_set");
|
|
|
|
arg2=((swig_lua_userdata*)(lua_touserdata(L,2)))->ptr;
|
2008-06-02 23:37:12 +00:00
|
|
|
if (arg1) (arg1)->function = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_input_callback_state_t_function_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
void *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"input_callback_state_t_function_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (void *) ((arg1)->function);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_input_callback_state_t_threadState_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
void *arg2 = (void *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"input_callback_state_t_threadState_set");
|
|
|
|
arg2=((swig_lua_userdata*)(lua_touserdata(L,2)))->ptr;
|
2008-06-02 23:37:12 +00:00
|
|
|
if (arg1) (arg1)->threadState = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_input_callback_state_t_threadState_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
void *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"input_callback_state_t_threadState_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (void *) ((arg1)->threadState);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_input_callback_state_t_extra_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
void *arg2 = (void *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"input_callback_state_t_extra_set");
|
|
|
|
arg2=((swig_lua_userdata*)(lua_touserdata(L,2)))->ptr;
|
2008-06-02 23:37:12 +00:00
|
|
|
if (arg1) (arg1)->extra = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_input_callback_state_t_extra_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
void *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"input_callback_state_t_extra_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (void *) ((arg1)->extra);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_input_callback_state_t_funcargs_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"input_callback_state_t_funcargs_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
{
|
|
|
|
if (arg1->funcargs) delete [] arg1->funcargs;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->funcargs = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->funcargs,arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
} else {
|
|
|
|
arg1->funcargs = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_input_callback_state_t_funcargs_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"input_callback_state_t_funcargs_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *) ((arg1)->funcargs);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_input_callback_state_t(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *result = 0 ;
|
|
|
|
|
|
|
|
result = (input_callback_state_t *)new input_callback_state_t();
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_input_callback_state,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_delete_input_callback_state_t(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(input_callback_state_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_input_callback_state,0,1,"delete_input_callback_state_t");
|
2008-06-02 23:37:12 +00:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static void swig_delete_input_callback_state_t(void *obj) {
|
|
|
|
input_callback_state_t *arg1 = (input_callback_state_t *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_input_callback_state_t_methods[] = {
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_input_callback_state_t_attributes[] = {
|
2010-09-10 01:36:27 +02:00
|
|
|
{ "function",_wrap_input_callback_state_t_function_get, _wrap_input_callback_state_t_function_set},
|
|
|
|
{ "threadState",_wrap_input_callback_state_t_threadState_get, _wrap_input_callback_state_t_threadState_set},
|
|
|
|
{ "extra",_wrap_input_callback_state_t_extra_get, _wrap_input_callback_state_t_extra_set},
|
|
|
|
{ "funcargs",_wrap_input_callback_state_t_funcargs_get, _wrap_input_callback_state_t_funcargs_set},
|
2008-06-02 23:37:12 +00:00
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_input_callback_state_t_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_input_callback_state_t = { "input_callback_state_t", &SWIGTYPE_p_input_callback_state,_wrap_new_input_callback_state_t, swig_delete_input_callback_state_t, swig_input_callback_state_t_methods, swig_input_callback_state_t_attributes, swig_input_callback_state_t_bases };
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-07-11 19:42:52 +00:00
|
|
|
static int _wrap_DTMF_digit_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
DTMF *arg1 = (DTMF *) 0 ;
|
|
|
|
char arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(DTMF *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_DTMF,0,1,"DTMF_digit_set");
|
|
|
|
arg2 = ((char*)lua_tostring(L, 2))[0];
|
2008-07-11 19:42:52 +00:00
|
|
|
if (arg1) (arg1)->digit = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_DTMF_digit_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
DTMF *arg1 = (DTMF *) 0 ;
|
|
|
|
char result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(DTMF *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_DTMF,0,1,"DTMF_digit_get");
|
2008-07-11 19:42:52 +00:00
|
|
|
result = (char) ((arg1)->digit);
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushfstring(L,"%c",result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_DTMF_duration_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
DTMF *arg1 = (DTMF *) 0 ;
|
|
|
|
uint32_t arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(DTMF *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_DTMF,0,1,"DTMF_duration_set");
|
|
|
|
{
|
|
|
|
uint32_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,2,(void**)(&argp),SWIGTYPE_p_uint32_t,0)) SWIG_fail;
|
|
|
|
arg2 = *argp;
|
2008-07-11 19:42:52 +00:00
|
|
|
}
|
|
|
|
if (arg1) (arg1)->duration = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_DTMF_duration_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
DTMF *arg1 = (DTMF *) 0 ;
|
|
|
|
uint32_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(DTMF *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_DTMF,0,1,"DTMF_duration_get");
|
2008-07-11 19:42:52 +00:00
|
|
|
result = ((arg1)->duration);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
uint32_t * resultptr;
|
|
|
|
resultptr = new uint32_t((uint32_t &) result);
|
2008-07-11 19:42:52 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_uint32_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_new_DTMF(lua_State* L) {
|
2008-07-11 19:42:52 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
char arg1 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
uint32_t arg2 = (uint32_t) SWITCH_DEFAULT_DTMF_DURATION ;
|
2008-07-11 19:42:52 +00:00
|
|
|
DTMF *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(lua_gettop(L)>=2 && !lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1 = ((char*)lua_tostring(L, 1))[0];
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=2){
|
2010-09-10 01:36:27 +02:00
|
|
|
{
|
|
|
|
uint32_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,2,(void**)(&argp),SWIGTYPE_p_uint32_t,0)) SWIG_fail;
|
|
|
|
arg2 = *argp;
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
2008-07-11 19:42:52 +00:00
|
|
|
}
|
|
|
|
result = (DTMF *)new DTMF(arg1,arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_DTMF,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_delete_DTMF(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
DTMF *arg1 = (DTMF *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(DTMF *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_DTMF,0,1,"delete_DTMF");
|
2008-07-11 19:42:52 +00:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void swig_delete_DTMF(void *obj) {
|
|
|
|
DTMF *arg1 = (DTMF *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_DTMF_methods[] = {
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_DTMF_attributes[] = {
|
2010-09-10 01:36:27 +02:00
|
|
|
{ "digit",_wrap_DTMF_digit_get, _wrap_DTMF_digit_set},
|
|
|
|
{ "duration",_wrap_DTMF_duration_get, _wrap_DTMF_duration_set},
|
2008-07-11 19:42:52 +00:00
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_DTMF_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_DTMF = { "DTMF", &SWIGTYPE_p_DTMF,_wrap_new_DTMF, swig_delete_DTMF, swig_DTMF_methods, swig_DTMF_attributes, swig_DTMF_bases };
|
2008-07-11 19:42:52 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Stream__SWIG_0(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Stream *result = 0 ;
|
|
|
|
|
|
|
|
result = (Stream *)new Stream();
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Stream,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Stream__SWIG_1(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0 ;
|
|
|
|
Stream *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(switch_stream_handle_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_switch_stream_handle_t,0,1,"new_Stream");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (Stream *)new Stream(arg1);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Stream,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Stream(lua_State* L) {
|
|
|
|
int argc;
|
|
|
|
int argv[2]={
|
|
|
|
1,2
|
|
|
|
};
|
|
|
|
|
|
|
|
argc = lua_gettop(L);
|
|
|
|
if (argc == 0) {
|
|
|
|
return _wrap_new_Stream__SWIG_0(L);
|
|
|
|
}
|
|
|
|
if (argc == 1) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_switch_stream_handle_t, 0)) {
|
2008-06-02 23:37:12 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_new_Stream__SWIG_1(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lua_pushstring(L,"No matching function for overloaded 'new_Stream'");
|
|
|
|
lua_error(L);return 0;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_delete_Stream(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Stream *arg1 = (Stream *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Stream *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Stream,0,1,"delete_Stream");
|
2008-06-02 23:37:12 +00:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Stream_write(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Stream *arg1 = (Stream *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Stream *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Stream,0,1,"Stream_write");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->write((char const *)arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Stream_get_data(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Stream *arg1 = (Stream *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Stream *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Stream,0,1,"Stream_get_data");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *)(arg1)->get_data();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static void swig_delete_Stream(void *obj) {
|
|
|
|
Stream *arg1 = (Stream *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_Stream_methods[] = {
|
|
|
|
{"write", _wrap_Stream_write},
|
|
|
|
{"get_data", _wrap_Stream_get_data},
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_Stream_attributes[] = {
|
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_Stream_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_Stream = { "Stream", &SWIGTYPE_p_Stream,_wrap_new_Stream, swig_delete_Stream, swig_Stream_methods, swig_Stream_attributes, swig_Stream_bases };
|
2008-06-02 23:37:12 +00:00
|
|
|
|
|
|
|
static int _wrap_Event_event_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
switch_event_t *arg2 = (switch_event_t *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_event_set");
|
|
|
|
arg2=(switch_event_t *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_switch_event_t,0,2,"Event_event_set");
|
2008-06-02 23:37:12 +00:00
|
|
|
if (arg1) (arg1)->event = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_event_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
switch_event_t *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_event_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (switch_event_t *) ((arg1)->event);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_switch_event_t,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_serialized_string_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_serialized_string_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
{
|
|
|
|
if (arg1->serialized_string) delete [] arg1->serialized_string;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->serialized_string = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->serialized_string,arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
} else {
|
|
|
|
arg1->serialized_string = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_serialized_string_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_serialized_string_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *) ((arg1)->serialized_string);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_mine_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
int arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_mine_set");
|
2008-06-02 23:37:12 +00:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
|
|
|
if (arg1) (arg1)->mine = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_mine_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_mine_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (int) ((arg1)->mine);
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Event__SWIG_0(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg2 = (char *) NULL ;
|
2008-06-02 23:37:12 +00:00
|
|
|
Event *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=2){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (Event *)new Event((char const *)arg1,(char const *)arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Event__SWIG_1(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
switch_event_t *arg1 = (switch_event_t *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
int arg2 = (int) 0 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
Event *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(switch_event_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_switch_event_t,0,1,"new_Event");
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=2){
|
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (Event *)new Event(arg1,arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Event(lua_State* L) {
|
|
|
|
int argc;
|
|
|
|
int argv[3]={
|
|
|
|
1,2,3
|
|
|
|
};
|
|
|
|
|
|
|
|
argc = lua_gettop(L);
|
2010-05-10 13:06:22 -05:00
|
|
|
if ((argc >= 1) && (argc <= 2)) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_switch_event_t, 0)) {
|
2008-06-02 23:37:12 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
2010-05-10 13:06:22 -05:00
|
|
|
if (argc <= 1) {
|
|
|
|
return _wrap_new_Event__SWIG_1(L);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
{
|
|
|
|
_v = lua_isnumber(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
2010-05-10 13:06:22 -05:00
|
|
|
return _wrap_new_Event__SWIG_1(L);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
if ((argc >= 1) && (argc <= 2)) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[0]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
2010-05-10 13:06:22 -05:00
|
|
|
if (argc <= 1) {
|
|
|
|
return _wrap_new_Event__SWIG_0(L);
|
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_new_Event__SWIG_0(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lua_pushstring(L,"No matching function for overloaded 'new_Event'");
|
|
|
|
lua_error(L);return 0;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_delete_Event(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"delete_Event");
|
2008-06-02 23:37:12 +00:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_Event_serialize(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg2 = (char *) NULL ;
|
2008-06-02 23:37:12 +00:00
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_serialize");
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=2){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *)(arg1)->serialize((char const *)arg2);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_Event_setPriority(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
switch_priority_t arg2 = (switch_priority_t) SWITCH_PRIORITY_NORMAL ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(lua_gettop(L)>=2 && !lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_setPriority");
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=2){
|
2010-09-10 01:36:27 +02:00
|
|
|
{
|
|
|
|
switch_priority_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,2,(void**)(&argp),SWIGTYPE_p_switch_priority_t,0)) SWIG_fail;
|
|
|
|
arg2 = *argp;
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
result = (bool)(arg1)->setPriority(arg2);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2010-05-10 13:06:22 -05:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_Event_getHeader(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg2 = (char *) 0 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_getHeader");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (char *)(arg1)->getHeader((char const *)arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_getBody(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_getBody");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *)(arg1)->getBody();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_getType(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_getType");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *)(arg1)->getType();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_addBody(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_addBody");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->addBody((char const *)arg2);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_addHeader(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_addHeader");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_delHeader(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_delHeader");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->delHeader((char const *)arg2);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Event_fire(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
Event *arg1 = (Event *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(Event *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_Event,0,1,"Event_fire");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->fire();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static void swig_delete_Event(void *obj) {
|
|
|
|
Event *arg1 = (Event *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_Event_methods[] = {
|
|
|
|
{"serialize", _wrap_Event_serialize},
|
|
|
|
{"setPriority", _wrap_Event_setPriority},
|
|
|
|
{"getHeader", _wrap_Event_getHeader},
|
|
|
|
{"getBody", _wrap_Event_getBody},
|
|
|
|
{"getType", _wrap_Event_getType},
|
|
|
|
{"addBody", _wrap_Event_addBody},
|
|
|
|
{"addHeader", _wrap_Event_addHeader},
|
|
|
|
{"delHeader", _wrap_Event_delHeader},
|
|
|
|
{"fire", _wrap_Event_fire},
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_Event_attributes[] = {
|
2010-09-10 01:36:27 +02:00
|
|
|
{ "event",_wrap_Event_event_get, _wrap_Event_event_set},
|
|
|
|
{ "serialized_string",_wrap_Event_serialized_string_get, _wrap_Event_serialized_string_set},
|
|
|
|
{ "mine",_wrap_Event_mine_get, _wrap_Event_mine_set},
|
2008-06-02 23:37:12 +00:00
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_Event_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_Event = { "Event", &SWIGTYPE_p_Event,_wrap_new_Event, swig_delete_Event, swig_Event_methods, swig_Event_attributes, swig_Event_bases };
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-07-02 21:12:57 +00:00
|
|
|
static int _wrap_EventConsumer_events_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
switch_queue_t *arg2 = (switch_queue_t *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_events_set");
|
|
|
|
arg2=(switch_queue_t *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_switch_queue_t,0,2,"EventConsumer_events_set");
|
2008-07-02 21:12:57 +00:00
|
|
|
if (arg1) (arg1)->events = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_events_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
switch_queue_t *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_events_get");
|
2008-07-02 21:12:57 +00:00
|
|
|
result = (switch_queue_t *) ((arg1)->events);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_switch_queue_t,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_e_event_id_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
switch_event_types_t arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_e_event_id_set");
|
|
|
|
{
|
|
|
|
switch_event_types_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,2,(void**)(&argp),SWIGTYPE_p_switch_event_types_t,0)) SWIG_fail;
|
|
|
|
arg2 = *argp;
|
2008-07-02 21:12:57 +00:00
|
|
|
}
|
|
|
|
if (arg1) (arg1)->e_event_id = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_e_event_id_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
switch_event_types_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_e_event_id_get");
|
2008-07-02 21:12:57 +00:00
|
|
|
result = ((arg1)->e_event_id);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
switch_event_types_t * resultptr;
|
|
|
|
resultptr = new switch_event_types_t((switch_event_types_t &) result);
|
2008-07-02 21:12:57 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_event_types_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_e_callback_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_e_callback_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-07-02 21:12:57 +00:00
|
|
|
{
|
|
|
|
if (arg1->e_callback) delete [] arg1->e_callback;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->e_callback = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->e_callback,arg2);
|
2008-07-02 21:12:57 +00:00
|
|
|
} else {
|
|
|
|
arg1->e_callback = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_e_callback_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_e_callback_get");
|
2008-07-02 21:12:57 +00:00
|
|
|
result = (char *) ((arg1)->e_callback);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-07-02 21:12:57 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_e_subclass_name_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_e_subclass_name_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-07-02 21:12:57 +00:00
|
|
|
{
|
|
|
|
if (arg1->e_subclass_name) delete [] arg1->e_subclass_name;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->e_subclass_name = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->e_subclass_name,arg2);
|
2008-07-02 21:12:57 +00:00
|
|
|
} else {
|
|
|
|
arg1->e_subclass_name = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_e_subclass_name_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_e_subclass_name_get");
|
2008-07-02 21:12:57 +00:00
|
|
|
result = (char *) ((arg1)->e_subclass_name);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-07-02 21:12:57 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_e_cb_arg_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_e_cb_arg_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-07-02 21:12:57 +00:00
|
|
|
{
|
|
|
|
if (arg1->e_cb_arg) delete [] arg1->e_cb_arg;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->e_cb_arg = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->e_cb_arg,arg2);
|
2008-07-02 21:12:57 +00:00
|
|
|
} else {
|
|
|
|
arg1->e_cb_arg = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_e_cb_arg_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_e_cb_arg_get");
|
2008-07-02 21:12:57 +00:00
|
|
|
result = (char *) ((arg1)->e_cb_arg);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-07-02 21:12:57 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-17 18:37:27 -05:00
|
|
|
static int _wrap_EventConsumer_enodes_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
switch_event_node_t **arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_enodes_set");
|
|
|
|
arg2=(switch_event_node_t **)SWIG_MustGetPtr(L,2,SWIGTYPE_p_p_switch_event_node_t,0,2,"EventConsumer_enodes_set");
|
2010-05-17 18:37:27 -05:00
|
|
|
{
|
|
|
|
size_t ii;
|
|
|
|
switch_event_node_t * *b = (switch_event_node_t * *) arg1->enodes;
|
|
|
|
for (ii = 0; ii < (size_t)SWITCH_EVENT_ALL+1; ii++) b[ii] = *((switch_event_node_t * *) arg2 + ii);
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_enodes_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
switch_event_node_t **result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_enodes_get");
|
2010-05-17 18:37:27 -05:00
|
|
|
result = (switch_event_node_t **)(switch_event_node_t **) ((arg1)->enodes);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_p_switch_event_node_t,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_node_index_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
uint32_t arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_node_index_set");
|
|
|
|
{
|
|
|
|
uint32_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,2,(void**)(&argp),SWIGTYPE_p_uint32_t,0)) SWIG_fail;
|
|
|
|
arg2 = *argp;
|
2010-05-17 18:37:27 -05:00
|
|
|
}
|
|
|
|
if (arg1) (arg1)->node_index = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_EventConsumer_node_index_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
uint32_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_node_index_get");
|
2010-05-17 18:37:27 -05:00
|
|
|
result = ((arg1)->node_index);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
uint32_t * resultptr;
|
|
|
|
resultptr = new uint32_t((uint32_t &) result);
|
2010-05-17 18:37:27 -05:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_uint32_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_new_EventConsumer(lua_State* L) {
|
2008-07-02 21:12:57 +00:00
|
|
|
int SWIG_arg = -1;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg1 = (char *) NULL ;
|
|
|
|
char *arg2 = (char *) "" ;
|
2008-07-02 21:12:57 +00:00
|
|
|
EventConsumer *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(lua_gettop(L)>=1 && !lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg(2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=1){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
|
|
|
if(lua_gettop(L)>=2){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
2008-07-02 21:12:57 +00:00
|
|
|
result = (EventConsumer *)new EventConsumer((char const *)arg1,(char const *)arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_EventConsumer,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_delete_EventConsumer(lua_State* L) {
|
2008-07-02 21:12:57 +00:00
|
|
|
int SWIG_arg = -1;
|
2010-05-10 13:06:22 -05:00
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
2008-07-02 21:12:57 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"delete_EventConsumer");
|
2010-05-10 13:06:22 -05:00
|
|
|
delete arg1;
|
|
|
|
|
2008-07-02 21:12:57 +00:00
|
|
|
SWIG_arg=0;
|
2010-05-10 13:06:22 -05:00
|
|
|
|
2008-07-02 21:12:57 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_EventConsumer_bind(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) "" ;
|
|
|
|
int result;
|
2008-07-02 21:12:57 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_bind");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=3){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-07-02 21:12:57 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (int)(arg1)->bind((char const *)arg2,(char const *)arg3);
|
2008-07-02 21:12:57 +00:00
|
|
|
SWIG_arg=0;
|
2010-05-10 13:06:22 -05:00
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
2008-07-02 21:12:57 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_EventConsumer_pop(lua_State* L) {
|
2008-07-02 21:12:57 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
int arg2 = (int) 0 ;
|
2008-07-02 21:12:57 +00:00
|
|
|
Event *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(lua_gettop(L)>=2 && !lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(EventConsumer *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_EventConsumer,0,1,"EventConsumer_pop");
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=2){
|
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
2008-07-02 21:12:57 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (Event *)(arg1)->pop(arg2);
|
2008-07-02 21:12:57 +00:00
|
|
|
SWIG_arg=0;
|
2009-07-08 16:35:22 +00:00
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++;
|
2008-07-02 21:12:57 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void swig_delete_EventConsumer(void *obj) {
|
|
|
|
EventConsumer *arg1 = (EventConsumer *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_EventConsumer_methods[] = {
|
2010-05-10 13:06:22 -05:00
|
|
|
{"bind", _wrap_EventConsumer_bind},
|
2008-07-02 21:12:57 +00:00
|
|
|
{"pop", _wrap_EventConsumer_pop},
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_EventConsumer_attributes[] = {
|
2010-09-10 01:36:27 +02:00
|
|
|
{ "events",_wrap_EventConsumer_events_get, _wrap_EventConsumer_events_set},
|
|
|
|
{ "e_event_id",_wrap_EventConsumer_e_event_id_get, _wrap_EventConsumer_e_event_id_set},
|
|
|
|
{ "e_callback",_wrap_EventConsumer_e_callback_get, _wrap_EventConsumer_e_callback_set},
|
|
|
|
{ "e_subclass_name",_wrap_EventConsumer_e_subclass_name_get, _wrap_EventConsumer_e_subclass_name_set},
|
|
|
|
{ "e_cb_arg",_wrap_EventConsumer_e_cb_arg_get, _wrap_EventConsumer_e_cb_arg_set},
|
|
|
|
{ "enodes",_wrap_EventConsumer_enodes_get, _wrap_EventConsumer_enodes_set},
|
|
|
|
{ "node_index",_wrap_EventConsumer_node_index_get, _wrap_EventConsumer_node_index_set},
|
2008-07-02 21:12:57 +00:00
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_EventConsumer_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_EventConsumer = { "EventConsumer", &SWIGTYPE_p_EventConsumer,_wrap_new_EventConsumer, swig_delete_EventConsumer, swig_EventConsumer_methods, swig_EventConsumer_attributes, swig_EventConsumer_bases };
|
2008-07-02 21:12:57 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_delete_CoreSession(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"delete_CoreSession");
|
2008-06-02 23:37:12 +00:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_session_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_core_session_t *arg2 = (switch_core_session_t *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_session_set");
|
|
|
|
arg2=(switch_core_session_t *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_switch_core_session_t,0,2,"CoreSession_session_set");
|
2008-06-02 23:37:12 +00:00
|
|
|
if (arg1) (arg1)->session = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_session_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_core_session_t *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_session_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (switch_core_session_t *) ((arg1)->session);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_switch_core_session_t,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_channel_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_channel_t *arg2 = (switch_channel_t *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_channel_set");
|
|
|
|
arg2=(switch_channel_t *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_switch_channel_t,0,2,"CoreSession_channel_set");
|
2008-06-02 23:37:12 +00:00
|
|
|
if (arg1) (arg1)->channel = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_channel_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_channel_t *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_channel_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (switch_channel_t *) ((arg1)->channel);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_switch_channel_t,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_flags_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
unsigned int arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_flags_set");
|
2008-06-02 23:37:12 +00:00
|
|
|
arg2 = (unsigned int)lua_tonumber(L, 2);
|
|
|
|
if (arg1) (arg1)->flags = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_flags_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
unsigned int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_flags_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (unsigned int) ((arg1)->flags);
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_allocated_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_allocated_set");
|
2008-06-02 23:37:12 +00:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
|
|
|
if (arg1) (arg1)->allocated = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_allocated_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_allocated_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (int) ((arg1)->allocated);
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_cb_state_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
input_callback_state *arg2 = (input_callback_state *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_cb_state_set");
|
|
|
|
arg2=(input_callback_state *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_input_callback_state,0,2,"CoreSession_cb_state_set");
|
2008-06-02 23:37:12 +00:00
|
|
|
if (arg1) (arg1)->cb_state = *arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_cb_state_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
input_callback_state *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_cb_state_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (input_callback_state *)& ((arg1)->cb_state);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_input_callback_state,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_hook_state_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_channel_state_t arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_hook_state_set");
|
|
|
|
{
|
|
|
|
switch_channel_state_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,2,(void**)(&argp),SWIGTYPE_p_switch_channel_state_t,0)) SWIG_fail;
|
|
|
|
arg2 = *argp;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
if (arg1) (arg1)->hook_state = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_hook_state_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_channel_state_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_hook_state_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = ((arg1)->hook_state);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
switch_channel_state_t * resultptr;
|
|
|
|
resultptr = new switch_channel_state_t((switch_channel_state_t &) result);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_channel_state_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2009-09-17 23:28:38 +00:00
|
|
|
static int _wrap_CoreSession_cause_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_call_cause_t arg2 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_cause_set");
|
|
|
|
{
|
|
|
|
switch_call_cause_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,2,(void**)(&argp),SWIGTYPE_p_switch_call_cause_t,0)) SWIG_fail;
|
|
|
|
arg2 = *argp;
|
2009-09-17 23:28:38 +00:00
|
|
|
}
|
|
|
|
if (arg1) (arg1)->cause = arg2;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_cause_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_call_cause_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_cause_get");
|
2009-09-17 23:28:38 +00:00
|
|
|
result = ((arg1)->cause);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
switch_call_cause_t * resultptr;
|
|
|
|
resultptr = new switch_call_cause_t((switch_call_cause_t &) result);
|
2009-09-17 23:28:38 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_call_cause_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-16 20:19:11 +00:00
|
|
|
static int _wrap_CoreSession_uuid_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_uuid_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-07-16 20:19:11 +00:00
|
|
|
{
|
|
|
|
if (arg1->uuid) delete [] arg1->uuid;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->uuid = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->uuid,arg2);
|
2008-07-16 20:19:11 +00:00
|
|
|
} else {
|
|
|
|
arg1->uuid = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_uuid_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_uuid_get");
|
2008-07-16 20:19:11 +00:00
|
|
|
result = (char *) ((arg1)->uuid);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-07-16 20:19:11 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_tts_name_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_tts_name_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-07-16 20:19:11 +00:00
|
|
|
{
|
|
|
|
if (arg1->tts_name) delete [] arg1->tts_name;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->tts_name = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->tts_name,arg2);
|
2008-07-16 20:19:11 +00:00
|
|
|
} else {
|
|
|
|
arg1->tts_name = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_tts_name_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_tts_name_get");
|
2008-07-16 20:19:11 +00:00
|
|
|
result = (char *) ((arg1)->tts_name);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-07-16 20:19:11 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_voice_name_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_voice_name_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-07-16 20:19:11 +00:00
|
|
|
{
|
|
|
|
if (arg1->voice_name) delete [] arg1->voice_name;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->voice_name = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->voice_name,arg2);
|
2008-07-16 20:19:11 +00:00
|
|
|
} else {
|
|
|
|
arg1->voice_name = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_voice_name_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_voice_name_get");
|
2008-07-16 20:19:11 +00:00
|
|
|
result = (char *) ((arg1)->voice_name);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-07-16 20:19:11 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_answer(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_answer");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (int)(arg1)->answer();
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-04-29 23:34:26 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_preAnswer(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_preAnswer");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (int)(arg1)->preAnswer();
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_hangup(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg2 = (char *) "normal_clearing" ;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_hangup");
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=2){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
(arg1)->hangup((char const *)arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-05-12 00:24:38 +00:00
|
|
|
|
2009-11-04 23:58:26 +00:00
|
|
|
static int _wrap_CoreSession_hangupState(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_hangupState");
|
2009-11-04 23:58:26 +00:00
|
|
|
(arg1)->hangupState();
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_setVariable(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_setVariable");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->setVariable(arg2,arg3);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-13 20:36:23 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_setPrivate(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
void *arg3 = (void *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isuserdata(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_setPrivate");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3=((swig_lua_userdata*)(lua_touserdata(L,3)))->ptr;
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->setPrivate(arg2,arg3);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-13 20:36:23 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_getPrivate(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
void *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_getPrivate");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (void *)(arg1)->getPrivate(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-13 20:36:23 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_getVariable(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_getVariable");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *)(arg1)->getVariable(arg2);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-13 20:36:23 +00:00
|
|
|
|
2008-05-27 04:54:52 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_process_callback_result(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
switch_status_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_process_callback_result");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (arg1)->process_callback_result(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
switch_status_t * resultptr;
|
|
|
|
resultptr = new switch_status_t((switch_status_t &) result);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_say(lua_State* L) {
|
2010-03-08 21:26:08 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
char *arg4 = (char *) 0 ;
|
|
|
|
char *arg5 = (char *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg6 = (char *) NULL ;
|
2010-03-08 21:26:08 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isstring(L,4)) SWIG_fail_arg(4);
|
|
|
|
if(!lua_isstring(L,5)) SWIG_fail_arg(5);
|
|
|
|
if(lua_gettop(L)>=6 && !lua_isstring(L,6)) SWIG_fail_arg(6);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_say");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
|
|
|
arg4 = (char*)lua_tostring(L, 4);
|
|
|
|
arg5 = (char*)lua_tostring(L, 5);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=6){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg6 = (char*)lua_tostring(L, 6);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
2010-03-08 21:26:08 +00:00
|
|
|
(arg1)->say((char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_sayPhrase(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg3 = (char *) "" ;
|
|
|
|
char *arg4 = (char *) NULL ;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(lua_gettop(L)>=4 && !lua_isstring(L,4)) SWIG_fail_arg(4);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_sayPhrase");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=3){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
|
|
|
if(lua_gettop(L)>=4){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg4 = (char*)lua_tostring(L, 4);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
|
|
|
(arg1)->sayPhrase((char const *)arg2,(char const *)arg3,(char const *)arg4);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_hangupCause(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *result = 0 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_hangupCause");
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (char *)(arg1)->hangupCause();
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_getState(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *result = 0 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_getState");
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (char *)(arg1)->getState();
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_recordFile(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
int arg3 = (int) 0 ;
|
|
|
|
int arg4 = (int) 0 ;
|
|
|
|
int arg5 = (int) 0 ;
|
|
|
|
int result;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg(4);
|
|
|
|
if(lua_gettop(L)>=5 && !lua_isnumber(L,5)) SWIG_fail_arg(5);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_recordFile");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=3){
|
|
|
|
arg3 = (int)lua_tonumber(L, 3);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=4){
|
|
|
|
arg4 = (int)lua_tonumber(L, 4);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=5){
|
|
|
|
arg5 = (int)lua_tonumber(L, 5);
|
2009-09-17 23:28:38 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5);
|
2009-09-17 23:28:38 +00:00
|
|
|
SWIG_arg=0;
|
2010-05-10 13:06:22 -05:00
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
2009-09-17 23:28:38 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_originate(lua_State* L) {
|
2009-09-25 17:02:46 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
CoreSession *arg2 = (CoreSession *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
int arg4 = (int) 60 ;
|
|
|
|
switch_state_handler_table_t *arg5 = (switch_state_handler_table_t *) NULL ;
|
|
|
|
int result;
|
2009-09-25 17:02:46 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg(4);
|
|
|
|
if(lua_gettop(L)>=5 && !lua_isuserdata(L,5)) SWIG_fail_arg(5);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_originate");
|
|
|
|
arg2=(CoreSession *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_CoreSession,0,2,"CoreSession_originate");
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=4){
|
|
|
|
arg4 = (int)lua_tonumber(L, 4);
|
|
|
|
}
|
|
|
|
if(lua_gettop(L)>=5){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg5=(switch_state_handler_table_t *)SWIG_MustGetPtr(L,5,SWIGTYPE_p_switch_state_handler_table_t,0,5,"CoreSession_originate");
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
|
|
|
result = (int)(arg1)->originate(arg2,arg3,arg4,arg5);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_destroy(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_destroy");
|
2010-05-10 13:06:22 -05:00
|
|
|
(arg1)->destroy();
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-05-10 13:06:22 -05:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_setDTMFCallback(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
void *arg2 = (void *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_setDTMFCallback");
|
|
|
|
arg2=((swig_lua_userdata*)(lua_touserdata(L,2)))->ptr;
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2010-05-10 13:06:22 -05:00
|
|
|
(arg1)->setDTMFCallback(arg2,arg3);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-05-10 13:06:22 -05:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_speak(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_speak");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (int)(arg1)->speak(arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
2010-05-10 13:06:22 -05:00
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
2008-06-23 19:19:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_set_tts_parms(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_set_tts_parms");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2010-05-10 13:06:22 -05:00
|
|
|
(arg1)->set_tts_parms(arg2,arg3);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-05-10 13:06:22 -05:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_collectDigits__SWIG_0(lua_State* L) {
|
2008-08-14 16:57:16 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
int arg2 ;
|
2008-08-14 16:57:16 +00:00
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_collectDigits");
|
2010-05-10 13:06:22 -05:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
|
|
|
result = (int)(arg1)->collectDigits(arg2);
|
2008-08-14 16:57:16 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_collectDigits__SWIG_1(lua_State* L) {
|
2008-08-14 16:57:16 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
int arg2 ;
|
|
|
|
int arg3 ;
|
2008-08-14 16:57:16 +00:00
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isnumber(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_collectDigits");
|
2010-05-10 13:06:22 -05:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
|
|
|
arg3 = (int)lua_tonumber(L, 3);
|
|
|
|
result = (int)(arg1)->collectDigits(arg2,arg3);
|
2008-08-14 16:57:16 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_collectDigits(lua_State* L) {
|
2008-08-14 16:57:16 +00:00
|
|
|
int argc;
|
2010-05-10 13:06:22 -05:00
|
|
|
int argv[4]={
|
|
|
|
1,2,3,4
|
2008-08-14 16:57:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
argc = lua_gettop(L);
|
|
|
|
if (argc == 2) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
|
2008-08-14 16:57:16 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
2010-05-10 13:06:22 -05:00
|
|
|
_v = lua_isnumber(L,argv[1]);
|
2008-08-14 16:57:16 +00:00
|
|
|
}
|
|
|
|
if (_v) {
|
2010-05-10 13:06:22 -05:00
|
|
|
return _wrap_CoreSession_collectDigits__SWIG_0(L);
|
2008-08-14 16:57:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (argc == 3) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
|
2008-08-14 16:57:16 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
2010-05-10 13:06:22 -05:00
|
|
|
_v = lua_isnumber(L,argv[1]);
|
2008-08-14 16:57:16 +00:00
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
2010-05-10 13:06:22 -05:00
|
|
|
_v = lua_isnumber(L,argv[2]);
|
2008-08-14 16:57:16 +00:00
|
|
|
}
|
|
|
|
if (_v) {
|
2010-05-10 13:06:22 -05:00
|
|
|
return _wrap_CoreSession_collectDigits__SWIG_1(L);
|
2008-08-14 16:57:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
lua_pushstring(L,"No matching function for overloaded 'CoreSession_collectDigits'");
|
2008-08-14 16:57:16 +00:00
|
|
|
lua_error(L);return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_getDigits__SWIG_0(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int arg2 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg3 = (char *) 0 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
int arg4 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isnumber(L,4)) SWIG_fail_arg(4);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_getDigits");
|
2008-06-02 23:37:12 +00:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
2010-09-10 01:36:27 +02:00
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-06-02 23:37:12 +00:00
|
|
|
arg4 = (int)lua_tonumber(L, 4);
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (char *)(arg1)->getDigits(arg2,arg3,arg4);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_getDigits__SWIG_1(lua_State* L) {
|
2009-01-15 15:38:32 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int arg2 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg3 = (char *) 0 ;
|
2009-01-15 15:38:32 +00:00
|
|
|
int arg4 ;
|
|
|
|
int arg5 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isnumber(L,4)) SWIG_fail_arg(4);
|
|
|
|
if(!lua_isnumber(L,5)) SWIG_fail_arg(5);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_getDigits");
|
2009-01-15 15:38:32 +00:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
2010-09-10 01:36:27 +02:00
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2009-01-15 15:38:32 +00:00
|
|
|
arg4 = (int)lua_tonumber(L, 4);
|
|
|
|
arg5 = (int)lua_tonumber(L, 5);
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (char *)(arg1)->getDigits(arg2,arg3,arg4,arg5);
|
2009-01-15 15:38:32 +00:00
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2009-01-15 15:38:32 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_getDigits(lua_State* L) {
|
2009-01-15 15:38:32 +00:00
|
|
|
int argc;
|
2010-05-10 13:06:22 -05:00
|
|
|
int argv[6]={
|
|
|
|
1,2,3,4,5,6
|
2009-01-15 15:38:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
argc = lua_gettop(L);
|
2010-05-10 13:06:22 -05:00
|
|
|
if (argc == 4) {
|
2009-01-15 15:38:32 +00:00
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
|
2009-01-15 15:38:32 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isnumber(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
2010-05-10 13:06:22 -05:00
|
|
|
_v = lua_isstring(L,argv[2]);
|
2009-01-15 15:38:32 +00:00
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isnumber(L,argv[3]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
2010-05-10 13:06:22 -05:00
|
|
|
return _wrap_CoreSession_getDigits__SWIG_0(L);
|
2009-01-15 15:38:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
if (argc == 5) {
|
2009-01-15 15:38:32 +00:00
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
|
2009-01-15 15:38:32 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isnumber(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
2010-05-10 13:06:22 -05:00
|
|
|
_v = lua_isstring(L,argv[2]);
|
2009-01-15 15:38:32 +00:00
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isnumber(L,argv[3]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isnumber(L,argv[4]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
2010-05-10 13:06:22 -05:00
|
|
|
return _wrap_CoreSession_getDigits__SWIG_1(L);
|
2009-01-15 15:38:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
lua_pushstring(L,"No matching function for overloaded 'CoreSession_getDigits'");
|
2009-01-15 15:38:32 +00:00
|
|
|
lua_error(L);return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_transfer(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg3 = (char *) NULL ;
|
|
|
|
char *arg4 = (char *) NULL ;
|
2008-06-02 23:37:12 +00:00
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(lua_gettop(L)>=4 && !lua_isstring(L,4)) SWIG_fail_arg(4);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_transfer");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=3){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
|
|
|
if(lua_gettop(L)>=4){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg4 = (char*)lua_tostring(L, 4);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
|
|
|
result = (int)(arg1)->transfer(arg2,arg3,arg4);
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_read(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int arg2 ;
|
|
|
|
int arg3 ;
|
|
|
|
char *arg4 = (char *) 0 ;
|
|
|
|
int arg5 ;
|
|
|
|
char *arg6 = (char *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isnumber(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isstring(L,4)) SWIG_fail_arg(4);
|
|
|
|
if(!lua_isnumber(L,5)) SWIG_fail_arg(5);
|
|
|
|
if(!lua_isstring(L,6)) SWIG_fail_arg(6);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_read");
|
2010-05-10 13:06:22 -05:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
arg3 = (int)lua_tonumber(L, 3);
|
2010-09-10 01:36:27 +02:00
|
|
|
arg4 = (char*)lua_tostring(L, 4);
|
2010-05-10 13:06:22 -05:00
|
|
|
arg5 = (int)lua_tonumber(L, 5);
|
2010-09-10 01:36:27 +02:00
|
|
|
arg6 = (char*)lua_tostring(L, 6);
|
2010-05-10 13:06:22 -05:00
|
|
|
result = (char *)(arg1)->read(arg2,arg3,(char const *)arg4,arg5,(char const *)arg6);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_playAndGetDigits(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
int arg2 ;
|
|
|
|
int arg3 ;
|
|
|
|
int arg4 ;
|
|
|
|
int arg5 ;
|
|
|
|
char *arg6 = (char *) 0 ;
|
|
|
|
char *arg7 = (char *) 0 ;
|
|
|
|
char *arg8 = (char *) 0 ;
|
|
|
|
char *arg9 = (char *) 0 ;
|
|
|
|
char *arg10 = (char *) NULL ;
|
|
|
|
char *result = 0 ;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isnumber(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isnumber(L,4)) SWIG_fail_arg(4);
|
|
|
|
if(!lua_isnumber(L,5)) SWIG_fail_arg(5);
|
|
|
|
if(!lua_isstring(L,6)) SWIG_fail_arg(6);
|
|
|
|
if(!lua_isstring(L,7)) SWIG_fail_arg(7);
|
|
|
|
if(!lua_isstring(L,8)) SWIG_fail_arg(8);
|
|
|
|
if(!lua_isstring(L,9)) SWIG_fail_arg(9);
|
|
|
|
if(lua_gettop(L)>=10 && !lua_isstring(L,10)) SWIG_fail_arg(10);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_playAndGetDigits");
|
2010-05-10 13:06:22 -05:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
|
|
|
arg3 = (int)lua_tonumber(L, 3);
|
|
|
|
arg4 = (int)lua_tonumber(L, 4);
|
|
|
|
arg5 = (int)lua_tonumber(L, 5);
|
2010-09-10 01:36:27 +02:00
|
|
|
arg6 = (char*)lua_tostring(L, 6);
|
|
|
|
arg7 = (char*)lua_tostring(L, 7);
|
|
|
|
arg8 = (char*)lua_tostring(L, 8);
|
|
|
|
arg9 = (char*)lua_tostring(L, 9);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=10){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg10 = (char*)lua_tostring(L, 10);
|
2010-05-10 13:06:22 -05:00
|
|
|
}
|
|
|
|
result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,(char const *)arg10);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_streamFile(lua_State* L) {
|
2008-12-15 03:45:38 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
int arg3 = (int) 0 ;
|
2008-12-15 03:45:38 +00:00
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_streamFile");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=3){
|
|
|
|
arg3 = (int)lua_tonumber(L, 3);
|
|
|
|
}
|
|
|
|
result = (int)(arg1)->streamFile(arg2,arg3);
|
2008-12-15 03:45:38 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_sleep(lua_State* L) {
|
2008-07-08 17:27:02 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
2008-07-12 18:44:05 +00:00
|
|
|
int arg2 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
int arg3 = (int) 0 ;
|
2008-07-08 17:27:02 +00:00
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isnumber(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isnumber(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_sleep");
|
2008-07-12 18:44:05 +00:00
|
|
|
arg2 = (int)lua_tonumber(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=3){
|
|
|
|
arg3 = (int)lua_tonumber(L, 3);
|
|
|
|
}
|
|
|
|
result = (int)(arg1)->sleep(arg2,arg3);
|
2008-07-08 17:27:02 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_flushEvents(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_flushEvents");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (int)(arg1)->flushEvents();
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-05-16 18:40:39 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_flushDigits(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_flushDigits");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (int)(arg1)->flushDigits();
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-16 18:40:39 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_setAutoHangup(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
bool arg2 ;
|
|
|
|
int result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isboolean(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_setAutoHangup");
|
|
|
|
arg2 = (bool)lua_toboolean(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (int)(arg1)->setAutoHangup(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-16 18:40:39 +00:00
|
|
|
|
2008-04-29 23:34:26 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_setHangupHook(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
void *arg2 = (void *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_setHangupHook");
|
|
|
|
arg2=((swig_lua_userdata*)(lua_touserdata(L,2)))->ptr;
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->setHangupHook(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-29 23:34:26 +00:00
|
|
|
|
2008-05-10 17:02:43 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_ready(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_ready");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->ready();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-10 17:02:43 +00:00
|
|
|
|
|
|
|
|
2010-03-02 01:08:31 +00:00
|
|
|
static int _wrap_CoreSession_bridged(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_bridged");
|
2010-03-02 01:08:31 +00:00
|
|
|
result = (bool)(arg1)->bridged();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2010-03-02 01:08:31 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:42:59 +00:00
|
|
|
static int _wrap_CoreSession_answered(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
2010-09-10 01:36:27 +02:00
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
bool result;
|
2008-06-02 23:42:59 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_answered");
|
2008-06-02 23:42:59 +00:00
|
|
|
result = (bool)(arg1)->answered();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:42:59 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_mediaReady(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_mediaReady");
|
2008-06-02 23:42:59 +00:00
|
|
|
result = (bool)(arg1)->mediaReady();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:42:59 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_CoreSession_waitForAnswer(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
CoreSession *arg2 = (CoreSession *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_waitForAnswer");
|
|
|
|
arg2=(CoreSession *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_CoreSession,0,2,"CoreSession_waitForAnswer");
|
2008-06-02 23:42:59 +00:00
|
|
|
(arg1)->waitForAnswer(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-05-10 13:06:22 -05:00
|
|
|
static int _wrap_CoreSession_execute(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
2010-05-10 13:06:22 -05:00
|
|
|
char *arg3 = (char *) NULL ;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_execute");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-05-10 13:06:22 -05:00
|
|
|
if(lua_gettop(L)>=3){
|
2010-09-10 01:36:27 +02:00
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2010-05-10 13:06:22 -05:00
|
|
|
(arg1)->execute((char const *)arg2,(char const *)arg3);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_sendEvent(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
Event *arg2 = (Event *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_sendEvent");
|
|
|
|
arg2=(Event *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_Event,0,2,"CoreSession_sendEvent");
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->sendEvent(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_setEventData(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
Event *arg2 = (Event *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_setEventData");
|
|
|
|
arg2=(Event *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_Event,0,2,"CoreSession_setEventData");
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->setEventData(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_getXMLCDR(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_getXMLCDR");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *)(arg1)->getXMLCDR();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_begin_allow_threads(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_begin_allow_threads");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->begin_allow_threads();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-05-27 04:54:52 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_end_allow_threads(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_end_allow_threads");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->end_allow_threads();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_get_uuid(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_get_uuid");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *)((CoreSession const *)arg1)->get_uuid();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_get_cb_args(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
switch_input_args_t *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_get_cb_args");
|
2008-06-02 23:37:12 +00:00
|
|
|
{
|
|
|
|
switch_input_args_t const &_result_ref = ((CoreSession const *)arg1)->get_cb_args();
|
|
|
|
result = (switch_input_args_t *) &_result_ref;
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_switch_input_args_t,0); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_check_hangup_hook(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_check_hangup_hook");
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->check_hangup_hook();
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_CoreSession_run_dtmf_callback(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = (CoreSession *) 0 ;
|
|
|
|
void *arg2 = (void *) 0 ;
|
|
|
|
switch_input_type_t arg3 ;
|
|
|
|
switch_status_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isuserdata(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"CoreSession_run_dtmf_callback");
|
|
|
|
arg2=((swig_lua_userdata*)(lua_touserdata(L,2)))->ptr;
|
|
|
|
{
|
|
|
|
switch_input_type_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,3,(void**)(&argp),SWIGTYPE_p_switch_input_type_t,0)) SWIG_fail;
|
|
|
|
arg3 = *argp;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
result = (arg1)->run_dtmf_callback(arg2,arg3);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
switch_status_t * resultptr;
|
|
|
|
resultptr = new switch_status_t((switch_status_t &) result);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static void swig_delete_CoreSession(void *obj) {
|
|
|
|
CoreSession *arg1 = (CoreSession *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_CoreSession_methods[] = {
|
|
|
|
{"answer", _wrap_CoreSession_answer},
|
|
|
|
{"preAnswer", _wrap_CoreSession_preAnswer},
|
|
|
|
{"hangup", _wrap_CoreSession_hangup},
|
2009-11-04 23:58:26 +00:00
|
|
|
{"hangupState", _wrap_CoreSession_hangupState},
|
2008-06-02 23:37:12 +00:00
|
|
|
{"setVariable", _wrap_CoreSession_setVariable},
|
|
|
|
{"setPrivate", _wrap_CoreSession_setPrivate},
|
|
|
|
{"getPrivate", _wrap_CoreSession_getPrivate},
|
|
|
|
{"getVariable", _wrap_CoreSession_getVariable},
|
|
|
|
{"process_callback_result", _wrap_CoreSession_process_callback_result},
|
|
|
|
{"say", _wrap_CoreSession_say},
|
|
|
|
{"sayPhrase", _wrap_CoreSession_sayPhrase},
|
2009-09-17 23:28:38 +00:00
|
|
|
{"hangupCause", _wrap_CoreSession_hangupCause},
|
2009-09-25 17:02:46 +00:00
|
|
|
{"getState", _wrap_CoreSession_getState},
|
2008-06-02 23:37:12 +00:00
|
|
|
{"recordFile", _wrap_CoreSession_recordFile},
|
|
|
|
{"originate", _wrap_CoreSession_originate},
|
2008-09-15 21:44:43 +00:00
|
|
|
{"destroy", _wrap_CoreSession_destroy},
|
2008-06-02 23:37:12 +00:00
|
|
|
{"setDTMFCallback", _wrap_CoreSession_setDTMFCallback},
|
|
|
|
{"speak", _wrap_CoreSession_speak},
|
|
|
|
{"set_tts_parms", _wrap_CoreSession_set_tts_parms},
|
|
|
|
{"collectDigits", _wrap_CoreSession_collectDigits},
|
|
|
|
{"getDigits", _wrap_CoreSession_getDigits},
|
|
|
|
{"transfer", _wrap_CoreSession_transfer},
|
|
|
|
{"read", _wrap_CoreSession_read},
|
|
|
|
{"playAndGetDigits", _wrap_CoreSession_playAndGetDigits},
|
|
|
|
{"streamFile", _wrap_CoreSession_streamFile},
|
2008-07-08 17:27:02 +00:00
|
|
|
{"sleep", _wrap_CoreSession_sleep},
|
2008-06-02 23:37:12 +00:00
|
|
|
{"flushEvents", _wrap_CoreSession_flushEvents},
|
|
|
|
{"flushDigits", _wrap_CoreSession_flushDigits},
|
|
|
|
{"setAutoHangup", _wrap_CoreSession_setAutoHangup},
|
|
|
|
{"setHangupHook", _wrap_CoreSession_setHangupHook},
|
|
|
|
{"ready", _wrap_CoreSession_ready},
|
2010-03-02 01:08:31 +00:00
|
|
|
{"bridged", _wrap_CoreSession_bridged},
|
2008-06-02 23:42:59 +00:00
|
|
|
{"answered", _wrap_CoreSession_answered},
|
|
|
|
{"mediaReady", _wrap_CoreSession_mediaReady},
|
|
|
|
{"waitForAnswer", _wrap_CoreSession_waitForAnswer},
|
2008-06-02 23:37:12 +00:00
|
|
|
{"execute", _wrap_CoreSession_execute},
|
|
|
|
{"sendEvent", _wrap_CoreSession_sendEvent},
|
|
|
|
{"setEventData", _wrap_CoreSession_setEventData},
|
|
|
|
{"getXMLCDR", _wrap_CoreSession_getXMLCDR},
|
|
|
|
{"begin_allow_threads", _wrap_CoreSession_begin_allow_threads},
|
|
|
|
{"end_allow_threads", _wrap_CoreSession_end_allow_threads},
|
|
|
|
{"get_uuid", _wrap_CoreSession_get_uuid},
|
|
|
|
{"get_cb_args", _wrap_CoreSession_get_cb_args},
|
|
|
|
{"check_hangup_hook", _wrap_CoreSession_check_hangup_hook},
|
|
|
|
{"run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback},
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_CoreSession_attributes[] = {
|
2010-09-10 01:36:27 +02:00
|
|
|
{ "session",_wrap_CoreSession_session_get, _wrap_CoreSession_session_set},
|
|
|
|
{ "channel",_wrap_CoreSession_channel_get, _wrap_CoreSession_channel_set},
|
|
|
|
{ "flags",_wrap_CoreSession_flags_get, _wrap_CoreSession_flags_set},
|
|
|
|
{ "allocated",_wrap_CoreSession_allocated_get, _wrap_CoreSession_allocated_set},
|
|
|
|
{ "cb_state",_wrap_CoreSession_cb_state_get, _wrap_CoreSession_cb_state_set},
|
|
|
|
{ "hook_state",_wrap_CoreSession_hook_state_get, _wrap_CoreSession_hook_state_set},
|
|
|
|
{ "cause",_wrap_CoreSession_cause_get, _wrap_CoreSession_cause_set},
|
|
|
|
{ "uuid",_wrap_CoreSession_uuid_get, _wrap_CoreSession_uuid_set},
|
|
|
|
{ "tts_name",_wrap_CoreSession_tts_name_get, _wrap_CoreSession_tts_name_set},
|
|
|
|
{ "voice_name",_wrap_CoreSession_voice_name_get, _wrap_CoreSession_voice_name_set},
|
2008-06-02 23:37:12 +00:00
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_CoreSession_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_CoreSession = { "CoreSession", &SWIGTYPE_p_CoreSession,0, swig_delete_CoreSession, swig_CoreSession_methods, swig_CoreSession_attributes, swig_CoreSession_bases };
|
2008-06-02 23:37:12 +00:00
|
|
|
|
|
|
|
static int _wrap_console_log(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
console_log(arg1,arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_console_clean_log(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
2008-06-02 23:37:12 +00:00
|
|
|
console_clean_log(arg1);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-11-20 23:12:15 +00:00
|
|
|
static int _wrap_msleep(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
2008-11-21 19:15:47 +00:00
|
|
|
unsigned int arg1 ;
|
2008-11-20 23:12:15 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isnumber(L,1)) SWIG_fail_arg(1);
|
2008-11-21 19:15:47 +00:00
|
|
|
arg1 = (unsigned int)lua_tonumber(L, 1);
|
2008-11-20 23:12:15 +00:00
|
|
|
msleep(arg1);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_bridge(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
CoreSession *arg1 = 0 ;
|
|
|
|
CoreSession *arg2 = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(CoreSession *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_CoreSession,0,1,"bridge");
|
|
|
|
arg2=(CoreSession *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_CoreSession,0,2,"bridge");
|
2008-06-02 23:37:12 +00:00
|
|
|
bridge(*arg1,*arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_hanguphook(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
|
|
|
switch_status_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(switch_core_session_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_switch_core_session_t,0,1,"hanguphook");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = hanguphook(arg1);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
switch_status_t * resultptr;
|
|
|
|
resultptr = new switch_status_t((switch_status_t &) result);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_dtmf_callback(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
|
|
|
void *arg2 = (void *) 0 ;
|
|
|
|
switch_input_type_t arg3 ;
|
|
|
|
void *arg4 = (void *) 0 ;
|
|
|
|
unsigned int arg5 ;
|
|
|
|
switch_status_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isuserdata(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isuserdata(L,4)) SWIG_fail_arg(4);
|
|
|
|
if(!lua_isnumber(L,5)) SWIG_fail_arg(5);
|
|
|
|
arg1=(switch_core_session_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_switch_core_session_t,0,1,"dtmf_callback");
|
|
|
|
arg2=((swig_lua_userdata*)(lua_touserdata(L,2)))->ptr;
|
|
|
|
{
|
|
|
|
switch_input_type_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,3,(void**)(&argp),SWIGTYPE_p_switch_input_type_t,0)) SWIG_fail;
|
|
|
|
arg3 = *argp;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2010-09-10 01:36:27 +02:00
|
|
|
arg4=((swig_lua_userdata*)(lua_touserdata(L,4)))->ptr;
|
2008-06-02 23:37:12 +00:00
|
|
|
arg5 = (unsigned int)lua_tonumber(L, 5);
|
|
|
|
result = dtmf_callback(arg1,arg2,arg3,arg4,arg5);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
switch_status_t * resultptr;
|
|
|
|
resultptr = new switch_status_t((switch_status_t &) result);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Session__SWIG_0(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *result = 0 ;
|
|
|
|
|
|
|
|
result = (LUA::Session *)new LUA::Session();
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Session__SWIG_1(lua_State* L) {
|
2008-07-16 21:06:14 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
CoreSession *arg2 = (CoreSession *) 0 ;
|
|
|
|
LUA::Session *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
|
|
|
arg2=(CoreSession *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_CoreSession,0,2,"new_Session");
|
2008-07-16 21:06:14 +00:00
|
|
|
result = (LUA::Session *)new LUA::Session(arg1,arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_new_Session__SWIG_2(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
LUA::Session *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (LUA::Session *)new LUA::Session(arg1);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-07-16 21:06:14 +00:00
|
|
|
static int _wrap_new_Session__SWIG_3(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
|
|
|
|
LUA::Session *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(switch_core_session_t *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_switch_core_session_t,0,1,"new_Session");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (LUA::Session *)new LUA::Session(arg1);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Session,1); SWIG_arg++; result->setLUA(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_new_Session(lua_State* L) {
|
|
|
|
int argc;
|
2008-07-16 21:06:14 +00:00
|
|
|
int argv[3]={
|
|
|
|
1,2,3
|
2008-06-02 23:37:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
argc = lua_gettop(L);
|
|
|
|
if (argc == 0) {
|
|
|
|
return _wrap_new_Session__SWIG_0(L);
|
|
|
|
}
|
|
|
|
if (argc == 1) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_switch_core_session_t, 0)) {
|
2008-06-02 23:37:12 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
2008-07-16 21:06:14 +00:00
|
|
|
return _wrap_new_Session__SWIG_3(L);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (argc == 1) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[0]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
2008-07-16 21:06:14 +00:00
|
|
|
return _wrap_new_Session__SWIG_2(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (argc == 2) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[0]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) {
|
2008-07-16 21:06:14 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_new_Session__SWIG_1(L);
|
|
|
|
}
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lua_pushstring(L,"No matching function for overloaded 'new_Session'");
|
|
|
|
lua_error(L);return 0;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_delete_Session(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"delete_Session");
|
2008-06-02 23:37:12 +00:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2009-03-24 15:30:08 +00:00
|
|
|
static int _wrap_Session_destroy(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_destroy");
|
2009-03-24 15:30:08 +00:00
|
|
|
(arg1)->destroy();
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_begin_allow_threads(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_begin_allow_threads");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->begin_allow_threads();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_end_allow_threads(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_end_allow_threads");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->end_allow_threads();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-05-08 23:58:45 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_check_hangup_hook(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_check_hangup_hook");
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->check_hangup_hook();
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-08 23:58:45 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_run_dtmf_callback(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
void *arg2 = (void *) 0 ;
|
|
|
|
switch_input_type_t arg3 ;
|
|
|
|
switch_status_t result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isuserdata(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_run_dtmf_callback");
|
|
|
|
arg2=((swig_lua_userdata*)(lua_touserdata(L,2)))->ptr;
|
|
|
|
{
|
|
|
|
switch_input_type_t * argp;
|
|
|
|
if(SWIG_ConvertPtr(L,3,(void**)(&argp),SWIGTYPE_p_switch_input_type_t,0)) SWIG_fail;
|
|
|
|
arg3 = *argp;
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
result = (arg1)->run_dtmf_callback(arg2,arg3);
|
|
|
|
SWIG_arg=0;
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
switch_status_t * resultptr;
|
|
|
|
resultptr = new switch_status_t((switch_status_t &) result);
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++;
|
|
|
|
}
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-05-08 23:58:45 +00:00
|
|
|
|
2008-08-14 17:20:34 +00:00
|
|
|
static int _wrap_Session_unsetInputCallback(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_unsetInputCallback");
|
2008-08-14 17:20:34 +00:00
|
|
|
(arg1)->unsetInputCallback();
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-07-12 18:44:05 +00:00
|
|
|
static int _wrap_Session_setInputCallback__SWIG_0(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_setInputCallback");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->setInputCallback(arg2,arg3);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-08 23:58:45 +00:00
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-07-12 18:44:05 +00:00
|
|
|
static int _wrap_Session_setInputCallback__SWIG_1(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_setInputCallback");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-07-12 18:44:05 +00:00
|
|
|
(arg1)->setInputCallback(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_Session_setInputCallback(lua_State* L) {
|
|
|
|
int argc;
|
|
|
|
int argv[4]={
|
|
|
|
1,2,3,4
|
|
|
|
};
|
|
|
|
|
|
|
|
argc = lua_gettop(L);
|
|
|
|
if (argc == 2) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) {
|
2008-07-12 18:44:05 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_Session_setInputCallback__SWIG_1(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (argc == 3) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) {
|
2008-07-12 18:44:05 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[2]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_Session_setInputCallback__SWIG_0(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lua_pushstring(L,"No matching function for overloaded 'Session_setInputCallback'");
|
|
|
|
lua_error(L);return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-09-10 21:37:32 +00:00
|
|
|
static int _wrap_Session_setHangupHook__SWIG_0(lua_State* L) {
|
2008-06-02 23:37:12 +00:00
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_setHangupHook");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->setHangupHook(arg2,arg3);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2009-09-10 21:37:32 +00:00
|
|
|
static int _wrap_Session_setHangupHook__SWIG_1(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_setHangupHook");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2009-09-10 21:37:32 +00:00
|
|
|
(arg1)->setHangupHook(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_Session_setHangupHook(lua_State* L) {
|
|
|
|
int argc;
|
|
|
|
int argv[4]={
|
|
|
|
1,2,3,4
|
|
|
|
};
|
|
|
|
|
|
|
|
argc = lua_gettop(L);
|
|
|
|
if (argc == 2) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) {
|
2009-09-10 21:37:32 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_Session_setHangupHook__SWIG_1(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (argc == 3) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
void *ptr;
|
2010-09-10 01:36:27 +02:00
|
|
|
if (lua_isuserdata(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) {
|
2009-09-10 21:37:32 +00:00
|
|
|
_v = 0;
|
|
|
|
} else {
|
|
|
|
_v = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[2]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_Session_setHangupHook__SWIG_0(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lua_pushstring(L,"No matching function for overloaded 'Session_setHangupHook'");
|
|
|
|
lua_error(L);return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_ready(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_ready");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (bool)(arg1)->ready();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-08-11 18:47:30 +00:00
|
|
|
static int _wrap_Session_originate(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
CoreSession *arg2 = (CoreSession *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
int arg4 ;
|
2008-08-14 17:35:46 +00:00
|
|
|
int result;
|
2008-08-11 18:47:30 +00:00
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
if(!lua_isnumber(L,4)) SWIG_fail_arg(4);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_originate");
|
|
|
|
arg2=(CoreSession *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_CoreSession,0,2,"Session_originate");
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2008-08-11 18:47:30 +00:00
|
|
|
arg4 = (int)lua_tonumber(L, 4);
|
2008-08-14 17:35:46 +00:00
|
|
|
result = (int)(arg1)->originate(arg2,arg3,arg4);
|
2008-08-11 18:47:30 +00:00
|
|
|
SWIG_arg=0;
|
2008-08-14 17:35:46 +00:00
|
|
|
lua_pushnumber(L, (lua_Number) result); SWIG_arg++;
|
2008-08-11 18:47:30 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_cb_function_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_cb_function_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
{
|
|
|
|
if (arg1->cb_function) delete [] arg1->cb_function;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->cb_function = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->cb_function,arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
} else {
|
|
|
|
arg1->cb_function = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_cb_function_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_cb_function_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *) ((arg1)->cb_function);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_cb_arg_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_cb_arg_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
{
|
|
|
|
if (arg1->cb_arg) delete [] arg1->cb_arg;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->cb_arg = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->cb_arg,arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
} else {
|
|
|
|
arg1->cb_arg = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-05-08 23:58:45 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_cb_arg_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_cb_arg_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *) ((arg1)->cb_arg);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-08 23:58:45 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_hangup_func_str_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_hangup_func_str_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
{
|
|
|
|
if (arg1->hangup_func_str) delete [] arg1->hangup_func_str;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->hangup_func_str = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->hangup_func_str,arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
} else {
|
|
|
|
arg1->hangup_func_str = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-08 23:58:45 +00:00
|
|
|
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_hangup_func_str_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_hangup_func_str_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *) ((arg1)->hangup_func_str);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_hangup_func_arg_set(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_hangup_func_arg_set");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2008-06-02 23:37:12 +00:00
|
|
|
{
|
|
|
|
if (arg1->hangup_func_arg) delete [] arg1->hangup_func_arg;
|
|
|
|
if (arg2) {
|
2010-09-10 01:36:27 +02:00
|
|
|
arg1->hangup_func_arg = (char *) (new char[strlen(arg2)+1]);
|
|
|
|
strcpy((char *) arg1->hangup_func_arg,arg2);
|
2008-06-02 23:37:12 +00:00
|
|
|
} else {
|
|
|
|
arg1->hangup_func_arg = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_hangup_func_arg_get(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
char *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_hangup_func_arg_get");
|
2008-06-02 23:37:12 +00:00
|
|
|
result = (char *) ((arg1)->hangup_func_arg);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushstring(L,result); SWIG_arg++;
|
2008-06-02 23:37:12 +00:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static int _wrap_Session_setLUA(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) 0 ;
|
|
|
|
lua_State *arg2 = (lua_State *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isuserdata(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1=(LUA::Session *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Session,0,1,"Session_setLUA");
|
|
|
|
arg2=(lua_State *)SWIG_MustGetPtr(L,2,SWIGTYPE_p_lua_State,0,2,"Session_setLUA");
|
2008-06-02 23:37:12 +00:00
|
|
|
(arg1)->setLUA(arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
2008-04-30 19:42:26 +00:00
|
|
|
|
2008-05-27 04:54:52 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
static void swig_delete_Session(void *obj) {
|
|
|
|
LUA::Session *arg1 = (LUA::Session *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_LUA_Session_methods[] = {
|
2009-03-24 15:30:08 +00:00
|
|
|
{"destroy", _wrap_Session_destroy},
|
2008-06-02 23:37:12 +00:00
|
|
|
{"begin_allow_threads", _wrap_Session_begin_allow_threads},
|
|
|
|
{"end_allow_threads", _wrap_Session_end_allow_threads},
|
|
|
|
{"check_hangup_hook", _wrap_Session_check_hangup_hook},
|
|
|
|
{"run_dtmf_callback", _wrap_Session_run_dtmf_callback},
|
2008-08-14 17:20:34 +00:00
|
|
|
{"unsetInputCallback", _wrap_Session_unsetInputCallback},
|
2008-06-02 23:37:12 +00:00
|
|
|
{"setInputCallback", _wrap_Session_setInputCallback},
|
|
|
|
{"setHangupHook", _wrap_Session_setHangupHook},
|
|
|
|
{"ready", _wrap_Session_ready},
|
2008-08-11 18:47:30 +00:00
|
|
|
{"originate", _wrap_Session_originate},
|
2008-06-02 23:37:12 +00:00
|
|
|
{"setLUA", _wrap_Session_setLUA},
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_LUA_Session_attributes[] = {
|
2010-09-10 01:36:27 +02:00
|
|
|
{ "cb_function",_wrap_Session_cb_function_get, _wrap_Session_cb_function_set},
|
|
|
|
{ "cb_arg",_wrap_Session_cb_arg_get, _wrap_Session_cb_arg_set},
|
|
|
|
{ "hangup_func_str",_wrap_Session_hangup_func_str_get, _wrap_Session_hangup_func_str_set},
|
|
|
|
{ "hangup_func_arg",_wrap_Session_hangup_func_arg_get, _wrap_Session_hangup_func_arg_set},
|
2008-06-02 23:37:12 +00:00
|
|
|
{0,0,0}
|
|
|
|
};
|
2010-09-10 01:36:27 +02:00
|
|
|
static swig_lua_class *swig_LUA_Session_bases[] = {&_wrap_class_CoreSession,0};
|
|
|
|
swig_lua_class _wrap_class_LUA_Session = { "Session", &SWIGTYPE_p_LUA__Session,_wrap_new_Session, swig_delete_Session, swig_LUA_Session_methods, swig_LUA_Session_attributes, swig_LUA_Session_bases };
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2010-09-07 11:45:56 -05:00
|
|
|
static int _wrap_new_Dbh__SWIG_0(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
char *arg3 = (char *) 0 ;
|
|
|
|
LUA::Dbh *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(!lua_isstring(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
arg3 = (char*)lua_tostring(L, 3);
|
2010-09-07 11:45:56 -05:00
|
|
|
result = (LUA::Dbh *)new LUA::Dbh(arg1,arg2,arg3);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Dbh,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_new_Dbh__SWIG_1(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
LUA::Dbh *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
2010-09-07 11:45:56 -05:00
|
|
|
result = (LUA::Dbh *)new LUA::Dbh(arg1,arg2);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Dbh,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_new_Dbh__SWIG_2(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
char *arg1 = (char *) 0 ;
|
|
|
|
LUA::Dbh *result = 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isstring(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1 = (char*)lua_tostring(L, 1);
|
2010-09-07 11:45:56 -05:00
|
|
|
result = (LUA::Dbh *)new LUA::Dbh(arg1);
|
|
|
|
SWIG_arg=0;
|
|
|
|
SWIG_NewPointerObj(L,result,SWIGTYPE_p_LUA__Dbh,1); SWIG_arg++;
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_new_Dbh(lua_State* L) {
|
|
|
|
int argc;
|
|
|
|
int argv[4]={
|
|
|
|
1,2,3,4
|
|
|
|
};
|
|
|
|
|
|
|
|
argc = lua_gettop(L);
|
|
|
|
if (argc == 1) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[0]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_new_Dbh__SWIG_2(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (argc == 2) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[0]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_new_Dbh__SWIG_1(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (argc == 3) {
|
|
|
|
int _v;
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[0]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[1]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
{
|
|
|
|
_v = lua_isstring(L,argv[2]);
|
|
|
|
}
|
|
|
|
if (_v) {
|
|
|
|
return _wrap_new_Dbh__SWIG_0(L);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
lua_pushstring(L,"No matching function for overloaded 'new_Dbh'");
|
|
|
|
lua_error(L);return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_delete_Dbh(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Dbh *arg1 = (LUA::Dbh *) 0 ;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Dbh *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Dbh,0,1,"delete_Dbh");
|
2010-09-07 11:45:56 -05:00
|
|
|
delete arg1;
|
|
|
|
|
|
|
|
SWIG_arg=0;
|
|
|
|
|
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_Dbh_release(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Dbh *arg1 = (LUA::Dbh *) 0 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
arg1=(LUA::Dbh *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Dbh,0,1,"Dbh_release");
|
2010-09-07 11:45:56 -05:00
|
|
|
result = (bool)(arg1)->release();
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2010-09-07 11:45:56 -05:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int _wrap_Dbh_query(lua_State* L) {
|
|
|
|
int SWIG_arg = -1;
|
|
|
|
LUA::Dbh *arg1 = (LUA::Dbh *) 0 ;
|
|
|
|
char *arg2 = (char *) 0 ;
|
|
|
|
SWIGLUA_FN arg3 ;
|
|
|
|
bool result;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
{
|
|
|
|
SWIGLUA_FN default_swiglua_fn = {
|
|
|
|
0
|
|
|
|
};
|
|
|
|
arg3 = default_swiglua_fn;
|
|
|
|
}
|
|
|
|
if(!lua_isuserdata(L,1)) SWIG_fail_arg(1);
|
|
|
|
if(!lua_isstring(L,2)) SWIG_fail_arg(2);
|
|
|
|
if(lua_gettop(L)>=3 && !lua_isfunction(L,3)) SWIG_fail_arg(3);
|
|
|
|
arg1=(LUA::Dbh *)SWIG_MustGetPtr(L,1,SWIGTYPE_p_LUA__Dbh,0,1,"Dbh_query");
|
|
|
|
arg2 = (char*)lua_tostring(L, 2);
|
|
|
|
if(lua_gettop(L)>=3){
|
|
|
|
{
|
|
|
|
(&arg3)->L = L;
|
|
|
|
(&arg3)->idx = 3;
|
|
|
|
}
|
2010-09-07 11:45:56 -05:00
|
|
|
}
|
|
|
|
result = (bool)(arg1)->query(arg2,arg3);
|
|
|
|
SWIG_arg=0;
|
2010-09-10 01:36:27 +02:00
|
|
|
lua_pushboolean(L,(int)result); SWIG_arg++;
|
2010-09-07 11:45:56 -05:00
|
|
|
return SWIG_arg;
|
|
|
|
|
|
|
|
fail:
|
|
|
|
lua_error(L);
|
|
|
|
return SWIG_arg;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void swig_delete_Dbh(void *obj) {
|
|
|
|
LUA::Dbh *arg1 = (LUA::Dbh *) obj;
|
|
|
|
delete arg1;
|
|
|
|
}
|
|
|
|
static swig_lua_method swig_LUA_Dbh_methods[] = {
|
|
|
|
{"release", _wrap_Dbh_release},
|
|
|
|
{"query", _wrap_Dbh_query},
|
|
|
|
{0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_attribute swig_LUA_Dbh_attributes[] = {
|
|
|
|
{0,0,0}
|
|
|
|
};
|
|
|
|
static swig_lua_class *swig_LUA_Dbh_bases[] = {0};
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_lua_class _wrap_class_LUA_Dbh = { "Dbh", &SWIGTYPE_p_LUA__Dbh,_wrap_new_Dbh, swig_delete_Dbh, swig_LUA_Dbh_methods, swig_LUA_Dbh_attributes, swig_LUA_Dbh_bases };
|
2010-09-07 11:45:56 -05:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
static const struct luaL_reg swig_commands[] = {
|
2008-06-02 23:37:12 +00:00
|
|
|
{ "consoleLog", _wrap_consoleLog},
|
|
|
|
{ "consoleCleanLog", _wrap_consoleCleanLog},
|
2010-09-10 01:36:27 +02:00
|
|
|
{ "new_IVRMenu", _wrap_new_IVRMenu},
|
|
|
|
{ "delete_IVRMenu", _wrap_delete_IVRMenu},
|
|
|
|
{ "IVRMenu_bindAction", _wrap_IVRMenu_bindAction},
|
|
|
|
{ "IVRMenu_execute", _wrap_IVRMenu_execute},
|
|
|
|
{ "new_API", _wrap_new_API},
|
|
|
|
{ "delete_API", _wrap_delete_API},
|
|
|
|
{ "API_execute", _wrap_API_execute},
|
|
|
|
{ "API_executeString", _wrap_API_executeString},
|
|
|
|
{ "API_getTime", _wrap_API_getTime},
|
|
|
|
{ "input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set},
|
|
|
|
{ "input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get},
|
|
|
|
{ "input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set},
|
|
|
|
{ "input_callback_state_t_threadState_get", _wrap_input_callback_state_t_threadState_get},
|
|
|
|
{ "input_callback_state_t_extra_set", _wrap_input_callback_state_t_extra_set},
|
|
|
|
{ "input_callback_state_t_extra_get", _wrap_input_callback_state_t_extra_get},
|
|
|
|
{ "input_callback_state_t_funcargs_set", _wrap_input_callback_state_t_funcargs_set},
|
|
|
|
{ "input_callback_state_t_funcargs_get", _wrap_input_callback_state_t_funcargs_get},
|
|
|
|
{ "new_input_callback_state_t", _wrap_new_input_callback_state_t},
|
|
|
|
{ "delete_input_callback_state_t", _wrap_delete_input_callback_state_t},
|
|
|
|
{ "DTMF_digit_set", _wrap_DTMF_digit_set},
|
|
|
|
{ "DTMF_digit_get", _wrap_DTMF_digit_get},
|
|
|
|
{ "DTMF_duration_set", _wrap_DTMF_duration_set},
|
|
|
|
{ "DTMF_duration_get", _wrap_DTMF_duration_get},
|
|
|
|
{ "new_DTMF", _wrap_new_DTMF},
|
|
|
|
{ "delete_DTMF", _wrap_delete_DTMF},
|
|
|
|
{ "new_Stream",_wrap_new_Stream},
|
|
|
|
{ "delete_Stream", _wrap_delete_Stream},
|
|
|
|
{ "Stream_write", _wrap_Stream_write},
|
|
|
|
{ "Stream_get_data", _wrap_Stream_get_data},
|
|
|
|
{ "Event_event_set", _wrap_Event_event_set},
|
|
|
|
{ "Event_event_get", _wrap_Event_event_get},
|
|
|
|
{ "Event_serialized_string_set", _wrap_Event_serialized_string_set},
|
|
|
|
{ "Event_serialized_string_get", _wrap_Event_serialized_string_get},
|
|
|
|
{ "Event_mine_set", _wrap_Event_mine_set},
|
|
|
|
{ "Event_mine_get", _wrap_Event_mine_get},
|
|
|
|
{ "new_Event",_wrap_new_Event},
|
|
|
|
{ "delete_Event", _wrap_delete_Event},
|
|
|
|
{ "Event_serialize", _wrap_Event_serialize},
|
|
|
|
{ "Event_setPriority", _wrap_Event_setPriority},
|
|
|
|
{ "Event_getHeader", _wrap_Event_getHeader},
|
|
|
|
{ "Event_getBody", _wrap_Event_getBody},
|
|
|
|
{ "Event_getType", _wrap_Event_getType},
|
|
|
|
{ "Event_addBody", _wrap_Event_addBody},
|
|
|
|
{ "Event_addHeader", _wrap_Event_addHeader},
|
|
|
|
{ "Event_delHeader", _wrap_Event_delHeader},
|
|
|
|
{ "Event_fire", _wrap_Event_fire},
|
|
|
|
{ "EventConsumer_events_set", _wrap_EventConsumer_events_set},
|
|
|
|
{ "EventConsumer_events_get", _wrap_EventConsumer_events_get},
|
|
|
|
{ "EventConsumer_e_event_id_set", _wrap_EventConsumer_e_event_id_set},
|
|
|
|
{ "EventConsumer_e_event_id_get", _wrap_EventConsumer_e_event_id_get},
|
|
|
|
{ "EventConsumer_e_callback_set", _wrap_EventConsumer_e_callback_set},
|
|
|
|
{ "EventConsumer_e_callback_get", _wrap_EventConsumer_e_callback_get},
|
|
|
|
{ "EventConsumer_e_subclass_name_set", _wrap_EventConsumer_e_subclass_name_set},
|
|
|
|
{ "EventConsumer_e_subclass_name_get", _wrap_EventConsumer_e_subclass_name_get},
|
|
|
|
{ "EventConsumer_e_cb_arg_set", _wrap_EventConsumer_e_cb_arg_set},
|
|
|
|
{ "EventConsumer_e_cb_arg_get", _wrap_EventConsumer_e_cb_arg_get},
|
|
|
|
{ "EventConsumer_enodes_set", _wrap_EventConsumer_enodes_set},
|
|
|
|
{ "EventConsumer_enodes_get", _wrap_EventConsumer_enodes_get},
|
|
|
|
{ "EventConsumer_node_index_set", _wrap_EventConsumer_node_index_set},
|
|
|
|
{ "EventConsumer_node_index_get", _wrap_EventConsumer_node_index_get},
|
|
|
|
{ "new_EventConsumer", _wrap_new_EventConsumer},
|
|
|
|
{ "delete_EventConsumer", _wrap_delete_EventConsumer},
|
|
|
|
{ "EventConsumer_bind", _wrap_EventConsumer_bind},
|
|
|
|
{ "EventConsumer_pop", _wrap_EventConsumer_pop},
|
|
|
|
{ "delete_CoreSession", _wrap_delete_CoreSession},
|
|
|
|
{ "CoreSession_session_set", _wrap_CoreSession_session_set},
|
|
|
|
{ "CoreSession_session_get", _wrap_CoreSession_session_get},
|
|
|
|
{ "CoreSession_channel_set", _wrap_CoreSession_channel_set},
|
|
|
|
{ "CoreSession_channel_get", _wrap_CoreSession_channel_get},
|
|
|
|
{ "CoreSession_flags_set", _wrap_CoreSession_flags_set},
|
|
|
|
{ "CoreSession_flags_get", _wrap_CoreSession_flags_get},
|
|
|
|
{ "CoreSession_allocated_set", _wrap_CoreSession_allocated_set},
|
|
|
|
{ "CoreSession_allocated_get", _wrap_CoreSession_allocated_get},
|
|
|
|
{ "CoreSession_cb_state_set", _wrap_CoreSession_cb_state_set},
|
|
|
|
{ "CoreSession_cb_state_get", _wrap_CoreSession_cb_state_get},
|
|
|
|
{ "CoreSession_hook_state_set", _wrap_CoreSession_hook_state_set},
|
|
|
|
{ "CoreSession_hook_state_get", _wrap_CoreSession_hook_state_get},
|
|
|
|
{ "CoreSession_cause_set", _wrap_CoreSession_cause_set},
|
|
|
|
{ "CoreSession_cause_get", _wrap_CoreSession_cause_get},
|
|
|
|
{ "CoreSession_uuid_set", _wrap_CoreSession_uuid_set},
|
|
|
|
{ "CoreSession_uuid_get", _wrap_CoreSession_uuid_get},
|
|
|
|
{ "CoreSession_tts_name_set", _wrap_CoreSession_tts_name_set},
|
|
|
|
{ "CoreSession_tts_name_get", _wrap_CoreSession_tts_name_get},
|
|
|
|
{ "CoreSession_voice_name_set", _wrap_CoreSession_voice_name_set},
|
|
|
|
{ "CoreSession_voice_name_get", _wrap_CoreSession_voice_name_get},
|
|
|
|
{ "CoreSession_answer", _wrap_CoreSession_answer},
|
|
|
|
{ "CoreSession_preAnswer", _wrap_CoreSession_preAnswer},
|
|
|
|
{ "CoreSession_hangup", _wrap_CoreSession_hangup},
|
|
|
|
{ "CoreSession_hangupState", _wrap_CoreSession_hangupState},
|
|
|
|
{ "CoreSession_setVariable", _wrap_CoreSession_setVariable},
|
|
|
|
{ "CoreSession_setPrivate", _wrap_CoreSession_setPrivate},
|
|
|
|
{ "CoreSession_getPrivate", _wrap_CoreSession_getPrivate},
|
|
|
|
{ "CoreSession_getVariable", _wrap_CoreSession_getVariable},
|
|
|
|
{ "CoreSession_process_callback_result", _wrap_CoreSession_process_callback_result},
|
|
|
|
{ "CoreSession_say", _wrap_CoreSession_say},
|
|
|
|
{ "CoreSession_sayPhrase", _wrap_CoreSession_sayPhrase},
|
|
|
|
{ "CoreSession_hangupCause", _wrap_CoreSession_hangupCause},
|
|
|
|
{ "CoreSession_getState", _wrap_CoreSession_getState},
|
|
|
|
{ "CoreSession_recordFile", _wrap_CoreSession_recordFile},
|
|
|
|
{ "CoreSession_originate", _wrap_CoreSession_originate},
|
|
|
|
{ "CoreSession_destroy", _wrap_CoreSession_destroy},
|
|
|
|
{ "CoreSession_setDTMFCallback", _wrap_CoreSession_setDTMFCallback},
|
|
|
|
{ "CoreSession_speak", _wrap_CoreSession_speak},
|
|
|
|
{ "CoreSession_set_tts_parms", _wrap_CoreSession_set_tts_parms},
|
|
|
|
{ "CoreSession_collectDigits",_wrap_CoreSession_collectDigits},
|
|
|
|
{ "CoreSession_getDigits",_wrap_CoreSession_getDigits},
|
|
|
|
{ "CoreSession_transfer", _wrap_CoreSession_transfer},
|
|
|
|
{ "CoreSession_read", _wrap_CoreSession_read},
|
|
|
|
{ "CoreSession_playAndGetDigits", _wrap_CoreSession_playAndGetDigits},
|
|
|
|
{ "CoreSession_streamFile", _wrap_CoreSession_streamFile},
|
|
|
|
{ "CoreSession_sleep", _wrap_CoreSession_sleep},
|
|
|
|
{ "CoreSession_flushEvents", _wrap_CoreSession_flushEvents},
|
|
|
|
{ "CoreSession_flushDigits", _wrap_CoreSession_flushDigits},
|
|
|
|
{ "CoreSession_setAutoHangup", _wrap_CoreSession_setAutoHangup},
|
|
|
|
{ "CoreSession_setHangupHook", _wrap_CoreSession_setHangupHook},
|
|
|
|
{ "CoreSession_ready", _wrap_CoreSession_ready},
|
|
|
|
{ "CoreSession_bridged", _wrap_CoreSession_bridged},
|
|
|
|
{ "CoreSession_answered", _wrap_CoreSession_answered},
|
|
|
|
{ "CoreSession_mediaReady", _wrap_CoreSession_mediaReady},
|
|
|
|
{ "CoreSession_waitForAnswer", _wrap_CoreSession_waitForAnswer},
|
|
|
|
{ "CoreSession_execute", _wrap_CoreSession_execute},
|
|
|
|
{ "CoreSession_sendEvent", _wrap_CoreSession_sendEvent},
|
|
|
|
{ "CoreSession_setEventData", _wrap_CoreSession_setEventData},
|
|
|
|
{ "CoreSession_getXMLCDR", _wrap_CoreSession_getXMLCDR},
|
|
|
|
{ "CoreSession_begin_allow_threads", _wrap_CoreSession_begin_allow_threads},
|
|
|
|
{ "CoreSession_end_allow_threads", _wrap_CoreSession_end_allow_threads},
|
|
|
|
{ "CoreSession_get_uuid", _wrap_CoreSession_get_uuid},
|
|
|
|
{ "CoreSession_get_cb_args", _wrap_CoreSession_get_cb_args},
|
|
|
|
{ "CoreSession_check_hangup_hook", _wrap_CoreSession_check_hangup_hook},
|
|
|
|
{ "CoreSession_run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback},
|
2008-06-02 23:37:12 +00:00
|
|
|
{ "console_log", _wrap_console_log},
|
|
|
|
{ "console_clean_log", _wrap_console_clean_log},
|
2008-11-20 23:12:15 +00:00
|
|
|
{ "msleep", _wrap_msleep},
|
2008-06-02 23:37:12 +00:00
|
|
|
{ "bridge", _wrap_bridge},
|
|
|
|
{ "hanguphook", _wrap_hanguphook},
|
|
|
|
{ "dtmf_callback", _wrap_dtmf_callback},
|
2010-09-10 01:36:27 +02:00
|
|
|
{ "new_Session",_wrap_new_Session},
|
|
|
|
{ "delete_Session", _wrap_delete_Session},
|
|
|
|
{ "Session_destroy", _wrap_Session_destroy},
|
|
|
|
{ "Session_begin_allow_threads", _wrap_Session_begin_allow_threads},
|
|
|
|
{ "Session_end_allow_threads", _wrap_Session_end_allow_threads},
|
|
|
|
{ "Session_check_hangup_hook", _wrap_Session_check_hangup_hook},
|
|
|
|
{ "Session_run_dtmf_callback", _wrap_Session_run_dtmf_callback},
|
|
|
|
{ "Session_unsetInputCallback", _wrap_Session_unsetInputCallback},
|
|
|
|
{ "Session_setInputCallback",_wrap_Session_setInputCallback},
|
|
|
|
{ "Session_setHangupHook",_wrap_Session_setHangupHook},
|
|
|
|
{ "Session_ready", _wrap_Session_ready},
|
|
|
|
{ "Session_originate", _wrap_Session_originate},
|
|
|
|
{ "Session_cb_function_set", _wrap_Session_cb_function_set},
|
|
|
|
{ "Session_cb_function_get", _wrap_Session_cb_function_get},
|
|
|
|
{ "Session_cb_arg_set", _wrap_Session_cb_arg_set},
|
|
|
|
{ "Session_cb_arg_get", _wrap_Session_cb_arg_get},
|
|
|
|
{ "Session_hangup_func_str_set", _wrap_Session_hangup_func_str_set},
|
|
|
|
{ "Session_hangup_func_str_get", _wrap_Session_hangup_func_str_get},
|
|
|
|
{ "Session_hangup_func_arg_set", _wrap_Session_hangup_func_arg_set},
|
|
|
|
{ "Session_hangup_func_arg_get", _wrap_Session_hangup_func_arg_get},
|
|
|
|
{ "Session_setLUA", _wrap_Session_setLUA},
|
|
|
|
{ "new_Dbh",_wrap_new_Dbh},
|
|
|
|
{ "delete_Dbh", _wrap_delete_Dbh},
|
|
|
|
{ "Dbh_release", _wrap_Dbh_release},
|
|
|
|
{ "Dbh_query", _wrap_Dbh_query},
|
2008-06-02 23:37:12 +00:00
|
|
|
{0,0}
|
2008-04-28 17:33:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static swig_lua_var_info swig_variables[] = {
|
2008-06-02 23:37:12 +00:00
|
|
|
{0,0,0}
|
2008-04-28 17:33:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static swig_lua_const_info swig_constants[] = {
|
2008-06-02 23:37:12 +00:00
|
|
|
{ SWIG_LUA_INT, (char *)"S_HUP", (long) S_HUP, 0, 0, 0},
|
|
|
|
{ SWIG_LUA_INT, (char *)"S_FREE", (long) S_FREE, 0, 0, 0},
|
|
|
|
{ SWIG_LUA_INT, (char *)"S_RDLOCK", (long) S_RDLOCK, 0, 0, 0},
|
|
|
|
{0,0,0,0,0,0}
|
2008-04-28 17:33:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
static void *_p_LUA__SessionTo_p_CoreSession(void *x) {
|
2008-06-02 23:37:12 +00:00
|
|
|
return (void *)((CoreSession *) ((LUA::Session *) x));
|
|
|
|
}
|
2010-09-10 01:36:27 +02:00
|
|
|
static swig_type_info _swigt__SWIGLUA_FN = {"_SWIGLUA_FN", "SWIGLUA_FN", 0, 0, (void*)0, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)&_wrap_class_API, 0};
|
|
|
|
static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)&_wrap_class_CoreSession, 0};
|
2008-07-11 19:42:52 +00:00
|
|
|
static swig_type_info _swigt__p_DTMF = {"_p_DTMF", "DTMF *", 0, 0, (void*)&_wrap_class_DTMF, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)&_wrap_class_Event, 0};
|
2008-07-02 21:12:57 +00:00
|
|
|
static swig_type_info _swigt__p_EventConsumer = {"_p_EventConsumer", "EventConsumer *", 0, 0, (void*)&_wrap_class_EventConsumer, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_IVRMenu = {"_p_IVRMenu", "IVRMenu *", 0, 0, (void*)&_wrap_class_IVRMenu, 0};
|
2010-09-07 11:45:56 -05:00
|
|
|
static swig_type_info _swigt__p_LUA__Dbh = {"_p_LUA__Dbh", "LUA::Dbh *", 0, 0, (void*)&_wrap_class_LUA_Dbh, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_LUA__Session = {"_p_LUA__Session", "LUA::Session *", 0, 0, (void*)&_wrap_class_LUA_Session, 0};
|
|
|
|
static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)&_wrap_class_Stream, 0};
|
2010-09-10 01:36:27 +02:00
|
|
|
static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state *", 0, 0, (void*)&_wrap_class_input_callback_state_t, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_lua_State = {"_p_lua_State", "lua_State *", 0, 0, (void*)0, 0};
|
2010-05-17 18:37:27 -05:00
|
|
|
static swig_type_info _swigt__p_p_switch_event_node_t = {"_p_p_switch_event_node_t", "switch_event_node_t **", 0, 0, (void*)0, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_session_flag_t = {"_p_session_flag_t", "enum session_flag_t *|session_flag_t *", 0, 0, (void*)0, 0};
|
2009-09-17 23:28:38 +00:00
|
|
|
static swig_type_info _swigt__p_switch_call_cause_t = {"_p_switch_call_cause_t", "switch_call_cause_t *", 0, 0, (void*)0, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_switch_channel_state_t = {"_p_switch_channel_state_t", "switch_channel_state_t *", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__p_switch_channel_t = {"_p_switch_channel_t", "switch_channel_t *", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__p_switch_core_session_t = {"_p_switch_core_session_t", "switch_core_session_t *", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__p_switch_event_t = {"_p_switch_event_t", "switch_event_t *", 0, 0, (void*)0, 0};
|
2008-07-02 21:12:57 +00:00
|
|
|
static swig_type_info _swigt__p_switch_event_types_t = {"_p_switch_event_types_t", "switch_event_types_t *", 0, 0, (void*)0, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_switch_input_args_t = {"_p_switch_input_args_t", "switch_input_args_t *", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__p_switch_input_type_t = {"_p_switch_input_type_t", "switch_input_type_t *", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__p_switch_priority_t = {"_p_switch_priority_t", "switch_priority_t *", 0, 0, (void*)0, 0};
|
2008-07-02 21:12:57 +00:00
|
|
|
static swig_type_info _swigt__p_switch_queue_t = {"_p_switch_queue_t", "switch_queue_t *", 0, 0, (void*)0, 0};
|
2009-09-15 18:48:12 +00:00
|
|
|
static swig_type_info _swigt__p_switch_state_handler_table_t = {"_p_switch_state_handler_table_t", "switch_state_handler_table_t *", 0, 0, (void*)0, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_switch_status_t = {"_p_switch_status_t", "switch_status_t *", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__p_switch_stream_handle_t = {"_p_switch_stream_handle_t", "switch_stream_handle_t *", 0, 0, (void*)0, 0};
|
2008-07-11 19:42:52 +00:00
|
|
|
static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *", 0, 0, (void*)0, 0};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
|
2010-09-10 01:36:27 +02:00
|
|
|
static swig_type_info _swigt__switch_call_cause_t = {"_switch_call_cause_t", "switch_call_cause_t", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__switch_channel_state_t = {"_switch_channel_state_t", "switch_channel_state_t", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__switch_event_types_t = {"_switch_event_types_t", "switch_event_types_t", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__switch_input_type_t = {"_switch_input_type_t", "switch_input_type_t", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__switch_priority_t = {"_switch_priority_t", "switch_priority_t", 0, 0, (void*)0, 0};
|
|
|
|
static swig_type_info _swigt__uint32_t = {"_uint32_t", "uint32_t", 0, 0, (void*)0, 0};
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
static swig_type_info *swig_type_initial[] = {
|
2010-09-10 01:36:27 +02:00
|
|
|
&_swigt__SWIGLUA_FN,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_API,
|
|
|
|
&_swigt__p_CoreSession,
|
2008-07-11 19:42:52 +00:00
|
|
|
&_swigt__p_DTMF,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_Event,
|
2008-07-02 21:12:57 +00:00
|
|
|
&_swigt__p_EventConsumer,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_IVRMenu,
|
2010-09-07 11:45:56 -05:00
|
|
|
&_swigt__p_LUA__Dbh,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_LUA__Session,
|
|
|
|
&_swigt__p_Stream,
|
|
|
|
&_swigt__p_input_callback_state,
|
|
|
|
&_swigt__p_lua_State,
|
2010-05-17 18:37:27 -05:00
|
|
|
&_swigt__p_p_switch_event_node_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_session_flag_t,
|
2009-09-17 23:28:38 +00:00
|
|
|
&_swigt__p_switch_call_cause_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_switch_channel_state_t,
|
|
|
|
&_swigt__p_switch_channel_t,
|
|
|
|
&_swigt__p_switch_core_session_t,
|
|
|
|
&_swigt__p_switch_event_t,
|
2008-07-02 21:12:57 +00:00
|
|
|
&_swigt__p_switch_event_types_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_switch_input_args_t,
|
|
|
|
&_swigt__p_switch_input_type_t,
|
|
|
|
&_swigt__p_switch_priority_t,
|
2008-07-02 21:12:57 +00:00
|
|
|
&_swigt__p_switch_queue_t,
|
2009-09-15 18:48:12 +00:00
|
|
|
&_swigt__p_switch_state_handler_table_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_switch_status_t,
|
|
|
|
&_swigt__p_switch_stream_handle_t,
|
2008-07-11 19:42:52 +00:00
|
|
|
&_swigt__p_uint32_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
&_swigt__p_void,
|
2010-09-10 01:36:27 +02:00
|
|
|
&_swigt__switch_call_cause_t,
|
|
|
|
&_swigt__switch_channel_state_t,
|
|
|
|
&_swigt__switch_event_types_t,
|
|
|
|
&_swigt__switch_input_type_t,
|
|
|
|
&_swigt__switch_priority_t,
|
|
|
|
&_swigt__uint32_t,
|
2008-04-28 17:33:58 +00:00
|
|
|
};
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
static swig_cast_info _swigc__SWIGLUA_FN[] = { {&_swigt__SWIGLUA_FN, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_API[] = { {&_swigt__p_API, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_CoreSession[] = { {&_swigt__p_CoreSession, 0, 0, 0}, {&_swigt__p_LUA__Session, _p_LUA__SessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}};
|
2008-07-11 19:42:52 +00:00
|
|
|
static swig_cast_info _swigc__p_DTMF[] = { {&_swigt__p_DTMF, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}};
|
2008-07-02 21:12:57 +00:00
|
|
|
static swig_cast_info _swigc__p_EventConsumer[] = { {&_swigt__p_EventConsumer, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0},{0, 0, 0, 0}};
|
2010-09-07 11:45:56 -05:00
|
|
|
static swig_cast_info _swigc__p_LUA__Dbh[] = { {&_swigt__p_LUA__Dbh, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_LUA__Session[] = { {&_swigt__p_LUA__Session, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_Stream[] = { {&_swigt__p_Stream, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_input_callback_state[] = { {&_swigt__p_input_callback_state, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_lua_State[] = { {&_swigt__p_lua_State, 0, 0, 0},{0, 0, 0, 0}};
|
2010-05-17 18:37:27 -05:00
|
|
|
static swig_cast_info _swigc__p_p_switch_event_node_t[] = { {&_swigt__p_p_switch_event_node_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}};
|
2009-09-17 23:28:38 +00:00
|
|
|
static swig_cast_info _swigc__p_switch_call_cause_t[] = { {&_swigt__p_switch_call_cause_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_switch_channel_state_t[] = { {&_swigt__p_switch_channel_state_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_switch_channel_t[] = { {&_swigt__p_switch_channel_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_switch_core_session_t[] = { {&_swigt__p_switch_core_session_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_switch_event_t[] = { {&_swigt__p_switch_event_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-07-02 21:12:57 +00:00
|
|
|
static swig_cast_info _swigc__p_switch_event_types_t[] = { {&_swigt__p_switch_event_types_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_switch_input_args_t[] = { {&_swigt__p_switch_input_args_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_switch_input_type_t[] = { {&_swigt__p_switch_input_type_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_switch_priority_t[] = { {&_swigt__p_switch_priority_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-07-02 21:12:57 +00:00
|
|
|
static swig_cast_info _swigc__p_switch_queue_t[] = { {&_swigt__p_switch_queue_t, 0, 0, 0},{0, 0, 0, 0}};
|
2009-09-15 18:48:12 +00:00
|
|
|
static swig_cast_info _swigc__p_switch_state_handler_table_t[] = { {&_swigt__p_switch_state_handler_table_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_switch_status_t[] = { {&_swigt__p_switch_status_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__p_switch_stream_handle_t[] = { {&_swigt__p_switch_stream_handle_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-07-11 19:42:52 +00:00
|
|
|
static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-06-02 23:37:12 +00:00
|
|
|
static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
|
2010-09-10 01:36:27 +02:00
|
|
|
static swig_cast_info _swigc__switch_call_cause_t[] = { {&_swigt__switch_call_cause_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__switch_channel_state_t[] = { {&_swigt__switch_channel_state_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__switch_event_types_t[] = { {&_swigt__switch_event_types_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__switch_input_type_t[] = { {&_swigt__switch_input_type_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__switch_priority_t[] = { {&_swigt__switch_priority_t, 0, 0, 0},{0, 0, 0, 0}};
|
|
|
|
static swig_cast_info _swigc__uint32_t[] = { {&_swigt__uint32_t, 0, 0, 0},{0, 0, 0, 0}};
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
static swig_cast_info *swig_cast_initial[] = {
|
2010-09-10 01:36:27 +02:00
|
|
|
_swigc__SWIGLUA_FN,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_API,
|
|
|
|
_swigc__p_CoreSession,
|
2008-07-11 19:42:52 +00:00
|
|
|
_swigc__p_DTMF,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_Event,
|
2008-07-02 21:12:57 +00:00
|
|
|
_swigc__p_EventConsumer,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_IVRMenu,
|
2010-09-07 11:45:56 -05:00
|
|
|
_swigc__p_LUA__Dbh,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_LUA__Session,
|
|
|
|
_swigc__p_Stream,
|
|
|
|
_swigc__p_input_callback_state,
|
|
|
|
_swigc__p_lua_State,
|
2010-05-17 18:37:27 -05:00
|
|
|
_swigc__p_p_switch_event_node_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_session_flag_t,
|
2009-09-17 23:28:38 +00:00
|
|
|
_swigc__p_switch_call_cause_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_switch_channel_state_t,
|
|
|
|
_swigc__p_switch_channel_t,
|
|
|
|
_swigc__p_switch_core_session_t,
|
|
|
|
_swigc__p_switch_event_t,
|
2008-07-02 21:12:57 +00:00
|
|
|
_swigc__p_switch_event_types_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_switch_input_args_t,
|
|
|
|
_swigc__p_switch_input_type_t,
|
|
|
|
_swigc__p_switch_priority_t,
|
2008-07-02 21:12:57 +00:00
|
|
|
_swigc__p_switch_queue_t,
|
2009-09-15 18:48:12 +00:00
|
|
|
_swigc__p_switch_state_handler_table_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_switch_status_t,
|
|
|
|
_swigc__p_switch_stream_handle_t,
|
2008-07-11 19:42:52 +00:00
|
|
|
_swigc__p_uint32_t,
|
2008-06-02 23:37:12 +00:00
|
|
|
_swigc__p_void,
|
2010-09-10 01:36:27 +02:00
|
|
|
_swigc__switch_call_cause_t,
|
|
|
|
_swigc__switch_channel_state_t,
|
|
|
|
_swigc__switch_event_types_t,
|
|
|
|
_swigc__switch_input_type_t,
|
|
|
|
_swigc__switch_priority_t,
|
|
|
|
_swigc__uint32_t,
|
2008-04-28 17:33:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
|
|
|
|
|
|
|
|
/* -----------------------------------------------------------------------------
|
|
|
|
* Type initialization:
|
|
|
|
* This problem is tough by the requirement that no dynamic
|
|
|
|
* memory is used. Also, since swig_type_info structures store pointers to
|
|
|
|
* swig_cast_info structures and swig_cast_info structures store pointers back
|
|
|
|
* to swig_type_info structures, we need some lookup code at initialization.
|
|
|
|
* The idea is that swig generates all the structures that are needed.
|
|
|
|
* The runtime then collects these partially filled structures.
|
|
|
|
* The SWIG_InitializeModule function takes these initial arrays out of
|
|
|
|
* swig_module, and does all the lookup, filling in the swig_module.types
|
|
|
|
* array with the correct data and linking the correct swig_cast_info
|
|
|
|
* structures together.
|
|
|
|
*
|
|
|
|
* The generated swig_type_info structures are assigned staticly to an initial
|
2010-09-10 01:36:27 +02:00
|
|
|
* array. We just loop though that array, and handle each type individually.
|
2008-04-28 17:33:58 +00:00
|
|
|
* First we lookup if this type has been already loaded, and if so, use the
|
|
|
|
* loaded structure instead of the generated one. Then we have to fill in the
|
|
|
|
* cast linked list. The cast data is initially stored in something like a
|
|
|
|
* two-dimensional array. Each row corresponds to a type (there are the same
|
|
|
|
* number of rows as there are in the swig_type_initial array). Each entry in
|
|
|
|
* a column is one of the swig_cast_info structures for that type.
|
|
|
|
* The cast_initial array is actually an array of arrays, because each row has
|
|
|
|
* a variable number of columns. So to actually build the cast linked list,
|
|
|
|
* we find the array of casts associated with the type, and loop through it
|
|
|
|
* adding the casts to the list. The one last trick we need to do is making
|
|
|
|
* sure the type pointer in the swig_cast_info struct is correct.
|
|
|
|
*
|
|
|
|
* First off, we lookup the cast->type name to see if it is already loaded.
|
|
|
|
* There are three cases to handle:
|
|
|
|
* 1) If the cast->type has already been loaded AND the type we are adding
|
|
|
|
* casting info to has not been loaded (it is in this module), THEN we
|
|
|
|
* replace the cast->type pointer with the type pointer that has already
|
|
|
|
* been loaded.
|
|
|
|
* 2) If BOTH types (the one we are adding casting info to, and the
|
|
|
|
* cast->type) are loaded, THEN the cast info has already been loaded by
|
|
|
|
* the previous module so we just ignore it.
|
|
|
|
* 3) Finally, if cast->type has not already been loaded, then we add that
|
|
|
|
* swig_cast_info to the linked list (because the cast->type) pointer will
|
|
|
|
* be correct.
|
|
|
|
* ----------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#if 0
|
2008-06-02 23:37:12 +00:00
|
|
|
} /* c-mode */
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
#if 0
|
|
|
|
#define SWIGRUNTIME_DEBUG
|
|
|
|
#endif
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME void
|
|
|
|
SWIG_InitializeModule(void *clientdata) {
|
|
|
|
size_t i;
|
2010-09-10 01:36:27 +02:00
|
|
|
swig_module_info *module_head;
|
|
|
|
static int init_run = 0;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
|
|
|
clientdata = clientdata;
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
if (init_run) return;
|
|
|
|
init_run = 1;
|
|
|
|
|
|
|
|
/* Initialize the swig_module */
|
|
|
|
swig_module.type_initial = swig_type_initial;
|
|
|
|
swig_module.cast_initial = swig_cast_initial;
|
2008-06-02 23:37:12 +00:00
|
|
|
|
|
|
|
/* Try and load any already created modules */
|
|
|
|
module_head = SWIG_GetModule(clientdata);
|
2010-09-10 01:36:27 +02:00
|
|
|
if (module_head) {
|
2008-06-02 23:37:12 +00:00
|
|
|
swig_module.next = module_head->next;
|
|
|
|
module_head->next = &swig_module;
|
2010-09-10 01:36:27 +02:00
|
|
|
} else {
|
|
|
|
/* This is the first module loaded */
|
|
|
|
swig_module.next = &swig_module;
|
|
|
|
SWIG_SetModule(clientdata, &swig_module);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2010-09-10 01:36:27 +02:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
/* Now work on filling in swig_module.types */
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
printf("SWIG_InitializeModule: size %d\n", swig_module.size);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
for (i = 0; i < swig_module.size; ++i) {
|
|
|
|
swig_type_info *type = 0;
|
|
|
|
swig_type_info *ret;
|
|
|
|
swig_cast_info *cast;
|
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
/* if there is another module already loaded */
|
|
|
|
if (swig_module.next != &swig_module) {
|
|
|
|
type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
|
|
|
|
}
|
|
|
|
if (type) {
|
|
|
|
/* Overwrite clientdata field */
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
printf("SWIG_InitializeModule: found type %s\n", type->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
if (swig_module.type_initial[i]->clientdata) {
|
|
|
|
type->clientdata = swig_module.type_initial[i]->clientdata;
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
} else {
|
|
|
|
type = swig_module.type_initial[i];
|
|
|
|
}
|
2008-05-27 04:54:52 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
/* Insert casting types */
|
|
|
|
cast = swig_module.cast_initial[i];
|
|
|
|
while (cast->type) {
|
|
|
|
|
|
|
|
/* Don't need to add information already in the list */
|
|
|
|
ret = 0;
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
if (swig_module.next != &swig_module) {
|
|
|
|
ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
|
|
|
if (ret) {
|
|
|
|
if (type == swig_module.type_initial[i]) {
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
cast->type = ret;
|
|
|
|
ret = 0;
|
|
|
|
} else {
|
|
|
|
/* Check for casting already in the list */
|
|
|
|
swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
if (!ocast) ret = 0;
|
|
|
|
}
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
2008-06-02 23:37:12 +00:00
|
|
|
if (!ret) {
|
2008-04-28 17:33:58 +00:00
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
if (type->cast) {
|
|
|
|
type->cast->prev = cast;
|
|
|
|
cast->next = type->cast;
|
|
|
|
}
|
|
|
|
type->cast = cast;
|
|
|
|
}
|
|
|
|
cast++;
|
|
|
|
}
|
|
|
|
/* Set entry in modules->types array equal to the type */
|
|
|
|
swig_module.types[i] = type;
|
|
|
|
}
|
|
|
|
swig_module.types[i] = 0;
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
#ifdef SWIGRUNTIME_DEBUG
|
2008-06-02 23:37:12 +00:00
|
|
|
printf("**** SWIG_InitializeModule: Cast List ******\n");
|
|
|
|
for (i = 0; i < swig_module.size; ++i) {
|
|
|
|
int j = 0;
|
|
|
|
swig_cast_info *cast = swig_module.cast_initial[i];
|
|
|
|
printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
|
|
|
while (cast->type) {
|
|
|
|
printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
|
|
|
|
cast++;
|
|
|
|
++j;
|
|
|
|
}
|
|
|
|
printf("---- Total casts: %d\n",j);
|
|
|
|
}
|
|
|
|
printf("**** SWIG_InitializeModule: Cast List ******\n");
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/* This function will propagate the clientdata field of type to
|
|
|
|
* any new swig_type_info structures that have been added into the list
|
|
|
|
* of equivalent types. It is like calling
|
|
|
|
* SWIG_TypeClientData(type, clientdata) a second time.
|
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGRUNTIME void
|
|
|
|
SWIG_PropagateClientData(void) {
|
|
|
|
size_t i;
|
|
|
|
swig_cast_info *equiv;
|
|
|
|
static int init_run = 0;
|
|
|
|
|
|
|
|
if (init_run) return;
|
|
|
|
init_run = 1;
|
|
|
|
|
|
|
|
for (i = 0; i < swig_module.size; i++) {
|
|
|
|
if (swig_module.types[i]->clientdata) {
|
|
|
|
equiv = swig_module.types[i]->cast;
|
|
|
|
while (equiv) {
|
|
|
|
if (!equiv->converter) {
|
|
|
|
if (equiv->type && !equiv->type->clientdata)
|
|
|
|
SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
|
|
|
|
}
|
|
|
|
equiv = equiv->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#if 0
|
2008-06-02 23:37:12 +00:00
|
|
|
{ /* c-mode */
|
2008-04-28 17:33:58 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Forward declaration of where the user's %init{} gets inserted */
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
2010-09-10 01:36:27 +02:00
|
|
|
void SWIG_init_user(lua_State* L );
|
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
/* this is the initialization function
|
2010-09-10 01:36:27 +02:00
|
|
|
added at the very end of the code
|
|
|
|
the function is always called SWIG_init, but an eariler #define will rename it
|
2008-04-28 17:33:58 +00:00
|
|
|
*/
|
2008-06-02 23:37:12 +00:00
|
|
|
SWIGEXPORT int SWIG_init(lua_State* L)
|
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
int i;
|
|
|
|
|
|
|
|
/* start with global table */
|
|
|
|
lua_pushvalue(L,LUA_GLOBALSINDEX);
|
|
|
|
|
|
|
|
SWIG_InitializeModule((void*)L);
|
|
|
|
SWIG_PropagateClientData();
|
|
|
|
|
|
|
|
/* invoke user-specific initialization */
|
|
|
|
SWIG_init_user(L);
|
|
|
|
|
|
|
|
/* add a global fn */
|
|
|
|
SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
|
|
|
|
SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
|
|
|
|
|
|
|
|
/* begin the module (its a table with the same name as the module) */
|
|
|
|
SWIG_Lua_module_begin(L,SWIG_name);
|
|
|
|
/* add commands/functions */
|
|
|
|
for (i = 0; swig_commands[i].name; i++){
|
|
|
|
SWIG_Lua_module_add_function(L,swig_commands[i].name,swig_commands[i].func);
|
|
|
|
}
|
|
|
|
/*luaL_openlib(L,NULL,swig_commands,0);*/
|
|
|
|
/* all in one */
|
|
|
|
/*luaL_openlib(L,SWIG_name,swig_commands,0);*/
|
|
|
|
/* add variables */
|
|
|
|
for (i = 0; swig_variables[i].name; i++){
|
|
|
|
SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* additional registration structs & classes in lua: */
|
|
|
|
for (i = 0; swig_types[i]; i++){
|
|
|
|
if (swig_types[i]->clientdata){
|
|
|
|
SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* constants */
|
|
|
|
SWIG_Lua_InstallConstants(L,swig_constants);
|
|
|
|
|
|
|
|
/* end module */
|
|
|
|
/*SWIG_Lua_module_end(L);*/
|
|
|
|
lua_pop(L,1); /* tidy stack (remove module table)*/
|
|
|
|
lua_pop(L,1); /* tidy stack (remove global table)*/
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Lua 5.1 has a different name for importing libraries
|
|
|
|
luaopen_XXX, where XXX is the name of the module (not capitalised)
|
|
|
|
this function will allow Lua 5.1 to import correctly.
|
|
|
|
There is a #define in the wrapper to rename 'SWIG_import' to the correct name
|
|
|
|
*/
|
|
|
|
|
|
|
|
SWIGEXPORT int SWIG_import(lua_State* L)
|
|
|
|
{
|
|
|
|
return SWIG_init(L);
|
2008-06-02 23:37:12 +00:00
|
|
|
}
|
2008-04-28 17:33:58 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2010-09-10 01:36:27 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
#endif
|
2008-06-02 23:37:12 +00:00
|
|
|
void SWIG_init_user(lua_State* L)
|
2008-04-28 17:33:58 +00:00
|
|
|
{
|
2010-09-10 01:36:27 +02:00
|
|
|
|
2008-04-28 17:33:58 +00:00
|
|
|
}
|
|
|
|
|
2008-04-29 23:34:26 +00:00
|
|
|
#include "mod_lua_extra.c"
|