From 830a8493deff2bc2571023fad899c31fd2edab32 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 2 Jun 2008 23:37:12 +0000 Subject: [PATCH] add answered and mediaReady methods to CoreSession git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8743 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/include/switch_cpp.h | 2 + src/mod/languages/mod_lua/mod_lua_wrap.cpp | 12079 ++++++------ src/mod/languages/mod_perl/mod_perl_wrap.cpp | 15658 ++++++++-------- .../languages/mod_python/mod_python_wrap.cpp | 14481 +++++++------- src/switch_cpp.cpp | 14 + 5 files changed, 20497 insertions(+), 21737 deletions(-) diff --git a/src/include/switch_cpp.h b/src/include/switch_cpp.h index 63d28facbc..1647955991 100644 --- a/src/include/switch_cpp.h +++ b/src/include/switch_cpp.h @@ -279,6 +279,8 @@ SWITCH_DECLARE(void) consoleCleanLog(char *msg); SWITCH_DECLARE(void) setHangupHook(void *hangup_func); SWITCH_DECLARE(bool) ready(); + SWITCH_DECLARE(bool) answered(); + SWITCH_DECLARE(bool) mediaReady(); SWITCH_DECLARE(void) execute(char *app, char *data = NULL); diff --git a/src/mod/languages/mod_lua/mod_lua_wrap.cpp b/src/mod/languages/mod_lua/mod_lua_wrap.cpp index 2be8990e46..673a44d8f2 100644 --- a/src/mod/languages/mod_lua/mod_lua_wrap.cpp +++ b/src/mod/languages/mod_lua/mod_lua_wrap.cpp @@ -10,35 +10,22 @@ #ifdef __cplusplus -template < typename T > class SwigValueWrapper { - 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); +template class SwigValueWrapper { + T *tt; +public: + SwigValueWrapper() : tt(0) { } + SwigValueWrapper(const SwigValueWrapper& 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& rhs); }; -template < typename T > T SwigValueInit() -{ - return T(); +template T SwigValueInit() { + return T(); } #endif @@ -73,14 +60,14 @@ template < typename T > T SwigValueInit() #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif @@ -88,7 +75,7 @@ template < typename T > T SwigValueInit() # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -131,7 +118,7 @@ template < typename T > T SwigValueInit() # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -275,10 +262,10 @@ template < typename T > T SwigValueInit() */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -305,18 +292,16 @@ template < typename T > T SwigValueInit() # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) -{ - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) -{ - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast @@ -332,38 +317,38 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) extern "C" { #endif - typedef void *(*swig_converter_func) (void *, int *); - typedef struct swig_type_info *(*swig_dycast_func) (void **); +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ - 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; +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; /* Structure to store a type and conversion function used for casting */ - 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; +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; /* 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.*/ - 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; +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; /* Compare two type names skipping the space characters, therefore @@ -372,56 +357,54 @@ extern "C" { Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ - 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; - } return (int) ((l1 - f1) - (l2 - f2)); - } +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; + } + return (int)((l1 - f1) - (l2 - f2)); +} /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ - 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; - } +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; +} /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ - 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; - } +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; +} /* think of this as a c++ template<> or a scheme macro */ @@ -449,89 +432,94 @@ extern "C" { /* Check the typename */ - SWIGRUNTIME swig_cast_info *SWIG_TypeCheck(const char *c, swig_type_info * ty) { - SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); - } +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); +} /* Same as previous function, except strcmp is replaced with a pointer comparison */ - SWIGRUNTIME swig_cast_info *SWIG_TypeCheckStruct(swig_type_info * from, swig_type_info * into) { - SWIG_TypeCheck_Template(iter->type == from, into); - } +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { + SWIG_TypeCheck_Template(iter->type == from, into); +} /* Cast a pointer up an inheritance hierarchy */ - SWIGRUNTIMEINLINE void *SWIG_TypeCast(swig_cast_info * ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter) (ptr, newmemory); - } +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} /* Dynamic pointer casting. Down an inheritance hierarchy */ - 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; - } +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; +} /* Return the name associated with this type */ - SWIGRUNTIMEINLINE const char *SWIG_TypeName(const swig_type_info * ty) { - return ty->name; - } +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ - 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; - } +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; +} /* Set the clientdata field for a type */ - 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; - } - +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; +} + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) @@ -540,38 +528,41 @@ extern "C" { Note: if start == end at the beginning of the function, we go all the way around the circular list. */ - 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 */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; +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 */ } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} /* Search for a swig_type_info structure for either a mangled name or a human readable name. @@ -582,124 +573,130 @@ extern "C" { Note: if start == end at the beginning of the function, we go all the way around the circular list. */ - 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; - } +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; +} /* Pack binary data into a string */ - 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; - } +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; +} /* Unpack binary data from a string */ - 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; - } +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; +} /* Pack 'void *' into a string buffer. */ - 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; - } +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; +} - 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 *)); - } +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 *)); +} - 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; - } +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; +} - 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); - } +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); +} #ifdef __cplusplus } @@ -722,8 +719,8 @@ extern "C" { #include "lua.h" #include "lauxlib.h" -#include /* for malloc */ -#include /* for a few sanity tests */ +#include /* for malloc */ +#include /* for a few sanity tests */ /* ----------------------------------------------------------------------------- * global swig types @@ -737,62 +734,62 @@ extern "C" { #define SWIG_LUA_CHAR 6 /* Structure for variable linking table */ - typedef struct { - const char *name; - lua_CFunction get; - lua_CFunction set; - } swig_lua_var_info; +typedef struct { + const char *name; + lua_CFunction get; + lua_CFunction set; +} swig_lua_var_info; /* Constant information structure */ - typedef struct { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; - } swig_lua_const_info; +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 method; +} swig_lua_method; - typedef struct { - const char *name; - lua_CFunction getmethod; - lua_CFunction setmethod; - } swig_lua_attribute; +typedef struct { + const char *name; + lua_CFunction getmethod; + lua_CFunction setmethod; +} swig_lua_attribute; - typedef struct swig_lua_class { - const char *name; - swig_type_info **type; - lua_CFunction constructor; - void (*destructor) (void *); - swig_lua_method *methods; - swig_lua_attribute *attributes; - struct swig_lua_class **bases; - const char **base_names; - } swig_lua_class; +typedef struct swig_lua_class { + const char *name; + swig_type_info **type; + lua_CFunction constructor; + void (*destructor)(void *); + swig_lua_method *methods; + swig_lua_attribute *attributes; + struct swig_lua_class **bases; + const char **base_names; +} swig_lua_class; /* this is the struct for wrappering all pointers in SwigLua */ - typedef struct { - swig_type_info *type; - int own; /* 1 if owned & must be destroyed */ - void *ptr; - } swig_lua_userdata; +typedef struct { + swig_type_info *type; + int own; /* 1 if owned & must be destroyed */ + void *ptr; +} swig_lua_userdata; /* this is the struct for wrapping arbitary packed binary data (currently it is only used for member function pointers) the data ordering is similar to swig_lua_userdata, but it is currently not possible to tell the two structures apart within Swig, other than by looking at the type */ - typedef struct { - swig_type_info *type; - int own; /* 1 if owned & must be destroyed */ - char data[1]; /* arbitary amount of data */ - } swig_lua_rawdata; +typedef struct { + swig_type_info *type; + int own; /* 1 if owned & must be destroyed */ + char data[1]; /* arbitary amount of data */ +} swig_lua_rawdata; /* Common SWIG API */ #define SWIG_NewPointerObj(L, ptr, type, owner) SWIG_Lua_NewPointerObj(L, (void *)ptr, type, owner) @@ -843,20 +840,24 @@ it gets the address, casts it, then dereferences it */ #endif /* 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; - } 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); - } +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; +} + +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); +} /* ----------------------------------------------------------------------------- * global variable support code: modules @@ -865,18 +866,20 @@ it gets the address, casts it, then dereferences it */ /* this function is called when trying to set an immutable. default value is to print an error. This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */ - SWIGINTERN int SWIG_Lua_set_immutable(lua_State * L) { +SWIGINTERN int SWIG_Lua_set_immutable(lua_State* L) +{ /* there should be 1 param passed in: the new value */ #ifndef SWIGLUA_IGNORE_SET_IMMUTABLE - lua_pop(L, 1); /* remove it */ - lua_pushstring(L, "This variable is immutable"); - lua_error(L); + lua_pop(L,1); /* remove it */ + lua_pushstring(L,"This variable is immutable"); + lua_error(L); #endif - return 0; /* should not return anything */ - } + return 0; /* should not return anything */ +} /* the module.get method used for getting linked data */ - SWIGINTERN int SWIG_Lua_module_get(lua_State * L) { +SWIGINTERN int SWIG_Lua_module_get(lua_State* L) +{ /* there should be 2 params passed in (1) table (not the meta table) (2) string name of the attribute @@ -884,158 +887,173 @@ This can removed with a compile flag SWIGLUA_IGNORE_SET_IMMUTABLE */ lua_topointer(L,1),lua_typename(L,lua_type(L,1)), lua_tostring(L,2)); */ - /* 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 */ - return 1; - } + /* 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 */ + return 1; +} /* the module.set method used for setting linked data */ - SWIGINTERN int SWIG_Lua_module_set(lua_State * L) { +SWIGINTERN int SWIG_Lua_module_set(lua_State* L) +{ /* 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 */ - /* 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_settop(L, 3); /* reset back to start */ - /* we now have the table, key & new value, so just set directly */ - lua_rawset(L, 1); /* add direct */ - return 0; - } + /* 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_settop(L,3); /* reset back to start */ + /* we now have the table, key & new value, so just set directly */ + lua_rawset(L,1); /* add direct */ + return 0; +} /* registering a module in lua */ - SWIGINTERN void SWIG_Lua_module_begin(lua_State * L, const char *name) { - 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 */ - } +SWIGINTERN void SWIG_Lua_module_begin(lua_State* L,const char* name) +{ + 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 */ +} /* ending the register */ - SWIGINTERN void SWIG_Lua_module_end(lua_State * L) { - lua_pop(L, 1); /* tidy stack (remove module) */ - } +SWIGINTERN void SWIG_Lua_module_end(lua_State* L) +{ + lua_pop(L,1); /* tidy stack (remove module) */ +} /* adding a linked variable to the module */ - SWIGINTERN void SWIG_Lua_module_add_variable(lua_State * L, const char *name, lua_CFunction getFn, lua_CFunction setFn) { - 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) */ - } +SWIGINTERN void SWIG_Lua_module_add_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn) +{ + 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) */ +} /* adding a function module */ - SWIGINTERN void SWIG_Lua_module_add_function(lua_State * L, const char *name, lua_CFunction fn) { - SWIG_Lua_add_function(L, name, fn); - } +SWIGINTERN void SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn) +{ + SWIG_Lua_add_function(L,name,fn); +} /* ----------------------------------------------------------------------------- * global variable support code: classes * ----------------------------------------------------------------------------- */ /* the class.get method, performs the lookup of class attributes */ - SWIGINTERN int SWIG_Lua_class_get(lua_State * L) { +SWIGINTERN int SWIG_Lua_class_get(lua_State* L) +{ /* there should be 2 params passed in (1) userdata (not the meta table) (2) string name of the attribute */ - 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_isfunction(L, -1)) { /* note: if its a C function or lua function *//* 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 */ - } + 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_isfunction(L,-1)) /* note: if its a C function or lua function */ + { /* 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 */ +} /* the class.set method, performs the lookup of class attributes */ - SWIGINTERN int SWIG_Lua_class_set(lua_State * L) { +SWIGINTERN int SWIG_Lua_class_set(lua_State* L) +{ /* there should be 3 params passed in (1) table (not the meta table) (2) string name of the attribute @@ -1045,123 +1063,136 @@ printf("SWIG_Lua_class_set %p(%s) '%s' %p(%s)\n", 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 */ + 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; - } + 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; +} /* the class.destruct method called by the interpreter */ - SWIGINTERN int SWIG_Lua_class_destruct(lua_State * L) { +SWIGINTERN int SWIG_Lua_class_destruct(lua_State* L) +{ /* 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; - } + 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; +} /* gets the swig class registry (or creates it) */ - SWIGINTERN void SWIG_Lua_get_class_registry(lua_State * L) { - /* 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); - } - } +SWIGINTERN void SWIG_Lua_get_class_registry(lua_State* L) +{ + /* 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); + } +} /* helper fn to get the classes metatable from the register */ - SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State * L, const char *cname) { - 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) */ - } +SWIGINTERN void SWIG_Lua_get_class_metatable(lua_State* L,const char* cname) +{ + 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) */ +} /* helper add a variable to a registered class */ - SWIGINTERN void SWIG_Lua_add_class_variable(lua_State * L, const char *name, lua_CFunction getFn, lua_CFunction setFn) { - 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) */ - } - } +SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn) +{ + 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) */ + } +} /* helper to recursively add class details (attributes & operations) */ - SWIGINTERN void SWIG_Lua_add_class_details(lua_State * L, swig_lua_class * clss) { - 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); - } - } - } +SWIGINTERN void SWIG_Lua_add_class_details(lua_State* L,swig_lua_class* clss) +{ + 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); + } + } +} /* set up the base classes pointers. Each class structure has a list of pointers to the base class structures. @@ -1170,237 +1201,256 @@ It cannot be done at compile time, as this will not work with hireachies spread over more than one swig file. Therefore it must be done at runtime, querying the SWIG type system. */ - SWIGINTERN void SWIG_Lua_init_base_class(lua_State * L, swig_lua_class * clss) { - int i = 0; - swig_module_info *module = SWIG_GetModule(L); - for (i = 0; clss->base_names[i]; i++) { - if (clss->bases[i] == 0) { /* not found yet */ - /* lookup and cache the base class */ - swig_type_info *info = SWIG_TypeQueryModule(module, module, clss->base_names[i]); - if (info) - clss->bases[i] = (swig_lua_class *) info->clientdata; - } - } - } +SWIGINTERN void SWIG_Lua_init_base_class(lua_State* L,swig_lua_class* clss) +{ + int i=0; + swig_module_info* module=SWIG_GetModule(L); + for(i=0;clss->base_names[i];i++) + { + if (clss->bases[i]==0) /* not found yet */ + { + /* lookup and cache the base class */ + swig_type_info *info = SWIG_TypeQueryModule(module,module,clss->base_names[i]); + if (info) clss->bases[i] = (swig_lua_class *) info->clientdata; + } + } +} /* performs the entire class registration process */ - SWIGINTERN void SWIG_Lua_class_register(lua_State * L, swig_lua_class * clss) { - /* 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); +SWIGINTERN void SWIG_Lua_class_register(lua_State* L,swig_lua_class* clss) +{ + /* 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_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) */ - } + 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) */ +} /* ----------------------------------------------------------------------------- * Class/structure conversion fns * ----------------------------------------------------------------------------- */ /* helper to add metatable to new lua object */ - SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State * L, swig_type_info * type) { - 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); - } - } - } +SWIGINTERN void _SWIG_Lua_AddMetatable(lua_State* L,swig_type_info *type) +{ + 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); + } + } +} /* pushes a new object into the lua stack */ - SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State * L, void *ptr, swig_type_info * type, int own) { - 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; - _SWIG_Lua_AddMetatable(L, type); /* add metatable */ - } +SWIGRUNTIME void SWIG_Lua_NewPointerObj(lua_State* L,void* ptr,swig_type_info *type, int own) +{ + 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; + _SWIG_Lua_AddMetatable(L,type); /* add metatable */ +} /* takes a object from the lua stack & converts it into an object of the correct type (if possible) */ - SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State * L, int index, void **ptr, swig_type_info * type, int flags) { - swig_lua_userdata *usr; - swig_cast_info *cast; - if (lua_isnil(L, index)) { - *ptr = 0; - return SWIG_OK; - } /* special case: lua nil => NULL pointer */ - usr = (swig_lua_userdata *) lua_touserdata(L, index); /* get data */ - if (usr) { - if (flags & SWIG_POINTER_DISOWN) { /* must disown the object */ - usr->own = 0; - } - if (!type) { /* special cast void*, no casting fn */ - *ptr = usr->ptr; - return SWIG_OK; /* ok */ - } - cast = SWIG_TypeCheckStruct(usr->type, type); /* performs normal type checking */ - if (cast) { - int newmemory = 0; - *ptr = SWIG_TypeCast(cast, usr->ptr, &newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - return SWIG_OK; /* ok */ - } - } - return SWIG_ERROR; /* error */ - } +SWIGRUNTIME int SWIG_Lua_ConvertPtr(lua_State* L,int index,void** ptr,swig_type_info *type,int flags) +{ + swig_lua_userdata* usr; + swig_cast_info *cast; + if (lua_isnil(L,index)){*ptr=0; return SWIG_OK;} /* special case: lua nil => NULL pointer */ + usr=(swig_lua_userdata*)lua_touserdata(L,index); /* get data */ + if (usr) + { + if (flags & SWIG_POINTER_DISOWN) /* must disown the object */ + { + usr->own=0; + } + if (!type) /* special cast void*, no casting fn */ + { + *ptr=usr->ptr; + return SWIG_OK; /* ok */ + } + cast=SWIG_TypeCheckStruct(usr->type,type); /* performs normal type checking */ + if (cast) + { + int newmemory = 0; + *ptr=SWIG_TypeCast(cast,usr->ptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + return SWIG_OK; /* ok */ + } + } + return SWIG_ERROR; /* error */ +} - SWIGRUNTIME void *SWIG_Lua_MustGetPtr(lua_State * L, int index, swig_type_info * type, int flags, int argnum, const char *func_name) { - void *result; - if (!SWIG_IsOK(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; - } +SWIGRUNTIME void* SWIG_Lua_MustGetPtr(lua_State* L,int index,swig_type_info *type,int flags, + int argnum,const char* func_name){ + void* result; + if (!SWIG_IsOK(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; +} /* pushes a packed userdata. user for member fn pointers only */ - SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State * L, void *ptr, size_t size, swig_type_info * type) { - swig_lua_rawdata *raw; - assert(ptr); /* not acceptable to pass in a NULL value */ - raw = (swig_lua_rawdata *) lua_newuserdata(L, sizeof(swig_lua_rawdata) - 1 + size); /* alloc data */ - raw->type = type; - raw->own = 0; - memcpy(raw->data, ptr, size); /* copy the data */ - _SWIG_Lua_AddMetatable(L, type); /* add metatable */ - } - +SWIGRUNTIME void SWIG_Lua_NewPackedObj(lua_State* L,void* ptr,size_t size,swig_type_info *type) +{ + swig_lua_rawdata* raw; + assert(ptr); /* not acceptable to pass in a NULL value */ + raw=(swig_lua_rawdata*)lua_newuserdata(L,sizeof(swig_lua_rawdata)-1+size); /* alloc data */ + raw->type=type; + raw->own=0; + memcpy(raw->data,ptr,size); /* copy the data */ + _SWIG_Lua_AddMetatable(L,type); /* add metatable */ +} + /* converts a packed userdata. user for member fn pointers only */ - SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State * L, int index, void *ptr, size_t size, swig_type_info * type) { - swig_lua_rawdata *raw; - raw = (swig_lua_rawdata *) lua_touserdata(L, index); /* get data */ - if (!raw) - return SWIG_ERROR; /* error */ - if (type == 0 || type == raw->type) { /* void* or identical type */ - memcpy(ptr, raw->data, size); /* copy it */ - return SWIG_OK; /* ok */ - } - return SWIG_ERROR; /* error */ - } +SWIGRUNTIME int SWIG_Lua_ConvertPacked(lua_State* L,int index,void* ptr,size_t size,swig_type_info *type) +{ + swig_lua_rawdata* raw; + raw=(swig_lua_rawdata*)lua_touserdata(L,index); /* get data */ + if (!raw) return SWIG_ERROR; /* error */ + if (type==0 || type==raw->type) /* void* or identical type */ + { + memcpy(ptr,raw->data,size); /* copy it */ + return SWIG_OK; /* ok */ + } + return SWIG_ERROR; /* error */ +} /* a function to get the typestring of a piece of data */ - SWIGRUNTIME const char *SWIG_Lua_typename(lua_State * L, int tp) { - swig_lua_userdata *usr; - if (lua_isuserdata(L, tp)) { - usr = (swig_lua_userdata *) lua_touserdata(L, 1); /* get data */ - if (usr && usr->type && usr->type->str) - return usr->type->str; - return "userdata (unknown type)"; - } - return lua_typename(L, lua_type(L, tp)); - } +SWIGRUNTIME const char *SWIG_Lua_typename(lua_State *L, int tp) +{ + swig_lua_userdata* usr; + if (lua_isuserdata(L,tp)) + { + usr=(swig_lua_userdata*)lua_touserdata(L,1); /* get data */ + if (usr && usr->type && usr->type->str) + return usr->type->str; + return "userdata (unknown type)"; + } + return lua_typename(L,lua_type(L,tp)); +} /* lua callable function to get the userdata's type */ - SWIGRUNTIME int SWIG_Lua_type(lua_State * L) { - lua_pushstring(L, SWIG_Lua_typename(L, 1)); - return 1; - } +SWIGRUNTIME int SWIG_Lua_type(lua_State* L) +{ + lua_pushstring(L,SWIG_Lua_typename(L,1)); + return 1; +} /* 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 */ - SWIGRUNTIME int SWIG_Lua_equal(lua_State * L) { - 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); only works if type is the same */ - result = (usr1->ptr == usr2->ptr); - lua_pushboolean(L, result); - return 1; - } +SWIGRUNTIME int SWIG_Lua_equal(lua_State* L) +{ + 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); only works if type is the same*/ + result=(usr1->ptr==usr2->ptr); + lua_pushboolean(L,result); + return 1; +} /* ----------------------------------------------------------------------------- * global variable support code: class/struct typemap functions * ----------------------------------------------------------------------------- */ /* Install Constants */ - 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); - lua_pushnumber(L, (lua_Number) constants[i].lvalue); - lua_rawset(L, -3); - break; - case SWIG_LUA_FLOAT: - lua_pushstring(L, constants[i].name); - lua_pushnumber(L, (lua_Number) constants[i].dvalue); - lua_rawset(L, -3); - break; - case SWIG_LUA_CHAR: - lua_pushstring(L, constants[i].name); - lua_pushfstring(L, "%c", (char) constants[i].lvalue); - 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: - lua_pushstring(L, constants[i].name); - SWIG_NewMemberObj(L, constants[i].pvalue, constants[i].lvalue, *(constants[i]).ptype); - lua_rawset(L, -3); - break; - default: - break; - } - } - } +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); + lua_pushnumber(L,(lua_Number)constants[i].lvalue); + lua_rawset(L,-3); + break; + case SWIG_LUA_FLOAT: + lua_pushstring(L,constants[i].name); + lua_pushnumber(L,(lua_Number)constants[i].dvalue); + lua_rawset(L,-3); + break; + case SWIG_LUA_CHAR: + lua_pushstring(L,constants[i].name); + lua_pushfstring(L,"%c",(char)constants[i].lvalue); + 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: + lua_pushstring(L,constants[i].name); + SWIG_NewMemberObj(L,constants[i].pvalue,constants[i].lvalue,*(constants[i]).ptype); + lua_rawset(L,-3); + break; + default: + break; + } + } +} /* ----------------------------------------------------------------------------- * executing lua code from within the wrapper * ----------------------------------------------------------------------------- */ -#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */ +#ifndef SWIG_DOSTRING_FAIL /* Allows redefining of error function */ #define SWIG_DOSTRING_FAIL(S) fprintf(stderr,"%s\n",S) #endif /* Executes a C string in Lua a really simple way of calling lua from C @@ -1408,23 +1458,22 @@ Unfortunately lua keeps changing its API's, so we need a conditional compile In lua 5.0.X its lua_dostring() In lua 5.1.X its luaL_dostring() */ - SWIGINTERN int - SWIG_Lua_dostring(lua_State * L, const char *str) { - int ok, top; - if (str == 0 || str[0] == 0) - return 0; /* nothing to do */ - top = lua_gettop(L); /* save stack */ +SWIGINTERN int +SWIG_Lua_dostring(lua_State *L, const char* str) { + int ok,top; + if (str==0 || str[0]==0) return 0; /* nothing to do */ + top=lua_gettop(L); /* save stack */ #if (defined(LUA_VERSION_NUM) && (LUA_VERSION_NUM>=501)) - ok = luaL_dostring(L, str); /* looks like this is lua 5.1.X or later, good */ + ok=luaL_dostring(L,str); /* looks like this is lua 5.1.X or later, good */ #else - ok = lua_dostring(L, str); /* might be lua 5.0.x, using lua_dostring */ + ok=lua_dostring(L,str); /* might be lua 5.0.x, using lua_dostring */ #endif - if (ok != 0) { - SWIG_DOSTRING_FAIL(lua_tostring(L, -1)); - } - lua_settop(L, top); /* restore the stack */ - return ok; - } + if (ok!=0) { + SWIG_DOSTRING_FAIL(lua_tostring(L,-1)); + } + lua_settop(L,top); /* restore the stack */ + return ok; +} #ifdef __cplusplus } @@ -1455,8 +1504,7 @@ In lua 5.1.X its luaL_dostring() #define SWIGTYPE_p_switch_stream_handle_t swig_types[17] #define SWIGTYPE_p_void swig_types[18] static swig_type_info *swig_types[20]; -static swig_module_info swig_module = { swig_types, 19, 0, 0, 0, 0 }; - +static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1470,5297 +1518,4782 @@ static swig_module_info swig_module = { swig_types, 19, 0, 0, 0, 0 }; namespace swig { - typedef struct { - } LANGUAGE_OBJ; +typedef struct{} LANGUAGE_OBJ; } + + #include "switch.h" #include "switch_cpp.h" #include "freeswitch_lua.h" + #ifdef __cplusplus extern "C" { #endif - static int _wrap_consoleLog(lua_State * L) { - int SWIG_arg = -1; - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("consoleLog", 2, 2) - if (!lua_isstring(L, 1)) - SWIG_fail_arg("consoleLog", 1, "char *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("consoleLog", 2, "char *"); - arg1 = (char *) lua_tostring(L, 1); - arg2 = (char *) lua_tostring(L, 2); - consoleLog(arg1, arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail:lua_error(L); - return SWIG_arg; - } static int _wrap_consoleCleanLog(lua_State * L) { - int SWIG_arg = -1; - char *arg1 = (char *) 0; - - SWIG_check_num_args("consoleCleanLog", 1, 1) - if (!lua_isstring(L, 1)) - SWIG_fail_arg("consoleCleanLog", 1, "char *"); - arg1 = (char *) lua_tostring(L, 1); - consoleCleanLog(arg1); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - int arg9; - int arg10; - int arg11; - int arg12; - int arg13; - IVRMenu *result = 0; - - SWIG_check_num_args("IVRMenu", 13, 13) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("IVRMenu", 1, "IVRMenu *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("IVRMenu", 2, "char const *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("IVRMenu", 3, "char const *"); - if (!lua_isstring(L, 4)) - SWIG_fail_arg("IVRMenu", 4, "char const *"); - if (!lua_isstring(L, 5)) - SWIG_fail_arg("IVRMenu", 5, "char const *"); - if (!lua_isstring(L, 6)) - SWIG_fail_arg("IVRMenu", 6, "char const *"); - if (!lua_isstring(L, 7)) - SWIG_fail_arg("IVRMenu", 7, "char const *"); - if (!lua_isstring(L, 8)) - SWIG_fail_arg("IVRMenu", 8, "char const *"); - if (!lua_isnumber(L, 9)) - SWIG_fail_arg("IVRMenu", 9, "int"); - if (!lua_isnumber(L, 10)) - SWIG_fail_arg("IVRMenu", 10, "int"); - if (!lua_isnumber(L, 11)) - SWIG_fail_arg("IVRMenu", 11, "int"); - if (!lua_isnumber(L, 12)) - SWIG_fail_arg("IVRMenu", 12, "int"); - if (!lua_isnumber(L, 13)) - SWIG_fail_arg("IVRMenu", 13, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_IVRMenu, 0))) { - SWIG_fail_ptr("new_IVRMenu", 1, SWIGTYPE_p_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 = (int) lua_tonumber(L, 9); - arg10 = (int) lua_tonumber(L, 10); - arg11 = (int) lua_tonumber(L, 11); - arg12 = (int) lua_tonumber(L, 12); - arg13 = (int) lua_tonumber(L, 13); - 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, arg9, arg10, arg11, arg12, arg13); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_IVRMenu, 1); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_delete_IVRMenu(lua_State * L) { - int SWIG_arg = -1; - IVRMenu *arg1 = (IVRMenu *) 0; - - SWIG_check_num_args("IVRMenu", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("IVRMenu", 1, "IVRMenu *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_IVRMenu, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("delete_IVRMenu", 1, SWIGTYPE_p_IVRMenu); - } - - delete arg1; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("bindAction", 4, 4) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("bindAction", 1, "IVRMenu *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("bindAction", 2, "char *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("bindAction", 3, "char const *"); - if (!lua_isstring(L, 4)) - SWIG_fail_arg("bindAction", 4, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_IVRMenu, 0))) { - SWIG_fail_ptr("IVRMenu_bindAction", 1, SWIGTYPE_p_IVRMenu); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - arg4 = (char *) lua_tostring(L, 4); - (arg1)->bindAction(arg2, (char const *) arg3, (char const *) arg4); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_IVRMenu_execute(lua_State * L) { - int SWIG_arg = -1; - IVRMenu *arg1 = (IVRMenu *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("execute", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("execute", 1, "IVRMenu *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("execute", 2, "CoreSession *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("execute", 3, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_IVRMenu, 0))) { - SWIG_fail_ptr("IVRMenu_execute", 1, SWIGTYPE_p_IVRMenu); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("IVRMenu_execute", 2, SWIGTYPE_p_CoreSession); - } - - arg3 = (char *) lua_tostring(L, 3); - (arg1)->execute(arg2, (char const *) arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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 }; - static const char *swig_IVRMenu_base_names[] = { 0 }; - static 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, -swig_IVRMenu_base_names }; - - static int _wrap_new_API(lua_State * L) { - int SWIG_arg = -1; - API *result = 0; - - SWIG_check_num_args("API", 0, 0) - result = (API *) new API(); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_API, 1); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_delete_API(lua_State * L) { - int SWIG_arg = -1; - API *arg1 = (API *) 0; - - SWIG_check_num_args("API", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("API", 1, "API *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_API, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("delete_API", 1, SWIGTYPE_p_API); - } - - delete arg1; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_API_execute(lua_State * L) { - int SWIG_arg = -1; - API *arg1 = (API *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *result = 0; - - SWIG_check_num_args("execute", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("execute", 1, "API *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("execute", 2, "char const *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("execute", 3, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_API, 0))) { - SWIG_fail_ptr("API_execute", 1, SWIGTYPE_p_API); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - result = (char *) (arg1)->execute((char const *) arg2, (char const *) arg3); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_API_executeString(lua_State * L) { - int SWIG_arg = -1; - API *arg1 = (API *) 0; - char *arg2 = (char *) 0; - char *result = 0; - - SWIG_check_num_args("executeString", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("executeString", 1, "API *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("executeString", 2, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_API, 0))) { - SWIG_fail_ptr("API_executeString", 1, SWIGTYPE_p_API); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (char *) (arg1)->executeString((char const *) arg2); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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}, - {0, 0} - }; - static swig_lua_attribute swig_API_attributes[] = { - {0, 0, 0} - }; - static swig_lua_class *swig_API_bases[] = { 0 }; - static const char *swig_API_base_names[] = { 0 }; - static 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, swig_API_base_names }; - - 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; - - SWIG_check_num_args("function", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("function", 1, "input_callback_state_t *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("function", 2, "void *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("input_callback_state_t_function_set", 1, SWIGTYPE_p_input_callback_state); - } - - arg2 = (void *) SWIG_MustGetPtr(L, 2, 0, 0, 2, "input_callback_state_t_function_set"); - if (arg1) - (arg1)->function = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("function", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("function", 1, "input_callback_state_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("input_callback_state_t_function_get", 1, SWIGTYPE_p_input_callback_state); - } - - result = (void *) ((arg1)->function); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_void, 0); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("threadState", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("threadState", 1, "input_callback_state_t *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("threadState", 2, "void *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("input_callback_state_t_threadState_set", 1, SWIGTYPE_p_input_callback_state); - } - - arg2 = (void *) SWIG_MustGetPtr(L, 2, 0, 0, 2, "input_callback_state_t_threadState_set"); - if (arg1) - (arg1)->threadState = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("threadState", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("threadState", 1, "input_callback_state_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("input_callback_state_t_threadState_get", 1, SWIGTYPE_p_input_callback_state); - } - - result = (void *) ((arg1)->threadState); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_void, 0); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("extra", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("extra", 1, "input_callback_state_t *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("extra", 2, "void *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("input_callback_state_t_extra_set", 1, SWIGTYPE_p_input_callback_state); - } - - arg2 = (void *) SWIG_MustGetPtr(L, 2, 0, 0, 2, "input_callback_state_t_extra_set"); - if (arg1) - (arg1)->extra = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("extra", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("extra", 1, "input_callback_state_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("input_callback_state_t_extra_get", 1, SWIGTYPE_p_input_callback_state); - } - - result = (void *) ((arg1)->extra); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_void, 0); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("funcargs", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("funcargs", 1, "input_callback_state_t *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("funcargs", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("input_callback_state_t_funcargs_set", 1, SWIGTYPE_p_input_callback_state); - } - - arg2 = (char *) lua_tostring(L, 2); - { - if (arg1->funcargs) - delete[]arg1->funcargs; - if (arg2) { - arg1->funcargs = (char *) (new char[strlen((const char *)arg2) + 1]); - strcpy((char *) arg1->funcargs, (const char *) arg2); - } else { - arg1->funcargs = 0; - } - } - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("funcargs", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("funcargs", 1, "input_callback_state_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("input_callback_state_t_funcargs_get", 1, SWIGTYPE_p_input_callback_state); - } - - result = (char *) ((arg1)->funcargs); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_input_callback_state_t(lua_State * L) { - int SWIG_arg = -1; - input_callback_state_t *result = 0; - - SWIG_check_num_args("input_callback_state_t::input_callback_state_t", 0, 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; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("input_callback_state_t::~input_callback_state_t", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("input_callback_state_t::~input_callback_state_t", 1, "input_callback_state_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_input_callback_state, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("delete_input_callback_state_t", 1, SWIGTYPE_p_input_callback_state); - } - - delete arg1; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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[] = { - {"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}, - {0, 0, 0} - }; - static swig_lua_class *swig_input_callback_state_t_bases[] = { 0 }; - static const char *swig_input_callback_state_t_base_names[] = { 0 }; - static 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, swig_input_callback_state_t_base_names }; - - static int _wrap_new_Stream__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - Stream *result = 0; - - SWIG_check_num_args("Stream", 0, 0) - result = (Stream *) new Stream(); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_Stream, 1); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("Stream", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("Stream", 1, "switch_stream_handle_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_switch_stream_handle_t, 0))) { - SWIG_fail_ptr("new_Stream", 1, SWIGTYPE_p_switch_stream_handle_t); - } - - result = (Stream *) new Stream(arg1); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_Stream, 1); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_switch_stream_handle_t, 0)) { - _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; - } - - - static int _wrap_delete_Stream(lua_State * L) { - int SWIG_arg = -1; - Stream *arg1 = (Stream *) 0; - - SWIG_check_num_args("Stream", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("Stream", 1, "Stream *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Stream, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("delete_Stream", 1, SWIGTYPE_p_Stream); - } - - delete arg1; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Stream_write(lua_State * L) { - int SWIG_arg = -1; - Stream *arg1 = (Stream *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("write", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("write", 1, "Stream *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("write", 2, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Stream, 0))) { - SWIG_fail_ptr("Stream_write", 1, SWIGTYPE_p_Stream); - } - - arg2 = (char *) lua_tostring(L, 2); - (arg1)->write((char const *) arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Stream_get_data(lua_State * L) { - int SWIG_arg = -1; - Stream *arg1 = (Stream *) 0; - char *result = 0; - - SWIG_check_num_args("get_data", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("get_data", 1, "Stream *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Stream, 0))) { - SWIG_fail_ptr("Stream_get_data", 1, SWIGTYPE_p_Stream); - } - - result = (char *) (arg1)->get_data(); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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 }; - static const char *swig_Stream_base_names[] = { 0 }; - static 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, -swig_Stream_base_names }; - - 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; - - SWIG_check_num_args("event", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("event", 1, "Event *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("event", 2, "switch_event_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_event_set", 1, SWIGTYPE_p_Event); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_switch_event_t, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("Event_event_set", 2, SWIGTYPE_p_switch_event_t); - } - - if (arg1) - (arg1)->event = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_event_get(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - switch_event_t *result = 0; - - SWIG_check_num_args("event", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("event", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_event_get", 1, SWIGTYPE_p_Event); - } - - result = (switch_event_t *) ((arg1)->event); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_switch_event_t, 0); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_serialized_string_set(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("serialized_string", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("serialized_string", 1, "Event *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("serialized_string", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_serialized_string_set", 1, SWIGTYPE_p_Event); - } - - arg2 = (char *) lua_tostring(L, 2); - { - if (arg1->serialized_string) - delete[]arg1->serialized_string; - if (arg2) { - arg1->serialized_string = (char *) (new char[strlen((const char *)arg2) + 1]); - strcpy((char *) arg1->serialized_string, (const char *) arg2); - } else { - arg1->serialized_string = 0; - } - } - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_serialized_string_get(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *result = 0; - - SWIG_check_num_args("serialized_string", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("serialized_string", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_serialized_string_get", 1, SWIGTYPE_p_Event); - } - - result = (char *) ((arg1)->serialized_string); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_mine_set(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - int arg2; - - SWIG_check_num_args("mine", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("mine", 1, "Event *"); - if (!lua_isnumber(L, 2)) - SWIG_fail_arg("mine", 2, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_mine_set", 1, SWIGTYPE_p_Event); - } - - arg2 = (int) lua_tonumber(L, 2); - if (arg1) - (arg1)->mine = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_mine_get(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - int result; - - SWIG_check_num_args("mine", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("mine", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_mine_get", 1, SWIGTYPE_p_Event); - } - - result = (int) ((arg1)->mine); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Event__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - Event *result = 0; - - SWIG_check_num_args("Event", 2, 2) - if (!lua_isstring(L, 1)) - SWIG_fail_arg("Event", 1, "char const *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("Event", 2, "char const *"); - arg1 = (char *) lua_tostring(L, 1); - arg2 = (char *) lua_tostring(L, 2); - 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; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Event__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - char *arg1 = (char *) 0; - Event *result = 0; - - SWIG_check_num_args("Event", 1, 1) - if (!lua_isstring(L, 1)) - SWIG_fail_arg("Event", 1, "char const *"); - arg1 = (char *) lua_tostring(L, 1); - result = (Event *) new Event((char const *) arg1); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_Event, 1); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Event__SWIG_2(lua_State * L) { - int SWIG_arg = -1; - switch_event_t *arg1 = (switch_event_t *) 0; - int arg2; - Event *result = 0; - - SWIG_check_num_args("Event", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("Event", 1, "switch_event_t *"); - if (!lua_isnumber(L, 2)) - SWIG_fail_arg("Event", 2, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_switch_event_t, 0))) { - SWIG_fail_ptr("new_Event", 1, SWIGTYPE_p_switch_event_t); - } - - arg2 = (int) lua_tonumber(L, 2); - result = (Event *) new Event(arg1, arg2); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_Event, 1); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Event__SWIG_3(lua_State * L) { - int SWIG_arg = -1; - switch_event_t *arg1 = (switch_event_t *) 0; - Event *result = 0; - - SWIG_check_num_args("Event", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("Event", 1, "switch_event_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_switch_event_t, 0))) { - SWIG_fail_ptr("new_Event", 1, SWIGTYPE_p_switch_event_t); - } - - result = (Event *) new Event(arg1); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_Event, 1); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Event(lua_State * L) { - int argc; - int argv[3] = { - 1, 2, 3 - }; - - argc = lua_gettop(L); - if (argc == 1) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_switch_event_t, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - return _wrap_new_Event__SWIG_3(L); - } - } - if (argc == 1) { - int _v; - { - _v = lua_isstring(L, argv[0]); - } - if (_v) { - return _wrap_new_Event__SWIG_1(L); - } - } - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_switch_event_t, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isnumber(L, argv[1]); - } - if (_v) { - return _wrap_new_Event__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_Event__SWIG_0(L); - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'new_Event'"); - lua_error(L); - return 0; - } - - - static int _wrap_delete_Event(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - - SWIG_check_num_args("Event", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("Event", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("delete_Event", 1, SWIGTYPE_p_Event); - } - - delete arg1; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_serialize__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - char *result = 0; - - SWIG_check_num_args("serialize", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("serialize", 1, "Event *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("serialize", 2, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_serialize", 1, SWIGTYPE_p_Event); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (char *) (arg1)->serialize((char const *) arg2); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_serialize__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *result = 0; - - SWIG_check_num_args("serialize", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("serialize", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_serialize", 1, SWIGTYPE_p_Event); - } - - result = (char *) (arg1)->serialize(); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_serialize(lua_State * L) { - int argc; - int argv[3] = { - 1, 2, 3 - }; - - argc = lua_gettop(L); - if (argc == 1) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - return _wrap_Event_serialize__SWIG_1(L); - } - } - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - return _wrap_Event_serialize__SWIG_0(L); - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'Event_serialize'"); - lua_error(L); - return 0; - } - - - static int _wrap_Event_setPriority__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - switch_priority_t arg2; - bool result; - switch_priority_t *argp2; - - SWIG_check_num_args("setPriority", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setPriority", 1, "Event *"); - if (!lua_isuserdata(L, 2)) - SWIG_fail_arg("setPriority", 2, "switch_priority_t"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_setPriority", 1, SWIGTYPE_p_Event); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &argp2, SWIGTYPE_p_switch_priority_t, 0))) { - SWIG_fail_ptr("Event_setPriority", 2, SWIGTYPE_p_switch_priority_t); - } - arg2 = *argp2; - - result = (bool) (arg1)->setPriority(arg2); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_setPriority__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - bool result; - - SWIG_check_num_args("setPriority", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setPriority", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_setPriority", 1, SWIGTYPE_p_Event); - } - - result = (bool) (arg1)->setPriority(); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_setPriority(lua_State * L) { - int argc; - int argv[3] = { - 1, 2, 3 - }; - - argc = lua_gettop(L); - if (argc == 1) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - return _wrap_Event_setPriority__SWIG_1(L); - } - } - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - void *ptr; - if (lua_isuserdata(L, argv[1]) == 0 || SWIG_ConvertPtr(L, argv[1], (void **) &ptr, SWIGTYPE_p_switch_priority_t, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - return _wrap_Event_setPriority__SWIG_0(L); - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'Event_setPriority'"); - lua_error(L); - return 0; - } - - - static int _wrap_Event_getHeader(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - char *result = 0; - - SWIG_check_num_args("getHeader", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("getHeader", 1, "Event *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("getHeader", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_getHeader", 1, SWIGTYPE_p_Event); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (char *) (arg1)->getHeader(arg2); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_getBody(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *result = 0; - - SWIG_check_num_args("getBody", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("getBody", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_getBody", 1, SWIGTYPE_p_Event); - } - - result = (char *) (arg1)->getBody(); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_getType(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *result = 0; - - SWIG_check_num_args("getType", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("getType", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_getType", 1, SWIGTYPE_p_Event); - } - - result = (char *) (arg1)->getType(); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_addBody(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - bool result; - - SWIG_check_num_args("addBody", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("addBody", 1, "Event *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("addBody", 2, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_addBody", 1, SWIGTYPE_p_Event); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (bool) (arg1)->addBody((char const *) arg2); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("addHeader", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("addHeader", 1, "Event *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("addHeader", 2, "char const *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("addHeader", 3, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_addHeader", 1, SWIGTYPE_p_Event); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - result = (bool) (arg1)->addHeader((char const *) arg2, (char const *) arg3); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_delHeader(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - bool result; - - SWIG_check_num_args("delHeader", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("delHeader", 1, "Event *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("delHeader", 2, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_delHeader", 1, SWIGTYPE_p_Event); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (bool) (arg1)->delHeader((char const *) arg2); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Event_fire(lua_State * L) { - int SWIG_arg = -1; - Event *arg1 = (Event *) 0; - bool result; - - SWIG_check_num_args("fire", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("fire", 1, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("Event_fire", 1, SWIGTYPE_p_Event); - } - - result = (bool) (arg1)->fire(); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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[] = { - {"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}, - {0, 0, 0} - }; - static swig_lua_class *swig_Event_bases[] = { 0 }; - static const char *swig_Event_base_names[] = { 0 }; - static 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, -swig_Event_base_names }; - - static int _wrap_delete_CoreSession(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - - SWIG_check_num_args("CoreSession", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("CoreSession", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("delete_CoreSession", 1, SWIGTYPE_p_CoreSession); - } - - delete arg1; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("session", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("session", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("session", 2, "switch_core_session_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_session_set", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_switch_core_session_t, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("CoreSession_session_set", 2, SWIGTYPE_p_switch_core_session_t); - } - - if (arg1) - (arg1)->session = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_session_get(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - switch_core_session_t *result = 0; - - SWIG_check_num_args("session", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("session", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_session_get", 1, SWIGTYPE_p_CoreSession); - } - - 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; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("channel", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("channel", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("channel", 2, "switch_channel_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_channel_set", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_switch_channel_t, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("CoreSession_channel_set", 2, SWIGTYPE_p_switch_channel_t); - } - - if (arg1) - (arg1)->channel = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_channel_get(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_t *result = 0; - - SWIG_check_num_args("channel", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("channel", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_channel_get", 1, SWIGTYPE_p_CoreSession); - } - - result = (switch_channel_t *) ((arg1)->channel); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_switch_channel_t, 0); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_flags_set(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - unsigned int arg2; - - SWIG_check_num_args("flags", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("flags", 1, "CoreSession *"); - if (!lua_isnumber(L, 2)) - SWIG_fail_arg("flags", 2, "unsigned int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_flags_set", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (unsigned int) lua_tonumber(L, 2); - if (arg1) - (arg1)->flags = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_flags_get(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - unsigned int result; - - SWIG_check_num_args("flags", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("flags", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_flags_get", 1, SWIGTYPE_p_CoreSession); - } - - result = (unsigned int) ((arg1)->flags); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_allocated_set(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - - SWIG_check_num_args("allocated", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("allocated", 1, "CoreSession *"); - if (!lua_isnumber(L, 2)) - SWIG_fail_arg("allocated", 2, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_allocated_set", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (int) lua_tonumber(L, 2); - if (arg1) - (arg1)->allocated = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_allocated_get(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - int result; - - SWIG_check_num_args("allocated", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("allocated", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_allocated_get", 1, SWIGTYPE_p_CoreSession); - } - - result = (int) ((arg1)->allocated); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("cb_state", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("cb_state", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("cb_state", 2, "input_callback_state *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_cb_state_set", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_input_callback_state, 0))) { - SWIG_fail_ptr("CoreSession_cb_state_set", 2, SWIGTYPE_p_input_callback_state); - } - - if (arg1) - (arg1)->cb_state = *arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_cb_state_get(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - input_callback_state *result = 0; - - SWIG_check_num_args("cb_state", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("cb_state", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_cb_state_get", 1, SWIGTYPE_p_CoreSession); - } - - 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; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_hook_state_set(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_state_t arg2; - switch_channel_state_t *argp2; - - SWIG_check_num_args("hook_state", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hook_state", 1, "CoreSession *"); - if (!lua_isuserdata(L, 2)) - SWIG_fail_arg("hook_state", 2, "switch_channel_state_t"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_hook_state_set", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &argp2, SWIGTYPE_p_switch_channel_state_t, 0))) { - SWIG_fail_ptr("CoreSession_hook_state_set", 2, SWIGTYPE_p_switch_channel_state_t); - } - arg2 = *argp2; - - if (arg1) - (arg1)->hook_state = arg2; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_hook_state_get(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_state_t result; - - SWIG_check_num_args("hook_state", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hook_state", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_hook_state_get", 1, SWIGTYPE_p_CoreSession); - } - - result = ((arg1)->hook_state); - SWIG_arg = 0; - { - switch_channel_state_t *resultptr = new switch_channel_state_t ((switch_channel_state_t &) result); - SWIG_NewPointerObj(L, (void *) resultptr, SWIGTYPE_p_switch_channel_state_t, 1); - SWIG_arg++; - } - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_answer(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - int result; - - SWIG_check_num_args("answer", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("answer", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_answer", 1, SWIGTYPE_p_CoreSession); - } - - result = (int) (arg1)->answer(); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_preAnswer(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - int result; - - SWIG_check_num_args("preAnswer", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("preAnswer", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_preAnswer", 1, SWIGTYPE_p_CoreSession); - } - - result = (int) (arg1)->preAnswer(); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_hangup__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("hangup", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hangup", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("hangup", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_hangup", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - (arg1)->hangup(arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_hangup__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - - SWIG_check_num_args("hangup", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hangup", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_hangup", 1, SWIGTYPE_p_CoreSession); - } - - (arg1)->hangup(); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_hangup(lua_State * L) { - int argc; - int argv[3] = { - 1, 2, 3 - }; - - argc = lua_gettop(L); - if (argc == 1) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - return _wrap_CoreSession_hangup__SWIG_1(L); - } - } - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - return _wrap_CoreSession_hangup__SWIG_0(L); - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'CoreSession_hangup'"); - lua_error(L); - return 0; - } - - - static int _wrap_CoreSession_setVariable(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("setVariable", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setVariable", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("setVariable", 2, "char *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("setVariable", 3, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_setVariable", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - (arg1)->setVariable(arg2, arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_setPrivate(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *arg3 = (void *) 0; - - SWIG_check_num_args("setPrivate", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setPrivate", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("setPrivate", 2, "char *"); - if (!SWIG_isptrtype(L, 3)) - SWIG_fail_arg("setPrivate", 3, "void *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_setPrivate", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (void *) SWIG_MustGetPtr(L, 3, 0, 0, 3, "CoreSession_setPrivate"); - (arg1)->setPrivate(arg2, arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_getPrivate(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *result = 0; - - SWIG_check_num_args("getPrivate", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("getPrivate", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("getPrivate", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_getPrivate", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (void *) (arg1)->getPrivate(arg2); - SWIG_arg = 0; - SWIG_NewPointerObj(L, result, SWIGTYPE_p_void, 0); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_getVariable(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *result = 0; - - SWIG_check_num_args("getVariable", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("getVariable", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("getVariable", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_getVariable", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (char *) (arg1)->getVariable(arg2); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("process_callback_result", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("process_callback_result", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("process_callback_result", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_process_callback_result", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (arg1)->process_callback_result(arg2); - SWIG_arg = 0; - { - switch_status_t *resultptr = new switch_status_t ((switch_status_t &) result); - SWIG_NewPointerObj(L, (void *) resultptr, SWIGTYPE_p_switch_status_t, 1); - SWIG_arg++; - } - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_say(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - char *arg5 = (char *) 0; - - SWIG_check_num_args("say", 5, 5) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("say", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("say", 2, "char const *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("say", 3, "char const *"); - if (!lua_isstring(L, 4)) - SWIG_fail_arg("say", 4, "char const *"); - if (!lua_isstring(L, 5)) - SWIG_fail_arg("say", 5, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_say", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - arg4 = (char *) lua_tostring(L, 4); - arg5 = (char *) lua_tostring(L, 5); - (arg1)->say((char const *) arg2, (char const *) arg3, (char const *) arg4, (char const *) arg5); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_sayPhrase__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - - SWIG_check_num_args("sayPhrase", 4, 4) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("sayPhrase", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("sayPhrase", 2, "char const *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("sayPhrase", 3, "char const *"); - if (!lua_isstring(L, 4)) - SWIG_fail_arg("sayPhrase", 4, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_sayPhrase", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - arg4 = (char *) lua_tostring(L, 4); - (arg1)->sayPhrase((char const *) arg2, (char const *) arg3, (char const *) arg4); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_sayPhrase__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("sayPhrase", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("sayPhrase", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("sayPhrase", 2, "char const *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("sayPhrase", 3, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_sayPhrase", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - (arg1)->sayPhrase((char const *) arg2, (char const *) arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_sayPhrase__SWIG_2(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("sayPhrase", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("sayPhrase", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("sayPhrase", 2, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_sayPhrase", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - (arg1)->sayPhrase((char const *) arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_sayPhrase(lua_State * L) { - int argc; - int argv[5] = { - 1, 2, 3, 4, 5 - }; - - argc = lua_gettop(L); - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - return _wrap_CoreSession_sayPhrase__SWIG_2(L); - } - } - } - if (argc == 3) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _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_CoreSession_sayPhrase__SWIG_1(L); - } - } - } - } - if (argc == 4) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - { - _v = lua_isstring(L, argv[2]); - } - if (_v) { - { - _v = lua_isstring(L, argv[3]); - } - if (_v) { - return _wrap_CoreSession_sayPhrase__SWIG_0(L); - } - } - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'CoreSession_sayPhrase'"); - lua_error(L); - return 0; - } - - - static int _wrap_CoreSession_recordFile__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int arg4; - int arg5; - int result; - - SWIG_check_num_args("recordFile", 5, 5) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("recordFile", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("recordFile", 2, "char *"); - if (!lua_isnumber(L, 3)) - SWIG_fail_arg("recordFile", 3, "int"); - if (!lua_isnumber(L, 4)) - SWIG_fail_arg("recordFile", 4, "int"); - if (!lua_isnumber(L, 5)) - SWIG_fail_arg("recordFile", 5, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_recordFile", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (int) lua_tonumber(L, 3); - arg4 = (int) lua_tonumber(L, 4); - arg5 = (int) lua_tonumber(L, 5); - result = (int) (arg1)->recordFile(arg2, arg3, arg4, arg5); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_recordFile__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int arg4; - int result; - - SWIG_check_num_args("recordFile", 4, 4) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("recordFile", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("recordFile", 2, "char *"); - if (!lua_isnumber(L, 3)) - SWIG_fail_arg("recordFile", 3, "int"); - if (!lua_isnumber(L, 4)) - SWIG_fail_arg("recordFile", 4, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_recordFile", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (int) lua_tonumber(L, 3); - arg4 = (int) lua_tonumber(L, 4); - result = (int) (arg1)->recordFile(arg2, arg3, arg4); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_recordFile__SWIG_2(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int result; - - SWIG_check_num_args("recordFile", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("recordFile", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("recordFile", 2, "char *"); - if (!lua_isnumber(L, 3)) - SWIG_fail_arg("recordFile", 3, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_recordFile", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (int) lua_tonumber(L, 3); - result = (int) (arg1)->recordFile(arg2, arg3); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_recordFile__SWIG_3(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - - SWIG_check_num_args("recordFile", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("recordFile", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("recordFile", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_recordFile", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (int) (arg1)->recordFile(arg2); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_recordFile(lua_State * L) { - int argc; - int argv[6] = { - 1, 2, 3, 4, 5, 6 - }; - - argc = lua_gettop(L); - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - return _wrap_CoreSession_recordFile__SWIG_3(L); - } - } - } - if (argc == 3) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - { - _v = lua_isnumber(L, argv[2]); - } - if (_v) { - return _wrap_CoreSession_recordFile__SWIG_2(L); - } - } - } - } - if (argc == 4) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - { - _v = lua_isnumber(L, argv[2]); - } - if (_v) { - { - _v = lua_isnumber(L, argv[3]); - } - if (_v) { - return _wrap_CoreSession_recordFile__SWIG_1(L); - } - } - } - } - } - if (argc == 5) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - { - _v = lua_isnumber(L, argv[2]); - } - if (_v) { - { - _v = lua_isnumber(L, argv[3]); - } - if (_v) { - { - _v = lua_isnumber(L, argv[4]); - } - if (_v) { - return _wrap_CoreSession_recordFile__SWIG_0(L); - } - } - } - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'CoreSession_recordFile'"); - lua_error(L); - return 0; - } - - - static int _wrap_CoreSession_setCallerData(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("setCallerData", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setCallerData", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("setCallerData", 2, "char *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("setCallerData", 3, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_setCallerData", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - (arg1)->setCallerData(arg2, arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_originate__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - int arg4; - int result; - - SWIG_check_num_args("originate", 4, 4) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("originate", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("originate", 2, "CoreSession *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("originate", 3, "char *"); - if (!lua_isnumber(L, 4)) - SWIG_fail_arg("originate", 4, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_originate", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_originate", 2, SWIGTYPE_p_CoreSession); - } - - arg3 = (char *) lua_tostring(L, 3); - arg4 = (int) lua_tonumber(L, 4); - result = (int) (arg1)->originate(arg2, arg3, arg4); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_originate__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - int result; - - SWIG_check_num_args("originate", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("originate", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("originate", 2, "CoreSession *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("originate", 3, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_originate", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_originate", 2, SWIGTYPE_p_CoreSession); - } - - arg3 = (char *) lua_tostring(L, 3); - result = (int) (arg1)->originate(arg2, arg3); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_originate(lua_State * L) { - int argc; - int argv[5] = { - 1, 2, 3, 4, 5 - }; - - argc = lua_gettop(L); - if (argc == 3) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - void *ptr; - if (SWIG_isptrtype(L, argv[1]) == 0 || SWIG_ConvertPtr(L, argv[1], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[2]); - } - if (_v) { - return _wrap_CoreSession_originate__SWIG_1(L); - } - } - } - } - if (argc == 4) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - void *ptr; - if (SWIG_isptrtype(L, argv[1]) == 0 || SWIG_ConvertPtr(L, argv[1], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[2]); - } - if (_v) { - { - _v = lua_isnumber(L, argv[3]); - } - if (_v) { - return _wrap_CoreSession_originate__SWIG_0(L); - } - } - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'CoreSession_originate'"); - lua_error(L); - return 0; - } - - - static int _wrap_CoreSession_setDTMFCallback(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - void *arg2 = (void *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("setDTMFCallback", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setDTMFCallback", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("setDTMFCallback", 2, "void *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("setDTMFCallback", 3, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_setDTMFCallback", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (void *) SWIG_MustGetPtr(L, 2, 0, 0, 2, "CoreSession_setDTMFCallback"); - arg3 = (char *) lua_tostring(L, 3); - (arg1)->setDTMFCallback(arg2, arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_speak(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - - SWIG_check_num_args("speak", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("speak", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("speak", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_speak", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (int) (arg1)->speak(arg2); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_set_tts_parms(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("set_tts_parms", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("set_tts_parms", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("set_tts_parms", 2, "char *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("set_tts_parms", 3, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_set_tts_parms", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - (arg1)->set_tts_parms(arg2, arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_collectDigits(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - int result; - - SWIG_check_num_args("collectDigits", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("collectDigits", 1, "CoreSession *"); - if (!lua_isnumber(L, 2)) - SWIG_fail_arg("collectDigits", 2, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_collectDigits", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (int) lua_tonumber(L, 2); - result = (int) (arg1)->collectDigits(arg2); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_getDigits(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - char *arg3 = (char *) 0; - int arg4; - char *result = 0; - - SWIG_check_num_args("getDigits", 4, 4) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("getDigits", 1, "CoreSession *"); - if (!lua_isnumber(L, 2)) - SWIG_fail_arg("getDigits", 2, "int"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("getDigits", 3, "char *"); - if (!lua_isnumber(L, 4)) - SWIG_fail_arg("getDigits", 4, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_getDigits", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (int) lua_tonumber(L, 2); - arg3 = (char *) lua_tostring(L, 3); - arg4 = (int) lua_tonumber(L, 4); - result = (char *) (arg1)->getDigits(arg2, arg3, arg4); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_transfer(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - int result; - - SWIG_check_num_args("transfer", 4, 4) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("transfer", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("transfer", 2, "char *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("transfer", 3, "char *"); - if (!lua_isstring(L, 4)) - SWIG_fail_arg("transfer", 4, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_transfer", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - arg4 = (char *) lua_tostring(L, 4); - result = (int) (arg1)->transfer(arg2, arg3, arg4); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - 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; - - SWIG_check_num_args("read", 6, 6) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("read", 1, "CoreSession *"); - if (!lua_isnumber(L, 2)) - SWIG_fail_arg("read", 2, "int"); - if (!lua_isnumber(L, 3)) - SWIG_fail_arg("read", 3, "int"); - if (!lua_isstring(L, 4)) - SWIG_fail_arg("read", 4, "char const *"); - if (!lua_isnumber(L, 5)) - SWIG_fail_arg("read", 5, "int"); - if (!lua_isstring(L, 6)) - SWIG_fail_arg("read", 6, "char const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_read", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (int) lua_tonumber(L, 2); - arg3 = (int) lua_tonumber(L, 3); - arg4 = (char *) lua_tostring(L, 4); - arg5 = (int) lua_tonumber(L, 5); - arg6 = (char *) lua_tostring(L, 6); - result = (char *) (arg1)->read(arg2, arg3, (char const *) arg4, arg5, (char const *) arg6); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_playAndGetDigits(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - 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 *result = 0; - - SWIG_check_num_args("playAndGetDigits", 9, 9) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("playAndGetDigits", 1, "CoreSession *"); - if (!lua_isnumber(L, 2)) - SWIG_fail_arg("playAndGetDigits", 2, "int"); - if (!lua_isnumber(L, 3)) - SWIG_fail_arg("playAndGetDigits", 3, "int"); - if (!lua_isnumber(L, 4)) - SWIG_fail_arg("playAndGetDigits", 4, "int"); - if (!lua_isnumber(L, 5)) - SWIG_fail_arg("playAndGetDigits", 5, "int"); - if (!lua_isstring(L, 6)) - SWIG_fail_arg("playAndGetDigits", 6, "char *"); - if (!lua_isstring(L, 7)) - SWIG_fail_arg("playAndGetDigits", 7, "char *"); - if (!lua_isstring(L, 8)) - SWIG_fail_arg("playAndGetDigits", 8, "char *"); - if (!lua_isstring(L, 9)) - SWIG_fail_arg("playAndGetDigits", 9, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_playAndGetDigits", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (int) lua_tonumber(L, 2); - arg3 = (int) lua_tonumber(L, 3); - arg4 = (int) lua_tonumber(L, 4); - arg5 = (int) lua_tonumber(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); - result = (char *) (arg1)->playAndGetDigits(arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_streamFile__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int result; - - SWIG_check_num_args("streamFile", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("streamFile", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("streamFile", 2, "char *"); - if (!lua_isnumber(L, 3)) - SWIG_fail_arg("streamFile", 3, "int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_streamFile", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (int) lua_tonumber(L, 3); - result = (int) (arg1)->streamFile(arg2, arg3); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_streamFile__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - - SWIG_check_num_args("streamFile", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("streamFile", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("streamFile", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_streamFile", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - result = (int) (arg1)->streamFile(arg2); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_streamFile(lua_State * L) { - int argc; - int argv[4] = { - 1, 2, 3, 4 - }; - - argc = lua_gettop(L); - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - return _wrap_CoreSession_streamFile__SWIG_1(L); - } - } - } - if (argc == 3) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - { - _v = lua_isnumber(L, argv[2]); - } - if (_v) { - return _wrap_CoreSession_streamFile__SWIG_0(L); - } - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'CoreSession_streamFile'"); - lua_error(L); - return 0; - } - - - static int _wrap_CoreSession_flushEvents(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - int result; - - SWIG_check_num_args("flushEvents", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("flushEvents", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_flushEvents", 1, SWIGTYPE_p_CoreSession); - } - - result = (int) (arg1)->flushEvents(); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_flushDigits(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - int result; - - SWIG_check_num_args("flushDigits", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("flushDigits", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_flushDigits", 1, SWIGTYPE_p_CoreSession); - } - - result = (int) (arg1)->flushDigits(); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_setAutoHangup(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - bool arg2; - int result; - - SWIG_check_num_args("setAutoHangup", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setAutoHangup", 1, "CoreSession *"); - if (!lua_isboolean(L, 2)) - SWIG_fail_arg("setAutoHangup", 2, "bool"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_setAutoHangup", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (lua_toboolean(L, 2) != 0); - result = (int) (arg1)->setAutoHangup(arg2); - SWIG_arg = 0; - lua_pushnumber(L, (lua_Number) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_setHangupHook(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - void *arg2 = (void *) 0; - - SWIG_check_num_args("setHangupHook", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setHangupHook", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("setHangupHook", 2, "void *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_setHangupHook", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (void *) SWIG_MustGetPtr(L, 2, 0, 0, 2, "CoreSession_setHangupHook"); - (arg1)->setHangupHook(arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_ready(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - bool result; - - SWIG_check_num_args("ready", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("ready", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_ready", 1, SWIGTYPE_p_CoreSession); - } - - result = (bool) (arg1)->ready(); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_execute__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("execute", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("execute", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("execute", 2, "char *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("execute", 3, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_execute", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - (arg1)->execute(arg2, arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_execute__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("execute", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("execute", 1, "CoreSession *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("execute", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_execute", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (char *) lua_tostring(L, 2); - (arg1)->execute(arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_execute(lua_State * L) { - int argc; - int argv[4] = { - 1, 2, 3, 4 - }; - - argc = lua_gettop(L); - if (argc == 2) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - { - _v = lua_isstring(L, argv[1]); - } - if (_v) { - return _wrap_CoreSession_execute__SWIG_1(L); - } - } - } - if (argc == 3) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { - _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_CoreSession_execute__SWIG_0(L); - } - } - } - } - - lua_pushstring(L, "No matching function for overloaded 'CoreSession_execute'"); - lua_error(L); - return 0; - } - - - static int _wrap_CoreSession_sendEvent(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - Event *arg2 = (Event *) 0; - - SWIG_check_num_args("sendEvent", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("sendEvent", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("sendEvent", 2, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_sendEvent", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("CoreSession_sendEvent", 2, SWIGTYPE_p_Event); - } - - (arg1)->sendEvent(arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_setEventData(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - Event *arg2 = (Event *) 0; - - SWIG_check_num_args("setEventData", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setEventData", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("setEventData", 2, "Event *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_setEventData", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_Event, 0))) { - SWIG_fail_ptr("CoreSession_setEventData", 2, SWIGTYPE_p_Event); - } - - (arg1)->setEventData(arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_getXMLCDR(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *result = 0; - - SWIG_check_num_args("getXMLCDR", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("getXMLCDR", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_getXMLCDR", 1, SWIGTYPE_p_CoreSession); - } - - result = (char *) (arg1)->getXMLCDR(); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_begin_allow_threads(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - bool result; - - SWIG_check_num_args("begin_allow_threads", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("begin_allow_threads", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_begin_allow_threads", 1, SWIGTYPE_p_CoreSession); - } - - result = (bool) (arg1)->begin_allow_threads(); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_end_allow_threads(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - bool result; - - SWIG_check_num_args("end_allow_threads", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("end_allow_threads", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_end_allow_threads", 1, SWIGTYPE_p_CoreSession); - } - - result = (bool) (arg1)->end_allow_threads(); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_get_uuid(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - char *result = 0; - - SWIG_check_num_args("get_uuid", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("get_uuid", 1, "CoreSession const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_get_uuid", 1, SWIGTYPE_p_CoreSession); - } - - result = (char *) ((CoreSession const *) arg1)->get_uuid(); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_get_cb_args(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - switch_input_args_t *result = 0; - - SWIG_check_num_args("get_cb_args", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("get_cb_args", 1, "CoreSession const *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_get_cb_args", 1, SWIGTYPE_p_CoreSession); - } - - { - 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; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_CoreSession_check_hangup_hook(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = (CoreSession *) 0; - - SWIG_check_num_args("check_hangup_hook", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("check_hangup_hook", 1, "CoreSession *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_check_hangup_hook", 1, SWIGTYPE_p_CoreSession); - } - - (arg1)->check_hangup_hook(); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - switch_input_type_t *argp3; - - SWIG_check_num_args("run_dtmf_callback", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("run_dtmf_callback", 1, "CoreSession *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("run_dtmf_callback", 2, "void *"); - if (!lua_isuserdata(L, 3)) - SWIG_fail_arg("run_dtmf_callback", 3, "switch_input_type_t"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("CoreSession_run_dtmf_callback", 1, SWIGTYPE_p_CoreSession); - } - - arg2 = (void *) SWIG_MustGetPtr(L, 2, 0, 0, 2, "CoreSession_run_dtmf_callback"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 3, (void **) &argp3, SWIGTYPE_p_switch_input_type_t, 0))) { - SWIG_fail_ptr("CoreSession_run_dtmf_callback", 3, SWIGTYPE_p_switch_input_type_t); - } - arg3 = *argp3; - - result = (arg1)->run_dtmf_callback(arg2, arg3); - SWIG_arg = 0; - { - switch_status_t *resultptr = new switch_status_t ((switch_status_t &) result); - SWIG_NewPointerObj(L, (void *) resultptr, SWIGTYPE_p_switch_status_t, 1); - SWIG_arg++; - } - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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}, - {"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}, - {"recordFile", _wrap_CoreSession_recordFile}, - {"setCallerData", _wrap_CoreSession_setCallerData}, - {"originate", _wrap_CoreSession_originate}, - {"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}, - {"flushEvents", _wrap_CoreSession_flushEvents}, - {"flushDigits", _wrap_CoreSession_flushDigits}, - {"setAutoHangup", _wrap_CoreSession_setAutoHangup}, - {"setHangupHook", _wrap_CoreSession_setHangupHook}, - {"ready", _wrap_CoreSession_ready}, - {"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[] = { - {"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}, - {0, 0, 0} - }; - static swig_lua_class *swig_CoreSession_bases[] = { 0 }; - static const char *swig_CoreSession_base_names[] = { 0 }; - static swig_lua_class _wrap_class_CoreSession = - { "CoreSession", &SWIGTYPE_p_CoreSession, 0, swig_delete_CoreSession, swig_CoreSession_methods, swig_CoreSession_attributes, -swig_CoreSession_bases, swig_CoreSession_base_names }; - - static int _wrap_console_log(lua_State * L) { - int SWIG_arg = -1; - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("console_log", 2, 2) - if (!lua_isstring(L, 1)) - SWIG_fail_arg("console_log", 1, "char *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("console_log", 2, "char *"); - arg1 = (char *) lua_tostring(L, 1); - arg2 = (char *) lua_tostring(L, 2); - console_log(arg1, arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_console_clean_log(lua_State * L) { - int SWIG_arg = -1; - char *arg1 = (char *) 0; - - SWIG_check_num_args("console_clean_log", 1, 1) - if (!lua_isstring(L, 1)) - SWIG_fail_arg("console_clean_log", 1, "char *"); - arg1 = (char *) lua_tostring(L, 1); - console_clean_log(arg1); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_bridge(lua_State * L) { - int SWIG_arg = -1; - CoreSession *arg1 = 0; - CoreSession *arg2 = 0; - - SWIG_check_num_args("bridge", 2, 2) - if (!lua_isuserdata(L, 1)) - SWIG_fail_arg("bridge", 1, "CoreSession &"); - if (!lua_isuserdata(L, 2)) - SWIG_fail_arg("bridge", 2, "CoreSession &"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("bridge", 1, SWIGTYPE_p_CoreSession); - } - - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 2, (void **) &arg2, SWIGTYPE_p_CoreSession, 0))) { - SWIG_fail_ptr("bridge", 2, SWIGTYPE_p_CoreSession); - } - - bridge(*arg1, *arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("hanguphook", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hanguphook", 1, "switch_core_session_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_switch_core_session_t, 0))) { - SWIG_fail_ptr("hanguphook", 1, SWIGTYPE_p_switch_core_session_t); - } - - result = hanguphook(arg1); - SWIG_arg = 0; - { - switch_status_t *resultptr = new switch_status_t ((switch_status_t &) result); - SWIG_NewPointerObj(L, (void *) resultptr, SWIGTYPE_p_switch_status_t, 1); - SWIG_arg++; - } - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - switch_input_type_t *argp3; - - SWIG_check_num_args("dtmf_callback", 5, 5) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("dtmf_callback", 1, "switch_core_session_t *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("dtmf_callback", 2, "void *"); - if (!lua_isuserdata(L, 3)) - SWIG_fail_arg("dtmf_callback", 3, "switch_input_type_t"); - if (!SWIG_isptrtype(L, 4)) - SWIG_fail_arg("dtmf_callback", 4, "void *"); - if (!lua_isnumber(L, 5)) - SWIG_fail_arg("dtmf_callback", 5, "unsigned int"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_switch_core_session_t, 0))) { - SWIG_fail_ptr("dtmf_callback", 1, SWIGTYPE_p_switch_core_session_t); - } - - arg2 = (void *) SWIG_MustGetPtr(L, 2, 0, 0, 2, "dtmf_callback"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 3, (void **) &argp3, SWIGTYPE_p_switch_input_type_t, 0))) { - SWIG_fail_ptr("dtmf_callback", 3, SWIGTYPE_p_switch_input_type_t); - } - arg3 = *argp3; - - arg4 = (void *) SWIG_MustGetPtr(L, 4, 0, 0, 4, "dtmf_callback"); - arg5 = (unsigned int) lua_tonumber(L, 5); - result = dtmf_callback(arg1, arg2, arg3, arg4, arg5); - SWIG_arg = 0; - { - switch_status_t *resultptr = new switch_status_t ((switch_status_t &) result); - SWIG_NewPointerObj(L, (void *) resultptr, SWIGTYPE_p_switch_status_t, 1); - SWIG_arg++; - } - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Session__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * result = 0; - - SWIG_check_num_args("LUA::Session", 0, 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; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Session__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - char *arg1 = (char *) 0; - LUA::Session * result = 0; - - SWIG_check_num_args("LUA::Session", 1, 1) - if (!lua_isstring(L, 1)) - SWIG_fail_arg("LUA::Session", 1, "char *"); - arg1 = (char *) lua_tostring(L, 1); - 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; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Session__SWIG_2(lua_State * L) { - int SWIG_arg = -1; - switch_core_session_t *arg1 = (switch_core_session_t *) 0; - LUA::Session * result = 0; - - SWIG_check_num_args("LUA::Session", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("LUA::Session", 1, "switch_core_session_t *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_switch_core_session_t, 0))) { - SWIG_fail_ptr("new_Session", 1, SWIGTYPE_p_switch_core_session_t); - } - - 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; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_new_Session(lua_State * L) { - int argc; - int argv[2] = { - 1, 2 - }; - - argc = lua_gettop(L); - if (argc == 0) { - return _wrap_new_Session__SWIG_0(L); - } - if (argc == 1) { - int _v; - { - void *ptr; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_switch_core_session_t, 0)) { - _v = 0; - } else { - _v = 1; - } - } - if (_v) { - return _wrap_new_Session__SWIG_2(L); - } - } - if (argc == 1) { - int _v; - { - _v = lua_isstring(L, argv[0]); - } - if (_v) { - return _wrap_new_Session__SWIG_1(L); - } - } - - lua_pushstring(L, "No matching function for overloaded 'new_Session'"); - lua_error(L); - return 0; - } - - - static int _wrap_delete_Session(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - - SWIG_check_num_args("LUA::~Session", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("LUA::~Session", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, SWIG_POINTER_DISOWN))) { - SWIG_fail_ptr("delete_Session", 1, SWIGTYPE_p_LUA__Session); - } - - delete arg1; - - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_begin_allow_threads(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - bool result; - - SWIG_check_num_args("begin_allow_threads", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("begin_allow_threads", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_begin_allow_threads", 1, SWIGTYPE_p_LUA__Session); - } - - result = (bool) (arg1)->begin_allow_threads(); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_end_allow_threads(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - bool result; - - SWIG_check_num_args("end_allow_threads", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("end_allow_threads", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_end_allow_threads", 1, SWIGTYPE_p_LUA__Session); - } - - result = (bool) (arg1)->end_allow_threads(); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_check_hangup_hook(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - - SWIG_check_num_args("check_hangup_hook", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("check_hangup_hook", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_check_hangup_hook", 1, SWIGTYPE_p_LUA__Session); - } - - (arg1)->check_hangup_hook(); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - switch_input_type_t *argp3; - - SWIG_check_num_args("run_dtmf_callback", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("run_dtmf_callback", 1, "LUA::Session *"); - if (!SWIG_isptrtype(L, 2)) - SWIG_fail_arg("run_dtmf_callback", 2, "void *"); - if (!lua_isuserdata(L, 3)) - SWIG_fail_arg("run_dtmf_callback", 3, "switch_input_type_t"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_run_dtmf_callback", 1, SWIGTYPE_p_LUA__Session); - } - - arg2 = (void *) SWIG_MustGetPtr(L, 2, 0, 0, 2, "Session_run_dtmf_callback"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 3, (void **) &argp3, SWIGTYPE_p_switch_input_type_t, 0))) { - SWIG_fail_ptr("Session_run_dtmf_callback", 3, SWIGTYPE_p_switch_input_type_t); - } - arg3 = *argp3; - - result = (arg1)->run_dtmf_callback(arg2, arg3); - SWIG_arg = 0; - { - switch_status_t *resultptr = new switch_status_t ((switch_status_t &) result); - SWIG_NewPointerObj(L, (void *) resultptr, SWIGTYPE_p_switch_status_t, 1); - SWIG_arg++; - } - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_setInputCallback(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("setInputCallback", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setInputCallback", 1, "LUA::Session *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("setInputCallback", 2, "char *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("setInputCallback", 3, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_setInputCallback", 1, SWIGTYPE_p_LUA__Session); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - (arg1)->setInputCallback(arg2, arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_setHangupHook__SWIG_0(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - - SWIG_check_num_args("setHangupHook", 3, 3) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setHangupHook", 1, "LUA::Session *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("setHangupHook", 2, "char *"); - if (!lua_isstring(L, 3)) - SWIG_fail_arg("setHangupHook", 3, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_setHangupHook", 1, SWIGTYPE_p_LUA__Session); - } - - arg2 = (char *) lua_tostring(L, 2); - arg3 = (char *) lua_tostring(L, 3); - (arg1)->setHangupHook(arg2, arg3); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_setHangupHook__SWIG_1(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("setHangupHook", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setHangupHook", 1, "LUA::Session *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("setHangupHook", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_setHangupHook", 1, SWIGTYPE_p_LUA__Session); - } - - arg2 = (char *) lua_tostring(L, 2); - (arg1)->setHangupHook(arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - 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; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) { - _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; - if (SWIG_isptrtype(L, argv[0]) == 0 || SWIG_ConvertPtr(L, argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) { - _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; - } - - - static int _wrap_Session_ready(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - bool result; - - SWIG_check_num_args("ready", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("ready", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_ready", 1, SWIGTYPE_p_LUA__Session); - } - - result = (bool) (arg1)->ready(); - SWIG_arg = 0; - lua_pushboolean(L, (int) (result == true)); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_cb_function_set(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("cb_function", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("cb_function", 1, "LUA::Session *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("cb_function", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_cb_function_set", 1, SWIGTYPE_p_LUA__Session); - } - - arg2 = (char *) lua_tostring(L, 2); - { - if (arg1->cb_function) - delete[]arg1->cb_function; - if (arg2) { - arg1->cb_function = (char *) (new char[strlen((const char *)arg2) + 1]); - strcpy((char *) arg1->cb_function, (const char *) arg2); - } else { - arg1->cb_function = 0; - } - } - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_cb_function_get(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *result = 0; - - SWIG_check_num_args("cb_function", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("cb_function", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_cb_function_get", 1, SWIGTYPE_p_LUA__Session); - } - - result = (char *) ((arg1)->cb_function); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_cb_arg_set(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *arg2 = (char *) 0; - - SWIG_check_num_args("cb_arg", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("cb_arg", 1, "LUA::Session *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("cb_arg", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_cb_arg_set", 1, SWIGTYPE_p_LUA__Session); - } - - arg2 = (char *) lua_tostring(L, 2); - { - if (arg1->cb_arg) - delete[]arg1->cb_arg; - if (arg2) { - arg1->cb_arg = (char *) (new char[strlen((const char *)arg2) + 1]); - strcpy((char *) arg1->cb_arg, (const char *) arg2); - } else { - arg1->cb_arg = 0; - } - } - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_cb_arg_get(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *result = 0; - - SWIG_check_num_args("cb_arg", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("cb_arg", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_cb_arg_get", 1, SWIGTYPE_p_LUA__Session); - } - - result = (char *) ((arg1)->cb_arg); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("hangup_func_str", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hangup_func_str", 1, "LUA::Session *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("hangup_func_str", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_hangup_func_str_set", 1, SWIGTYPE_p_LUA__Session); - } - - arg2 = (char *) lua_tostring(L, 2); - { - if (arg1->hangup_func_str) - delete[]arg1->hangup_func_str; - if (arg2) { - arg1->hangup_func_str = (char *) (new char[strlen((const char *)arg2) + 1]); - strcpy((char *) arg1->hangup_func_str, (const char *) arg2); - } else { - arg1->hangup_func_str = 0; - } - } - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_hangup_func_str_get(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *result = 0; - - SWIG_check_num_args("hangup_func_str", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hangup_func_str", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_hangup_func_str_get", 1, SWIGTYPE_p_LUA__Session); - } - - result = (char *) ((arg1)->hangup_func_str); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - 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; - - SWIG_check_num_args("hangup_func_arg", 2, 2) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hangup_func_arg", 1, "LUA::Session *"); - if (!lua_isstring(L, 2)) - SWIG_fail_arg("hangup_func_arg", 2, "char *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_hangup_func_arg_set", 1, SWIGTYPE_p_LUA__Session); - } - - arg2 = (char *) lua_tostring(L, 2); - { - if (arg1->hangup_func_arg) - delete[]arg1->hangup_func_arg; - if (arg2) { - arg1->hangup_func_arg = (char *) (new char[strlen((const char *)arg2) + 1]); - strcpy((char *) arg1->hangup_func_arg, (const char *) arg2); - } else { - arg1->hangup_func_arg = 0; - } - } - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_hangup_func_arg_get(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - char *result = 0; - - SWIG_check_num_args("hangup_func_arg", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("hangup_func_arg", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_hangup_func_arg_get", 1, SWIGTYPE_p_LUA__Session); - } - - result = (char *) ((arg1)->hangup_func_arg); - SWIG_arg = 0; - lua_pushstring(L, (const char *) result); - SWIG_arg++; - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static int _wrap_Session_setLUA(lua_State * L) { - int SWIG_arg = -1; - LUA::Session * arg1 = (LUA::Session *) 0; - lua_State *arg2 = (lua_State *) 0; - - arg2 = L; - SWIG_check_num_args("setLUA", 1, 1) - if (!SWIG_isptrtype(L, 1)) - SWIG_fail_arg("setLUA", 1, "LUA::Session *"); - - if (!SWIG_IsOK(SWIG_ConvertPtr(L, 1, (void **) &arg1, SWIGTYPE_p_LUA__Session, 0))) { - SWIG_fail_ptr("Session_setLUA", 1, SWIGTYPE_p_LUA__Session); - } - - (arg1)->setLUA(arg2); - SWIG_arg = 0; - - return SWIG_arg; - - if (0) - SWIG_fail; - - fail: - lua_error(L); - return SWIG_arg; - } - - - static void swig_delete_Session(void *obj) { - LUA::Session * arg1 = (LUA::Session *) obj; - delete arg1; - } - static swig_lua_method swig_LUA_Session_methods[] = { - {"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}, - {"setInputCallback", _wrap_Session_setInputCallback}, - {"setHangupHook", _wrap_Session_setHangupHook}, - {"ready", _wrap_Session_ready}, - {"setLUA", _wrap_Session_setLUA}, - {0, 0} - }; - static swig_lua_attribute swig_LUA_Session_attributes[] = { - {"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}, - {0, 0, 0} - }; - static swig_lua_class *swig_LUA_Session_bases[] = { 0, 0 }; - static const char *swig_LUA_Session_base_names[] = { "CoreSession *", 0 }; - static 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, swig_LUA_Session_base_names }; +static int _wrap_consoleLog(lua_State* L) { + int SWIG_arg = -1; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("consoleLog",2,2) + if(!lua_isstring(L,1)) SWIG_fail_arg("consoleLog",1,"char *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("consoleLog",2,"char *"); + arg1 = (char *)lua_tostring(L, 1); + arg2 = (char *)lua_tostring(L, 2); + consoleLog(arg1,arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_consoleCleanLog(lua_State* L) { + int SWIG_arg = -1; + char *arg1 = (char *) 0 ; + + SWIG_check_num_args("consoleCleanLog",1,1) + if(!lua_isstring(L,1)) SWIG_fail_arg("consoleCleanLog",1,"char *"); + arg1 = (char *)lua_tostring(L, 1); + consoleCleanLog(arg1); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + IVRMenu *result = 0 ; + + SWIG_check_num_args("IVRMenu",13,13) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IVRMenu",1,"IVRMenu *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("IVRMenu",2,"char const *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("IVRMenu",3,"char const *"); + if(!lua_isstring(L,4)) SWIG_fail_arg("IVRMenu",4,"char const *"); + if(!lua_isstring(L,5)) SWIG_fail_arg("IVRMenu",5,"char const *"); + if(!lua_isstring(L,6)) SWIG_fail_arg("IVRMenu",6,"char const *"); + if(!lua_isstring(L,7)) SWIG_fail_arg("IVRMenu",7,"char const *"); + if(!lua_isstring(L,8)) SWIG_fail_arg("IVRMenu",8,"char const *"); + if(!lua_isnumber(L,9)) SWIG_fail_arg("IVRMenu",9,"int"); + if(!lua_isnumber(L,10)) SWIG_fail_arg("IVRMenu",10,"int"); + if(!lua_isnumber(L,11)) SWIG_fail_arg("IVRMenu",11,"int"); + if(!lua_isnumber(L,12)) SWIG_fail_arg("IVRMenu",12,"int"); + if(!lua_isnumber(L,13)) SWIG_fail_arg("IVRMenu",13,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,0))){ + SWIG_fail_ptr("new_IVRMenu",1,SWIGTYPE_p_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 = (int)lua_tonumber(L, 9); + arg10 = (int)lua_tonumber(L, 10); + arg11 = (int)lua_tonumber(L, 11); + arg12 = (int)lua_tonumber(L, 12); + arg13 = (int)lua_tonumber(L, 13); + 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,arg9,arg10,arg11,arg12,arg13); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_IVRMenu,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_delete_IVRMenu(lua_State* L) { + int SWIG_arg = -1; + IVRMenu *arg1 = (IVRMenu *) 0 ; + + SWIG_check_num_args("IVRMenu",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("IVRMenu",1,"IVRMenu *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("delete_IVRMenu",1,SWIGTYPE_p_IVRMenu); + } + + delete arg1; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("bindAction",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("bindAction",1,"IVRMenu *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("bindAction",2,"char *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("bindAction",3,"char const *"); + if(!lua_isstring(L,4)) SWIG_fail_arg("bindAction",4,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,0))){ + SWIG_fail_ptr("IVRMenu_bindAction",1,SWIGTYPE_p_IVRMenu); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + arg4 = (char *)lua_tostring(L, 4); + (arg1)->bindAction(arg2,(char const *)arg3,(char const *)arg4); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_IVRMenu_execute(lua_State* L) { + int SWIG_arg = -1; + IVRMenu *arg1 = (IVRMenu *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("execute",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"IVRMenu *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("execute",2,"CoreSession *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_IVRMenu,0))){ + SWIG_fail_ptr("IVRMenu_execute",1,SWIGTYPE_p_IVRMenu); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("IVRMenu_execute",2,SWIGTYPE_p_CoreSession); + } + + arg3 = (char *)lua_tostring(L, 3); + (arg1)->execute(arg2,(char const *)arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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}; +static const char *swig_IVRMenu_base_names[] = {0}; +static 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, swig_IVRMenu_base_names }; + +static int _wrap_new_API(lua_State* L) { + int SWIG_arg = -1; + API *result = 0 ; + + SWIG_check_num_args("API",0,0) + result = (API *)new API(); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_API,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_delete_API(lua_State* L) { + int SWIG_arg = -1; + API *arg1 = (API *) 0 ; + + SWIG_check_num_args("API",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("API",1,"API *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_API,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("delete_API",1,SWIGTYPE_p_API); + } + + delete arg1; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_API_execute(lua_State* L) { + int SWIG_arg = -1; + API *arg1 = (API *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("execute",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"API *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char const *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_API,0))){ + SWIG_fail_ptr("API_execute",1,SWIGTYPE_p_API); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_API_executeString(lua_State* L) { + int SWIG_arg = -1; + API *arg1 = (API *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("executeString",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("executeString",1,"API *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("executeString",2,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_API,0))){ + SWIG_fail_ptr("API_executeString",1,SWIGTYPE_p_API); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (char *)(arg1)->executeString((char const *)arg2); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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}, + {0,0} +}; +static swig_lua_attribute swig_API_attributes[] = { + {0,0,0} +}; +static swig_lua_class *swig_API_bases[] = {0}; +static const char *swig_API_base_names[] = {0}; +static 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, swig_API_base_names }; + +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 ; + + SWIG_check_num_args("function",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("function",1,"input_callback_state_t *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("function",2,"void *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("input_callback_state_t_function_set",1,SWIGTYPE_p_input_callback_state); + } + + arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"input_callback_state_t_function_set"); + if (arg1) (arg1)->function = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("function",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("function",1,"input_callback_state_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("input_callback_state_t_function_get",1,SWIGTYPE_p_input_callback_state); + } + + result = (void *) ((arg1)->function); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("threadState",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("threadState",1,"input_callback_state_t *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("threadState",2,"void *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("input_callback_state_t_threadState_set",1,SWIGTYPE_p_input_callback_state); + } + + arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"input_callback_state_t_threadState_set"); + if (arg1) (arg1)->threadState = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("threadState",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("threadState",1,"input_callback_state_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("input_callback_state_t_threadState_get",1,SWIGTYPE_p_input_callback_state); + } + + result = (void *) ((arg1)->threadState); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("extra",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("extra",1,"input_callback_state_t *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("extra",2,"void *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("input_callback_state_t_extra_set",1,SWIGTYPE_p_input_callback_state); + } + + arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"input_callback_state_t_extra_set"); + if (arg1) (arg1)->extra = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("extra",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("extra",1,"input_callback_state_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("input_callback_state_t_extra_get",1,SWIGTYPE_p_input_callback_state); + } + + result = (void *) ((arg1)->extra); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("funcargs",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("funcargs",1,"input_callback_state_t *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("funcargs",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("input_callback_state_t_funcargs_set",1,SWIGTYPE_p_input_callback_state); + } + + arg2 = (char *)lua_tostring(L, 2); + { + if (arg1->funcargs) delete [] arg1->funcargs; + if (arg2) { + arg1->funcargs = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->funcargs, (const char *)arg2); + } else { + arg1->funcargs = 0; + } + } + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("funcargs",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("funcargs",1,"input_callback_state_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("input_callback_state_t_funcargs_get",1,SWIGTYPE_p_input_callback_state); + } + + result = (char *) ((arg1)->funcargs); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_input_callback_state_t(lua_State* L) { + int SWIG_arg = -1; + input_callback_state_t *result = 0 ; + + SWIG_check_num_args("input_callback_state_t::input_callback_state_t",0,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; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("input_callback_state_t::~input_callback_state_t",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("input_callback_state_t::~input_callback_state_t",1,"input_callback_state_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_input_callback_state,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("delete_input_callback_state_t",1,SWIGTYPE_p_input_callback_state); + } + + delete arg1; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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[] = { + { "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}, + {0,0,0} +}; +static swig_lua_class *swig_input_callback_state_t_bases[] = {0}; +static const char *swig_input_callback_state_t_base_names[] = {0}; +static 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, swig_input_callback_state_t_base_names }; + +static int _wrap_new_Stream__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + Stream *result = 0 ; + + SWIG_check_num_args("Stream",0,0) + result = (Stream *)new Stream(); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_Stream,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("Stream",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Stream",1,"switch_stream_handle_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_stream_handle_t,0))){ + SWIG_fail_ptr("new_Stream",1,SWIGTYPE_p_switch_stream_handle_t); + } + + result = (Stream *)new Stream(arg1); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_Stream,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_switch_stream_handle_t, 0)) { + _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; +} + + +static int _wrap_delete_Stream(lua_State* L) { + int SWIG_arg = -1; + Stream *arg1 = (Stream *) 0 ; + + SWIG_check_num_args("Stream",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Stream",1,"Stream *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Stream,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("delete_Stream",1,SWIGTYPE_p_Stream); + } + + delete arg1; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Stream_write(lua_State* L) { + int SWIG_arg = -1; + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("write",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("write",1,"Stream *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("write",2,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Stream,0))){ + SWIG_fail_ptr("Stream_write",1,SWIGTYPE_p_Stream); + } + + arg2 = (char *)lua_tostring(L, 2); + (arg1)->write((char const *)arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Stream_get_data(lua_State* L) { + int SWIG_arg = -1; + Stream *arg1 = (Stream *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("get_data",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("get_data",1,"Stream *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Stream,0))){ + SWIG_fail_ptr("Stream_get_data",1,SWIGTYPE_p_Stream); + } + + result = (char *)(arg1)->get_data(); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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}; +static const char *swig_Stream_base_names[] = {0}; +static 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, swig_Stream_base_names }; + +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 ; + + SWIG_check_num_args("event",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("event",1,"Event *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("event",2,"switch_event_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_event_set",1,SWIGTYPE_p_Event); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_switch_event_t,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("Event_event_set",2,SWIGTYPE_p_switch_event_t); + } + + if (arg1) (arg1)->event = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_event_get(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + switch_event_t *result = 0 ; + + SWIG_check_num_args("event",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("event",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_event_get",1,SWIGTYPE_p_Event); + } + + result = (switch_event_t *) ((arg1)->event); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_switch_event_t,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_serialized_string_set(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("serialized_string",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("serialized_string",1,"Event *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("serialized_string",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_serialized_string_set",1,SWIGTYPE_p_Event); + } + + arg2 = (char *)lua_tostring(L, 2); + { + if (arg1->serialized_string) delete [] arg1->serialized_string; + if (arg2) { + arg1->serialized_string = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->serialized_string, (const char *)arg2); + } else { + arg1->serialized_string = 0; + } + } + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_serialized_string_get(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("serialized_string",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("serialized_string",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_serialized_string_get",1,SWIGTYPE_p_Event); + } + + result = (char *) ((arg1)->serialized_string); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_mine_set(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + int arg2 ; + + SWIG_check_num_args("mine",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("mine",1,"Event *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("mine",2,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_mine_set",1,SWIGTYPE_p_Event); + } + + arg2 = (int)lua_tonumber(L, 2); + if (arg1) (arg1)->mine = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_mine_get(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + int result; + + SWIG_check_num_args("mine",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("mine",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_mine_get",1,SWIGTYPE_p_Event); + } + + result = (int) ((arg1)->mine); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Event__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + Event *result = 0 ; + + SWIG_check_num_args("Event",2,2) + if(!lua_isstring(L,1)) SWIG_fail_arg("Event",1,"char const *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("Event",2,"char const *"); + arg1 = (char *)lua_tostring(L, 1); + arg2 = (char *)lua_tostring(L, 2); + 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; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Event__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + char *arg1 = (char *) 0 ; + Event *result = 0 ; + + SWIG_check_num_args("Event",1,1) + if(!lua_isstring(L,1)) SWIG_fail_arg("Event",1,"char const *"); + arg1 = (char *)lua_tostring(L, 1); + result = (Event *)new Event((char const *)arg1); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Event__SWIG_2(lua_State* L) { + int SWIG_arg = -1; + switch_event_t *arg1 = (switch_event_t *) 0 ; + int arg2 ; + Event *result = 0 ; + + SWIG_check_num_args("Event",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Event",1,"switch_event_t *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("Event",2,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_event_t,0))){ + SWIG_fail_ptr("new_Event",1,SWIGTYPE_p_switch_event_t); + } + + arg2 = (int)lua_tonumber(L, 2); + result = (Event *)new Event(arg1,arg2); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Event__SWIG_3(lua_State* L) { + int SWIG_arg = -1; + switch_event_t *arg1 = (switch_event_t *) 0 ; + Event *result = 0 ; + + SWIG_check_num_args("Event",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Event",1,"switch_event_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_event_t,0))){ + SWIG_fail_ptr("new_Event",1,SWIGTYPE_p_switch_event_t); + } + + result = (Event *)new Event(arg1); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_Event,1); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Event(lua_State* L) { + int argc; + int argv[3]={ + 1,2,3 + }; + + argc = lua_gettop(L); + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_switch_event_t, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_new_Event__SWIG_3(L); + } + } + if (argc == 1) { + int _v; + { + _v = lua_isstring(L,argv[0]); + } + if (_v) { + return _wrap_new_Event__SWIG_1(L); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_switch_event_t, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isnumber(L,argv[1]); + } + if (_v) { + return _wrap_new_Event__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_Event__SWIG_0(L); + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'new_Event'"); + lua_error(L);return 0; +} + + +static int _wrap_delete_Event(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + + SWIG_check_num_args("Event",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("Event",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("delete_Event",1,SWIGTYPE_p_Event); + } + + delete arg1; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_serialize__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("serialize",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("serialize",1,"Event *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("serialize",2,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_serialize",1,SWIGTYPE_p_Event); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (char *)(arg1)->serialize((char const *)arg2); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_serialize__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("serialize",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("serialize",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_serialize",1,SWIGTYPE_p_Event); + } + + result = (char *)(arg1)->serialize(); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_serialize(lua_State* L) { + int argc; + int argv[3]={ + 1,2,3 + }; + + argc = lua_gettop(L); + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_Event_serialize__SWIG_1(L); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + return _wrap_Event_serialize__SWIG_0(L); + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'Event_serialize'"); + lua_error(L);return 0; +} + + +static int _wrap_Event_setPriority__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + switch_priority_t arg2 ; + bool result; + switch_priority_t *argp2 ; + + SWIG_check_num_args("setPriority",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setPriority",1,"Event *"); + if(!lua_isuserdata(L,2)) SWIG_fail_arg("setPriority",2,"switch_priority_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_setPriority",1,SWIGTYPE_p_Event); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_switch_priority_t,0))){ + SWIG_fail_ptr("Event_setPriority",2,SWIGTYPE_p_switch_priority_t); + } + arg2 = *argp2; + + result = (bool)(arg1)->setPriority(arg2); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_setPriority__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + bool result; + + SWIG_check_num_args("setPriority",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setPriority",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_setPriority",1,SWIGTYPE_p_Event); + } + + result = (bool)(arg1)->setPriority(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_setPriority(lua_State* L) { + int argc; + int argv[3]={ + 1,2,3 + }; + + argc = lua_gettop(L); + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_Event_setPriority__SWIG_1(L); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_Event, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (lua_isuserdata(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_switch_priority_t, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_Event_setPriority__SWIG_0(L); + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'Event_setPriority'"); + lua_error(L);return 0; +} + + +static int _wrap_Event_getHeader(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("getHeader",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getHeader",1,"Event *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("getHeader",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_getHeader",1,SWIGTYPE_p_Event); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (char *)(arg1)->getHeader(arg2); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_getBody(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("getBody",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getBody",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_getBody",1,SWIGTYPE_p_Event); + } + + result = (char *)(arg1)->getBody(); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_getType(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("getType",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getType",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_getType",1,SWIGTYPE_p_Event); + } + + result = (char *)(arg1)->getType(); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_addBody(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + SWIG_check_num_args("addBody",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("addBody",1,"Event *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("addBody",2,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_addBody",1,SWIGTYPE_p_Event); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (bool)(arg1)->addBody((char const *)arg2); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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; + + SWIG_check_num_args("addHeader",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("addHeader",1,"Event *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("addHeader",2,"char const *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("addHeader",3,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_addHeader",1,SWIGTYPE_p_Event); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_delHeader(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + + SWIG_check_num_args("delHeader",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("delHeader",1,"Event *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("delHeader",2,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_delHeader",1,SWIGTYPE_p_Event); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (bool)(arg1)->delHeader((char const *)arg2); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Event_fire(lua_State* L) { + int SWIG_arg = -1; + Event *arg1 = (Event *) 0 ; + bool result; + + SWIG_check_num_args("fire",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("fire",1,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("Event_fire",1,SWIGTYPE_p_Event); + } + + result = (bool)(arg1)->fire(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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[] = { + { "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}, + {0,0,0} +}; +static swig_lua_class *swig_Event_bases[] = {0}; +static const char *swig_Event_base_names[] = {0}; +static 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, swig_Event_base_names }; + +static int _wrap_delete_CoreSession(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + + SWIG_check_num_args("CoreSession",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("CoreSession",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("delete_CoreSession",1,SWIGTYPE_p_CoreSession); + } + + delete arg1; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("session",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("session",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("session",2,"switch_core_session_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_session_set",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_switch_core_session_t,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("CoreSession_session_set",2,SWIGTYPE_p_switch_core_session_t); + } + + if (arg1) (arg1)->session = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_session_get(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_core_session_t *result = 0 ; + + SWIG_check_num_args("session",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("session",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_session_get",1,SWIGTYPE_p_CoreSession); + } + + 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; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("channel",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("channel",2,"switch_channel_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_channel_set",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_switch_channel_t,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("CoreSession_channel_set",2,SWIGTYPE_p_switch_channel_t); + } + + if (arg1) (arg1)->channel = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_channel_get(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_t *result = 0 ; + + SWIG_check_num_args("channel",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("channel",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_channel_get",1,SWIGTYPE_p_CoreSession); + } + + result = (switch_channel_t *) ((arg1)->channel); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_switch_channel_t,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_flags_set(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + unsigned int arg2 ; + + SWIG_check_num_args("flags",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("flags",1,"CoreSession *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("flags",2,"unsigned int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_flags_set",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (unsigned int)lua_tonumber(L, 2); + if (arg1) (arg1)->flags = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_flags_get(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + unsigned int result; + + SWIG_check_num_args("flags",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("flags",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_flags_get",1,SWIGTYPE_p_CoreSession); + } + + result = (unsigned int) ((arg1)->flags); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_allocated_set(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + + SWIG_check_num_args("allocated",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("allocated",1,"CoreSession *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("allocated",2,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_allocated_set",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (int)lua_tonumber(L, 2); + if (arg1) (arg1)->allocated = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_allocated_get(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + + SWIG_check_num_args("allocated",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("allocated",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_allocated_get",1,SWIGTYPE_p_CoreSession); + } + + result = (int) ((arg1)->allocated); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("cb_state",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_state",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("cb_state",2,"input_callback_state *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_cb_state_set",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_input_callback_state,0))){ + SWIG_fail_ptr("CoreSession_cb_state_set",2,SWIGTYPE_p_input_callback_state); + } + + if (arg1) (arg1)->cb_state = *arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_cb_state_get(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + input_callback_state *result = 0 ; + + SWIG_check_num_args("cb_state",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_state",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_cb_state_get",1,SWIGTYPE_p_CoreSession); + } + + 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; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_hook_state_set(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_state_t arg2 ; + switch_channel_state_t *argp2 ; + + SWIG_check_num_args("hook_state",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hook_state",1,"CoreSession *"); + if(!lua_isuserdata(L,2)) SWIG_fail_arg("hook_state",2,"switch_channel_state_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_hook_state_set",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&argp2,SWIGTYPE_p_switch_channel_state_t,0))){ + SWIG_fail_ptr("CoreSession_hook_state_set",2,SWIGTYPE_p_switch_channel_state_t); + } + arg2 = *argp2; + + if (arg1) (arg1)->hook_state = arg2; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_hook_state_get(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_state_t result; + + SWIG_check_num_args("hook_state",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hook_state",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_hook_state_get",1,SWIGTYPE_p_CoreSession); + } + + result = ((arg1)->hook_state); + SWIG_arg=0; + { + switch_channel_state_t * resultptr = new switch_channel_state_t((switch_channel_state_t &) result); + SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_channel_state_t,1); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_answer(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + + SWIG_check_num_args("answer",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("answer",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_answer",1,SWIGTYPE_p_CoreSession); + } + + result = (int)(arg1)->answer(); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_preAnswer(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + + SWIG_check_num_args("preAnswer",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("preAnswer",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_preAnswer",1,SWIGTYPE_p_CoreSession); + } + + result = (int)(arg1)->preAnswer(); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_hangup__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("hangup",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("hangup",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_hangup",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + (arg1)->hangup(arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_hangup__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + + SWIG_check_num_args("hangup",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_hangup",1,SWIGTYPE_p_CoreSession); + } + + (arg1)->hangup(); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_hangup(lua_State* L) { + int argc; + int argv[3]={ + 1,2,3 + }; + + argc = lua_gettop(L); + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_CoreSession_hangup__SWIG_1(L); + } + } + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + return _wrap_CoreSession_hangup__SWIG_0(L); + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'CoreSession_hangup'"); + lua_error(L);return 0; +} + + +static int _wrap_CoreSession_setVariable(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("setVariable",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setVariable",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("setVariable",2,"char *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("setVariable",3,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_setVariable",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + (arg1)->setVariable(arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_setPrivate(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *arg3 = (void *) 0 ; + + SWIG_check_num_args("setPrivate",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setPrivate",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("setPrivate",2,"char *"); + if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("setPrivate",3,"void *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_setPrivate",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3=(void *)SWIG_MustGetPtr(L,3,0,0,3,"CoreSession_setPrivate"); + (arg1)->setPrivate(arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_getPrivate(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *result = 0 ; + + SWIG_check_num_args("getPrivate",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getPrivate",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("getPrivate",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_getPrivate",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (void *)(arg1)->getPrivate(arg2); + SWIG_arg=0; + SWIG_NewPointerObj(L,result,SWIGTYPE_p_void,0); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_getVariable(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("getVariable",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getVariable",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("getVariable",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_getVariable",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (char *)(arg1)->getVariable(arg2); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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; + + SWIG_check_num_args("process_callback_result",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("process_callback_result",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("process_callback_result",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_process_callback_result",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (arg1)->process_callback_result(arg2); + SWIG_arg=0; + { + switch_status_t * resultptr = new switch_status_t((switch_status_t &) result); + SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_say(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + char *arg5 = (char *) 0 ; + + SWIG_check_num_args("say",5,5) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("say",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("say",2,"char const *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("say",3,"char const *"); + if(!lua_isstring(L,4)) SWIG_fail_arg("say",4,"char const *"); + if(!lua_isstring(L,5)) SWIG_fail_arg("say",5,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_say",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + arg4 = (char *)lua_tostring(L, 4); + arg5 = (char *)lua_tostring(L, 5); + (arg1)->say((char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_sayPhrase__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + + SWIG_check_num_args("sayPhrase",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("sayPhrase",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("sayPhrase",2,"char const *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("sayPhrase",3,"char const *"); + if(!lua_isstring(L,4)) SWIG_fail_arg("sayPhrase",4,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_sayPhrase",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + arg4 = (char *)lua_tostring(L, 4); + (arg1)->sayPhrase((char const *)arg2,(char const *)arg3,(char const *)arg4); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_sayPhrase__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("sayPhrase",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("sayPhrase",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("sayPhrase",2,"char const *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("sayPhrase",3,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_sayPhrase",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + (arg1)->sayPhrase((char const *)arg2,(char const *)arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_sayPhrase__SWIG_2(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("sayPhrase",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("sayPhrase",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("sayPhrase",2,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_sayPhrase",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + (arg1)->sayPhrase((char const *)arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_sayPhrase(lua_State* L) { + int argc; + int argv[5]={ + 1,2,3,4,5 + }; + + argc = lua_gettop(L); + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + return _wrap_CoreSession_sayPhrase__SWIG_2(L); + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _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_CoreSession_sayPhrase__SWIG_1(L); + } + } + } + } + if (argc == 4) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + { + _v = lua_isstring(L,argv[2]); + } + if (_v) { + { + _v = lua_isstring(L,argv[3]); + } + if (_v) { + return _wrap_CoreSession_sayPhrase__SWIG_0(L); + } + } + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'CoreSession_sayPhrase'"); + lua_error(L);return 0; +} + + +static int _wrap_CoreSession_recordFile__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int arg5 ; + int result; + + SWIG_check_num_args("recordFile",5,5) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("recordFile",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("recordFile",2,"char *"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("recordFile",3,"int"); + if(!lua_isnumber(L,4)) SWIG_fail_arg("recordFile",4,"int"); + if(!lua_isnumber(L,5)) SWIG_fail_arg("recordFile",5,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_recordFile",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (int)lua_tonumber(L, 3); + arg4 = (int)lua_tonumber(L, 4); + arg5 = (int)lua_tonumber(L, 5); + result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_recordFile__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int result; + + SWIG_check_num_args("recordFile",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("recordFile",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("recordFile",2,"char *"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("recordFile",3,"int"); + if(!lua_isnumber(L,4)) SWIG_fail_arg("recordFile",4,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_recordFile",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (int)lua_tonumber(L, 3); + arg4 = (int)lua_tonumber(L, 4); + result = (int)(arg1)->recordFile(arg2,arg3,arg4); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_recordFile__SWIG_2(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int result; + + SWIG_check_num_args("recordFile",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("recordFile",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("recordFile",2,"char *"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("recordFile",3,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_recordFile",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (int)lua_tonumber(L, 3); + result = (int)(arg1)->recordFile(arg2,arg3); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_recordFile__SWIG_3(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + SWIG_check_num_args("recordFile",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("recordFile",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("recordFile",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_recordFile",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (int)(arg1)->recordFile(arg2); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_recordFile(lua_State* L) { + int argc; + int argv[6]={ + 1,2,3,4,5,6 + }; + + argc = lua_gettop(L); + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + return _wrap_CoreSession_recordFile__SWIG_3(L); + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[2]); + } + if (_v) { + return _wrap_CoreSession_recordFile__SWIG_2(L); + } + } + } + } + if (argc == 4) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[2]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[3]); + } + if (_v) { + return _wrap_CoreSession_recordFile__SWIG_1(L); + } + } + } + } + } + if (argc == 5) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[2]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[3]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[4]); + } + if (_v) { + return _wrap_CoreSession_recordFile__SWIG_0(L); + } + } + } + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'CoreSession_recordFile'"); + lua_error(L);return 0; +} + + +static int _wrap_CoreSession_setCallerData(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("setCallerData",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setCallerData",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("setCallerData",2,"char *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("setCallerData",3,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_setCallerData",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + (arg1)->setCallerData(arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_originate__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + int arg4 ; + int result; + + SWIG_check_num_args("originate",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("originate",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("originate",2,"CoreSession *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("originate",3,"char *"); + if(!lua_isnumber(L,4)) SWIG_fail_arg("originate",4,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_originate",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_originate",2,SWIGTYPE_p_CoreSession); + } + + arg3 = (char *)lua_tostring(L, 3); + arg4 = (int)lua_tonumber(L, 4); + result = (int)(arg1)->originate(arg2,arg3,arg4); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_originate__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + int result; + + SWIG_check_num_args("originate",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("originate",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("originate",2,"CoreSession *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("originate",3,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_originate",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_originate",2,SWIGTYPE_p_CoreSession); + } + + arg3 = (char *)lua_tostring(L, 3); + result = (int)(arg1)->originate(arg2,arg3); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_originate(lua_State* L) { + int argc; + int argv[5]={ + 1,2,3,4,5 + }; + + argc = lua_gettop(L); + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[2]); + } + if (_v) { + return _wrap_CoreSession_originate__SWIG_1(L); + } + } + } + } + if (argc == 4) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + void *ptr; + if (SWIG_isptrtype(L,argv[1])==0 || SWIG_ConvertPtr(L,argv[1], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[2]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[3]); + } + if (_v) { + return _wrap_CoreSession_originate__SWIG_0(L); + } + } + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'CoreSession_originate'"); + lua_error(L);return 0; +} + + +static int _wrap_CoreSession_setDTMFCallback(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + void *arg2 = (void *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("setDTMFCallback",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setDTMFCallback",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setDTMFCallback",2,"void *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("setDTMFCallback",3,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_setDTMFCallback",1,SWIGTYPE_p_CoreSession); + } + + arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"CoreSession_setDTMFCallback"); + arg3 = (char *)lua_tostring(L, 3); + (arg1)->setDTMFCallback(arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_speak(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + SWIG_check_num_args("speak",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("speak",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("speak",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_speak",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (int)(arg1)->speak(arg2); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_set_tts_parms(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("set_tts_parms",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("set_tts_parms",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("set_tts_parms",2,"char *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("set_tts_parms",3,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_set_tts_parms",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + (arg1)->set_tts_parms(arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_collectDigits(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + int result; + + SWIG_check_num_args("collectDigits",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("collectDigits",1,"CoreSession *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("collectDigits",2,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_collectDigits",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (int)lua_tonumber(L, 2); + result = (int)(arg1)->collectDigits(arg2); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_getDigits(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + char *arg3 = (char *) 0 ; + int arg4 ; + char *result = 0 ; + + SWIG_check_num_args("getDigits",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getDigits",1,"CoreSession *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("getDigits",2,"int"); + if(!lua_isstring(L,3)) SWIG_fail_arg("getDigits",3,"char *"); + if(!lua_isnumber(L,4)) SWIG_fail_arg("getDigits",4,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_getDigits",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (int)lua_tonumber(L, 2); + arg3 = (char *)lua_tostring(L, 3); + arg4 = (int)lua_tonumber(L, 4); + result = (char *)(arg1)->getDigits(arg2,arg3,arg4); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_transfer(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + int result; + + SWIG_check_num_args("transfer",4,4) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("transfer",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("transfer",2,"char *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("transfer",3,"char *"); + if(!lua_isstring(L,4)) SWIG_fail_arg("transfer",4,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_transfer",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + arg4 = (char *)lua_tostring(L, 4); + result = (int)(arg1)->transfer(arg2,arg3,arg4); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +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 ; + + SWIG_check_num_args("read",6,6) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("read",1,"CoreSession *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("read",2,"int"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("read",3,"int"); + if(!lua_isstring(L,4)) SWIG_fail_arg("read",4,"char const *"); + if(!lua_isnumber(L,5)) SWIG_fail_arg("read",5,"int"); + if(!lua_isstring(L,6)) SWIG_fail_arg("read",6,"char const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_read",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (int)lua_tonumber(L, 2); + arg3 = (int)lua_tonumber(L, 3); + arg4 = (char *)lua_tostring(L, 4); + arg5 = (int)lua_tonumber(L, 5); + arg6 = (char *)lua_tostring(L, 6); + result = (char *)(arg1)->read(arg2,arg3,(char const *)arg4,arg5,(char const *)arg6); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_playAndGetDigits(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + 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 *result = 0 ; + + SWIG_check_num_args("playAndGetDigits",9,9) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("playAndGetDigits",1,"CoreSession *"); + if(!lua_isnumber(L,2)) SWIG_fail_arg("playAndGetDigits",2,"int"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("playAndGetDigits",3,"int"); + if(!lua_isnumber(L,4)) SWIG_fail_arg("playAndGetDigits",4,"int"); + if(!lua_isnumber(L,5)) SWIG_fail_arg("playAndGetDigits",5,"int"); + if(!lua_isstring(L,6)) SWIG_fail_arg("playAndGetDigits",6,"char *"); + if(!lua_isstring(L,7)) SWIG_fail_arg("playAndGetDigits",7,"char *"); + if(!lua_isstring(L,8)) SWIG_fail_arg("playAndGetDigits",8,"char *"); + if(!lua_isstring(L,9)) SWIG_fail_arg("playAndGetDigits",9,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_playAndGetDigits",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (int)lua_tonumber(L, 2); + arg3 = (int)lua_tonumber(L, 3); + arg4 = (int)lua_tonumber(L, 4); + arg5 = (int)lua_tonumber(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); + result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_streamFile__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int result; + + SWIG_check_num_args("streamFile",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("streamFile",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("streamFile",2,"char *"); + if(!lua_isnumber(L,3)) SWIG_fail_arg("streamFile",3,"int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_streamFile",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (int)lua_tonumber(L, 3); + result = (int)(arg1)->streamFile(arg2,arg3); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_streamFile__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + + SWIG_check_num_args("streamFile",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("streamFile",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("streamFile",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_streamFile",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + result = (int)(arg1)->streamFile(arg2); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_streamFile(lua_State* L) { + int argc; + int argv[4]={ + 1,2,3,4 + }; + + argc = lua_gettop(L); + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + return _wrap_CoreSession_streamFile__SWIG_1(L); + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + { + _v = lua_isnumber(L,argv[2]); + } + if (_v) { + return _wrap_CoreSession_streamFile__SWIG_0(L); + } + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'CoreSession_streamFile'"); + lua_error(L);return 0; +} + + +static int _wrap_CoreSession_flushEvents(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + + SWIG_check_num_args("flushEvents",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("flushEvents",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_flushEvents",1,SWIGTYPE_p_CoreSession); + } + + result = (int)(arg1)->flushEvents(); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_flushDigits(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + + SWIG_check_num_args("flushDigits",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("flushDigits",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_flushDigits",1,SWIGTYPE_p_CoreSession); + } + + result = (int)(arg1)->flushDigits(); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_setAutoHangup(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + bool arg2 ; + int result; + + SWIG_check_num_args("setAutoHangup",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setAutoHangup",1,"CoreSession *"); + if(!lua_isboolean(L,2)) SWIG_fail_arg("setAutoHangup",2,"bool"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_setAutoHangup",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (lua_toboolean(L, 2)!=0); + result = (int)(arg1)->setAutoHangup(arg2); + SWIG_arg=0; + lua_pushnumber(L, (lua_Number) result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_setHangupHook(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + void *arg2 = (void *) 0 ; + + SWIG_check_num_args("setHangupHook",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setHangupHook",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setHangupHook",2,"void *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_setHangupHook",1,SWIGTYPE_p_CoreSession); + } + + arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"CoreSession_setHangupHook"); + (arg1)->setHangupHook(arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_ready(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + + SWIG_check_num_args("ready",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ready",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_ready",1,SWIGTYPE_p_CoreSession); + } + + result = (bool)(arg1)->ready(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_execute__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("execute",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("execute",3,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + (arg1)->execute(arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_execute__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("execute",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("execute",1,"CoreSession *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("execute",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_execute",1,SWIGTYPE_p_CoreSession); + } + + arg2 = (char *)lua_tostring(L, 2); + (arg1)->execute(arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_execute(lua_State* L) { + int argc; + int argv[4]={ + 1,2,3,4 + }; + + argc = lua_gettop(L); + if (argc == 2) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + { + _v = lua_isstring(L,argv[1]); + } + if (_v) { + return _wrap_CoreSession_execute__SWIG_1(L); + } + } + } + if (argc == 3) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_CoreSession, 0)) { + _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_CoreSession_execute__SWIG_0(L); + } + } + } + } + + lua_pushstring(L,"No matching function for overloaded 'CoreSession_execute'"); + lua_error(L);return 0; +} + + +static int _wrap_CoreSession_sendEvent(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + Event *arg2 = (Event *) 0 ; + + SWIG_check_num_args("sendEvent",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("sendEvent",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("sendEvent",2,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_sendEvent",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("CoreSession_sendEvent",2,SWIGTYPE_p_Event); + } + + (arg1)->sendEvent(arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_setEventData(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + Event *arg2 = (Event *) 0 ; + + SWIG_check_num_args("setEventData",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setEventData",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("setEventData",2,"Event *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_setEventData",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_Event,0))){ + SWIG_fail_ptr("CoreSession_setEventData",2,SWIGTYPE_p_Event); + } + + (arg1)->setEventData(arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_getXMLCDR(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("getXMLCDR",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("getXMLCDR",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_getXMLCDR",1,SWIGTYPE_p_CoreSession); + } + + result = (char *)(arg1)->getXMLCDR(); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_begin_allow_threads(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + + SWIG_check_num_args("begin_allow_threads",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("begin_allow_threads",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_begin_allow_threads",1,SWIGTYPE_p_CoreSession); + } + + result = (bool)(arg1)->begin_allow_threads(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_end_allow_threads(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + + SWIG_check_num_args("end_allow_threads",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("end_allow_threads",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_end_allow_threads",1,SWIGTYPE_p_CoreSession); + } + + result = (bool)(arg1)->end_allow_threads(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_get_uuid(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("get_uuid",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("get_uuid",1,"CoreSession const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_get_uuid",1,SWIGTYPE_p_CoreSession); + } + + result = (char *)((CoreSession const *)arg1)->get_uuid(); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_get_cb_args(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_input_args_t *result = 0 ; + + SWIG_check_num_args("get_cb_args",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("get_cb_args",1,"CoreSession const *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_get_cb_args",1,SWIGTYPE_p_CoreSession); + } + + { + 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; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_CoreSession_check_hangup_hook(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = (CoreSession *) 0 ; + + SWIG_check_num_args("check_hangup_hook",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("check_hangup_hook",1,"CoreSession *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_check_hangup_hook",1,SWIGTYPE_p_CoreSession); + } + + (arg1)->check_hangup_hook(); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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; + switch_input_type_t *argp3 ; + + SWIG_check_num_args("run_dtmf_callback",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("run_dtmf_callback",1,"CoreSession *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("run_dtmf_callback",2,"void *"); + if(!lua_isuserdata(L,3)) SWIG_fail_arg("run_dtmf_callback",3,"switch_input_type_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("CoreSession_run_dtmf_callback",1,SWIGTYPE_p_CoreSession); + } + + arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"CoreSession_run_dtmf_callback"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_switch_input_type_t,0))){ + SWIG_fail_ptr("CoreSession_run_dtmf_callback",3,SWIGTYPE_p_switch_input_type_t); + } + arg3 = *argp3; + + result = (arg1)->run_dtmf_callback(arg2,arg3); + SWIG_arg=0; + { + switch_status_t * resultptr = new switch_status_t((switch_status_t &) result); + SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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}, + {"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}, + {"recordFile", _wrap_CoreSession_recordFile}, + {"setCallerData", _wrap_CoreSession_setCallerData}, + {"originate", _wrap_CoreSession_originate}, + {"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}, + {"flushEvents", _wrap_CoreSession_flushEvents}, + {"flushDigits", _wrap_CoreSession_flushDigits}, + {"setAutoHangup", _wrap_CoreSession_setAutoHangup}, + {"setHangupHook", _wrap_CoreSession_setHangupHook}, + {"ready", _wrap_CoreSession_ready}, + {"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[] = { + { "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}, + {0,0,0} +}; +static swig_lua_class *swig_CoreSession_bases[] = {0}; +static const char *swig_CoreSession_base_names[] = {0}; +static swig_lua_class _wrap_class_CoreSession = { "CoreSession", &SWIGTYPE_p_CoreSession,0, swig_delete_CoreSession, swig_CoreSession_methods, swig_CoreSession_attributes, swig_CoreSession_bases, swig_CoreSession_base_names }; + +static int _wrap_console_log(lua_State* L) { + int SWIG_arg = -1; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("console_log",2,2) + if(!lua_isstring(L,1)) SWIG_fail_arg("console_log",1,"char *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("console_log",2,"char *"); + arg1 = (char *)lua_tostring(L, 1); + arg2 = (char *)lua_tostring(L, 2); + console_log(arg1,arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_console_clean_log(lua_State* L) { + int SWIG_arg = -1; + char *arg1 = (char *) 0 ; + + SWIG_check_num_args("console_clean_log",1,1) + if(!lua_isstring(L,1)) SWIG_fail_arg("console_clean_log",1,"char *"); + arg1 = (char *)lua_tostring(L, 1); + console_clean_log(arg1); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_bridge(lua_State* L) { + int SWIG_arg = -1; + CoreSession *arg1 = 0 ; + CoreSession *arg2 = 0 ; + + SWIG_check_num_args("bridge",2,2) + if(!lua_isuserdata(L,1)) SWIG_fail_arg("bridge",1,"CoreSession &"); + if(!lua_isuserdata(L,2)) SWIG_fail_arg("bridge",2,"CoreSession &"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("bridge",1,SWIGTYPE_p_CoreSession); + } + + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,2,(void**)&arg2,SWIGTYPE_p_CoreSession,0))){ + SWIG_fail_ptr("bridge",2,SWIGTYPE_p_CoreSession); + } + + bridge(*arg1,*arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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; + + SWIG_check_num_args("hanguphook",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hanguphook",1,"switch_core_session_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_core_session_t,0))){ + SWIG_fail_ptr("hanguphook",1,SWIGTYPE_p_switch_core_session_t); + } + + result = hanguphook(arg1); + SWIG_arg=0; + { + switch_status_t * resultptr = new switch_status_t((switch_status_t &) result); + SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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; + switch_input_type_t *argp3 ; + + SWIG_check_num_args("dtmf_callback",5,5) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("dtmf_callback",1,"switch_core_session_t *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("dtmf_callback",2,"void *"); + if(!lua_isuserdata(L,3)) SWIG_fail_arg("dtmf_callback",3,"switch_input_type_t"); + if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("dtmf_callback",4,"void *"); + if(!lua_isnumber(L,5)) SWIG_fail_arg("dtmf_callback",5,"unsigned int"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_core_session_t,0))){ + SWIG_fail_ptr("dtmf_callback",1,SWIGTYPE_p_switch_core_session_t); + } + + arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"dtmf_callback"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_switch_input_type_t,0))){ + SWIG_fail_ptr("dtmf_callback",3,SWIGTYPE_p_switch_input_type_t); + } + arg3 = *argp3; + + arg4=(void *)SWIG_MustGetPtr(L,4,0,0,4,"dtmf_callback"); + arg5 = (unsigned int)lua_tonumber(L, 5); + result = dtmf_callback(arg1,arg2,arg3,arg4,arg5); + SWIG_arg=0; + { + switch_status_t * resultptr = new switch_status_t((switch_status_t &) result); + SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Session__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *result = 0 ; + + SWIG_check_num_args("LUA::Session",0,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; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Session__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + char *arg1 = (char *) 0 ; + LUA::Session *result = 0 ; + + SWIG_check_num_args("LUA::Session",1,1) + if(!lua_isstring(L,1)) SWIG_fail_arg("LUA::Session",1,"char *"); + arg1 = (char *)lua_tostring(L, 1); + 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; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Session__SWIG_2(lua_State* L) { + int SWIG_arg = -1; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + LUA::Session *result = 0 ; + + SWIG_check_num_args("LUA::Session",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LUA::Session",1,"switch_core_session_t *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_switch_core_session_t,0))){ + SWIG_fail_ptr("new_Session",1,SWIGTYPE_p_switch_core_session_t); + } + + 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; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_new_Session(lua_State* L) { + int argc; + int argv[2]={ + 1,2 + }; + + argc = lua_gettop(L); + if (argc == 0) { + return _wrap_new_Session__SWIG_0(L); + } + if (argc == 1) { + int _v; + { + void *ptr; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_switch_core_session_t, 0)) { + _v = 0; + } else { + _v = 1; + } + } + if (_v) { + return _wrap_new_Session__SWIG_2(L); + } + } + if (argc == 1) { + int _v; + { + _v = lua_isstring(L,argv[0]); + } + if (_v) { + return _wrap_new_Session__SWIG_1(L); + } + } + + lua_pushstring(L,"No matching function for overloaded 'new_Session'"); + lua_error(L);return 0; +} + + +static int _wrap_delete_Session(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + + SWIG_check_num_args("LUA::~Session",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("LUA::~Session",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,SWIG_POINTER_DISOWN))){ + SWIG_fail_ptr("delete_Session",1,SWIGTYPE_p_LUA__Session); + } + + delete arg1; + + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_begin_allow_threads(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + bool result; + + SWIG_check_num_args("begin_allow_threads",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("begin_allow_threads",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_begin_allow_threads",1,SWIGTYPE_p_LUA__Session); + } + + result = (bool)(arg1)->begin_allow_threads(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_end_allow_threads(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + bool result; + + SWIG_check_num_args("end_allow_threads",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("end_allow_threads",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_end_allow_threads",1,SWIGTYPE_p_LUA__Session); + } + + result = (bool)(arg1)->end_allow_threads(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_check_hangup_hook(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + + SWIG_check_num_args("check_hangup_hook",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("check_hangup_hook",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_check_hangup_hook",1,SWIGTYPE_p_LUA__Session); + } + + (arg1)->check_hangup_hook(); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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; + switch_input_type_t *argp3 ; + + SWIG_check_num_args("run_dtmf_callback",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("run_dtmf_callback",1,"LUA::Session *"); + if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("run_dtmf_callback",2,"void *"); + if(!lua_isuserdata(L,3)) SWIG_fail_arg("run_dtmf_callback",3,"switch_input_type_t"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_run_dtmf_callback",1,SWIGTYPE_p_LUA__Session); + } + + arg2=(void *)SWIG_MustGetPtr(L,2,0,0,2,"Session_run_dtmf_callback"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,3,(void**)&argp3,SWIGTYPE_p_switch_input_type_t,0))){ + SWIG_fail_ptr("Session_run_dtmf_callback",3,SWIGTYPE_p_switch_input_type_t); + } + arg3 = *argp3; + + result = (arg1)->run_dtmf_callback(arg2,arg3); + SWIG_arg=0; + { + switch_status_t * resultptr = new switch_status_t((switch_status_t &) result); + SWIG_NewPointerObj(L,(void *) resultptr,SWIGTYPE_p_switch_status_t,1); SWIG_arg++; + } + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_setInputCallback(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("setInputCallback",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setInputCallback",1,"LUA::Session *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("setInputCallback",2,"char *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("setInputCallback",3,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_setInputCallback",1,SWIGTYPE_p_LUA__Session); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + (arg1)->setInputCallback(arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_setHangupHook__SWIG_0(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + + SWIG_check_num_args("setHangupHook",3,3) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setHangupHook",1,"LUA::Session *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("setHangupHook",2,"char *"); + if(!lua_isstring(L,3)) SWIG_fail_arg("setHangupHook",3,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_setHangupHook",1,SWIGTYPE_p_LUA__Session); + } + + arg2 = (char *)lua_tostring(L, 2); + arg3 = (char *)lua_tostring(L, 3); + (arg1)->setHangupHook(arg2,arg3); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_setHangupHook__SWIG_1(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("setHangupHook",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setHangupHook",1,"LUA::Session *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("setHangupHook",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_setHangupHook",1,SWIGTYPE_p_LUA__Session); + } + + arg2 = (char *)lua_tostring(L, 2); + (arg1)->setHangupHook(arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +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; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) { + _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; + if (SWIG_isptrtype(L,argv[0])==0 || SWIG_ConvertPtr(L,argv[0], (void **) &ptr, SWIGTYPE_p_LUA__Session, 0)) { + _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; +} + + +static int _wrap_Session_ready(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + bool result; + + SWIG_check_num_args("ready",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("ready",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_ready",1,SWIGTYPE_p_LUA__Session); + } + + result = (bool)(arg1)->ready(); + SWIG_arg=0; + lua_pushboolean(L,(int)(result==true)); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_cb_function_set(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("cb_function",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_function",1,"LUA::Session *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("cb_function",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_cb_function_set",1,SWIGTYPE_p_LUA__Session); + } + + arg2 = (char *)lua_tostring(L, 2); + { + if (arg1->cb_function) delete [] arg1->cb_function; + if (arg2) { + arg1->cb_function = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->cb_function, (const char *)arg2); + } else { + arg1->cb_function = 0; + } + } + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_cb_function_get(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("cb_function",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_function",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_cb_function_get",1,SWIGTYPE_p_LUA__Session); + } + + result = (char *) ((arg1)->cb_function); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_cb_arg_set(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *arg2 = (char *) 0 ; + + SWIG_check_num_args("cb_arg",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_arg",1,"LUA::Session *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("cb_arg",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_cb_arg_set",1,SWIGTYPE_p_LUA__Session); + } + + arg2 = (char *)lua_tostring(L, 2); + { + if (arg1->cb_arg) delete [] arg1->cb_arg; + if (arg2) { + arg1->cb_arg = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->cb_arg, (const char *)arg2); + } else { + arg1->cb_arg = 0; + } + } + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_cb_arg_get(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("cb_arg",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("cb_arg",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_cb_arg_get",1,SWIGTYPE_p_LUA__Session); + } + + result = (char *) ((arg1)->cb_arg); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("hangup_func_str",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_str",1,"LUA::Session *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("hangup_func_str",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_hangup_func_str_set",1,SWIGTYPE_p_LUA__Session); + } + + arg2 = (char *)lua_tostring(L, 2); + { + if (arg1->hangup_func_str) delete [] arg1->hangup_func_str; + if (arg2) { + arg1->hangup_func_str = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->hangup_func_str, (const char *)arg2); + } else { + arg1->hangup_func_str = 0; + } + } + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_hangup_func_str_get(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("hangup_func_str",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_str",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_hangup_func_str_get",1,SWIGTYPE_p_LUA__Session); + } + + result = (char *) ((arg1)->hangup_func_str); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +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 ; + + SWIG_check_num_args("hangup_func_arg",2,2) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_arg",1,"LUA::Session *"); + if(!lua_isstring(L,2)) SWIG_fail_arg("hangup_func_arg",2,"char *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_hangup_func_arg_set",1,SWIGTYPE_p_LUA__Session); + } + + arg2 = (char *)lua_tostring(L, 2); + { + if (arg1->hangup_func_arg) delete [] arg1->hangup_func_arg; + if (arg2) { + arg1->hangup_func_arg = (char *) (new char[strlen((const char *)arg2)+1]); + strcpy((char *)arg1->hangup_func_arg, (const char *)arg2); + } else { + arg1->hangup_func_arg = 0; + } + } + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_hangup_func_arg_get(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + char *result = 0 ; + + SWIG_check_num_args("hangup_func_arg",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("hangup_func_arg",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_hangup_func_arg_get",1,SWIGTYPE_p_LUA__Session); + } + + result = (char *) ((arg1)->hangup_func_arg); + SWIG_arg=0; + lua_pushstring(L,(const char*)result); SWIG_arg++; + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static int _wrap_Session_setLUA(lua_State* L) { + int SWIG_arg = -1; + LUA::Session *arg1 = (LUA::Session *) 0 ; + lua_State *arg2 = (lua_State *) 0 ; + + arg2 = L; + SWIG_check_num_args("setLUA",1,1) + if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("setLUA",1,"LUA::Session *"); + + if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_LUA__Session,0))){ + SWIG_fail_ptr("Session_setLUA",1,SWIGTYPE_p_LUA__Session); + } + + (arg1)->setLUA(arg2); + SWIG_arg=0; + + return SWIG_arg; + + if(0) SWIG_fail; + +fail: + lua_error(L); + return SWIG_arg; +} + + +static void swig_delete_Session(void *obj) { +LUA::Session *arg1 = (LUA::Session *) obj; +delete arg1; +} +static swig_lua_method swig_LUA_Session_methods[] = { + {"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}, + {"setInputCallback", _wrap_Session_setInputCallback}, + {"setHangupHook", _wrap_Session_setHangupHook}, + {"ready", _wrap_Session_ready}, + {"setLUA", _wrap_Session_setLUA}, + {0,0} +}; +static swig_lua_attribute swig_LUA_Session_attributes[] = { + { "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}, + {0,0,0} +}; +static swig_lua_class *swig_LUA_Session_bases[] = {0,0}; +static const char *swig_LUA_Session_base_names[] = {"CoreSession *",0}; +static 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, swig_LUA_Session_base_names }; #ifdef __cplusplus } #endif static const struct luaL_reg swig_commands[] = { - {"consoleLog", _wrap_consoleLog}, - {"consoleCleanLog", _wrap_consoleCleanLog}, - {"console_log", _wrap_console_log}, - {"console_clean_log", _wrap_console_clean_log}, - {"bridge", _wrap_bridge}, - {"hanguphook", _wrap_hanguphook}, - {"dtmf_callback", _wrap_dtmf_callback}, - {0, 0} + { "consoleLog", _wrap_consoleLog}, + { "consoleCleanLog", _wrap_consoleCleanLog}, + { "console_log", _wrap_console_log}, + { "console_clean_log", _wrap_console_clean_log}, + { "bridge", _wrap_bridge}, + { "hanguphook", _wrap_hanguphook}, + { "dtmf_callback", _wrap_dtmf_callback}, + {0,0} }; static swig_lua_var_info swig_variables[] = { - {0, 0, 0} + {0,0,0} }; static swig_lua_const_info swig_constants[] = { - {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} +{ 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} }; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static void *_p_LUA__SessionTo_p_CoreSession(void *x, int *newmemory) -{ - return (void *) ((CoreSession *) ((LUA::Session *) x)); +static void *_p_LUA__SessionTo_p_CoreSession(void *x, int *newmemory) { + return (void *)((CoreSession *) ((LUA::Session *) x)); } -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 }; -static swig_type_info _swigt__p_Event = { "_p_Event", "Event *", 0, 0, (void *) &_wrap_class_Event, 0 }; -static swig_type_info _swigt__p_IVRMenu = { "_p_IVRMenu", "IVRMenu *", 0, 0, (void *) &_wrap_class_IVRMenu, 0 }; -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 }; -static swig_type_info _swigt__p_input_callback_state = - { "_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void *) &_wrap_class_input_callback_state_t, 0 }; -static swig_type_info _swigt__p_lua_State = { "_p_lua_State", "lua_State *", 0, 0, (void *) 0, 0 }; -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 }; -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 }; -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 }; -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 }; -static swig_type_info _swigt__p_void = { "_p_void", "void *", 0, 0, (void *) 0, 0 }; +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}; +static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)&_wrap_class_Event, 0}; +static swig_type_info _swigt__p_IVRMenu = {"_p_IVRMenu", "IVRMenu *", 0, 0, (void*)&_wrap_class_IVRMenu, 0}; +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}; +static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)&_wrap_class_input_callback_state_t, 0}; +static swig_type_info _swigt__p_lua_State = {"_p_lua_State", "lua_State *", 0, 0, (void*)0, 0}; +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}; +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}; +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}; +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}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { - &_swigt__p_API, - &_swigt__p_CoreSession, - &_swigt__p_Event, - &_swigt__p_IVRMenu, - &_swigt__p_LUA__Session, - &_swigt__p_Stream, - &_swigt__p_input_callback_state, - &_swigt__p_lua_State, - &_swigt__p_session_flag_t, - &_swigt__p_switch_channel_state_t, - &_swigt__p_switch_channel_t, - &_swigt__p_switch_core_session_t, - &_swigt__p_switch_event_t, - &_swigt__p_switch_input_args_t, - &_swigt__p_switch_input_type_t, - &_swigt__p_switch_priority_t, - &_swigt__p_switch_status_t, - &_swigt__p_switch_stream_handle_t, - &_swigt__p_void, + &_swigt__p_API, + &_swigt__p_CoreSession, + &_swigt__p_Event, + &_swigt__p_IVRMenu, + &_swigt__p_LUA__Session, + &_swigt__p_Stream, + &_swigt__p_input_callback_state, + &_swigt__p_lua_State, + &_swigt__p_session_flag_t, + &_swigt__p_switch_channel_state_t, + &_swigt__p_switch_channel_t, + &_swigt__p_switch_core_session_t, + &_swigt__p_switch_event_t, + &_swigt__p_switch_input_args_t, + &_swigt__p_switch_input_type_t, + &_swigt__p_switch_priority_t, + &_swigt__p_switch_status_t, + &_swigt__p_switch_stream_handle_t, + &_swigt__p_void, }; -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} }; -static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0}, {0, 0, 0, 0} }; -static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0}, {0, 0, 0, 0} }; -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} }; -static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0}, {0, 0, 0, 0} }; -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} }; -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} }; -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} }; -static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0}, {0, 0, 0, 0} }; +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}}; +static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0},{0, 0, 0, 0}}; +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}}; +static swig_cast_info _swigc__p_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}}; +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}}; +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}}; +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}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { - _swigc__p_API, - _swigc__p_CoreSession, - _swigc__p_Event, - _swigc__p_IVRMenu, - _swigc__p_LUA__Session, - _swigc__p_Stream, - _swigc__p_input_callback_state, - _swigc__p_lua_State, - _swigc__p_session_flag_t, - _swigc__p_switch_channel_state_t, - _swigc__p_switch_channel_t, - _swigc__p_switch_core_session_t, - _swigc__p_switch_event_t, - _swigc__p_switch_input_args_t, - _swigc__p_switch_input_type_t, - _swigc__p_switch_priority_t, - _swigc__p_switch_status_t, - _swigc__p_switch_stream_handle_t, - _swigc__p_void, + _swigc__p_API, + _swigc__p_CoreSession, + _swigc__p_Event, + _swigc__p_IVRMenu, + _swigc__p_LUA__Session, + _swigc__p_Stream, + _swigc__p_input_callback_state, + _swigc__p_lua_State, + _swigc__p_session_flag_t, + _swigc__p_switch_channel_state_t, + _swigc__p_switch_channel_t, + _swigc__p_switch_core_session_t, + _swigc__p_switch_event_t, + _swigc__p_switch_input_args_t, + _swigc__p_switch_input_type_t, + _swigc__p_switch_priority_t, + _swigc__p_switch_status_t, + _swigc__p_switch_stream_handle_t, + _swigc__p_void, }; @@ -6810,163 +6343,161 @@ static swig_cast_info *swig_cast_initial[] = { #ifdef __cplusplus extern "C" { #if 0 -} /* c-mode */ +} /* c-mode */ #endif #endif + #if 0 #define SWIGRUNTIME_DEBUG #endif -SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) -{ - size_t i; - swig_module_info *module_head, *iter; - int found, init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next == 0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found, init; + + clientdata = clientdata; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* 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 */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; } else { - init = 0; + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; } + } - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found = 0; - iter = module_head; - do { - if (iter == &swig_module) { - found = 1; - break; - } - iter = iter->next; - } while (iter != module_head); - - /* if the is found in the list, then all is done and we may leave */ - if (found) - return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpeters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) - return; - - /* Now work on filling in swig_module.types */ + if (!ret) { #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; + 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; #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); -#endif - - /* 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 */ -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); -#endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); -#endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - - /* Don't need to add information already in the list */ - ret = 0; -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); -#endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); -#ifdef SWIGRUNTIME_DEBUG - if (ret) - printf("SWIG_InitializeModule: found cast %s\n", ret->name); -#endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); -#endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); -#ifdef SWIGRUNTIME_DEBUG - if (ocast) - printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); -#endif - if (!ocast) - ret = 0; - } - } - - if (!ret) { -#ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); -#endif - 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; - -#ifdef SWIGRUNTIME_DEBUG - 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"); + 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"); #endif } @@ -6975,33 +6506,32 @@ SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ -SWIGRUNTIME void SWIG_PropagateClientData(void) -{ - size_t i; - swig_cast_info *equiv; - static int init_run = 0; +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; - if (init_run) - return; - init_run = 1; + 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; - } - } - } + 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; + } + } + } } #ifdef __cplusplus #if 0 -{ /* c-mode */ +{ /* c-mode */ #endif } #endif @@ -7009,8 +6539,8 @@ SWIGRUNTIME void SWIG_PropagateClientData(void) /* Forward declaration of where the user's %init{} gets inserted */ -void SWIG_init_user(lua_State * L); - +void SWIG_init_user(lua_State* L ); + #ifdef __cplusplus extern "C" { #endif @@ -7018,58 +6548,61 @@ extern "C" { added at the very end of the code the function is always called SWIG_init, but an eariler #define will rename it */ - SWIGEXPORT int SWIG_init(lua_State * L) { - int i; - /* start with global table */ - lua_pushvalue(L, LUA_GLOBALSINDEX); - /* SWIG's internal initalisation */ - SWIG_InitializeModule((void *) L); - SWIG_PropagateClientData(); - /* 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); - } - /* 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); - } - /* set up base class pointers (the hierachy) */ - for (i = 0; swig_types[i]; i++) { - if (swig_types[i]->clientdata) { - SWIG_Lua_init_base_class(L, (swig_lua_class *) (swig_types[i]->clientdata)); - } - } - /* 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); - /* invoke user-specific initialization */ - SWIG_init_user(L); - /* end module */ - lua_pop(L, 1); /* tidy stack (remove module table) */ - lua_pop(L, 1); /* tidy stack (remove global table) */ - return 1; - } +SWIGEXPORT int SWIG_init(lua_State* L) +{ + int i; + /* start with global table */ + lua_pushvalue(L,LUA_GLOBALSINDEX); + /* SWIG's internal initalisation */ + SWIG_InitializeModule((void*)L); + SWIG_PropagateClientData(); + /* 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); + } + /* 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); + } + /* set up base class pointers (the hierachy) */ + for (i = 0; swig_types[i]; i++){ + if (swig_types[i]->clientdata){ + SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata)); + } + } + /* 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); + /* invoke user-specific initialization */ + SWIG_init_user(L); + /* end module */ + lua_pop(L,1); /* tidy stack (remove module table)*/ + lua_pop(L,1); /* tidy stack (remove global table)*/ + return 1; +} #ifdef __cplusplus } #endif -const char *SWIG_LUACODE = ""; +const char* SWIG_LUACODE= + ""; -void SWIG_init_user(lua_State * L) +void SWIG_init_user(lua_State* L) { - /* exec Lua code if applicable */ - SWIG_Lua_dostring(L, SWIG_LUACODE); + /* exec Lua code if applicable */ + SWIG_Lua_dostring(L,SWIG_LUACODE); } #include "mod_lua_extra.c" diff --git a/src/mod/languages/mod_perl/mod_perl_wrap.cpp b/src/mod/languages/mod_perl/mod_perl_wrap.cpp index 56ec1dddbb..28559f7fa4 100644 --- a/src/mod/languages/mod_perl/mod_perl_wrap.cpp +++ b/src/mod/languages/mod_perl/mod_perl_wrap.cpp @@ -12,35 +12,22 @@ #define SWIG_CASTRANK_MODE #ifdef __cplusplus -template < typename T > class SwigValueWrapper { - 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); +template class SwigValueWrapper { + T *tt; +public: + SwigValueWrapper() : tt(0) { } + SwigValueWrapper(const SwigValueWrapper& 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& rhs); }; -template < typename T > T SwigValueInit() -{ - return T(); +template T SwigValueInit() { + return T(); } #endif @@ -75,14 +62,14 @@ template < typename T > T SwigValueInit() #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif @@ -90,7 +77,7 @@ template < typename T > T SwigValueInit() # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -133,7 +120,7 @@ template < typename T > T SwigValueInit() # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -277,10 +264,10 @@ template < typename T > T SwigValueInit() */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -307,18 +294,16 @@ template < typename T > T SwigValueInit() # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) -{ - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) -{ - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast @@ -334,38 +319,38 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) extern "C" { #endif - typedef void *(*swig_converter_func) (void *, int *); - typedef struct swig_type_info *(*swig_dycast_func) (void **); +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ - 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; +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; /* Structure to store a type and conversion function used for casting */ - 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; +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; /* 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.*/ - 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; +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; /* Compare two type names skipping the space characters, therefore @@ -374,56 +359,54 @@ extern "C" { Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ - 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; - } return (int) ((l1 - f1) - (l2 - f2)); - } +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; + } + return (int)((l1 - f1) - (l2 - f2)); +} /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ - 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; - } +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; +} /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ - 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; - } +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; +} /* think of this as a c++ template<> or a scheme macro */ @@ -451,89 +434,94 @@ extern "C" { /* Check the typename */ - SWIGRUNTIME swig_cast_info *SWIG_TypeCheck(const char *c, swig_type_info * ty) { - SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); - } +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); +} /* Same as previous function, except strcmp is replaced with a pointer comparison */ - SWIGRUNTIME swig_cast_info *SWIG_TypeCheckStruct(swig_type_info * from, swig_type_info * into) { - SWIG_TypeCheck_Template(iter->type == from, into); - } +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { + SWIG_TypeCheck_Template(iter->type == from, into); +} /* Cast a pointer up an inheritance hierarchy */ - SWIGRUNTIMEINLINE void *SWIG_TypeCast(swig_cast_info * ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter) (ptr, newmemory); - } +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} /* Dynamic pointer casting. Down an inheritance hierarchy */ - 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; - } +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; +} /* Return the name associated with this type */ - SWIGRUNTIMEINLINE const char *SWIG_TypeName(const swig_type_info * ty) { - return ty->name; - } +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ - 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; - } +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; +} /* Set the clientdata field for a type */ - 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; - } - +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; +} + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) @@ -542,38 +530,41 @@ extern "C" { Note: if start == end at the beginning of the function, we go all the way around the circular list. */ - 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 */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; +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 */ } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} /* Search for a swig_type_info structure for either a mangled name or a human readable name. @@ -584,142 +575,148 @@ extern "C" { Note: if start == end at the beginning of the function, we go all the way around the circular list. */ - 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; - } +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; +} /* Pack binary data into a string */ - 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; - } +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; +} /* Unpack binary data from a string */ - 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; - } +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; +} /* Pack 'void *' into a string buffer. */ - 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; - } +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; +} - 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 *)); - } +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 *)); +} - 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; - } +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; +} - 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); - } +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); +} #ifdef __cplusplus } #endif /* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 +#define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 @@ -777,7 +774,7 @@ extern "C" { # ifdef LONGSIZE # define IVSIZE LONGSIZE # else -# define IVSIZE 4 /* A bold guess, but the best we can make. */ +# define IVSIZE 4 /* A bold guess, but the best we can make. */ # endif #endif @@ -804,7 +801,7 @@ extern "C" { # else # define PTR2ul(p) INT2PTR(unsigned long,p) # endif -#endif /* !INT2PTR */ +#endif /* !INT2PTR */ #ifndef SvPV_nolen # define SvPV_nolen(x) SvPV(x,PL_na) @@ -820,56 +817,58 @@ extern "C" { #ifndef pTHX_ #define pTHX_ -#endif +#endif #include #ifdef __cplusplus } #endif + /* ----------------------------------------------------------------------------- * error manipulation - * ----------------------------------------------------------------------------- */ SWIGINTERN const char * -SWIG_Perl_ErrorType(int code) -{ - const char *type = 0; - switch (code) { - case SWIG_MemoryError: - type = "MemoryError"; - break; - case SWIG_IOError: - type = "IOError"; - break; - case SWIG_RuntimeError: - type = "RuntimeError"; - break; - case SWIG_IndexError: - type = "IndexError"; - break; - case SWIG_TypeError: - type = "TypeError"; - break; - case SWIG_DivisionByZero: - type = "ZeroDivisionError"; - break; - case SWIG_OverflowError: - type = "OverflowError"; - break; - case SWIG_SyntaxError: - type = "SyntaxError"; - break; - case SWIG_ValueError: - type = "ValueError"; - break; - case SWIG_SystemError: - type = "SystemError"; - break; - case SWIG_AttributeError: - type = "AttributeError"; - break; - default: - type = "RuntimeError"; - } - return type; + * ----------------------------------------------------------------------------- */ + +SWIGINTERN const char* +SWIG_Perl_ErrorType(int code) { + const char* type = 0; + switch(code) { + case SWIG_MemoryError: + type = "MemoryError"; + break; + case SWIG_IOError: + type = "IOError"; + break; + case SWIG_RuntimeError: + type = "RuntimeError"; + break; + case SWIG_IndexError: + type = "IndexError"; + break; + case SWIG_TypeError: + type = "TypeError"; + break; + case SWIG_DivisionByZero: + type = "ZeroDivisionError"; + break; + case SWIG_OverflowError: + type = "OverflowError"; + break; + case SWIG_SyntaxError: + type = "SyntaxError"; + break; + case SWIG_ValueError: + type = "ValueError"; + break; + case SWIG_SystemError: + type = "SystemError"; + break; + case SWIG_AttributeError: + type = "AttributeError"; + break; + default: + type = "RuntimeError"; + } + return type; } @@ -922,9 +921,9 @@ SWIG_Perl_ErrorType(int code) /* Error manipulation */ -#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) +#define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code) #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail +#define SWIG_fail goto fail /* Perl-specific SWIG API */ @@ -962,29 +961,31 @@ extern "C" { #endif /* Macro to call an XS function */ -#ifdef PERL_OBJECT -# define SWIG_CALLXS(_name) _name(cv,pPerl) -#else -# ifndef MULTIPLICITY -# define SWIG_CALLXS(_name) _name(cv) -# else -# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) -# endif -#endif +#ifdef PERL_OBJECT +# define SWIG_CALLXS(_name) _name(cv,pPerl) +#else +# ifndef MULTIPLICITY +# define SWIG_CALLXS(_name) _name(cv) +# else +# define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) +# endif +#endif #ifdef PERL_OBJECT #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this; #ifdef __cplusplus - extern "C" { +extern "C" { #endif - typedef int (CPerlObj::*SwigMagicFunc) (SV *, MAGIC *); +typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus - } +} #endif + #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) #define SWIGCLASS_STATIC -#else /* PERL_OBJECT */ + +#else /* PERL_OBJECT */ #define MAGIC_PPERL #define SWIGCLASS_STATIC static SWIGUNUSED @@ -993,46 +994,50 @@ extern "C" { #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b) #ifdef __cplusplus - extern "C" { +extern "C" { #endif - typedef int (*SwigMagicFunc) (SV *, MAGIC *); +typedef int (*SwigMagicFunc)(SV *, MAGIC *); #ifdef __cplusplus - } +} #endif -#else /* MULTIPLICITY */ + +#else /* MULTIPLICITY */ #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b) #ifdef __cplusplus - extern "C" { +extern "C" { #endif - typedef int (*SwigMagicFunc) (struct interpreter *, SV *, MAGIC *); +typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); #ifdef __cplusplus - } +} #endif -#endif /* MULTIPLICITY */ -#endif /* PERL_OBJECT */ + +#endif /* MULTIPLICITY */ +#endif /* PERL_OBJECT */ + /* Workaround for bug in perl 5.6.x croak and earlier */ #if (PERL_VERSION < 8) # ifdef PERL_OBJECT # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) - static void SWIG_Perl_croak_null(CPerlObj * pPerl) +static void SWIG_Perl_croak_null(CPerlObj *pPerl) # else - static void SWIG_croak_null() +static void SWIG_croak_null() # endif - { - SV *err = ERRSV; +{ + SV *err=ERRSV; # if (PERL_VERSION < 6) - croak("%_", err); + croak("%_", err); # else - if (SvOK(err) && !SvROK(err)) - croak("%_", err); - croak(Nullch); + if (SvOK(err) && !SvROK(err)) croak("%_", err); + croak(Nullch); # endif - } +} #else # define SWIG_croak_null() croak(Nullch) #endif + + /* Define how strict is the cast between strings and integers/doubles when overloading between these types occurs. @@ -1055,201 +1060,206 @@ extern "C" { #endif #ifdef SWIG_PERL_STRICT_STR2NUM /* string takes precedence */ -#define SWIG_Str2NumCast(x) SWIG_AddCast(x) +#define SWIG_Str2NumCast(x) SWIG_AddCast(x) #else /* number takes precedence */ #define SWIG_Str2NumCast(x) x #endif -#include - SWIGRUNTIME const char *SWIG_Perl_TypeProxyName(const swig_type_info * type) { - if (!type) - return NULL; - if (type->clientdata != NULL) { - return (const char *) type->clientdata; - } else { - return type->name; - } - } - SWIGRUNTIME swig_cast_info *SWIG_TypeProxyCheck(const char *c, swig_type_info * ty) { - SWIG_TypeCheck_Template(((!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) - || (iter->type->clientdata && (strcmp((char *) iter->type->clientdata, c) == 0))), ty); - } + + +#include + +SWIGRUNTIME const char * +SWIG_Perl_TypeProxyName(const swig_type_info *type) { + if (!type) return NULL; + if (type->clientdata != NULL) { + return (const char*) type->clientdata; + } + else { + return type->name; + } +} + +SWIGRUNTIME swig_cast_info * +SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) { + SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) + || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty); +} /* Function for getting a pointer value */ - SWIGRUNTIME int - SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV * sv, void **ptr, swig_type_info * _t, int flags) { - swig_cast_info *tc; - void *voidptr = (void *) 0; - SV *tsv = 0; - /* If magical, apply more magic */ - if (SvGMAGICAL(sv)) - mg_get(sv); +SWIGRUNTIME int +SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { + swig_cast_info *tc; + void *voidptr = (void *)0; + SV *tsv = 0; + /* If magical, apply more magic */ + if (SvGMAGICAL(sv)) + mg_get(sv); - /* Check to see if this is an object */ - if (sv_isobject(sv)) { - IV tmp = 0; - tsv = (SV *) SvRV(sv); - if ((SvTYPE(tsv) == SVt_PVHV)) { - MAGIC *mg; - if (SvMAGICAL(tsv)) { - mg = mg_find(tsv, 'P'); - if (mg) { - sv = mg->mg_obj; - if (sv_isobject(sv)) { - tsv = (SV *) SvRV(sv); - tmp = SvIV(tsv); - } - } - } else { - return SWIG_ERROR; - } - } else { - tmp = SvIV(tsv); - } - voidptr = INT2PTR(void *, tmp); - } else if (!SvOK(sv)) { /* Check for undef */ - *(ptr) = (void *) 0; - return SWIG_OK; - } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ - if (!SvROK(sv)) { - *(ptr) = (void *) 0; - return SWIG_OK; - } else { - return SWIG_ERROR; - } - } else { /* Don't know what it is */ - return SWIG_ERROR; - } - if (_t) { - /* Now see if the types match */ - char *_c = HvNAME(SvSTASH(SvRV(sv))); - tc = SWIG_TypeProxyCheck(_c, _t); - if (!tc) { - return SWIG_ERROR; - } - { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc, voidptr, &newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } - } else { - *ptr = voidptr; - } + /* Check to see if this is an object */ + if (sv_isobject(sv)) { + IV tmp = 0; + tsv = (SV*) SvRV(sv); + if ((SvTYPE(tsv) == SVt_PVHV)) { + MAGIC *mg; + if (SvMAGICAL(tsv)) { + mg = mg_find(tsv,'P'); + if (mg) { + sv = mg->mg_obj; + if (sv_isobject(sv)) { + tsv = (SV*)SvRV(sv); + tmp = SvIV(tsv); + } + } + } else { + return SWIG_ERROR; + } + } else { + tmp = SvIV(tsv); + } + voidptr = INT2PTR(void *,tmp); + } else if (! SvOK(sv)) { /* Check for undef */ + *(ptr) = (void *) 0; + return SWIG_OK; + } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */ + if (!SvROK(sv)) { + *(ptr) = (void *) 0; + return SWIG_OK; + } else { + return SWIG_ERROR; + } + } else { /* Don't know what it is */ + return SWIG_ERROR; + } + if (_t) { + /* Now see if the types match */ + char *_c = HvNAME(SvSTASH(SvRV(sv))); + tc = SWIG_TypeProxyCheck(_c,_t); + if (!tc) { + return SWIG_ERROR; + } + { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,voidptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } + } else { + *ptr = voidptr; + } - /* - * DISOWN implementation: we need a perl guru to check this one. - */ - if (tsv && (flags & SWIG_POINTER_DISOWN)) { - /* - * almost copy paste code from below SWIG_POINTER_OWN setting - */ - SV *obj = sv; - HV *stash = SvSTASH(SvRV(obj)); - GV *gv = *(GV **) hv_fetch(stash, "OWNER", 5, TRUE); - if (isGV(gv)) { - HV *hv = GvHVn(gv); - /* - * To set ownership (see below), a newSViv(1) entry is added. - * Hence, to remove ownership, we delete the entry. - */ - if (hv_exists_ent(hv, obj, 0)) { - hv_delete_ent(hv, obj, 0, 0); - } - } - } - return SWIG_OK; - } + /* + * DISOWN implementation: we need a perl guru to check this one. + */ + if (tsv && (flags & SWIG_POINTER_DISOWN)) { + /* + * almost copy paste code from below SWIG_POINTER_OWN setting + */ + SV *obj = sv; + HV *stash = SvSTASH(SvRV(obj)); + GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE); + if (isGV(gv)) { + HV *hv = GvHVn(gv); + /* + * To set ownership (see below), a newSViv(1) entry is added. + * Hence, to remove ownership, we delete the entry. + */ + if (hv_exists_ent(hv, obj, 0)) { + hv_delete_ent(hv, obj, 0, 0); + } + } + } + return SWIG_OK; +} - SWIGRUNTIME void - SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV * sv, void *ptr, swig_type_info * t, int flags) { - if (ptr && (flags & SWIG_SHADOW)) { - SV *self; - SV *obj = newSV(0); - HV *hash = newHV(); - HV *stash; - sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); - stash = SvSTASH(SvRV(obj)); - if (flags & SWIG_POINTER_OWN) { - HV *hv; - GV *gv = *(GV **) hv_fetch(stash, "OWNER", 5, TRUE); - if (!isGV(gv)) - gv_init(gv, stash, "OWNER", 5, FALSE); - hv = GvHVn(gv); - hv_store_ent(hv, obj, newSViv(1), 0); - } - sv_magic((SV *) hash, (SV *) obj, 'P', Nullch, 0); - SvREFCNT_dec(obj); - self = newRV_noinc((SV *) hash); - sv_setsv(sv, self); - SvREFCNT_dec((SV *) self); - sv_bless(sv, stash); - } else { - sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); - } - } +SWIGRUNTIME void +SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { + if (ptr && (flags & SWIG_SHADOW)) { + SV *self; + SV *obj=newSV(0); + HV *hash=newHV(); + HV *stash; + sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr); + stash=SvSTASH(SvRV(obj)); + if (flags & SWIG_POINTER_OWN) { + HV *hv; + GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE); + if (!isGV(gv)) + gv_init(gv, stash, "OWNER", 5, FALSE); + hv=GvHVn(gv); + hv_store_ent(hv, obj, newSViv(1), 0); + } + sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0); + SvREFCNT_dec(obj); + self=newRV_noinc((SV *)hash); + sv_setsv(sv, self); + SvREFCNT_dec((SV *)self); + sv_bless(sv, stash); + } + else { + sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr); + } +} - SWIGRUNTIMEINLINE SV *SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info * t, int flags) { - SV *result = sv_newmortal(); - SWIG_MakePtr(result, ptr, t, flags); - return result; - } +SWIGRUNTIMEINLINE SV * +SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { + SV *result = sv_newmortal(); + SWIG_MakePtr(result, ptr, t, flags); + return result; +} - SWIGRUNTIME void - SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV * sv, void *ptr, int sz, swig_type_info * type) { - char result[1024]; - char *r = result; - if ((2 * sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) - return; - *(r++) = '_'; - r = SWIG_PackData(r, ptr, sz); - strcpy(r, SWIG_Perl_TypeProxyName(type)); - sv_setpv(sv, result); - } +SWIGRUNTIME void +SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + strcpy(r,SWIG_Perl_TypeProxyName(type)); + sv_setpv(sv, result); +} - SWIGRUNTIME SV *SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info * type) { - SV *result = sv_newmortal(); - SWIG_Perl_MakePackedObj(result, ptr, sz, type); - return result; - } +SWIGRUNTIME SV * +SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) { + SV *result = sv_newmortal(); + SWIG_Perl_MakePackedObj(result, ptr, sz, type); + return result; +} /* Convert a packed value value */ - SWIGRUNTIME int - SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV * obj, void *ptr, int sz, swig_type_info * ty) { - swig_cast_info *tc; - const char *c = 0; +SWIGRUNTIME int +SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) { + swig_cast_info *tc; + const char *c = 0; - if ((!obj) || (!SvOK(obj))) - return SWIG_ERROR; - c = SvPV_nolen(obj); - /* Pointer values must start with leading underscore */ - if (*c != '_') - return SWIG_ERROR; - c++; - c = SWIG_UnpackData(c, ptr, sz); - if (ty) { - tc = SWIG_TypeCheck(c, ty); - if (!tc) - return SWIG_ERROR; - } - return SWIG_OK; - } + if ((!obj) || (!SvOK(obj))) return SWIG_ERROR; + c = SvPV_nolen(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') return SWIG_ERROR; + c++; + c = SWIG_UnpackData(c,ptr,sz); + if (ty) { + tc = SWIG_TypeCheck(c,ty); + if (!tc) return SWIG_ERROR; + } + return SWIG_OK; +} /* Macros for low-level exception handling */ #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; } - typedef XSPROTO(SwigPerlWrapper); - typedef SwigPerlWrapper *SwigPerlWrapperPtr; +typedef XSPROTO(SwigPerlWrapper); +typedef SwigPerlWrapper *SwigPerlWrapperPtr; /* Structure for command table */ - typedef struct { - const char *name; - SwigPerlWrapperPtr wrapper; - } swig_command_info; +typedef struct { + const char *name; + SwigPerlWrapperPtr wrapper; +} swig_command_info; /* Information for constant table */ @@ -1260,74 +1270,73 @@ extern "C" { #define SWIG_BINARY 5 /* Constant information structure */ - typedef struct swig_constant_info { - int type; - const char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; - } swig_constant_info; +typedef struct swig_constant_info { + int type; + const char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; +} swig_constant_info; /* Structure for variable table */ - typedef struct { - const char *name; - SwigMagicFunc set; - SwigMagicFunc get; - swig_type_info **type; - } swig_variable_info; +typedef struct { + const char *name; + SwigMagicFunc set; + SwigMagicFunc get; + swig_type_info **type; +} swig_variable_info; /* Magic variable code */ #ifndef PERL_OBJECT #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c) -#ifndef MULTIPLICITY - SWIGRUNTIME void _swig_create_magic(SV * sv, char *name, int (*set) (SV *, MAGIC *), int (*get) (SV *, MAGIC *)) -#else - SWIGRUNTIME void _swig_create_magic(SV * sv, char *name, int (*set) (struct interpreter *, SV *, MAGIC *), - int (*get) (struct interpreter *, SV *, MAGIC *)) -#endif + #ifndef MULTIPLICITY + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) + #else + SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) + #endif #else # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c) - SWIGRUNTIME void _swig_create_magic(CPerlObj * pPerl, SV * sv, const char *name, int (CPerlObj::*set) (SV *, MAGIC *), - int (CPerlObj::*get) (SV *, MAGIC *)) +SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) #endif - { - MAGIC *mg; - sv_magic(sv, sv, 'U', (char *) name, strlen(name)); - mg = mg_find(sv, 'U'); - mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); - mg->mg_virtual->svt_get = (SwigMagicFunc) get; - mg->mg_virtual->svt_set = (SwigMagicFunc) set; - mg->mg_virtual->svt_len = 0; - mg->mg_virtual->svt_clear = 0; - mg->mg_virtual->svt_free = 0; - } +{ + MAGIC *mg; + sv_magic(sv,sv,'U',(char *) name,strlen(name)); + mg = mg_find(sv,'U'); + mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL)); + mg->mg_virtual->svt_get = (SwigMagicFunc) get; + mg->mg_virtual->svt_set = (SwigMagicFunc) set; + mg->mg_virtual->svt_len = 0; + mg->mg_virtual->svt_clear = 0; + mg->mg_virtual->svt_free = 0; +} - SWIGRUNTIME swig_module_info *SWIG_Perl_GetModule(void) { - static void *type_pointer = (void *) 0; - SV *pointer; +SWIGRUNTIME swig_module_info * +SWIG_Perl_GetModule(void) { + static void *type_pointer = (void *)0; + SV *pointer; - /* first check if pointer already created */ - if (!type_pointer) { - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); - if (pointer && SvOK(pointer)) { - type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); - } - } + /* first check if pointer already created */ + if (!type_pointer) { + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI); + if (pointer && SvOK(pointer)) { + type_pointer = INT2PTR(swig_type_info **, SvIV(pointer)); + } + } - return (swig_module_info *) type_pointer; - } + return (swig_module_info *) type_pointer; +} - SWIGRUNTIME void - SWIG_Perl_SetModule(swig_module_info * module) { - SV *pointer; +SWIGRUNTIME void +SWIG_Perl_SetModule(swig_module_info *module) { + SV *pointer; - /* create a new pointer */ - pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); - sv_setiv(pointer, PTR2IV(module)); - } + /* create a new pointer */ + pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI); + sv_setiv(pointer, PTR2IV(module)); +} #ifdef __cplusplus } @@ -1337,101 +1346,101 @@ extern "C" { * functions like fopen will not solve the problem on all platforms as fopen * might be a macro on Windows but not necessarily on other operating systems. */ #ifdef do_open -#undef do_open + #undef do_open #endif #ifdef do_close -#undef do_close + #undef do_close #endif #ifdef scalar -#undef scalar + #undef scalar #endif #ifdef list -#undef list + #undef list #endif #ifdef apply -#undef apply + #undef apply #endif #ifdef convert -#undef convert + #undef convert #endif #ifdef Error -#undef Error + #undef Error #endif #ifdef form -#undef form + #undef form #endif #ifdef vform -#undef vform + #undef vform #endif #ifdef LABEL -#undef LABEL + #undef LABEL #endif #ifdef METHOD -#undef METHOD + #undef METHOD #endif #ifdef Move -#undef Move + #undef Move #endif #ifdef yylex -#undef yylex + #undef yylex #endif #ifdef yyparse -#undef yyparse + #undef yyparse #endif #ifdef yyerror -#undef yyerror + #undef yyerror #endif #ifdef invert -#undef invert + #undef invert #endif #ifdef ref -#undef ref + #undef ref #endif #ifdef read -#undef read + #undef read #endif #ifdef write -#undef write + #undef write #endif #ifdef eof -#undef eof + #undef eof #endif #ifdef bool -#undef bool + #undef bool #endif #ifdef close -#undef close + #undef close #endif #ifdef rewind -#undef rewind + #undef rewind #endif #ifdef free -#undef free + #undef free #endif #ifdef malloc -#undef malloc + #undef malloc #endif #ifdef calloc -#undef calloc + #undef calloc #endif #ifdef Stat -#undef Stat + #undef Stat #endif #ifdef check -#undef check + #undef check #endif #ifdef seekdir -#undef seekdir + #undef seekdir #endif #ifdef open -#undef open + #undef open #endif -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else @@ -1458,8 +1467,7 @@ extern "C" { #define SWIGTYPE_p_switch_stream_handle_t swig_types[18] #define SWIGTYPE_p_void swig_types[19] static swig_type_info *swig_types[21]; -static swig_module_info swig_module = { swig_types, 20, 0, 0, 0, 0 }; - +static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -1470,12 +1478,12 @@ static swig_module_info swig_module = { swig_types, 20, 0, 0, 0, 0 }; #define SWIG_name "freeswitchc::boot_freeswitch" #define SWIG_prefix "freeswitchc::" -#define SWIGVERSION 0x010335 +#define SWIGVERSION 0x010335 #define SWIG_VERSION SWIGVERSION -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include @@ -1486,12 +1494,12 @@ extern "C" #endif #ifndef PERL_OBJECT #ifndef MULTIPLICITY - SWIGEXPORT void SWIG_init(CV * cv); +SWIGEXPORT void SWIG_init (CV* cv); #else - SWIGEXPORT void SWIG_init(pTHXo_ CV * cv); +SWIGEXPORT void SWIG_init (pTHXo_ CV* cv); #endif #else - SWIGEXPORT void SWIG_init(CV * cv, CPerlObj *); +SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *); #endif @@ -1499,53 +1507,51 @@ extern "C" #include "freeswitch_perl.h" -SWIGINTERN swig_type_info *SWIG_pchar_descriptor(void) +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) { - static int init = 0; - static swig_type_info *info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; } -SWIGINTERN int SWIG_AsCharPtrAndSize(SV * obj, char **cptr, size_t *psize, int *alloc) +SWIGINTERN int +SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc) { - if (SvPOK(obj)) { - STRLEN len = 0; - char *cstr = SvPV(obj, len); - size_t size = len + 1; - if (cptr) { - if (alloc) { - if (*alloc == SWIG_NEWOBJ) { - *cptr = reinterpret_cast < char *>(memcpy((new char[size]), cstr, sizeof(char) * (size))); - } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } - } - if (psize) - *psize = size; - return SWIG_OK; + if (SvPOK(obj)) { + STRLEN len = 0; + char *cstr = SvPV(obj, len); + size_t size = len + 1; + if (cptr) { + if (alloc) { + if (*alloc == SWIG_NEWOBJ) { + *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size))); } else { - swig_type_info *pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - char *vptr = 0; - if (SWIG_ConvertPtr(obj, (void **) &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) - *cptr = vptr; - if (psize) - *psize = vptr ? (strlen(vptr) + 1) : 0; - if (alloc) - *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } + *cptr = cstr; + *alloc = SWIG_OLDOBJ; } - return SWIG_TypeError; + } + } + if (psize) *psize = size; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + char* vptr = 0; + if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = vptr; + if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; } @@ -1563,34 +1569,31 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(SV * obj, char **cptr, size_t *psize, int * SWIGINTERN int -SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV * obj, double *val) +SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val) { - if (SvNIOK(obj)) { - if (val) - *val = SvNV(obj); - return SWIG_OK; - } else if (SvIOK(obj)) { - if (val) - *val = (double) SvIV(obj); - return SWIG_AddCast(SWIG_OK); - } else { - const char *nptr = SvPV_nolen(obj); - if (nptr) { - char *endptr; - double v = strtod(nptr, &endptr); - if (errno == ERANGE) { - errno = 0; - return SWIG_OverflowError; - } else { - if (*endptr == '\0') { - if (val) - *val = v; - return SWIG_Str2NumCast(SWIG_OK); - } - } - } + if (SvNIOK(obj)) { + if (val) *val = SvNV(obj); + return SWIG_OK; + } else if (SvIOK(obj)) { + if (val) *val = (double) SvIV(obj); + return SWIG_AddCast(SWIG_OK); + } else { + const char *nptr = SvPV_nolen(obj); + if (nptr) { + char *endptr; + double v = strtod(nptr, &endptr); + if (errno == ERANGE) { + errno = 0; + return SWIG_OverflowError; + } else { + if (*endptr == '\0') { + if (val) *val = v; + return SWIG_Str2NumCast(SWIG_OK); } - return SWIG_TypeError; + } + } + } + return SWIG_TypeError; } @@ -1600,234 +1603,229 @@ SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV * obj, double *val) #include -SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) -{ - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff / summ; - if (reps < 8 * DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; } SWIGINTERN int -SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV * obj, long *val) +SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val) { - if (SvIOK(obj)) { - if (val) - *val = SvIV(obj); - return SWIG_OK; - } else { - int dispatch = 0; - const char *nptr = SvPV_nolen(obj); - if (nptr) { - char *endptr; - long v; - errno = 0; - v = strtol(nptr, &endptr, 0); - if (errno == ERANGE) { - errno = 0; - return SWIG_OverflowError; - } else { - if (*endptr == '\0') { - if (val) - *val = v; - return SWIG_Str2NumCast(SWIG_OK); - } - } - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj, &d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) - *val = (long) (d); - return res; - } - } + if (SvIOK(obj)) { + if (val) *val = SvIV(obj); + return SWIG_OK; + } else { + int dispatch = 0; + const char *nptr = SvPV_nolen(obj); + if (nptr) { + char *endptr; + long v; + errno = 0; + v = strtol(nptr, &endptr,0); + if (errno == ERANGE) { + errno = 0; + return SWIG_OverflowError; + } else { + if (*endptr == '\0') { + if (val) *val = v; + return SWIG_Str2NumCast(SWIG_OK); } - return SWIG_TypeError; + } + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); + return res; + } + } + } + return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val) { - long v; - int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) - *val = static_cast < int >(v); - } - } - return res; + long v; + int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; } -SWIGINTERNINLINE SV *SWIG_FromCharPtrAndSize(const char *carray, size_t size) +SWIGINTERNINLINE SV * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) { - SV *obj = sv_newmortal(); - if (carray) { - sv_setpvn(obj, carray, size); - } else { - sv_setsv(obj, &PL_sv_undef); - } - return obj; + SV *obj = sv_newmortal(); + if (carray) { + sv_setpvn(obj, carray, size); + } else { + sv_setsv(obj, &PL_sv_undef); + } + return obj; } -SWIGINTERNINLINE SV *SWIG_FromCharPtr(const char *cptr) -{ - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +SWIGINTERNINLINE SV * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } -SWIGINTERNINLINE SV *SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) -{ - SV *obj = sv_newmortal(); - sv_setiv(obj, (IV) value); - return obj; +SWIGINTERNINLINE SV * +SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value) +{ + SV *obj = sv_newmortal(); + sv_setiv(obj, (IV) value); + return obj; } -SWIGINTERNINLINE SV *SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) -{ - return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value); +SWIGINTERNINLINE SV * +SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value) +{ + return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value); } -SWIGINTERNINLINE SV *SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value) -{ - SV *obj = sv_newmortal(); - if (value) { - sv_setsv(obj, &PL_sv_yes); - } else { - sv_setsv(obj, &PL_sv_no); - } - return obj; +SWIGINTERNINLINE SV * +SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value) +{ + SV *obj = sv_newmortal(); + if (value) { + sv_setsv(obj, &PL_sv_yes); + } else { + sv_setsv(obj, &PL_sv_no); + } + return obj; } SWIGINTERN int -SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned long *val) +SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val) { - if (SvUOK(obj)) { - if (val) - *val = SvUV(obj); - return SWIG_OK; - } else if (SvIOK(obj)) { - long v = SvIV(obj); - if (v >= 0) { - if (val) - *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else { - int dispatch = 0; - const char *nptr = SvPV_nolen(obj); - if (nptr) { - char *endptr; - unsigned long v; - errno = 0; - v = strtoul(nptr, &endptr, 0); - if (errno == ERANGE) { - errno = 0; - return SWIG_OverflowError; - } else { - if (*endptr == '\0') { - if (val) - *val = v; - return SWIG_Str2NumCast(SWIG_OK); - } - } - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj, &d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) - *val = (unsigned long) (d); - return res; - } - } + if (SvUOK(obj)) { + if (val) *val = SvUV(obj); + return SWIG_OK; + } else if (SvIOK(obj)) { + long v = SvIV(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else { + int dispatch = 0; + const char *nptr = SvPV_nolen(obj); + if (nptr) { + char *endptr; + unsigned long v; + errno = 0; + v = strtoul(nptr, &endptr,0); + if (errno == ERANGE) { + errno = 0; + return SWIG_OverflowError; + } else { + if (*endptr == '\0') { + if (val) *val = v; + return SWIG_Str2NumCast(SWIG_OK); } - return SWIG_TypeError; + } + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); + return res; + } + } + } + return SWIG_TypeError; } SWIGINTERN int SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val) { - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v); - if (SWIG_IsOK(res)) { - if ((v > UINT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) - *val = static_cast < unsigned int >(v); - } - } - return res; + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; } -SWIGINTERNINLINE SV *SWIG_From_unsigned_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long value) -{ - SV *obj = sv_newmortal(); - sv_setuv(obj, (UV) value); - return obj; +SWIGINTERNINLINE SV * +SWIG_From_unsigned_SS_long SWIG_PERL_DECL_ARGS_1(unsigned long value) +{ + SV *obj = sv_newmortal(); + sv_setuv(obj, (UV) value); + return obj; } -SWIGINTERNINLINE SV *SWIG_From_unsigned_SS_int SWIG_PERL_DECL_ARGS_1(unsigned int value) -{ - return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value); +SWIGINTERNINLINE SV * +SWIG_From_unsigned_SS_int SWIG_PERL_DECL_ARGS_1(unsigned int value) +{ + return SWIG_From_unsigned_SS_long SWIG_PERL_CALL_ARGS_1(value); } SWIGINTERN int -SWIG_AsVal_bool SWIG_PERL_DECL_ARGS_2(SV * obj, bool * val) +SWIG_AsVal_bool SWIG_PERL_DECL_ARGS_2(SV *obj, bool* val) { - if (obj == &PL_sv_yes) { - if (val) - *val = true; - return SWIG_OK; - } else if (obj == &PL_sv_no) { - if (val) - *val = false; - return SWIG_OK; - } else { - if (val) - *val = SvTRUE(obj) ? true : false; - return SWIG_AddCast(SWIG_OK); - } - return SWIG_TypeError; + if (obj == &PL_sv_yes) { + if (val) *val = true; + return SWIG_OK; + } else if (obj == &PL_sv_no) { + if (val) *val = false; + return SWIG_OK; + } else { + if (val) *val = SvTRUE(obj) ? true: false; + return SWIG_AddCast(SWIG_OK); + } + return SWIG_TypeError; } #ifdef __cplusplus @@ -1836,15 +1834,18 @@ extern "C" { #ifdef PERL_OBJECT #define MAGIC_CLASS _wrap_freeswitch_var:: - class _wrap_freeswitch_var:public CPerlObj { - public: +class _wrap_freeswitch_var : public CPerlObj { +public: #else #define MAGIC_CLASS #endif - SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV * SWIGUNUSEDPARM(sv), MAGIC * SWIGUNUSEDPARM(mg)) { - MAGIC_PPERL croak("Value is read-only."); - return 0; - } +SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) { + MAGIC_PPERL + croak("Value is read-only."); + return 0; +} + + #ifdef PERL_OBJECT }; #endif @@ -1856,6984 +1857,6474 @@ extern "C" { #ifdef __cplusplus extern "C" { #endif - XS(_wrap_consoleLog) { - { - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: consoleLog(level_str,msg);"); - } - res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleLog" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "consoleLog" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - consoleLog(arg1, arg2); - - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_consoleCleanLog) { - { - char *arg1 = (char *) 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: consoleCleanLog(msg);"); - } - res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleCleanLog" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - consoleCleanLog(arg1); - - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - XSRETURN(argvi); - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - SWIG_croak_null(); - } - } - - - XS(_wrap_new_IVRMenu) { - { - 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; - int arg9; - int arg10; - int arg11; - int arg12; - int arg13; - IVRMenu *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int res5; - char *buf5 = 0; - int alloc5 = 0; - int res6; - char *buf6 = 0; - int alloc6 = 0; - int res7; - char *buf7 = 0; - int alloc7 = 0; - int res8; - char *buf8 = 0; - int alloc8 = 0; - int val9; - int ecode9 = 0; - int val10; - int ecode10 = 0; - int val11; - int ecode11 = 0; - int val12; - int ecode12 = 0; - int val13; - int ecode13 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 13) || (items > 13)) { - SWIG_croak - ("Usage: new_IVRMenu(main,name,greeting_sound,short_greeting_sound,invalid_sound,exit_sound,confirm_macro,confirm_key,confirm_attempts,inter_timeout,digit_len,timeout,max_failures);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_IVRMenu, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IVRMenu" "', argument " "1" " of type '" "IVRMenu *" "'"); - } - arg1 = reinterpret_cast < IVRMenu * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IVRMenu" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IVRMenu" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IVRMenu" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_IVRMenu" "', argument " "5" " of type '" "char const *" "'"); - } - arg5 = reinterpret_cast < char *>(buf5); - res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IVRMenu" "', argument " "6" " of type '" "char const *" "'"); - } - arg6 = reinterpret_cast < char *>(buf6); - res7 = SWIG_AsCharPtrAndSize(ST(6), &buf7, NULL, &alloc7); - if (!SWIG_IsOK(res7)) { - SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_IVRMenu" "', argument " "7" " of type '" "char const *" "'"); - } - arg7 = reinterpret_cast < char *>(buf7); - res8 = SWIG_AsCharPtrAndSize(ST(7), &buf8, NULL, &alloc8); - if (!SWIG_IsOK(res8)) { - SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IVRMenu" "', argument " "8" " of type '" "char const *" "'"); - } - arg8 = reinterpret_cast < char *>(buf8); - ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_IVRMenu" "', argument " "9" " of type '" "int" "'"); - } - arg9 = static_cast < int >(val9); - ecode10 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(9), &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_IVRMenu" "', argument " "10" " of type '" "int" "'"); - } - arg10 = static_cast < int >(val10); - ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_IVRMenu" "', argument " "11" " of type '" "int" "'"); - } - arg11 = static_cast < int >(val11); - ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12); - if (!SWIG_IsOK(ecode12)) { - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_IVRMenu" "', argument " "12" " of type '" "int" "'"); - } - arg12 = static_cast < int >(val12); - ecode13 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), &val13); - if (!SWIG_IsOK(ecode13)) { - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_IVRMenu" "', argument " "13" " of type '" "int" "'"); - } - arg13 = static_cast < int >(val13); - 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, arg9, arg10, arg11, arg12, arg13); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVRMenu, SWIG_OWNER | SWIG_SHADOW); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc5 == SWIG_NEWOBJ) - delete[]buf5; - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - if (alloc7 == SWIG_NEWOBJ) - delete[]buf7; - if (alloc8 == SWIG_NEWOBJ) - delete[]buf8; - - - - - - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc5 == SWIG_NEWOBJ) - delete[]buf5; - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - if (alloc7 == SWIG_NEWOBJ) - delete[]buf7; - if (alloc8 == SWIG_NEWOBJ) - delete[]buf8; - - - - - - SWIG_croak_null(); - } - } - - - XS(_wrap_delete_IVRMenu) { - { - IVRMenu *arg1 = (IVRMenu *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: delete_IVRMenu(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_IVRMenu, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVRMenu" "', argument " "1" " of type '" "IVRMenu *" "'"); - } - arg1 = reinterpret_cast < IVRMenu * >(argp1); - delete arg1; - - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_IVRMenu_bindAction) { - { - IVRMenu *arg1 = (IVRMenu *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 4) || (items > 4)) { - SWIG_croak("Usage: IVRMenu_bindAction(self,action,arg,bind);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_IVRMenu, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_bindAction" "', argument " "1" " of type '" "IVRMenu *" "'"); - } - arg1 = reinterpret_cast < IVRMenu * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_bindAction" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_bindAction" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IVRMenu_bindAction" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - (arg1)->bindAction(arg2, (char const *) arg3, (char const *) arg4); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - SWIG_croak_null(); - } - } - - - XS(_wrap_IVRMenu_execute) { - { - IVRMenu *arg1 = (IVRMenu *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: IVRMenu_execute(self,session,name);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_IVRMenu, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_execute" "', argument " "1" " of type '" "IVRMenu *" "'"); - } - arg1 = reinterpret_cast < IVRMenu * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_execute" "', argument " "2" " of type '" "CoreSession *" "'"); - } - arg2 = reinterpret_cast < CoreSession * >(argp2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_execute" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->execute(arg2, (char const *) arg3); - - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_new_API) { - { - API *result = 0; - int argvi = 0; - dXSARGS; - - if ((items < 0) || (items > 0)) { - SWIG_croak("Usage: new_API();"); - } - result = (API *) new API(); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_API, SWIG_OWNER | SWIG_SHADOW); - argvi++; - XSRETURN(argvi); - fail: - SWIG_croak_null(); - } - } - - - XS(_wrap_delete_API) { - { - API *arg1 = (API *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: delete_API(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_API, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_API" "', argument " "1" " of type '" "API *" "'"); - } - arg1 = reinterpret_cast < API * >(argp1); - delete arg1; - - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_API_execute) { - { - API *arg1 = (API *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: API_execute(self,command,data);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_API, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_execute" "', argument " "1" " of type '" "API *" "'"); - } - arg1 = reinterpret_cast < API * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_execute" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "API_execute" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - result = (char *) (arg1)->execute((char const *) arg2, (char const *) arg3); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_API_executeString) { - { - API *arg1 = (API *) 0; - char *arg2 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: API_executeString(self,command);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_API, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_executeString" "', argument " "1" " of type '" "API *" "'"); - } - arg1 = reinterpret_cast < API * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_executeString" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (char *) (arg1)->executeString((char const *) arg2); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_input_callback_state_t_function_set) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *arg2 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: input_callback_state_t_function_set(self,function);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_function_set" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_function_set" "', argument " "2" " of type '" "void *" "'"); - } - if (arg1) - (arg1)->function = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_input_callback_state_t_function_get) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: input_callback_state_t_function_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_function_get" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - result = (void *) ((arg1)->function); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_input_callback_state_t_threadState_set) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *arg2 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: input_callback_state_t_threadState_set(self,threadState);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_threadState_set" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" "input_callback_state_t_threadState_set" "', argument " "2" " of type '" "void *" "'"); - } - if (arg1) - (arg1)->threadState = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_input_callback_state_t_threadState_get) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: input_callback_state_t_threadState_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_threadState_get" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - result = (void *) ((arg1)->threadState); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_input_callback_state_t_extra_set) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *arg2 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: input_callback_state_t_extra_set(self,extra);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_extra_set" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_extra_set" "', argument " "2" " of type '" "void *" "'"); - } - if (arg1) - (arg1)->extra = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_input_callback_state_t_extra_get) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: input_callback_state_t_extra_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_extra_get" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - result = (void *) ((arg1)->extra); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_input_callback_state_t_funcargs_set) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: input_callback_state_t_funcargs_set(self,funcargs);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_funcargs_set" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_funcargs_set" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - if (arg1->funcargs) - delete[]arg1->funcargs; - if (arg2) { - size_t size = strlen(reinterpret_cast < const char *>(arg2)) + 1; - arg1->funcargs = - (char *) reinterpret_cast < char *>(memcpy((new char[size]), reinterpret_cast < const char *>(arg2), sizeof(char) * (size))); - } else { - arg1->funcargs = 0; - } - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_input_callback_state_t_funcargs_get) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: input_callback_state_t_funcargs_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_funcargs_get" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - result = (char *) ((arg1)->funcargs); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_new_input_callback_state_t) { - { - input_callback_state_t *result = 0; - int argvi = 0; - dXSARGS; - - if ((items < 0) || (items > 0)) { - SWIG_croak("Usage: new_input_callback_state_t();"); - } - result = (input_callback_state_t *) new input_callback_state_t(); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input_callback_state, SWIG_OWNER | SWIG_SHADOW); - argvi++; - XSRETURN(argvi); - fail: - SWIG_croak_null(); - } - } - - - XS(_wrap_delete_input_callback_state_t) { - { - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: delete_input_callback_state_t(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_input_callback_state, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "delete_input_callback_state_t" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - delete arg1; - - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Stream__SWIG_0) { - { - Stream *result = 0; - int argvi = 0; - dXSARGS; - - if ((items < 0) || (items > 0)) { - SWIG_croak("Usage: new_Stream();"); - } - result = (Stream *) new Stream(); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_OWNER | SWIG_SHADOW); - argvi++; - XSRETURN(argvi); - fail: - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Stream__SWIG_1) { - { - switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0; - Stream *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: new_Stream(switch_stream_handle_t *);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_switch_stream_handle_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stream" "', argument " "1" " of type '" "switch_stream_handle_t *" "'"); - } - arg1 = reinterpret_cast < switch_stream_handle_t *>(argp1); - result = (Stream *) new Stream(arg1); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_OWNER | SWIG_SHADOW); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Stream) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - if (items == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_switch_stream_handle_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Stream__SWIG_0); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Stream__SWIG_1); - return; - } - } - - croak("No matching function for overloaded 'new_Stream'"); - XSRETURN(0); - } - - - XS(_wrap_delete_Stream) { - { - Stream *arg1 = (Stream *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: delete_Stream(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Stream, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stream" "', argument " "1" " of type '" "Stream *" "'"); - } - arg1 = reinterpret_cast < Stream * >(argp1); - delete arg1; - - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Stream_write) { - { - Stream *arg1 = (Stream *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Stream_write(self,data);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Stream, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_write" "', argument " "1" " of type '" "Stream *" "'"); - } - arg1 = reinterpret_cast < Stream * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stream_write" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->write((char const *) arg2); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Stream_get_data) { - { - Stream *arg1 = (Stream *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Stream_get_data(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Stream, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_get_data" "', argument " "1" " of type '" "Stream *" "'"); - } - arg1 = reinterpret_cast < Stream * >(argp1); - result = (char *) (arg1)->get_data(); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_event_set) { - { - Event *arg1 = (Event *) 0; - switch_event_t *arg2 = (switch_event_t *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Event_event_set(self,event);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_set" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_event_t, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_event_set" "', argument " "2" " of type '" "switch_event_t *" "'"); - } - arg2 = reinterpret_cast < switch_event_t *>(argp2); - if (arg1) - (arg1)->event = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_event_get) { - { - Event *arg1 = (Event *) 0; - switch_event_t *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Event_event_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_get" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (switch_event_t *) ((arg1)->event); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_event_t, 0 | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_serialized_string_set) { - { - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Event_serialized_string_set(self,serialized_string);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_set" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialized_string_set" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - if (arg1->serialized_string) - delete[]arg1->serialized_string; - if (arg2) { - size_t size = strlen(reinterpret_cast < const char *>(arg2)) + 1; - arg1->serialized_string = - (char *) reinterpret_cast < char *>(memcpy((new char[size]), reinterpret_cast < const char *>(arg2), sizeof(char) * (size))); - } else { - arg1->serialized_string = 0; - } - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_serialized_string_get) { - { - Event *arg1 = (Event *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Event_serialized_string_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_get" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (char *) ((arg1)->serialized_string); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_mine_set) { - { - Event *arg1 = (Event *) 0; - int arg2; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Event_mine_set(self,mine);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_set" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Event_mine_set" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - if (arg1) - (arg1)->mine = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_mine_get) { - { - Event *arg1 = (Event *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Event_mine_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_get" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (int) ((arg1)->mine); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Event__SWIG_0) { - { - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - Event *result = 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: new_Event(type,subclass_name);"); - } - res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1" " of type '" "char const *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Event" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (Event *) new Event((char const *) arg1, (char const *) arg2); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); - argvi++; - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Event__SWIG_1) { - { - char *arg1 = (char *) 0; - Event *result = 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: new_Event(type);"); - } - res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1" " of type '" "char const *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - result = (Event *) new Event((char const *) arg1); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); - argvi++; - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - XSRETURN(argvi); - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Event__SWIG_2) { - { - switch_event_t *arg1 = (switch_event_t *) 0; - int arg2; - Event *result = 0; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: new_Event(wrap_me,free_me);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_switch_event_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1" " of type '" "switch_event_t *" "'"); - } - arg1 = reinterpret_cast < switch_event_t *>(argp1); - ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - result = (Event *) new Event(arg1, arg2); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); - argvi++; - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Event__SWIG_3) { - { - switch_event_t *arg1 = (switch_event_t *) 0; - Event *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: new_Event(wrap_me);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_switch_event_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1" " of type '" "switch_event_t *" "'"); - } - arg1 = reinterpret_cast < switch_event_t *>(argp1); - result = (Event *) new Event(arg1); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Event) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_switch_event_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_switch_event_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 3; - if (_rank == _rankm) - goto dispatch; - } - } - check_3: - - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_4; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_4; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 4; - if (_rank == _rankm) - goto dispatch; - } - } - check_4: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Event__SWIG_3); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Event__SWIG_1); - return; - case 3: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Event__SWIG_2); - return; - case 4: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Event__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'new_Event'"); - XSRETURN(0); - } - - - XS(_wrap_delete_Event) { - { - Event *arg1 = (Event *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: delete_Event(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Event" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - delete arg1; - - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_serialize__SWIG_0) { - { - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Event_serialize(self,format);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (char *) (arg1)->serialize((char const *) arg2); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_serialize__SWIG_1) { - { - Event *arg1 = (Event *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Event_serialize(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (char *) (arg1)->serialize(); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_serialize) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Event, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Event, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_Event_serialize__SWIG_1); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_Event_serialize__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'Event_serialize'"); - XSRETURN(0); - } - - - XS(_wrap_Event_setPriority__SWIG_0) { - { - Event *arg1 = (Event *) 0; - switch_priority_t arg2; - bool result; - void *argp1 = 0; - int res1 = 0; - void *argp2; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Event_setPriority(self,priority);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - { - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_priority_t, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_setPriority" "', argument " "2" " of type '" "switch_priority_t" "'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "Event_setPriority" "', argument " "2" " of type '" "switch_priority_t" - "'"); - } else { - arg2 = *(reinterpret_cast < switch_priority_t *>(argp2)); - } - } - result = (bool) (arg1)->setPriority(arg2); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_setPriority__SWIG_1) { - { - Event *arg1 = (Event *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Event_setPriority(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (bool) (arg1)->setPriority(); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_setPriority) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Event, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Event, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_switch_priority_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_Event_setPriority__SWIG_1); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_Event_setPriority__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'Event_setPriority'"); - XSRETURN(0); - } - - - XS(_wrap_Event_getHeader) { - { - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Event_getHeader(self,header_name);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getHeader" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getHeader" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (char *) (arg1)->getHeader(arg2); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_getBody) { - { - Event *arg1 = (Event *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Event_getBody(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getBody" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (char *) (arg1)->getBody(); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_getType) { - { - Event *arg1 = (Event *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Event_getType(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getType" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (char *) (arg1)->getType(); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_addBody) { - { - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Event_addBody(self,value);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addBody" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addBody" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (bool) (arg1)->addBody((char const *) arg2); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_addHeader) { - { - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: Event_addHeader(self,header_name,value);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addHeader" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addHeader" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_addHeader" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - result = (bool) (arg1)->addHeader((char const *) arg2, (char const *) arg3); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_delHeader) { - { - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Event_delHeader(self,header_name);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_delHeader" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_delHeader" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (bool) (arg1)->delHeader((char const *) arg2); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Event_fire) { - { - Event *arg1 = (Event *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Event_fire(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_fire" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (bool) (arg1)->fire(); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_delete_CoreSession) { - { - CoreSession *arg1 = (CoreSession *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: delete_CoreSession(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoreSession" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - delete arg1; - - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_session_set) { - { - CoreSession *arg1 = (CoreSession *) 0; - switch_core_session_t *arg2 = (switch_core_session_t *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_session_set(self,session);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_session_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_core_session_t, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" "CoreSession_session_set" "', argument " "2" " of type '" "switch_core_session_t *" "'"); - } - arg2 = reinterpret_cast < switch_core_session_t *>(argp2); - if (arg1) - (arg1)->session = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_session_get) { - { - CoreSession *arg1 = (CoreSession *) 0; - switch_core_session_t *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_session_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_session_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (switch_core_session_t *) ((arg1)->session); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_core_session_t, 0 | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_channel_set) { - { - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_t *arg2 = (switch_channel_t *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_channel_set(self,channel);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_channel_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_channel_t, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_channel_set" "', argument " "2" " of type '" "switch_channel_t *" "'"); - } - arg2 = reinterpret_cast < switch_channel_t *>(argp2); - if (arg1) - (arg1)->channel = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_channel_get) { - { - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_t *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_channel_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_channel_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (switch_channel_t *) ((arg1)->channel); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_channel_t, 0 | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_flags_set) { - { - CoreSession *arg1 = (CoreSession *) 0; - unsigned int arg2; - void *argp1 = 0; - int res1 = 0; - unsigned int val2; - int ecode2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_flags_set(self,flags);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flags_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_flags_set" "', argument " "2" " of type '" "unsigned int" "'"); - } - arg2 = static_cast < unsigned int >(val2); - if (arg1) - (arg1)->flags = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_flags_get) { - { - CoreSession *arg1 = (CoreSession *) 0; - unsigned int result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_flags_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flags_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (unsigned int) ((arg1)->flags); - ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1(static_cast < unsigned int >(result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_allocated_set) { - { - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_allocated_set(self,allocated);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_allocated_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_allocated_set" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - if (arg1) - (arg1)->allocated = arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_allocated_get) { - { - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_allocated_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_allocated_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) ((arg1)->allocated); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_cb_state_set) { - { - CoreSession *arg1 = (CoreSession *) 0; - input_callback_state *arg2 = (input_callback_state *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_cb_state_set(self,cb_state);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_cb_state_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" "CoreSession_cb_state_set" "', argument " "2" " of type '" "input_callback_state *" "'"); - } - arg2 = reinterpret_cast < input_callback_state * >(argp2); - if (arg1) - (arg1)->cb_state = *arg2; - - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_cb_state_get) { - { - CoreSession *arg1 = (CoreSession *) 0; - input_callback_state *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_cb_state_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_cb_state_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (input_callback_state *) & ((arg1)->cb_state); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input_callback_state, 0 | SWIG_SHADOW); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_hook_state_set) { - { - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_state_t arg2; - void *argp1 = 0; - int res1 = 0; - void *argp2; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_hook_state_set(self,hook_state);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hook_state_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - { - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_channel_state_t, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" "CoreSession_hook_state_set" "', argument " "2" " of type '" "switch_channel_state_t" "'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "CoreSession_hook_state_set" "', argument " "2" " of type '" - "switch_channel_state_t" "'"); - } else { - arg2 = *(reinterpret_cast < switch_channel_state_t *>(argp2)); - } - } - if (arg1) - (arg1)->hook_state = arg2; - - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_hook_state_get) { - { - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_state_t result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_hook_state_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hook_state_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = ((arg1)->hook_state); - ST(argvi) = - SWIG_NewPointerObj((new switch_channel_state_t (static_cast < const switch_channel_state_t &>(result))), SWIGTYPE_p_switch_channel_state_t, - SWIG_POINTER_OWN | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_answer) { - { - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_answer(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_answer" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) (arg1)->answer(); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_preAnswer) { - { - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_preAnswer(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_preAnswer" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) (arg1)->preAnswer(); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_hangup__SWIG_0) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_hangup(self,cause);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->hangup(arg2); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_hangup__SWIG_1) { - { - CoreSession *arg1 = (CoreSession *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_hangup(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - (arg1)->hangup(); - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_hangup) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_hangup__SWIG_1); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_hangup__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'CoreSession_hangup'"); - XSRETURN(0); - } - - - XS(_wrap_CoreSession_setVariable) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_setVariable(self,var,val);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setVariable" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setVariable" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setVariable" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setVariable(arg2, arg3); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_setPrivate) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *arg3 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_setPrivate(self,var,val);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setPrivate" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setPrivate" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_ConvertPtr(ST(2), SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setPrivate" "', argument " "3" " of type '" "void *" "'"); - } - (arg1)->setPrivate(arg2, arg3); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_getPrivate) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_getPrivate(self,var);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getPrivate" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getPrivate" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (void *) (arg1)->getPrivate(arg2); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_getVariable) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_getVariable(self,var);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getVariable" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getVariable" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (char *) (arg1)->getVariable(arg2); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_process_callback_result) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - switch_status_t result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_process_callback_result(self,result);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "CoreSession_process_callback_result" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_process_callback_result" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (arg1)->process_callback_result(arg2); - ST(argvi) = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, - SWIG_POINTER_OWN | 0); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_say) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - char *arg5 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int res5; - char *buf5 = 0; - int alloc5 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 5) || (items > 5)) { - SWIG_croak("Usage: CoreSession_say(self,tosay,module_name,say_type,say_method);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_say" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_say" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_say" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_say" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CoreSession_say" "', argument " "5" " of type '" "char const *" "'"); - } - arg5 = reinterpret_cast < char *>(buf5); - (arg1)->say((char const *) arg2, (char const *) arg3, (char const *) arg4, (char const *) arg5); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc5 == SWIG_NEWOBJ) - delete[]buf5; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc5 == SWIG_NEWOBJ) - delete[]buf5; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_sayPhrase__SWIG_0) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 4) || (items > 4)) { - SWIG_croak("Usage: CoreSession_sayPhrase(self,phrase_name,phrase_data,phrase_lang);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_sayPhrase" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_sayPhrase" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - (arg1)->sayPhrase((char const *) arg2, (char const *) arg3, (char const *) arg4); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_sayPhrase__SWIG_1) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_sayPhrase(self,phrase_name,phrase_data);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_sayPhrase" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->sayPhrase((char const *) arg2, (char const *) arg3); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_sayPhrase__SWIG_2) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_sayPhrase(self,phrase_name);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->sayPhrase((char const *) arg2); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_sayPhrase) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - if (items == 4) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 3; - if (_rank == _rankm) - goto dispatch; - } - } - check_3: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_sayPhrase__SWIG_2); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_sayPhrase__SWIG_1); - return; - case 3: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_sayPhrase__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'CoreSession_sayPhrase'"); - XSRETURN(0); - } - - - XS(_wrap_CoreSession_recordFile__SWIG_0) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int arg4; - int arg5; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - int val4; - int ecode4 = 0; - int val5; - int ecode5 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 5) || (items > 5)) { - SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len,silence_threshold,silence_secs);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_recordFile" "', argument " "5" " of type '" "int" "'"); - } - arg5 = static_cast < int >(val5); - result = (int) (arg1)->recordFile(arg2, arg3, arg4, arg5); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - - - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_recordFile__SWIG_1) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int arg4; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - int val4; - int ecode4 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 4) || (items > 4)) { - SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len,silence_threshold);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - result = (int) (arg1)->recordFile(arg2, arg3, arg4); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_recordFile__SWIG_2) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - result = (int) (arg1)->recordFile(arg2, arg3); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_recordFile__SWIG_3) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_recordFile(self,file_name);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (int) (arg1)->recordFile(arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_recordFile) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - if (items == 4) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 3; - if (_rank == _rankm) - goto dispatch; - } - } - check_3: - - if (items == 5) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_4; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_4; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_4; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_4; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_4; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 4; - if (_rank == _rankm) - goto dispatch; - } - } - check_4: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_3); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_2); - return; - case 3: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_1); - return; - case 4: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'CoreSession_recordFile'"); - XSRETURN(0); - } - - - XS(_wrap_CoreSession_setCallerData) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_setCallerData(self,var,val);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setCallerData" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setCallerData" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setCallerData" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setCallerData(arg2, arg3); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_originate__SWIG_0) { - { - CoreSession *arg1 = (CoreSession *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - int arg4; - int result; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int val4; - int ecode4 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 4) || (items > 4)) { - SWIG_croak("Usage: CoreSession_originate(self,a_leg_session,dest,timeout);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2" " of type '" "CoreSession *" "'"); - } - arg2 = reinterpret_cast < CoreSession * >(argp2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_originate" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - result = (int) (arg1)->originate(arg2, arg3, arg4); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - - XSRETURN(argvi); - fail: - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_originate__SWIG_1) { - { - CoreSession *arg1 = (CoreSession *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_originate(self,a_leg_session,dest);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2" " of type '" "CoreSession *" "'"); - } - arg2 = reinterpret_cast < CoreSession * >(argp2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - result = (int) (arg1)->originate(arg2, arg3); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_originate) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 4) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_originate__SWIG_1); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_originate__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'CoreSession_originate'"); - XSRETURN(0); - } - - - XS(_wrap_CoreSession_setDTMFCallback) { - { - CoreSession *arg1 = (CoreSession *) 0; - void *arg2 = (void *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_setDTMFCallback(self,cbfunc,funcargs);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setDTMFCallback" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setDTMFCallback" "', argument " "2" " of type '" "void *" "'"); - } - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setDTMFCallback" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setDTMFCallback(arg2, arg3); - - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_speak) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_speak(self,text);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_speak" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_speak" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (int) (arg1)->speak(arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_set_tts_parms) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_set_tts_parms(self,tts_name,voice_name);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_set_tts_parms" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_set_tts_parms" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_set_tts_parms" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->set_tts_parms(arg2, arg3); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_collectDigits) { - { - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - int result; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_collectDigits(self,timeout);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_collectDigits" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_collectDigits" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - result = (int) (arg1)->collectDigits(arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_getDigits) { - { - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - char *arg3 = (char *) 0; - int arg4; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int val4; - int ecode4 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 4) || (items > 4)) { - SWIG_croak("Usage: CoreSession_getDigits(self,maxdigits,terminators,timeout);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getDigits" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_getDigits" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_getDigits" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_getDigits" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - result = (char *) (arg1)->getDigits(arg2, arg3, arg4); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - - XSRETURN(argvi); - fail: - - - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_transfer) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 4) || (items > 4)) { - SWIG_croak("Usage: CoreSession_transfer(self,extensions,dialplan,context);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_transfer" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_transfer" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_transfer" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_transfer" "', argument " "4" " of type '" "char *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - result = (int) (arg1)->transfer(arg2, arg3, arg4); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_read) { - { - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - int arg3; - char *arg4 = (char *) 0; - int arg5; - char *arg6 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int val3; - int ecode3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int val5; - int ecode5 = 0; - int res6; - char *buf6 = 0; - int alloc6 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 6) || (items > 6)) { - SWIG_croak("Usage: CoreSession_read(self,min_digits,max_digits,prompt_audio_file,timeout,valid_terminators);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_read" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_read" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_read" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_read" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_read" "', argument " "5" " of type '" "int" "'"); - } - arg5 = static_cast < int >(val5); - res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_read" "', argument " "6" " of type '" "char const *" "'"); - } - arg6 = reinterpret_cast < char *>(buf6); - result = (char *) (arg1)->read(arg2, arg3, (char const *) arg4, arg5, (char const *) arg6); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - - - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - XSRETURN(argvi); - fail: - - - - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_playAndGetDigits) { - { - CoreSession *arg1 = (CoreSession *) 0; - 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 *result = 0; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int val3; - int ecode3 = 0; - int val4; - int ecode4 = 0; - int val5; - int ecode5 = 0; - int res6; - char *buf6 = 0; - int alloc6 = 0; - int res7; - char *buf7 = 0; - int alloc7 = 0; - int res8; - char *buf8 = 0; - int alloc8 = 0; - int res9; - char *buf9 = 0; - int alloc9 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 9) || (items > 9)) { - SWIG_croak - ("Usage: CoreSession_playAndGetDigits(self,min_digits,max_digits,max_tries,timeout,terminators,audio_files,bad_input_audio_files,digits_regex);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_playAndGetDigits" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_playAndGetDigits" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_playAndGetDigits" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_playAndGetDigits" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_playAndGetDigits" "', argument " "5" " of type '" "int" "'"); - } - arg5 = static_cast < int >(val5); - res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_playAndGetDigits" "', argument " "6" " of type '" "char *" "'"); - } - arg6 = reinterpret_cast < char *>(buf6); - res7 = SWIG_AsCharPtrAndSize(ST(6), &buf7, NULL, &alloc7); - if (!SWIG_IsOK(res7)) { - SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CoreSession_playAndGetDigits" "', argument " "7" " of type '" "char *" "'"); - } - arg7 = reinterpret_cast < char *>(buf7); - res8 = SWIG_AsCharPtrAndSize(ST(7), &buf8, NULL, &alloc8); - if (!SWIG_IsOK(res8)) { - SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CoreSession_playAndGetDigits" "', argument " "8" " of type '" "char *" "'"); - } - arg8 = reinterpret_cast < char *>(buf8); - res9 = SWIG_AsCharPtrAndSize(ST(8), &buf9, NULL, &alloc9); - if (!SWIG_IsOK(res9)) { - SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CoreSession_playAndGetDigits" "', argument " "9" " of type '" "char *" "'"); - } - arg9 = reinterpret_cast < char *>(buf9); - result = (char *) (arg1)->playAndGetDigits(arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - - - - - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - if (alloc7 == SWIG_NEWOBJ) - delete[]buf7; - if (alloc8 == SWIG_NEWOBJ) - delete[]buf8; - if (alloc9 == SWIG_NEWOBJ) - delete[]buf9; - XSRETURN(argvi); - fail: - - - - - - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - if (alloc7 == SWIG_NEWOBJ) - delete[]buf7; - if (alloc8 == SWIG_NEWOBJ) - delete[]buf8; - if (alloc9 == SWIG_NEWOBJ) - delete[]buf9; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_streamFile__SWIG_0) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_streamFile(self,file,starting_sample_count);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_streamFile" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - result = (int) (arg1)->streamFile(arg2, arg3); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_streamFile__SWIG_1) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_streamFile(self,file);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (int) (arg1)->streamFile(arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_streamFile) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - { - int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); - _v = SWIG_CheckState(res); - } - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_streamFile__SWIG_1); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_streamFile__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'CoreSession_streamFile'"); - XSRETURN(0); - } - - - XS(_wrap_CoreSession_flushEvents) { - { - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_flushEvents(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flushEvents" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) (arg1)->flushEvents(); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_flushDigits) { - { - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_flushDigits(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flushDigits" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) (arg1)->flushDigits(); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_setAutoHangup) { - { - CoreSession *arg1 = (CoreSession *) 0; - bool arg2; - int result; - void *argp1 = 0; - int res1 = 0; - bool val2; - int ecode2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_setAutoHangup(self,val);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setAutoHangup" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_setAutoHangup" "', argument " "2" " of type '" "bool" "'"); - } - arg2 = static_cast < bool > (val2); - result = (int) (arg1)->setAutoHangup(arg2); - ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(result)); - argvi++; - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_setHangupHook) { - { - CoreSession *arg1 = (CoreSession *) 0; - void *arg2 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_setHangupHook(self,hangup_func);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setHangupHook" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setHangupHook" "', argument " "2" " of type '" "void *" "'"); - } - (arg1)->setHangupHook(arg2); - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_ready) { - { - CoreSession *arg1 = (CoreSession *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_ready(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_ready" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (bool) (arg1)->ready(); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_execute__SWIG_0) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_execute(self,app,data);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->execute(arg2, arg3); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_execute__SWIG_1) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_execute(self,app);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->execute(arg2); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_execute) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_execute__SWIG_1); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_CoreSession_execute__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'CoreSession_execute'"); - XSRETURN(0); - } - - - XS(_wrap_CoreSession_sendEvent) { - { - CoreSession *arg1 = (CoreSession *) 0; - Event *arg2 = (Event *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_sendEvent(self,sendME);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sendEvent" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sendEvent" "', argument " "2" " of type '" "Event *" "'"); - } - arg2 = reinterpret_cast < Event * >(argp2); - (arg1)->sendEvent(arg2); - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_setEventData) { - { - CoreSession *arg1 = (CoreSession *) 0; - Event *arg2 = (Event *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: CoreSession_setEventData(self,e);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setEventData" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setEventData" "', argument " "2" " of type '" "Event *" "'"); - } - arg2 = reinterpret_cast < Event * >(argp2); - (arg1)->setEventData(arg2); - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_getXMLCDR) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_getXMLCDR(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getXMLCDR" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (char *) (arg1)->getXMLCDR(); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_begin_allow_threads) { - { - CoreSession *arg1 = (CoreSession *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_begin_allow_threads(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "CoreSession_begin_allow_threads" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (bool) (arg1)->begin_allow_threads(); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_end_allow_threads) { - { - CoreSession *arg1 = (CoreSession *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_end_allow_threads(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "CoreSession_end_allow_threads" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (bool) (arg1)->end_allow_threads(); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_get_uuid) { - { - CoreSession *arg1 = (CoreSession *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_get_uuid(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_get_uuid" "', argument " "1" " of type '" "CoreSession const *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (char *) ((CoreSession const *) arg1)->get_uuid(); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_get_cb_args) { - { - CoreSession *arg1 = (CoreSession *) 0; - switch_input_args_t *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_get_cb_args(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "CoreSession_get_cb_args" "', argument " "1" " of type '" "CoreSession const *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - { - switch_input_args_t const &_result_ref = ((CoreSession const *) arg1)->get_cb_args(); - result = (switch_input_args_t *) &_result_ref; - } - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_input_args_t, 0 | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_check_hangup_hook) { - { - CoreSession *arg1 = (CoreSession *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: CoreSession_check_hangup_hook(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "CoreSession_check_hangup_hook" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - (arg1)->check_hangup_hook(); - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_CoreSession_run_dtmf_callback) { - { - CoreSession *arg1 = (CoreSession *) 0; - void *arg2 = (void *) 0; - switch_input_type_t arg3; - switch_status_t result; - void *argp1 = 0; - int res1 = 0; - int res2; - void *argp3; - int res3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: CoreSession_run_dtmf_callback(self,input,itype);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "CoreSession_run_dtmf_callback" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_run_dtmf_callback" "', argument " "2" " of type '" "void *" "'"); - } - { - res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_switch_input_type_t, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" "CoreSession_run_dtmf_callback" "', argument " "3" " of type '" "switch_input_type_t" "'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "CoreSession_run_dtmf_callback" "', argument " "3" " of type '" - "switch_input_type_t" "'"); - } else { - arg3 = *(reinterpret_cast < switch_input_type_t *>(argp3)); - } - } - result = (arg1)->run_dtmf_callback(arg2, arg3); - ST(argvi) = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, - SWIG_POINTER_OWN | 0); - argvi++; - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_console_log) { - { - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: console_log(level_str,msg);"); - } - res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_log" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "console_log" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - console_log(arg1, arg2); - - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_console_clean_log) { - { - char *arg1 = (char *) 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: console_clean_log(msg);"); - } - res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_clean_log" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - console_clean_log(arg1); - - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - XSRETURN(argvi); - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - SWIG_croak_null(); - } - } - - - XS(_wrap_bridge) { - { - CoreSession *arg1 = 0; - CoreSession *arg2 = 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: bridge(session_a,session_b);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bridge" "', argument " "1" " of type '" "CoreSession &" "'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "bridge" "', argument " "1" " of type '" "CoreSession &" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_CoreSession, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bridge" "', argument " "2" " of type '" "CoreSession &" "'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "bridge" "', argument " "2" " of type '" "CoreSession &" "'"); - } - arg2 = reinterpret_cast < CoreSession * >(argp2); - bridge(*arg1, *arg2); - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_hanguphook) { - { - switch_core_session_t *arg1 = (switch_core_session_t *) 0; - switch_status_t result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: hanguphook(session);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_switch_core_session_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hanguphook" "', argument " "1" " of type '" "switch_core_session_t *" "'"); - } - arg1 = reinterpret_cast < switch_core_session_t *>(argp1); - result = hanguphook(arg1); - ST(argvi) = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, - SWIG_POINTER_OWN | 0); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_dtmf_callback) { - { - 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; - void *argp1 = 0; - int res1 = 0; - int res2; - void *argp3; - int res3 = 0; - int res4; - unsigned int val5; - int ecode5 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 5) || (items > 5)) { - SWIG_croak("Usage: dtmf_callback(session,input,itype,buf,buflen);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_switch_core_session_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dtmf_callback" "', argument " "1" " of type '" "switch_core_session_t *" "'"); - } - arg1 = reinterpret_cast < switch_core_session_t *>(argp1); - res2 = SWIG_ConvertPtr(ST(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dtmf_callback" "', argument " "2" " of type '" "void *" "'"); - } - { - res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_switch_input_type_t, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dtmf_callback" "', argument " "3" " of type '" "switch_input_type_t" "'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "dtmf_callback" "', argument " "3" " of type '" "switch_input_type_t" "'"); - } else { - arg3 = *(reinterpret_cast < switch_input_type_t *>(argp3)); - } - } - res4 = SWIG_ConvertPtr(ST(3), SWIG_as_voidptrptr(&arg4), 0, 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dtmf_callback" "', argument " "4" " of type '" "void *" "'"); - } - ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dtmf_callback" "', argument " "5" " of type '" "unsigned int" "'"); - } - arg5 = static_cast < unsigned int >(val5); - result = dtmf_callback(arg1, arg2, arg3, arg4, arg5); - ST(argvi) = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, - SWIG_POINTER_OWN | 0); - argvi++; - - - - - XSRETURN(argvi); - fail: - - - - - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Session__SWIG_0) { - { - PERL::Session * result = 0; - int argvi = 0; - dXSARGS; - - if ((items < 0) || (items > 0)) { - SWIG_croak("Usage: new_Session();"); - } - result = (PERL::Session *) new PERL::Session(); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); - argvi++; - XSRETURN(argvi); - fail: - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Session__SWIG_1) { - { - char *arg1 = (char *) 0; - PERL::Session * result = 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: new_Session(uuid);"); - } - res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - result = (PERL::Session *) new PERL::Session(arg1); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); - argvi++; - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - XSRETURN(argvi); - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Session__SWIG_2) { - { - switch_core_session_t *arg1 = (switch_core_session_t *) 0; - PERL::Session * result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: new_Session(session);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_switch_core_session_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1" " of type '" "switch_core_session_t *" "'"); - } - arg1 = reinterpret_cast < switch_core_session_t *>(argp1); - result = (PERL::Session *) new PERL::Session(arg1); - ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_new_Session) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 0) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - if (items == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_switch_core_session_t, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - if (items == 1) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_3; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 3; - if (_rank == _rankm) - goto dispatch; - } - } - check_3: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Session__SWIG_0); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Session__SWIG_2); - return; - case 3: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_new_Session__SWIG_1); - return; - } - } - - croak("No matching function for overloaded 'new_Session'"); - XSRETURN(0); - } - - - XS(_wrap_delete_Session) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: delete_Session(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Session" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - delete arg1; - - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_begin_allow_threads) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Session_begin_allow_threads(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "Session_begin_allow_threads" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - result = (bool) (arg1)->begin_allow_threads(); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_end_allow_threads) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Session_end_allow_threads(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_end_allow_threads" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - result = (bool) (arg1)->end_allow_threads(); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_check_hangup_hook) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Session_check_hangup_hook(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_check_hangup_hook" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - (arg1)->check_hangup_hook(); - - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_run_dtmf_callback) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - void *arg2 = (void *) 0; - switch_input_type_t arg3; - switch_status_t result; - void *argp1 = 0; - int res1 = 0; - int res2; - void *argp3; - int res3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: Session_run_dtmf_callback(self,input,itype);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_run_dtmf_callback" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_run_dtmf_callback" "', argument " "2" " of type '" "void *" "'"); - } - { - res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_switch_input_type_t, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" "Session_run_dtmf_callback" "', argument " "3" " of type '" "switch_input_type_t" "'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "Session_run_dtmf_callback" "', argument " "3" " of type '" - "switch_input_type_t" "'"); - } else { - arg3 = *(reinterpret_cast < switch_input_type_t *>(argp3)); - } - } - result = (arg1)->run_dtmf_callback(arg2, arg3); - ST(argvi) = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, - SWIG_POINTER_OWN | 0); - argvi++; - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_setInputCallback) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: Session_setInputCallback(self,cbfunc,funcargs);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setInputCallback" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setInputCallback" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Session_setInputCallback" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setInputCallback(arg2, arg3); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_setHangupHook__SWIG_0) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 3) || (items > 3)) { - SWIG_croak("Usage: Session_setHangupHook(self,func,arg);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setHangupHook" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setHangupHook" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Session_setHangupHook" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setHangupHook(arg2, arg3); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_setHangupHook__SWIG_1) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Session_setHangupHook(self,func);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setHangupHook" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setHangupHook" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->setHangupHook(arg2); - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_setHangupHook) { - dXSARGS; - - { - unsigned long _index = 0; - SWIG_TypeRank _rank = 0; - if (items == 2) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PERL__Session, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_1; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 1; - if (_rank == _rankm) - goto dispatch; - } - } - check_1: - - if (items == 3) { - SWIG_TypeRank _ranki = 0; - SWIG_TypeRank _rankm = 0; - SWIG_TypeRank _pi = 1; - int _v = 0; - { - void *vptr = 0; - int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PERL__Session, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - { - int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); - _v = SWIG_CheckState(res); - } - if (!_v) - goto check_2; - _ranki += _v * _pi; - _rankm += _pi; - _pi *= SWIG_MAXCASTRANK; - if (!_index || (_ranki < _rank)) { - _rank = _ranki; - _index = 2; - if (_rank == _rankm) - goto dispatch; - } - } - check_2: - - dispatch: - switch (_index) { - case 1: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_Session_setHangupHook__SWIG_1); - return; - case 2: - ++PL_markstack_ptr; - SWIG_CALLXS(_wrap_Session_setHangupHook__SWIG_0); - return; - } - } - - croak("No matching function for overloaded 'Session_setHangupHook'"); - XSRETURN(0); - } - - - XS(_wrap_Session_ready) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Session_ready(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_ready" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - result = (bool) (arg1)->ready(); - ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast < bool > (result)); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_cb_function_set) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Session_cb_function_set(self,cb_function);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_function_set" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_cb_function_set" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - if (arg1->cb_function) - delete[]arg1->cb_function; - if (arg2) { - size_t size = strlen(reinterpret_cast < const char *>(arg2)) + 1; - arg1->cb_function = - (char *) reinterpret_cast < char *>(memcpy((new char[size]), reinterpret_cast < const char *>(arg2), sizeof(char) * (size))); - } else { - arg1->cb_function = 0; - } - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_cb_function_get) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Session_cb_function_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_function_get" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - result = (char *) ((arg1)->cb_function); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_cb_arg_set) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Session_cb_arg_set(self,cb_arg);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_arg_set" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_cb_arg_set" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - if (arg1->cb_arg) - delete[]arg1->cb_arg; - if (arg2) { - size_t size = strlen(reinterpret_cast < const char *>(arg2)) + 1; - arg1->cb_arg = - (char *) reinterpret_cast < char *>(memcpy((new char[size]), reinterpret_cast < const char *>(arg2), sizeof(char) * (size))); - } else { - arg1->cb_arg = 0; - } - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_cb_arg_get) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Session_cb_arg_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_arg_get" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - result = (char *) ((arg1)->cb_arg); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_hangup_func_str_set) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Session_hangup_func_str_set(self,hangup_func_str);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "Session_hangup_func_str_set" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_hangup_func_str_set" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - if (arg1->hangup_func_str) - delete[]arg1->hangup_func_str; - if (arg2) { - size_t size = strlen(reinterpret_cast < const char *>(arg2)) + 1; - arg1->hangup_func_str = - (char *) reinterpret_cast < char *>(memcpy((new char[size]), reinterpret_cast < const char *>(arg2), sizeof(char) * (size))); - } else { - arg1->hangup_func_str = 0; - } - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_hangup_func_str_get) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Session_hangup_func_str_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "Session_hangup_func_str_get" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - result = (char *) ((arg1)->hangup_func_str); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_hangup_func_arg_set) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Session_hangup_func_arg_set(self,hangup_func_arg);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "Session_hangup_func_arg_set" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_hangup_func_arg_set" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - if (arg1->hangup_func_arg) - delete[]arg1->hangup_func_arg; - if (arg2) { - size_t size = strlen(reinterpret_cast < const char *>(arg2)) + 1; - arg1->hangup_func_arg = - (char *) reinterpret_cast < char *>(memcpy((new char[size]), reinterpret_cast < const char *>(arg2), sizeof(char) * (size))); - } else { - arg1->hangup_func_arg = 0; - } - - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - XSRETURN(argvi); - fail: - - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_hangup_func_arg_get) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 1) || (items > 1)) { - SWIG_croak("Usage: Session_hangup_func_arg_get(self);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "Session_hangup_func_arg_get" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - result = (char *) ((arg1)->hangup_func_arg); - ST(argvi) = SWIG_FromCharPtr((const char *) result); - argvi++; - - XSRETURN(argvi); - fail: - - SWIG_croak_null(); - } - } - - - XS(_wrap_Session_setPERL) { - { - PERL::Session * arg1 = (PERL::Session *) 0; - PerlInterpreter *arg2 = (PerlInterpreter *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int argvi = 0; - dXSARGS; - - if ((items < 2) || (items > 2)) { - SWIG_croak("Usage: Session_setPERL(self,pi);"); - } - res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_PERL__Session, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setPERL" "', argument " "1" " of type '" "PERL::Session *" "'"); - } - arg1 = reinterpret_cast < PERL::Session * >(argp1); - res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_PerlInterpreter, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setPERL" "', argument " "2" " of type '" "PerlInterpreter *" "'"); - } - arg2 = reinterpret_cast < PerlInterpreter * >(argp2); - (arg1)->setPERL(arg2); - - - - XSRETURN(argvi); - fail: - - - SWIG_croak_null(); - } - } +XS(_wrap_consoleLog) { + { + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: consoleLog(level_str,msg);"); + } + res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleLog" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "consoleLog" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + consoleLog(arg1,arg2); + + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_consoleCleanLog) { + { + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: consoleCleanLog(msg);"); + } + res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleCleanLog" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + consoleCleanLog(arg1); + + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + XSRETURN(argvi); + fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_IVRMenu) { + { + 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 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + IVRMenu *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int res5 ; + char *buf5 = 0 ; + int alloc5 = 0 ; + int res6 ; + char *buf6 = 0 ; + int alloc6 = 0 ; + int res7 ; + char *buf7 = 0 ; + int alloc7 = 0 ; + int res8 ; + char *buf8 = 0 ; + int alloc8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 13) || (items > 13)) { + SWIG_croak("Usage: new_IVRMenu(main,name,greeting_sound,short_greeting_sound,invalid_sound,exit_sound,confirm_macro,confirm_key,confirm_attempts,inter_timeout,digit_len,timeout,max_failures);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IVRMenu" "', argument " "1"" of type '" "IVRMenu *""'"); + } + arg1 = reinterpret_cast< IVRMenu * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IVRMenu" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IVRMenu" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IVRMenu" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_IVRMenu" "', argument " "5"" of type '" "char const *""'"); + } + arg5 = reinterpret_cast< char * >(buf5); + res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IVRMenu" "', argument " "6"" of type '" "char const *""'"); + } + arg6 = reinterpret_cast< char * >(buf6); + res7 = SWIG_AsCharPtrAndSize(ST(6), &buf7, NULL, &alloc7); + if (!SWIG_IsOK(res7)) { + SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_IVRMenu" "', argument " "7"" of type '" "char const *""'"); + } + arg7 = reinterpret_cast< char * >(buf7); + res8 = SWIG_AsCharPtrAndSize(ST(7), &buf8, NULL, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IVRMenu" "', argument " "8"" of type '" "char const *""'"); + } + arg8 = reinterpret_cast< char * >(buf8); + ecode9 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_IVRMenu" "', argument " "9"" of type '" "int""'"); + } + arg9 = static_cast< int >(val9); + ecode10 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(9), &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_IVRMenu" "', argument " "10"" of type '" "int""'"); + } + arg10 = static_cast< int >(val10); + ecode11 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(10), &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_IVRMenu" "', argument " "11"" of type '" "int""'"); + } + arg11 = static_cast< int >(val11); + ecode12 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(11), &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_IVRMenu" "', argument " "12"" of type '" "int""'"); + } + arg12 = static_cast< int >(val12); + ecode13 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(12), &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_IVRMenu" "', argument " "13"" of type '" "int""'"); + } + arg13 = static_cast< int >(val13); + 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,arg9,arg10,arg11,arg12,arg13); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVRMenu, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc5 == SWIG_NEWOBJ) delete[] buf5; + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + if (alloc7 == SWIG_NEWOBJ) delete[] buf7; + if (alloc8 == SWIG_NEWOBJ) delete[] buf8; + + + + + + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc5 == SWIG_NEWOBJ) delete[] buf5; + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + if (alloc7 == SWIG_NEWOBJ) delete[] buf7; + if (alloc8 == SWIG_NEWOBJ) delete[] buf8; + + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_IVRMenu) { + { + IVRMenu *arg1 = (IVRMenu *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_IVRMenu(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVRMenu" "', argument " "1"" of type '" "IVRMenu *""'"); + } + arg1 = reinterpret_cast< IVRMenu * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_IVRMenu_bindAction) { + { + IVRMenu *arg1 = (IVRMenu *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: IVRMenu_bindAction(self,action,arg,bind);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_bindAction" "', argument " "1"" of type '" "IVRMenu *""'"); + } + arg1 = reinterpret_cast< IVRMenu * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_bindAction" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_bindAction" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IVRMenu_bindAction" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + (arg1)->bindAction(arg2,(char const *)arg3,(char const *)arg4); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + SWIG_croak_null(); + } +} + + +XS(_wrap_IVRMenu_execute) { + { + IVRMenu *arg1 = (IVRMenu *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: IVRMenu_execute(self,session,name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_execute" "', argument " "1"" of type '" "IVRMenu *""'"); + } + arg1 = reinterpret_cast< IVRMenu * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_execute" "', argument " "2"" of type '" "CoreSession *""'"); + } + arg2 = reinterpret_cast< CoreSession * >(argp2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_execute" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->execute(arg2,(char const *)arg3); + + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_API) { + { + API *result = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_API();"); + } + result = (API *)new API(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_API, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_API) { + { + API *arg1 = (API *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_API(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_API, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_API" "', argument " "1"" of type '" "API *""'"); + } + arg1 = reinterpret_cast< API * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_API_execute) { + { + API *arg1 = (API *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: API_execute(self,command,data);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_API, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_execute" "', argument " "1"" of type '" "API *""'"); + } + arg1 = reinterpret_cast< API * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_execute" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "API_execute" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_API_executeString) { + { + API *arg1 = (API *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: API_executeString(self,command);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_API, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_executeString" "', argument " "1"" of type '" "API *""'"); + } + arg1 = reinterpret_cast< API * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_executeString" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (char *)(arg1)->executeString((char const *)arg2); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_input_callback_state_t_function_set) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: input_callback_state_t_function_set(self,function);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_function_set" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_function_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->function = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_input_callback_state_t_function_get) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: input_callback_state_t_function_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_function_get" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + result = (void *) ((arg1)->function); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_input_callback_state_t_threadState_set) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: input_callback_state_t_threadState_set(self,threadState);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_threadState_set" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_threadState_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->threadState = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_input_callback_state_t_threadState_get) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: input_callback_state_t_threadState_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_threadState_get" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + result = (void *) ((arg1)->threadState); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_input_callback_state_t_extra_set) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: input_callback_state_t_extra_set(self,extra);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_extra_set" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_extra_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->extra = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_input_callback_state_t_extra_get) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: input_callback_state_t_extra_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_extra_get" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + result = (void *) ((arg1)->extra); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_input_callback_state_t_funcargs_set) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: input_callback_state_t_funcargs_set(self,funcargs);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_funcargs_set" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_funcargs_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg1->funcargs) delete[] arg1->funcargs; + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->funcargs = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); + } else { + arg1->funcargs = 0; + } + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_input_callback_state_t_funcargs_get) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: input_callback_state_t_funcargs_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_funcargs_get" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + result = (char *) ((arg1)->funcargs); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_input_callback_state_t) { + { + input_callback_state_t *result = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_input_callback_state_t();"); + } + result = (input_callback_state_t *)new input_callback_state_t(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input_callback_state, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_input_callback_state_t) { + { + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_input_callback_state_t(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_input_callback_state, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_input_callback_state_t" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Stream__SWIG_0) { + { + Stream *result = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_Stream();"); + } + result = (Stream *)new Stream(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Stream__SWIG_1) { + { + switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0 ; + Stream *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_Stream(switch_stream_handle_t *);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_switch_stream_handle_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stream" "', argument " "1"" of type '" "switch_stream_handle_t *""'"); + } + arg1 = reinterpret_cast< switch_stream_handle_t * >(argp1); + result = (Stream *)new Stream(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Stream) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_switch_stream_handle_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Stream__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Stream__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'new_Stream'"); + XSRETURN(0); +} + + +XS(_wrap_delete_Stream) { + { + Stream *arg1 = (Stream *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_Stream(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Stream, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stream" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Stream_write) { + { + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Stream_write(self,data);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Stream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_write" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stream_write" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->write((char const *)arg2); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Stream_get_data) { + { + Stream *arg1 = (Stream *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Stream_get_data(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Stream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_get_data" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + result = (char *)(arg1)->get_data(); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_event_set) { + { + Event *arg1 = (Event *) 0 ; + switch_event_t *arg2 = (switch_event_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Event_event_set(self,event);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_set" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_switch_event_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_event_set" "', argument " "2"" of type '" "switch_event_t *""'"); + } + arg2 = reinterpret_cast< switch_event_t * >(argp2); + if (arg1) (arg1)->event = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_event_get) { + { + Event *arg1 = (Event *) 0 ; + switch_event_t *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Event_event_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_get" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (switch_event_t *) ((arg1)->event); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_event_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_serialized_string_set) { + { + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Event_serialized_string_set(self,serialized_string);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_set" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialized_string_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg1->serialized_string) delete[] arg1->serialized_string; + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->serialized_string = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); + } else { + arg1->serialized_string = 0; + } + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_serialized_string_get) { + { + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Event_serialized_string_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_get" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (char *) ((arg1)->serialized_string); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_mine_set) { + { + Event *arg1 = (Event *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Event_mine_set(self,mine);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_set" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Event_mine_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->mine = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_mine_get) { + { + Event *arg1 = (Event *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Event_mine_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_get" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (int) ((arg1)->mine); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Event__SWIG_0) { + { + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + Event *result = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_Event(type,subclass_name);"); + } + res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Event" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (Event *)new Event((char const *)arg1,(char const *)arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Event__SWIG_1) { + { + char *arg1 = (char *) 0 ; + Event *result = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_Event(type);"); + } + res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + result = (Event *)new Event((char const *)arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + XSRETURN(argvi); + fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Event__SWIG_2) { + { + switch_event_t *arg1 = (switch_event_t *) 0 ; + int arg2 ; + Event *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: new_Event(wrap_me,free_me);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'"); + } + arg1 = reinterpret_cast< switch_event_t * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (Event *)new Event(arg1,arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Event__SWIG_3) { + { + switch_event_t *arg1 = (switch_event_t *) 0 ; + Event *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_Event(wrap_me);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'"); + } + arg1 = reinterpret_cast< switch_event_t * >(argp1); + result = (Event *)new Event(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Event) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_switch_event_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_switch_event_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_3); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_2); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Event__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'new_Event'"); + XSRETURN(0); +} + + +XS(_wrap_delete_Event) { + { + Event *arg1 = (Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_Event(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Event" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_serialize__SWIG_0) { + { + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Event_serialize(self,format);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (char *)(arg1)->serialize((char const *)arg2); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_serialize__SWIG_1) { + { + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Event_serialize(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (char *)(arg1)->serialize(); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_serialize) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Event, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Event, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Event_serialize__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Event_serialize__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Event_serialize'"); + XSRETURN(0); +} + + +XS(_wrap_Event_setPriority__SWIG_0) { + { + Event *arg1 = (Event *) 0 ; + switch_priority_t arg2 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Event_setPriority(self,priority);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_priority_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_setPriority" "', argument " "2"" of type '" "switch_priority_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_setPriority" "', argument " "2"" of type '" "switch_priority_t""'"); + } else { + arg2 = *(reinterpret_cast< switch_priority_t * >(argp2)); + } + } + result = (bool)(arg1)->setPriority(arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_setPriority__SWIG_1) { + { + Event *arg1 = (Event *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Event_setPriority(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (bool)(arg1)->setPriority(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_setPriority) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Event, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Event, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_switch_priority_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Event_setPriority__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Event_setPriority__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Event_setPriority'"); + XSRETURN(0); +} + + +XS(_wrap_Event_getHeader) { + { + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Event_getHeader(self,header_name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getHeader" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getHeader" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (char *)(arg1)->getHeader(arg2); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_getBody) { + { + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Event_getBody(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getBody" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (char *)(arg1)->getBody(); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_getType) { + { + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Event_getType(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getType" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (char *)(arg1)->getType(); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_addBody) { + { + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Event_addBody(self,value);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addBody" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addBody" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (bool)(arg1)->addBody((char const *)arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_addHeader) { + { + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Event_addHeader(self,header_name,value);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addHeader" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addHeader" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_addHeader" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_delHeader) { + { + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Event_delHeader(self,header_name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_delHeader" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_delHeader" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (bool)(arg1)->delHeader((char const *)arg2); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Event_fire) { + { + Event *arg1 = (Event *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Event_fire(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_fire" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (bool)(arg1)->fire(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_delete_CoreSession) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_CoreSession(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoreSession" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_session_set) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + switch_core_session_t *arg2 = (switch_core_session_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_session_set(self,session);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_session_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_switch_core_session_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_session_set" "', argument " "2"" of type '" "switch_core_session_t *""'"); + } + arg2 = reinterpret_cast< switch_core_session_t * >(argp2); + if (arg1) (arg1)->session = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_session_get) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + switch_core_session_t *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_session_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_session_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (switch_core_session_t *) ((arg1)->session); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_core_session_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_channel_set) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_t *arg2 = (switch_channel_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_channel_set(self,channel);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_channel_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_switch_channel_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_channel_set" "', argument " "2"" of type '" "switch_channel_t *""'"); + } + arg2 = reinterpret_cast< switch_channel_t * >(argp2); + if (arg1) (arg1)->channel = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_channel_get) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_t *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_channel_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_channel_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (switch_channel_t *) ((arg1)->channel); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_channel_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_flags_set) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_flags_set(self,flags);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flags_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_flags_set" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + if (arg1) (arg1)->flags = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_flags_get) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_flags_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flags_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (unsigned int) ((arg1)->flags); + ST(argvi) = SWIG_From_unsigned_SS_int SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_allocated_set) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_allocated_set(self,allocated);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_allocated_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_allocated_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->allocated = arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_allocated_get) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_allocated_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_allocated_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int) ((arg1)->allocated); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_cb_state_set) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + input_callback_state *arg2 = (input_callback_state *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_cb_state_set(self,cb_state);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_cb_state_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_cb_state_set" "', argument " "2"" of type '" "input_callback_state *""'"); + } + arg2 = reinterpret_cast< input_callback_state * >(argp2); + if (arg1) (arg1)->cb_state = *arg2; + + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_cb_state_get) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + input_callback_state *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_cb_state_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_cb_state_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (input_callback_state *)& ((arg1)->cb_state); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input_callback_state, 0 | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_hook_state_set) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_state_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_hook_state_set(self,hook_state);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hook_state_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + { + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_switch_channel_state_t, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hook_state_set" "', argument " "2"" of type '" "switch_channel_state_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CoreSession_hook_state_set" "', argument " "2"" of type '" "switch_channel_state_t""'"); + } else { + arg2 = *(reinterpret_cast< switch_channel_state_t * >(argp2)); + } + } + if (arg1) (arg1)->hook_state = arg2; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_hook_state_get) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_state_t result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_hook_state_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hook_state_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = ((arg1)->hook_state); + ST(argvi) = SWIG_NewPointerObj((new switch_channel_state_t(static_cast< const switch_channel_state_t& >(result))), SWIGTYPE_p_switch_channel_state_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_answer) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_answer(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_answer" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int)(arg1)->answer(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_preAnswer) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_preAnswer(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_preAnswer" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int)(arg1)->preAnswer(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_hangup__SWIG_0) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_hangup(self,cause);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->hangup(arg2); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_hangup__SWIG_1) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_hangup(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + (arg1)->hangup(); + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_hangup) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_hangup__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_hangup__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CoreSession_hangup'"); + XSRETURN(0); +} + + +XS(_wrap_CoreSession_setVariable) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_setVariable(self,var,val);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setVariable" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setVariable" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setVariable" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setVariable(arg2,arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_setPrivate) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_setPrivate(self,var,val);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setPrivate" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setPrivate" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setPrivate" "', argument " "3"" of type '" "void *""'"); + } + (arg1)->setPrivate(arg2,arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_getPrivate) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_getPrivate(self,var);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getPrivate" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getPrivate" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (void *)(arg1)->getPrivate(arg2); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_getVariable) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_getVariable(self,var);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getVariable" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getVariable" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (char *)(arg1)->getVariable(arg2); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_process_callback_result) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + switch_status_t result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_process_callback_result(self,result);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_process_callback_result" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_process_callback_result" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (arg1)->process_callback_result(arg2); + ST(argvi) = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_say) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + char *arg5 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int res5 ; + char *buf5 = 0 ; + int alloc5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: CoreSession_say(self,tosay,module_name,say_type,say_method);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_say" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_say" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_say" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_say" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CoreSession_say" "', argument " "5"" of type '" "char const *""'"); + } + arg5 = reinterpret_cast< char * >(buf5); + (arg1)->say((char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc5 == SWIG_NEWOBJ) delete[] buf5; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc5 == SWIG_NEWOBJ) delete[] buf5; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_sayPhrase__SWIG_0) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: CoreSession_sayPhrase(self,phrase_name,phrase_data,phrase_lang);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_sayPhrase" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_sayPhrase" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + (arg1)->sayPhrase((char const *)arg2,(char const *)arg3,(char const *)arg4); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_sayPhrase__SWIG_1) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_sayPhrase(self,phrase_name,phrase_data);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_sayPhrase" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->sayPhrase((char const *)arg2,(char const *)arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_sayPhrase__SWIG_2) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_sayPhrase(self,phrase_name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->sayPhrase((char const *)arg2); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_sayPhrase) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(3), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_sayPhrase__SWIG_2); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_sayPhrase__SWIG_1); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_sayPhrase__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CoreSession_sayPhrase'"); + XSRETURN(0); +} + + +XS(_wrap_CoreSession_recordFile__SWIG_0) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int arg5 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len,silence_threshold,silence_secs);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_recordFile" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + + + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_recordFile__SWIG_1) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len,silence_threshold);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (int)(arg1)->recordFile(arg2,arg3,arg4); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_recordFile__SWIG_2) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_recordFile(self,file_name,max_len);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (int)(arg1)->recordFile(arg2,arg3); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_recordFile__SWIG_3) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_recordFile(self,file_name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->recordFile(arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_recordFile) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + if (items == 5) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_4; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 4; + if (_rank == _rankm) goto dispatch; + } + } + check_4: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_3); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_2); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_1); return; + case 4: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_recordFile__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CoreSession_recordFile'"); + XSRETURN(0); +} + + +XS(_wrap_CoreSession_setCallerData) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_setCallerData(self,var,val);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setCallerData" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setCallerData" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setCallerData" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setCallerData(arg2,arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_originate__SWIG_0) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + int arg4 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: CoreSession_originate(self,a_leg_session,dest,timeout);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2"" of type '" "CoreSession *""'"); + } + arg2 = reinterpret_cast< CoreSession * >(argp2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_originate" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (int)(arg1)->originate(arg2,arg3,arg4); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + XSRETURN(argvi); + fail: + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_originate__SWIG_1) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_originate(self,a_leg_session,dest);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2"" of type '" "CoreSession *""'"); + } + arg2 = reinterpret_cast< CoreSession * >(argp2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (int)(arg1)->originate(arg2,arg3); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_originate) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 4) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_originate__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_originate__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CoreSession_originate'"); + XSRETURN(0); +} + + +XS(_wrap_CoreSession_setDTMFCallback) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + void *arg2 = (void *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_setDTMFCallback(self,cbfunc,funcargs);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setDTMFCallback" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setDTMFCallback" "', argument " "2"" of type '" "void *""'"); + } + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setDTMFCallback" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setDTMFCallback(arg2,arg3); + + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_speak) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_speak(self,text);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_speak" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_speak" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->speak(arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_set_tts_parms) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_set_tts_parms(self,tts_name,voice_name);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_set_tts_parms" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_set_tts_parms" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_set_tts_parms" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->set_tts_parms(arg2,arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_collectDigits) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_collectDigits(self,timeout);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_collectDigits" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_collectDigits" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (int)(arg1)->collectDigits(arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_getDigits) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + char *arg3 = (char *) 0 ; + int arg4 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: CoreSession_getDigits(self,maxdigits,terminators,timeout);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getDigits" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_getDigits" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_getDigits" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_getDigits" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (char *)(arg1)->getDigits(arg2,arg3,arg4); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + XSRETURN(argvi); + fail: + + + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_transfer) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 4) || (items > 4)) { + SWIG_croak("Usage: CoreSession_transfer(self,extensions,dialplan,context);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_transfer" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_transfer" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_transfer" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_transfer" "', argument " "4"" of type '" "char *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + result = (int)(arg1)->transfer(arg2,arg3,arg4); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_read) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + char *arg6 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int res6 ; + char *buf6 = 0 ; + int alloc6 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 6) || (items > 6)) { + SWIG_croak("Usage: CoreSession_read(self,min_digits,max_digits,prompt_audio_file,timeout,valid_terminators);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_read" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_read" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_read" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_read" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_read" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_read" "', argument " "6"" of type '" "char const *""'"); + } + arg6 = reinterpret_cast< char * >(buf6); + result = (char *)(arg1)->read(arg2,arg3,(char const *)arg4,arg5,(char const *)arg6); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + + + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + XSRETURN(argvi); + fail: + + + + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_playAndGetDigits) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + 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 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int res6 ; + char *buf6 = 0 ; + int alloc6 = 0 ; + int res7 ; + char *buf7 = 0 ; + int alloc7 = 0 ; + int res8 ; + char *buf8 = 0 ; + int alloc8 = 0 ; + int res9 ; + char *buf9 = 0 ; + int alloc9 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 9) || (items > 9)) { + SWIG_croak("Usage: CoreSession_playAndGetDigits(self,min_digits,max_digits,max_tries,timeout,terminators,audio_files,bad_input_audio_files,digits_regex);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_playAndGetDigits" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_playAndGetDigits" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_playAndGetDigits" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_playAndGetDigits" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_playAndGetDigits" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_AsCharPtrAndSize(ST(5), &buf6, NULL, &alloc6); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_playAndGetDigits" "', argument " "6"" of type '" "char *""'"); + } + arg6 = reinterpret_cast< char * >(buf6); + res7 = SWIG_AsCharPtrAndSize(ST(6), &buf7, NULL, &alloc7); + if (!SWIG_IsOK(res7)) { + SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CoreSession_playAndGetDigits" "', argument " "7"" of type '" "char *""'"); + } + arg7 = reinterpret_cast< char * >(buf7); + res8 = SWIG_AsCharPtrAndSize(ST(7), &buf8, NULL, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CoreSession_playAndGetDigits" "', argument " "8"" of type '" "char *""'"); + } + arg8 = reinterpret_cast< char * >(buf8); + res9 = SWIG_AsCharPtrAndSize(ST(8), &buf9, NULL, &alloc9); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CoreSession_playAndGetDigits" "', argument " "9"" of type '" "char *""'"); + } + arg9 = reinterpret_cast< char * >(buf9); + result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + + + + + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + if (alloc7 == SWIG_NEWOBJ) delete[] buf7; + if (alloc8 == SWIG_NEWOBJ) delete[] buf8; + if (alloc9 == SWIG_NEWOBJ) delete[] buf9; + XSRETURN(argvi); + fail: + + + + + + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + if (alloc7 == SWIG_NEWOBJ) delete[] buf7; + if (alloc8 == SWIG_NEWOBJ) delete[] buf8; + if (alloc9 == SWIG_NEWOBJ) delete[] buf9; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_streamFile__SWIG_0) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_streamFile(self,file,starting_sample_count);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_streamFile" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (int)(arg1)->streamFile(arg2,arg3); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_streamFile__SWIG_1) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_streamFile(self,file);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->streamFile(arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_streamFile) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + { + int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL); + _v = SWIG_CheckState(res); + } + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_streamFile__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_streamFile__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CoreSession_streamFile'"); + XSRETURN(0); +} + + +XS(_wrap_CoreSession_flushEvents) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_flushEvents(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flushEvents" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int)(arg1)->flushEvents(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_flushDigits) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_flushDigits(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flushDigits" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int)(arg1)->flushDigits(); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_setAutoHangup) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + bool arg2 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_setAutoHangup(self,val);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setAutoHangup" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_setAutoHangup" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (int)(arg1)->setAutoHangup(arg2); + ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_setHangupHook) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_setHangupHook(self,hangup_func);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setHangupHook" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setHangupHook" "', argument " "2"" of type '" "void *""'"); + } + (arg1)->setHangupHook(arg2); + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_ready) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_ready(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_ready" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (bool)(arg1)->ready(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_execute__SWIG_0) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_execute(self,app,data);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->execute(arg2,arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_execute__SWIG_1) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_execute(self,app);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->execute(arg2); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_execute) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_execute__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_CoreSession_execute__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'CoreSession_execute'"); + XSRETURN(0); +} + + +XS(_wrap_CoreSession_sendEvent) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + Event *arg2 = (Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_sendEvent(self,sendME);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sendEvent" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sendEvent" "', argument " "2"" of type '" "Event *""'"); + } + arg2 = reinterpret_cast< Event * >(argp2); + (arg1)->sendEvent(arg2); + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_setEventData) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + Event *arg2 = (Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: CoreSession_setEventData(self,e);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setEventData" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setEventData" "', argument " "2"" of type '" "Event *""'"); + } + arg2 = reinterpret_cast< Event * >(argp2); + (arg1)->setEventData(arg2); + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_getXMLCDR) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_getXMLCDR(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getXMLCDR" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (char *)(arg1)->getXMLCDR(); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_begin_allow_threads) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_begin_allow_threads(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_begin_allow_threads" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (bool)(arg1)->begin_allow_threads(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_end_allow_threads) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_end_allow_threads(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_end_allow_threads" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (bool)(arg1)->end_allow_threads(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_get_uuid) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_get_uuid(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_get_uuid" "', argument " "1"" of type '" "CoreSession const *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (char *)((CoreSession const *)arg1)->get_uuid(); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_get_cb_args) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + switch_input_args_t *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_get_cb_args(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_get_cb_args" "', argument " "1"" of type '" "CoreSession const *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + { + switch_input_args_t const &_result_ref = ((CoreSession const *)arg1)->get_cb_args(); + result = (switch_input_args_t *) &_result_ref; + } + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_input_args_t, 0 | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_check_hangup_hook) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: CoreSession_check_hangup_hook(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_check_hangup_hook" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + (arg1)->check_hangup_hook(); + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_CoreSession_run_dtmf_callback) { + { + CoreSession *arg1 = (CoreSession *) 0 ; + void *arg2 = (void *) 0 ; + switch_input_type_t arg3 ; + switch_status_t result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: CoreSession_run_dtmf_callback(self,input,itype);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_run_dtmf_callback" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_run_dtmf_callback" "', argument " "2"" of type '" "void *""'"); + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_switch_input_type_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_run_dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CoreSession_run_dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } else { + arg3 = *(reinterpret_cast< switch_input_type_t * >(argp3)); + } + } + result = (arg1)->run_dtmf_callback(arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_console_log) { + { + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: console_log(level_str,msg);"); + } + res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_log" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "console_log" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + console_log(arg1,arg2); + + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_console_clean_log) { + { + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: console_clean_log(msg);"); + } + res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_clean_log" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + console_clean_log(arg1); + + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + XSRETURN(argvi); + fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + SWIG_croak_null(); + } +} + + +XS(_wrap_bridge) { + { + CoreSession *arg1 = 0 ; + CoreSession *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: bridge(session_a,session_b);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_CoreSession, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bridge" "', argument " "1"" of type '" "CoreSession &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "bridge" "', argument " "1"" of type '" "CoreSession &""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_CoreSession, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bridge" "', argument " "2"" of type '" "CoreSession &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "bridge" "', argument " "2"" of type '" "CoreSession &""'"); + } + arg2 = reinterpret_cast< CoreSession * >(argp2); + bridge(*arg1,*arg2); + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_hanguphook) { + { + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + switch_status_t result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: hanguphook(session);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_switch_core_session_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hanguphook" "', argument " "1"" of type '" "switch_core_session_t *""'"); + } + arg1 = reinterpret_cast< switch_core_session_t * >(argp1); + result = hanguphook(arg1); + ST(argvi) = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_dtmf_callback) { + { + 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; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + void *argp3 ; + int res3 = 0 ; + int res4 ; + unsigned int val5 ; + int ecode5 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 5) || (items > 5)) { + SWIG_croak("Usage: dtmf_callback(session,input,itype,buf,buflen);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_switch_core_session_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dtmf_callback" "', argument " "1"" of type '" "switch_core_session_t *""'"); + } + arg1 = reinterpret_cast< switch_core_session_t * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dtmf_callback" "', argument " "2"" of type '" "void *""'"); + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_switch_input_type_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } else { + arg3 = *(reinterpret_cast< switch_input_type_t * >(argp3)); + } + } + res4 = SWIG_ConvertPtr(ST(3),SWIG_as_voidptrptr(&arg4), 0, 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dtmf_callback" "', argument " "4"" of type '" "void *""'"); + } + ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dtmf_callback" "', argument " "5"" of type '" "unsigned int""'"); + } + arg5 = static_cast< unsigned int >(val5); + result = dtmf_callback(arg1,arg2,arg3,arg4,arg5); + ST(argvi) = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + + + XSRETURN(argvi); + fail: + + + + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Session__SWIG_0) { + { + PERL::Session *result = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 0) || (items > 0)) { + SWIG_croak("Usage: new_Session();"); + } + result = (PERL::Session *)new PERL::Session(); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + XSRETURN(argvi); + fail: + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Session__SWIG_1) { + { + char *arg1 = (char *) 0 ; + PERL::Session *result = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_Session(uuid);"); + } + res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + result = (PERL::Session *)new PERL::Session(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + XSRETURN(argvi); + fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Session__SWIG_2) { + { + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + PERL::Session *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: new_Session(session);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_switch_core_session_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Session" "', argument " "1"" of type '" "switch_core_session_t *""'"); + } + arg1 = reinterpret_cast< switch_core_session_t * >(argp1); + result = (PERL::Session *)new PERL::Session(arg1); + ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PERL__Session, SWIG_OWNER | SWIG_SHADOW); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_new_Session) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 0) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_switch_core_session_t, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + if (items == 1) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + int res = SWIG_AsCharPtrAndSize(ST(0), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_3; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 3; + if (_rank == _rankm) goto dispatch; + } + } + check_3: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Session__SWIG_0); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Session__SWIG_2); return; + case 3: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Session__SWIG_1); return; + } + } + + croak("No matching function for overloaded 'new_Session'"); + XSRETURN(0); +} + + +XS(_wrap_delete_Session) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: delete_Session(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Session" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + delete arg1; + + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_begin_allow_threads) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Session_begin_allow_threads(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_begin_allow_threads" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + result = (bool)(arg1)->begin_allow_threads(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_end_allow_threads) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Session_end_allow_threads(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_end_allow_threads" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + result = (bool)(arg1)->end_allow_threads(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_check_hangup_hook) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Session_check_hangup_hook(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_check_hangup_hook" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + (arg1)->check_hangup_hook(); + + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_run_dtmf_callback) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + void *arg2 = (void *) 0 ; + switch_input_type_t arg3 ; + switch_status_t result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + void *argp3 ; + int res3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Session_run_dtmf_callback(self,input,itype);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_run_dtmf_callback" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_run_dtmf_callback" "', argument " "2"" of type '" "void *""'"); + } + { + res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_switch_input_type_t, 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Session_run_dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Session_run_dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } else { + arg3 = *(reinterpret_cast< switch_input_type_t * >(argp3)); + } + } + result = (arg1)->run_dtmf_callback(arg2,arg3); + ST(argvi) = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); argvi++ ; + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_setInputCallback) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Session_setInputCallback(self,cbfunc,funcargs);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setInputCallback" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setInputCallback" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Session_setInputCallback" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setInputCallback(arg2,arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_setHangupHook__SWIG_0) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 3) || (items > 3)) { + SWIG_croak("Usage: Session_setHangupHook(self,func,arg);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setHangupHook" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setHangupHook" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Session_setHangupHook" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setHangupHook(arg2,arg3); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_setHangupHook__SWIG_1) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Session_setHangupHook(self,func);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setHangupHook" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setHangupHook" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->setHangupHook(arg2); + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_setHangupHook) { + dXSARGS; + + { + unsigned long _index = 0; + SWIG_TypeRank _rank = 0; + if (items == 2) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PERL__Session, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_1; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 1; + if (_rank == _rankm) goto dispatch; + } + } + check_1: + + if (items == 3) { + SWIG_TypeRank _ranki = 0; + SWIG_TypeRank _rankm = 0; + SWIG_TypeRank _pi = 1; + int _v = 0; + { + void *vptr = 0; + int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_PERL__Session, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + { + int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0); + _v = SWIG_CheckState(res); + } + if (!_v) goto check_2; + _ranki += _v*_pi; + _rankm += _pi; + _pi *= SWIG_MAXCASTRANK; + if (!_index || (_ranki < _rank)) { + _rank = _ranki; _index = 2; + if (_rank == _rankm) goto dispatch; + } + } + check_2: + + dispatch: + switch(_index) { + case 1: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Session_setHangupHook__SWIG_1); return; + case 2: + ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Session_setHangupHook__SWIG_0); return; + } + } + + croak("No matching function for overloaded 'Session_setHangupHook'"); + XSRETURN(0); +} + + +XS(_wrap_Session_ready) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Session_ready(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_ready" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + result = (bool)(arg1)->ready(); + ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_cb_function_set) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Session_cb_function_set(self,cb_function);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_function_set" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_cb_function_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg1->cb_function) delete[] arg1->cb_function; + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->cb_function = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); + } else { + arg1->cb_function = 0; + } + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_cb_function_get) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Session_cb_function_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_function_get" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + result = (char *) ((arg1)->cb_function); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_cb_arg_set) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Session_cb_arg_set(self,cb_arg);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_arg_set" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_cb_arg_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg1->cb_arg) delete[] arg1->cb_arg; + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->cb_arg = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); + } else { + arg1->cb_arg = 0; + } + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_cb_arg_get) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Session_cb_arg_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_cb_arg_get" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + result = (char *) ((arg1)->cb_arg); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_hangup_func_str_set) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Session_hangup_func_str_set(self,hangup_func_str);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_str_set" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_hangup_func_str_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg1->hangup_func_str) delete[] arg1->hangup_func_str; + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->hangup_func_str = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); + } else { + arg1->hangup_func_str = 0; + } + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_hangup_func_str_get) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Session_hangup_func_str_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_str_get" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + result = (char *) ((arg1)->hangup_func_str); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_hangup_func_arg_set) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Session_hangup_func_arg_set(self,hangup_func_arg);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_arg_set" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_hangup_func_arg_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg1->hangup_func_arg) delete[] arg1->hangup_func_arg; + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->hangup_func_arg = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); + } else { + arg1->hangup_func_arg = 0; + } + + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + XSRETURN(argvi); + fail: + + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_hangup_func_arg_get) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 1) || (items > 1)) { + SWIG_croak("Usage: Session_hangup_func_arg_get(self);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_hangup_func_arg_get" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + result = (char *) ((arg1)->hangup_func_arg); + ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ; + + XSRETURN(argvi); + fail: + + SWIG_croak_null(); + } +} + + +XS(_wrap_Session_setPERL) { + { + PERL::Session *arg1 = (PERL::Session *) 0 ; + PerlInterpreter *arg2 = (PerlInterpreter *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int argvi = 0; + dXSARGS; + + if ((items < 2) || (items > 2)) { + SWIG_croak("Usage: Session_setPERL(self,pi);"); + } + res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_PERL__Session, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Session_setPERL" "', argument " "1"" of type '" "PERL::Session *""'"); + } + arg1 = reinterpret_cast< PERL::Session * >(argp1); + res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_PerlInterpreter, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Session_setPERL" "', argument " "2"" of type '" "PerlInterpreter *""'"); + } + arg2 = reinterpret_cast< PerlInterpreter * >(argp2); + (arg1)->setPERL(arg2); + + + + XSRETURN(argvi); + fail: + + + SWIG_croak_null(); + } +} /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - static void *_p_PERL__SessionTo_p_CoreSession(void *x, int *newmemory) { - return (void *) ((CoreSession *) ((PERL::Session *) x)); - } - static swig_type_info _swigt__p_API = { "_p_API", "API *", 0, 0, (void *) "freeswitch::API", 0 }; - static swig_type_info _swigt__p_CoreSession = { "_p_CoreSession", "CoreSession *", 0, 0, (void *) "freeswitch::CoreSession", 0 }; - static swig_type_info _swigt__p_Event = { "_p_Event", "Event *", 0, 0, (void *) "freeswitch::Event", 0 }; - static swig_type_info _swigt__p_IVRMenu = { "_p_IVRMenu", "IVRMenu *", 0, 0, (void *) "freeswitch::IVRMenu", 0 }; - static swig_type_info _swigt__p_PERL__Session = { "_p_PERL__Session", "PERL::Session *", 0, 0, (void *) "freeswitch::Session", 0 }; - static swig_type_info _swigt__p_PerlInterpreter = { "_p_PerlInterpreter", "PerlInterpreter *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_Stream = { "_p_Stream", "Stream *", 0, 0, (void *) "freeswitch::Stream", 0 }; - static swig_type_info _swigt__p_char = { "_p_char", "char *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_input_callback_state = - { "_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void *) "freeswitch::input_callback_state_t", 0 }; - 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 }; - 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 }; - 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 }; - 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 }; - static swig_type_info _swigt__p_void = { "_p_void", "void *", 0, 0, (void *) 0, 0 }; +static void *_p_PERL__SessionTo_p_CoreSession(void *x, int *newmemory) { + return (void *)((CoreSession *) ((PERL::Session *) x)); +} +static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)"freeswitch::API", 0}; +static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)"freeswitch::CoreSession", 0}; +static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)"freeswitch::Event", 0}; +static swig_type_info _swigt__p_IVRMenu = {"_p_IVRMenu", "IVRMenu *", 0, 0, (void*)"freeswitch::IVRMenu", 0}; +static swig_type_info _swigt__p_PERL__Session = {"_p_PERL__Session", "PERL::Session *", 0, 0, (void*)"freeswitch::Session", 0}; +static swig_type_info _swigt__p_PerlInterpreter = {"_p_PerlInterpreter", "PerlInterpreter *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)"freeswitch::Stream", 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)"freeswitch::input_callback_state_t", 0}; +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}; +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}; +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}; +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}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; - static swig_type_info *swig_type_initial[] = { - &_swigt__p_API, - &_swigt__p_CoreSession, - &_swigt__p_Event, - &_swigt__p_IVRMenu, - &_swigt__p_PERL__Session, - &_swigt__p_PerlInterpreter, - &_swigt__p_Stream, - &_swigt__p_char, - &_swigt__p_input_callback_state, - &_swigt__p_session_flag_t, - &_swigt__p_switch_channel_state_t, - &_swigt__p_switch_channel_t, - &_swigt__p_switch_core_session_t, - &_swigt__p_switch_event_t, - &_swigt__p_switch_input_args_t, - &_swigt__p_switch_input_type_t, - &_swigt__p_switch_priority_t, - &_swigt__p_switch_status_t, - &_swigt__p_switch_stream_handle_t, - &_swigt__p_void, - }; +static swig_type_info *swig_type_initial[] = { + &_swigt__p_API, + &_swigt__p_CoreSession, + &_swigt__p_Event, + &_swigt__p_IVRMenu, + &_swigt__p_PERL__Session, + &_swigt__p_PerlInterpreter, + &_swigt__p_Stream, + &_swigt__p_char, + &_swigt__p_input_callback_state, + &_swigt__p_session_flag_t, + &_swigt__p_switch_channel_state_t, + &_swigt__p_switch_channel_t, + &_swigt__p_switch_core_session_t, + &_swigt__p_switch_event_t, + &_swigt__p_switch_input_args_t, + &_swigt__p_switch_input_type_t, + &_swigt__p_switch_priority_t, + &_swigt__p_switch_status_t, + &_swigt__p_switch_stream_handle_t, + &_swigt__p_void, +}; - 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_PERL__Session, _p_PERL__SessionTo_p_CoreSession, 0, 0}, {0, 0, 0, 0} }; - static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0}, {0, 0, 0, 0} }; - static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0}, {0, 0, 0, 0} }; - static swig_cast_info _swigc__p_PERL__Session[] = { {&_swigt__p_PERL__Session, 0, 0, 0}, {0, 0, 0, 0} }; - static swig_cast_info _swigc__p_PerlInterpreter[] = { {&_swigt__p_PerlInterpreter, 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_char[] = { {&_swigt__p_char, 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_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0}, {0, 0, 0, 0} }; - 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} }; - 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} }; - 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} }; - static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0}, {0, 0, 0, 0} }; +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_PERL__Session, _p_PERL__SessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PERL__Session[] = { {&_swigt__p_PERL__Session, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PerlInterpreter[] = { {&_swigt__p_PerlInterpreter, 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_char[] = { {&_swigt__p_char, 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_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}}; +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}}; +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}}; +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}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; - static swig_cast_info *swig_cast_initial[] = { - _swigc__p_API, - _swigc__p_CoreSession, - _swigc__p_Event, - _swigc__p_IVRMenu, - _swigc__p_PERL__Session, - _swigc__p_PerlInterpreter, - _swigc__p_Stream, - _swigc__p_char, - _swigc__p_input_callback_state, - _swigc__p_session_flag_t, - _swigc__p_switch_channel_state_t, - _swigc__p_switch_channel_t, - _swigc__p_switch_core_session_t, - _swigc__p_switch_event_t, - _swigc__p_switch_input_args_t, - _swigc__p_switch_input_type_t, - _swigc__p_switch_priority_t, - _swigc__p_switch_status_t, - _swigc__p_switch_stream_handle_t, - _swigc__p_void, - }; +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_API, + _swigc__p_CoreSession, + _swigc__p_Event, + _swigc__p_IVRMenu, + _swigc__p_PERL__Session, + _swigc__p_PerlInterpreter, + _swigc__p_Stream, + _swigc__p_char, + _swigc__p_input_callback_state, + _swigc__p_session_flag_t, + _swigc__p_switch_channel_state_t, + _swigc__p_switch_channel_t, + _swigc__p_switch_core_session_t, + _swigc__p_switch_event_t, + _swigc__p_switch_input_args_t, + _swigc__p_switch_input_type_t, + _swigc__p_switch_priority_t, + _swigc__p_switch_status_t, + _swigc__p_switch_stream_handle_t, + _swigc__p_void, +}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - static swig_constant_info swig_constants[] = { - {0, 0, 0, 0, 0, 0} - }; +static swig_constant_info swig_constants[] = { +{0,0,0,0,0,0} +}; #ifdef __cplusplus } #endif static swig_variable_info swig_variables[] = { - {0, 0, 0, 0} +{0,0,0,0} }; static swig_command_info swig_commands[] = { - {"freeswitchc::consoleLog", _wrap_consoleLog}, - {"freeswitchc::consoleCleanLog", _wrap_consoleCleanLog}, - {"freeswitchc::new_IVRMenu", _wrap_new_IVRMenu}, - {"freeswitchc::delete_IVRMenu", _wrap_delete_IVRMenu}, - {"freeswitchc::IVRMenu_bindAction", _wrap_IVRMenu_bindAction}, - {"freeswitchc::IVRMenu_execute", _wrap_IVRMenu_execute}, - {"freeswitchc::new_API", _wrap_new_API}, - {"freeswitchc::delete_API", _wrap_delete_API}, - {"freeswitchc::API_execute", _wrap_API_execute}, - {"freeswitchc::API_executeString", _wrap_API_executeString}, - {"freeswitchc::input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set}, - {"freeswitchc::input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get}, - {"freeswitchc::input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set}, - {"freeswitchc::input_callback_state_t_threadState_get", _wrap_input_callback_state_t_threadState_get}, - {"freeswitchc::input_callback_state_t_extra_set", _wrap_input_callback_state_t_extra_set}, - {"freeswitchc::input_callback_state_t_extra_get", _wrap_input_callback_state_t_extra_get}, - {"freeswitchc::input_callback_state_t_funcargs_set", _wrap_input_callback_state_t_funcargs_set}, - {"freeswitchc::input_callback_state_t_funcargs_get", _wrap_input_callback_state_t_funcargs_get}, - {"freeswitchc::new_input_callback_state_t", _wrap_new_input_callback_state_t}, - {"freeswitchc::delete_input_callback_state_t", _wrap_delete_input_callback_state_t}, - {"freeswitchc::new_Stream", _wrap_new_Stream}, - {"freeswitchc::delete_Stream", _wrap_delete_Stream}, - {"freeswitchc::Stream_write", _wrap_Stream_write}, - {"freeswitchc::Stream_get_data", _wrap_Stream_get_data}, - {"freeswitchc::Event_event_set", _wrap_Event_event_set}, - {"freeswitchc::Event_event_get", _wrap_Event_event_get}, - {"freeswitchc::Event_serialized_string_set", _wrap_Event_serialized_string_set}, - {"freeswitchc::Event_serialized_string_get", _wrap_Event_serialized_string_get}, - {"freeswitchc::Event_mine_set", _wrap_Event_mine_set}, - {"freeswitchc::Event_mine_get", _wrap_Event_mine_get}, - {"freeswitchc::new_Event", _wrap_new_Event}, - {"freeswitchc::delete_Event", _wrap_delete_Event}, - {"freeswitchc::Event_serialize", _wrap_Event_serialize}, - {"freeswitchc::Event_setPriority", _wrap_Event_setPriority}, - {"freeswitchc::Event_getHeader", _wrap_Event_getHeader}, - {"freeswitchc::Event_getBody", _wrap_Event_getBody}, - {"freeswitchc::Event_getType", _wrap_Event_getType}, - {"freeswitchc::Event_addBody", _wrap_Event_addBody}, - {"freeswitchc::Event_addHeader", _wrap_Event_addHeader}, - {"freeswitchc::Event_delHeader", _wrap_Event_delHeader}, - {"freeswitchc::Event_fire", _wrap_Event_fire}, - {"freeswitchc::delete_CoreSession", _wrap_delete_CoreSession}, - {"freeswitchc::CoreSession_session_set", _wrap_CoreSession_session_set}, - {"freeswitchc::CoreSession_session_get", _wrap_CoreSession_session_get}, - {"freeswitchc::CoreSession_channel_set", _wrap_CoreSession_channel_set}, - {"freeswitchc::CoreSession_channel_get", _wrap_CoreSession_channel_get}, - {"freeswitchc::CoreSession_flags_set", _wrap_CoreSession_flags_set}, - {"freeswitchc::CoreSession_flags_get", _wrap_CoreSession_flags_get}, - {"freeswitchc::CoreSession_allocated_set", _wrap_CoreSession_allocated_set}, - {"freeswitchc::CoreSession_allocated_get", _wrap_CoreSession_allocated_get}, - {"freeswitchc::CoreSession_cb_state_set", _wrap_CoreSession_cb_state_set}, - {"freeswitchc::CoreSession_cb_state_get", _wrap_CoreSession_cb_state_get}, - {"freeswitchc::CoreSession_hook_state_set", _wrap_CoreSession_hook_state_set}, - {"freeswitchc::CoreSession_hook_state_get", _wrap_CoreSession_hook_state_get}, - {"freeswitchc::CoreSession_answer", _wrap_CoreSession_answer}, - {"freeswitchc::CoreSession_preAnswer", _wrap_CoreSession_preAnswer}, - {"freeswitchc::CoreSession_hangup", _wrap_CoreSession_hangup}, - {"freeswitchc::CoreSession_setVariable", _wrap_CoreSession_setVariable}, - {"freeswitchc::CoreSession_setPrivate", _wrap_CoreSession_setPrivate}, - {"freeswitchc::CoreSession_getPrivate", _wrap_CoreSession_getPrivate}, - {"freeswitchc::CoreSession_getVariable", _wrap_CoreSession_getVariable}, - {"freeswitchc::CoreSession_process_callback_result", _wrap_CoreSession_process_callback_result}, - {"freeswitchc::CoreSession_say", _wrap_CoreSession_say}, - {"freeswitchc::CoreSession_sayPhrase", _wrap_CoreSession_sayPhrase}, - {"freeswitchc::CoreSession_recordFile", _wrap_CoreSession_recordFile}, - {"freeswitchc::CoreSession_setCallerData", _wrap_CoreSession_setCallerData}, - {"freeswitchc::CoreSession_originate", _wrap_CoreSession_originate}, - {"freeswitchc::CoreSession_setDTMFCallback", _wrap_CoreSession_setDTMFCallback}, - {"freeswitchc::CoreSession_speak", _wrap_CoreSession_speak}, - {"freeswitchc::CoreSession_set_tts_parms", _wrap_CoreSession_set_tts_parms}, - {"freeswitchc::CoreSession_collectDigits", _wrap_CoreSession_collectDigits}, - {"freeswitchc::CoreSession_getDigits", _wrap_CoreSession_getDigits}, - {"freeswitchc::CoreSession_transfer", _wrap_CoreSession_transfer}, - {"freeswitchc::CoreSession_read", _wrap_CoreSession_read}, - {"freeswitchc::CoreSession_playAndGetDigits", _wrap_CoreSession_playAndGetDigits}, - {"freeswitchc::CoreSession_streamFile", _wrap_CoreSession_streamFile}, - {"freeswitchc::CoreSession_flushEvents", _wrap_CoreSession_flushEvents}, - {"freeswitchc::CoreSession_flushDigits", _wrap_CoreSession_flushDigits}, - {"freeswitchc::CoreSession_setAutoHangup", _wrap_CoreSession_setAutoHangup}, - {"freeswitchc::CoreSession_setHangupHook", _wrap_CoreSession_setHangupHook}, - {"freeswitchc::CoreSession_ready", _wrap_CoreSession_ready}, - {"freeswitchc::CoreSession_execute", _wrap_CoreSession_execute}, - {"freeswitchc::CoreSession_sendEvent", _wrap_CoreSession_sendEvent}, - {"freeswitchc::CoreSession_setEventData", _wrap_CoreSession_setEventData}, - {"freeswitchc::CoreSession_getXMLCDR", _wrap_CoreSession_getXMLCDR}, - {"freeswitchc::CoreSession_begin_allow_threads", _wrap_CoreSession_begin_allow_threads}, - {"freeswitchc::CoreSession_end_allow_threads", _wrap_CoreSession_end_allow_threads}, - {"freeswitchc::CoreSession_get_uuid", _wrap_CoreSession_get_uuid}, - {"freeswitchc::CoreSession_get_cb_args", _wrap_CoreSession_get_cb_args}, - {"freeswitchc::CoreSession_check_hangup_hook", _wrap_CoreSession_check_hangup_hook}, - {"freeswitchc::CoreSession_run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback}, - {"freeswitchc::console_log", _wrap_console_log}, - {"freeswitchc::console_clean_log", _wrap_console_clean_log}, - {"freeswitchc::bridge", _wrap_bridge}, - {"freeswitchc::hanguphook", _wrap_hanguphook}, - {"freeswitchc::dtmf_callback", _wrap_dtmf_callback}, - {"freeswitchc::new_Session", _wrap_new_Session}, - {"freeswitchc::delete_Session", _wrap_delete_Session}, - {"freeswitchc::Session_begin_allow_threads", _wrap_Session_begin_allow_threads}, - {"freeswitchc::Session_end_allow_threads", _wrap_Session_end_allow_threads}, - {"freeswitchc::Session_check_hangup_hook", _wrap_Session_check_hangup_hook}, - {"freeswitchc::Session_run_dtmf_callback", _wrap_Session_run_dtmf_callback}, - {"freeswitchc::Session_setInputCallback", _wrap_Session_setInputCallback}, - {"freeswitchc::Session_setHangupHook", _wrap_Session_setHangupHook}, - {"freeswitchc::Session_ready", _wrap_Session_ready}, - {"freeswitchc::Session_cb_function_set", _wrap_Session_cb_function_set}, - {"freeswitchc::Session_cb_function_get", _wrap_Session_cb_function_get}, - {"freeswitchc::Session_cb_arg_set", _wrap_Session_cb_arg_set}, - {"freeswitchc::Session_cb_arg_get", _wrap_Session_cb_arg_get}, - {"freeswitchc::Session_hangup_func_str_set", _wrap_Session_hangup_func_str_set}, - {"freeswitchc::Session_hangup_func_str_get", _wrap_Session_hangup_func_str_get}, - {"freeswitchc::Session_hangup_func_arg_set", _wrap_Session_hangup_func_arg_set}, - {"freeswitchc::Session_hangup_func_arg_get", _wrap_Session_hangup_func_arg_get}, - {"freeswitchc::Session_setPERL", _wrap_Session_setPERL}, - {0, 0} +{"freeswitchc::consoleLog", _wrap_consoleLog}, +{"freeswitchc::consoleCleanLog", _wrap_consoleCleanLog}, +{"freeswitchc::new_IVRMenu", _wrap_new_IVRMenu}, +{"freeswitchc::delete_IVRMenu", _wrap_delete_IVRMenu}, +{"freeswitchc::IVRMenu_bindAction", _wrap_IVRMenu_bindAction}, +{"freeswitchc::IVRMenu_execute", _wrap_IVRMenu_execute}, +{"freeswitchc::new_API", _wrap_new_API}, +{"freeswitchc::delete_API", _wrap_delete_API}, +{"freeswitchc::API_execute", _wrap_API_execute}, +{"freeswitchc::API_executeString", _wrap_API_executeString}, +{"freeswitchc::input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set}, +{"freeswitchc::input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get}, +{"freeswitchc::input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set}, +{"freeswitchc::input_callback_state_t_threadState_get", _wrap_input_callback_state_t_threadState_get}, +{"freeswitchc::input_callback_state_t_extra_set", _wrap_input_callback_state_t_extra_set}, +{"freeswitchc::input_callback_state_t_extra_get", _wrap_input_callback_state_t_extra_get}, +{"freeswitchc::input_callback_state_t_funcargs_set", _wrap_input_callback_state_t_funcargs_set}, +{"freeswitchc::input_callback_state_t_funcargs_get", _wrap_input_callback_state_t_funcargs_get}, +{"freeswitchc::new_input_callback_state_t", _wrap_new_input_callback_state_t}, +{"freeswitchc::delete_input_callback_state_t", _wrap_delete_input_callback_state_t}, +{"freeswitchc::new_Stream", _wrap_new_Stream}, +{"freeswitchc::delete_Stream", _wrap_delete_Stream}, +{"freeswitchc::Stream_write", _wrap_Stream_write}, +{"freeswitchc::Stream_get_data", _wrap_Stream_get_data}, +{"freeswitchc::Event_event_set", _wrap_Event_event_set}, +{"freeswitchc::Event_event_get", _wrap_Event_event_get}, +{"freeswitchc::Event_serialized_string_set", _wrap_Event_serialized_string_set}, +{"freeswitchc::Event_serialized_string_get", _wrap_Event_serialized_string_get}, +{"freeswitchc::Event_mine_set", _wrap_Event_mine_set}, +{"freeswitchc::Event_mine_get", _wrap_Event_mine_get}, +{"freeswitchc::new_Event", _wrap_new_Event}, +{"freeswitchc::delete_Event", _wrap_delete_Event}, +{"freeswitchc::Event_serialize", _wrap_Event_serialize}, +{"freeswitchc::Event_setPriority", _wrap_Event_setPriority}, +{"freeswitchc::Event_getHeader", _wrap_Event_getHeader}, +{"freeswitchc::Event_getBody", _wrap_Event_getBody}, +{"freeswitchc::Event_getType", _wrap_Event_getType}, +{"freeswitchc::Event_addBody", _wrap_Event_addBody}, +{"freeswitchc::Event_addHeader", _wrap_Event_addHeader}, +{"freeswitchc::Event_delHeader", _wrap_Event_delHeader}, +{"freeswitchc::Event_fire", _wrap_Event_fire}, +{"freeswitchc::delete_CoreSession", _wrap_delete_CoreSession}, +{"freeswitchc::CoreSession_session_set", _wrap_CoreSession_session_set}, +{"freeswitchc::CoreSession_session_get", _wrap_CoreSession_session_get}, +{"freeswitchc::CoreSession_channel_set", _wrap_CoreSession_channel_set}, +{"freeswitchc::CoreSession_channel_get", _wrap_CoreSession_channel_get}, +{"freeswitchc::CoreSession_flags_set", _wrap_CoreSession_flags_set}, +{"freeswitchc::CoreSession_flags_get", _wrap_CoreSession_flags_get}, +{"freeswitchc::CoreSession_allocated_set", _wrap_CoreSession_allocated_set}, +{"freeswitchc::CoreSession_allocated_get", _wrap_CoreSession_allocated_get}, +{"freeswitchc::CoreSession_cb_state_set", _wrap_CoreSession_cb_state_set}, +{"freeswitchc::CoreSession_cb_state_get", _wrap_CoreSession_cb_state_get}, +{"freeswitchc::CoreSession_hook_state_set", _wrap_CoreSession_hook_state_set}, +{"freeswitchc::CoreSession_hook_state_get", _wrap_CoreSession_hook_state_get}, +{"freeswitchc::CoreSession_answer", _wrap_CoreSession_answer}, +{"freeswitchc::CoreSession_preAnswer", _wrap_CoreSession_preAnswer}, +{"freeswitchc::CoreSession_hangup", _wrap_CoreSession_hangup}, +{"freeswitchc::CoreSession_setVariable", _wrap_CoreSession_setVariable}, +{"freeswitchc::CoreSession_setPrivate", _wrap_CoreSession_setPrivate}, +{"freeswitchc::CoreSession_getPrivate", _wrap_CoreSession_getPrivate}, +{"freeswitchc::CoreSession_getVariable", _wrap_CoreSession_getVariable}, +{"freeswitchc::CoreSession_process_callback_result", _wrap_CoreSession_process_callback_result}, +{"freeswitchc::CoreSession_say", _wrap_CoreSession_say}, +{"freeswitchc::CoreSession_sayPhrase", _wrap_CoreSession_sayPhrase}, +{"freeswitchc::CoreSession_recordFile", _wrap_CoreSession_recordFile}, +{"freeswitchc::CoreSession_setCallerData", _wrap_CoreSession_setCallerData}, +{"freeswitchc::CoreSession_originate", _wrap_CoreSession_originate}, +{"freeswitchc::CoreSession_setDTMFCallback", _wrap_CoreSession_setDTMFCallback}, +{"freeswitchc::CoreSession_speak", _wrap_CoreSession_speak}, +{"freeswitchc::CoreSession_set_tts_parms", _wrap_CoreSession_set_tts_parms}, +{"freeswitchc::CoreSession_collectDigits", _wrap_CoreSession_collectDigits}, +{"freeswitchc::CoreSession_getDigits", _wrap_CoreSession_getDigits}, +{"freeswitchc::CoreSession_transfer", _wrap_CoreSession_transfer}, +{"freeswitchc::CoreSession_read", _wrap_CoreSession_read}, +{"freeswitchc::CoreSession_playAndGetDigits", _wrap_CoreSession_playAndGetDigits}, +{"freeswitchc::CoreSession_streamFile", _wrap_CoreSession_streamFile}, +{"freeswitchc::CoreSession_flushEvents", _wrap_CoreSession_flushEvents}, +{"freeswitchc::CoreSession_flushDigits", _wrap_CoreSession_flushDigits}, +{"freeswitchc::CoreSession_setAutoHangup", _wrap_CoreSession_setAutoHangup}, +{"freeswitchc::CoreSession_setHangupHook", _wrap_CoreSession_setHangupHook}, +{"freeswitchc::CoreSession_ready", _wrap_CoreSession_ready}, +{"freeswitchc::CoreSession_execute", _wrap_CoreSession_execute}, +{"freeswitchc::CoreSession_sendEvent", _wrap_CoreSession_sendEvent}, +{"freeswitchc::CoreSession_setEventData", _wrap_CoreSession_setEventData}, +{"freeswitchc::CoreSession_getXMLCDR", _wrap_CoreSession_getXMLCDR}, +{"freeswitchc::CoreSession_begin_allow_threads", _wrap_CoreSession_begin_allow_threads}, +{"freeswitchc::CoreSession_end_allow_threads", _wrap_CoreSession_end_allow_threads}, +{"freeswitchc::CoreSession_get_uuid", _wrap_CoreSession_get_uuid}, +{"freeswitchc::CoreSession_get_cb_args", _wrap_CoreSession_get_cb_args}, +{"freeswitchc::CoreSession_check_hangup_hook", _wrap_CoreSession_check_hangup_hook}, +{"freeswitchc::CoreSession_run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback}, +{"freeswitchc::console_log", _wrap_console_log}, +{"freeswitchc::console_clean_log", _wrap_console_clean_log}, +{"freeswitchc::bridge", _wrap_bridge}, +{"freeswitchc::hanguphook", _wrap_hanguphook}, +{"freeswitchc::dtmf_callback", _wrap_dtmf_callback}, +{"freeswitchc::new_Session", _wrap_new_Session}, +{"freeswitchc::delete_Session", _wrap_delete_Session}, +{"freeswitchc::Session_begin_allow_threads", _wrap_Session_begin_allow_threads}, +{"freeswitchc::Session_end_allow_threads", _wrap_Session_end_allow_threads}, +{"freeswitchc::Session_check_hangup_hook", _wrap_Session_check_hangup_hook}, +{"freeswitchc::Session_run_dtmf_callback", _wrap_Session_run_dtmf_callback}, +{"freeswitchc::Session_setInputCallback", _wrap_Session_setInputCallback}, +{"freeswitchc::Session_setHangupHook", _wrap_Session_setHangupHook}, +{"freeswitchc::Session_ready", _wrap_Session_ready}, +{"freeswitchc::Session_cb_function_set", _wrap_Session_cb_function_set}, +{"freeswitchc::Session_cb_function_get", _wrap_Session_cb_function_get}, +{"freeswitchc::Session_cb_arg_set", _wrap_Session_cb_arg_set}, +{"freeswitchc::Session_cb_arg_get", _wrap_Session_cb_arg_get}, +{"freeswitchc::Session_hangup_func_str_set", _wrap_Session_hangup_func_str_set}, +{"freeswitchc::Session_hangup_func_str_get", _wrap_Session_hangup_func_str_get}, +{"freeswitchc::Session_hangup_func_arg_set", _wrap_Session_hangup_func_arg_set}, +{"freeswitchc::Session_hangup_func_arg_get", _wrap_Session_hangup_func_arg_get}, +{"freeswitchc::Session_setPERL", _wrap_Session_setPERL}, +{0,0} }; - /* ----------------------------------------------------------------------------- * Type initialization: * This problem is tough by the requirement that no dynamic @@ -8878,162 +8369,160 @@ static swig_command_info swig_commands[] = { #ifdef __cplusplus extern "C" { #if 0 -} /* c-mode */ +} /* c-mode */ #endif #endif + #if 0 #define SWIGRUNTIME_DEBUG #endif -SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) -{ - size_t i; - swig_module_info *module_head, *iter; - int found, init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next == 0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found = 0; - iter = module_head; - do { - if (iter == &swig_module) { - found = 1; - break; - } - iter = iter->next; - } while (iter != module_head); - - /* if the is found in the list, then all is done and we may leave */ - if (found) - return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpeters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) - return; - - /* Now work on filling in swig_module.types */ +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found, init; + + clientdata = clientdata; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); + printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif - - /* 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 */ + + /* 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 */ #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); + printf("SWIG_InitializeModule: found type %s\n", type->name); #endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG - if (ret) - printf("SWIG_InitializeModule: found cast %s\n", ret->name); + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { + } + if (ret) { + if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG - if (ocast) - printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif - if (!ocast) - ret = 0; - } - } - - if (!ret) { + if (!ocast) ret = 0; + } + } + + if (!ret) { #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif - 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; - + 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; + #ifdef SWIGRUNTIME_DEBUG - 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"); + 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"); #endif } @@ -9042,34 +8531,33 @@ SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ -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; - } - } - } +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; + } + } + } } #ifdef __cplusplus #if 0 { - /* c-mode */ + /* c-mode */ #endif } #endif @@ -9079,86 +8567,80 @@ SWIGRUNTIME void SWIG_PropagateClientData(void) #ifdef __cplusplus extern "C" #endif - XS(SWIG_init) -{ - dXSARGS; - int i; - SWIG_InitializeModule(0); - - /* Install commands */ - for (i = 0; swig_commands[i].name; i++) { - newXS((char *) swig_commands[i].name, swig_commands[i].wrapper, (char *) __FILE__); - } - - /* Install variables */ - for (i = 0; swig_variables[i].name; i++) { - SV *sv; - sv = get_sv((char *) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI); - if (swig_variables[i].type) { - SWIG_MakePtr(sv, (void *) 1, *swig_variables[i].type, 0); - } else { - sv_setiv(sv, (IV) 0); - } - swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); - } - - /* Install constant */ - for (i = 0; swig_constants[i].type; i++) { - SV *sv; - sv = get_sv((char *) swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI); - switch (swig_constants[i].type) { - case SWIG_INT: - sv_setiv(sv, (IV) swig_constants[i].lvalue); - break; - case SWIG_FLOAT: - sv_setnv(sv, (double) swig_constants[i].dvalue); - break; - case SWIG_STRING: - sv_setpv(sv, (char *) swig_constants[i].pvalue); - break; - case SWIG_POINTER: - SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype), 0); - break; - case SWIG_BINARY: - SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype)); - break; - default: - break; - } - SvREADONLY_on(sv); - } - - SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void *) "freeswitch::IVRMenu"); - SWIG_TypeClientData(SWIGTYPE_p_API, (void *) "freeswitch::API"); - SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void *) "freeswitch::input_callback_state_t"); - /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@ */ - do { - SV *sv = get_sv((char *) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI); - sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(S_HUP))); - SvREADONLY_on(sv); - } while (0) /*@SWIG@ */ - ; - /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@ */ - do { - SV *sv = get_sv((char *) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI); - sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(S_FREE))); - SvREADONLY_on(sv); - } while (0) /*@SWIG@ */ - ; - /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@ */ - do { - SV *sv = get_sv((char *) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI); - sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast < int >(S_RDLOCK))); - SvREADONLY_on(sv); - } while (0) /*@SWIG@ */ - ; - SWIG_TypeClientData(SWIGTYPE_p_Stream, (void *) "freeswitch::Stream"); - SWIG_TypeClientData(SWIGTYPE_p_Event, (void *) "freeswitch::Event"); - SWIG_TypeClientData(SWIGTYPE_p_CoreSession, (void *) "freeswitch::CoreSession"); - SWIG_TypeClientData(SWIGTYPE_p_PERL__Session, (void *) "freeswitch::Session"); - ST(0) = &PL_sv_yes; - XSRETURN(1); +XS(SWIG_init) { + dXSARGS; + int i; + + SWIG_InitializeModule(0); + + /* Install commands */ + for (i = 0; swig_commands[i].name; i++) { + newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__); + } + + /* Install variables */ + for (i = 0; swig_variables[i].name; i++) { + SV *sv; + sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI); + if (swig_variables[i].type) { + SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0); + } else { + sv_setiv(sv,(IV) 0); + } + swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); + } + + /* Install constant */ + for (i = 0; swig_constants[i].type; i++) { + SV *sv; + sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI); + switch(swig_constants[i].type) { + case SWIG_INT: + sv_setiv(sv, (IV) swig_constants[i].lvalue); + break; + case SWIG_FLOAT: + sv_setnv(sv, (double) swig_constants[i].dvalue); + break; + case SWIG_STRING: + sv_setpv(sv, (char *) swig_constants[i].pvalue); + break; + case SWIG_POINTER: + SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0); + break; + case SWIG_BINARY: + SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype)); + break; + default: + break; + } + SvREADONLY_on(sv); + } + + SWIG_TypeClientData(SWIGTYPE_p_IVRMenu, (void*) "freeswitch::IVRMenu"); + SWIG_TypeClientData(SWIGTYPE_p_API, (void*) "freeswitch::API"); + SWIG_TypeClientData(SWIGTYPE_p_input_callback_state, (void*) "freeswitch::input_callback_state_t"); + /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "S_HUP", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_HUP))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "S_FREE", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_FREE))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + /*@SWIG:/usr/local/share/swig/1.3.35/perl5/perltypemaps.swg,64,%set_constant@*/ do { + SV *sv = get_sv((char*) SWIG_prefix "S_RDLOCK", TRUE | 0x2 | GV_ADDMULTI); + sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(S_RDLOCK))); + SvREADONLY_on(sv); + } while(0) /*@SWIG@*/; + SWIG_TypeClientData(SWIGTYPE_p_Stream, (void*) "freeswitch::Stream"); + SWIG_TypeClientData(SWIGTYPE_p_Event, (void*) "freeswitch::Event"); + SWIG_TypeClientData(SWIGTYPE_p_CoreSession, (void*) "freeswitch::CoreSession"); + SWIG_TypeClientData(SWIGTYPE_p_PERL__Session, (void*) "freeswitch::Session"); + ST(0) = &PL_sv_yes; + XSRETURN(1); } #include "mod_perl_extra.c" diff --git a/src/mod/languages/mod_python/mod_python_wrap.cpp b/src/mod/languages/mod_python/mod_python_wrap.cpp index 411999a882..cec904cd83 100644 --- a/src/mod/languages/mod_python/mod_python_wrap.cpp +++ b/src/mod/languages/mod_python/mod_python_wrap.cpp @@ -12,35 +12,22 @@ #define SWIG_PYTHON_DIRECTOR_NO_VTABLE #ifdef __cplusplus -template < typename T > class SwigValueWrapper { - 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); +template class SwigValueWrapper { + T *tt; +public: + SwigValueWrapper() : tt(0) { } + SwigValueWrapper(const SwigValueWrapper& 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& rhs); }; -template < typename T > T SwigValueInit() -{ - return T(); +template T SwigValueInit() { + return T(); } #endif @@ -75,14 +62,14 @@ template < typename T > T SwigValueInit() #ifndef SWIGUNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif # elif defined(__ICC) -# define SWIGUNUSED __attribute__ ((__unused__)) +# define SWIGUNUSED __attribute__ ((__unused__)) # else -# define SWIGUNUSED +# define SWIGUNUSED # endif #endif @@ -90,7 +77,7 @@ template < typename T > T SwigValueInit() # ifdef __cplusplus # define SWIGUNUSEDPARM(p) # else -# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# define SWIGUNUSEDPARM(p) p SWIGUNUSED # endif #endif @@ -133,7 +120,7 @@ template < typename T > T SwigValueInit() # define SWIGSTDCALL __stdcall # else # define SWIGSTDCALL -# endif +# endif #endif /* Deal with Microsoft's attempt at deprecating C standard runtime functions */ @@ -281,10 +268,10 @@ template < typename T > T SwigValueInit() */ -#define SWIG_OK (0) +#define SWIG_OK (0) #define SWIG_ERROR (-1) #define SWIG_IsOK(r) (r >= 0) -#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) /* The CastRankLimit says how many bits are used for the cast rank */ #define SWIG_CASTRANKLIMIT (1 << 8) @@ -311,18 +298,16 @@ template < typename T > T SwigValueInit() # ifndef SWIG_TypeRank # define SWIG_TypeRank unsigned long # endif -# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ # define SWIG_MAXCASTRANK (2) # endif # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) -SWIGINTERNINLINE int SWIG_AddCast(int r) -{ - return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; } -SWIGINTERNINLINE int SWIG_CheckState(int r) -{ - return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ # define SWIG_AddCast @@ -338,38 +323,38 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) extern "C" { #endif - typedef void *(*swig_converter_func) (void *, int *); - typedef struct swig_type_info *(*swig_dycast_func) (void **); +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); /* Structure to store information on one type */ - 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; +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; /* Structure to store a type and conversion function used for casting */ - 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; +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; /* 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.*/ - 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; +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; /* Compare two type names skipping the space characters, therefore @@ -378,56 +363,54 @@ extern "C" { Return 0 when the two name types are equivalent, as in strncmp, but skipping ' '. */ - 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; - } return (int) ((l1 - f1) - (l2 - f2)); - } +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; + } + return (int)((l1 - f1) - (l2 - f2)); +} /* Check type equivalence in a name list like ||... Return 0 if not equal, 1 if equal */ - 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; - } +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; +} /* Check type equivalence in a name list like ||... Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ - 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; - } +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; +} /* think of this as a c++ template<> or a scheme macro */ @@ -455,89 +438,94 @@ extern "C" { /* Check the typename */ - SWIGRUNTIME swig_cast_info *SWIG_TypeCheck(const char *c, swig_type_info * ty) { - SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); - } +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); +} /* Same as previous function, except strcmp is replaced with a pointer comparison */ - SWIGRUNTIME swig_cast_info *SWIG_TypeCheckStruct(swig_type_info * from, swig_type_info * into) { - SWIG_TypeCheck_Template(iter->type == from, into); - } +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { + SWIG_TypeCheck_Template(iter->type == from, into); +} /* Cast a pointer up an inheritance hierarchy */ - SWIGRUNTIMEINLINE void *SWIG_TypeCast(swig_cast_info * ty, void *ptr, int *newmemory) { - return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter) (ptr, newmemory); - } +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} /* Dynamic pointer casting. Down an inheritance hierarchy */ - 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; - } +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; +} /* Return the name associated with this type */ - SWIGRUNTIMEINLINE const char *SWIG_TypeName(const swig_type_info * ty) { - return ty->name; - } +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} /* Return the pretty name associated with this type, that is an unmangled type name in a form presentable to the user. */ - 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; - } +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; +} /* Set the clientdata field for a type */ - 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; - } - +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; +} + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) @@ -546,38 +534,41 @@ extern "C" { Note: if start == end at the beginning of the function, we go all the way around the circular list. */ - 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 */ - } - } while (l <= r); - } - iter = iter->next; - } while (iter != end); - return 0; +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 */ } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} /* Search for a swig_type_info structure for either a mangled name or a human readable name. @@ -588,142 +579,148 @@ extern "C" { Note: if start == end at the beginning of the function, we go all the way around the circular list. */ - 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; - } +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; +} /* Pack binary data into a string */ - 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; - } +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; +} /* Unpack binary data from a string */ - 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; - } +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; +} /* Pack 'void *' into a string buffer. */ - 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; - } +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; +} - 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 *)); - } +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 *)); +} - 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; - } +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; +} - 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); - } +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); +} #ifdef __cplusplus } #endif /* Errors in SWIG */ -#define SWIG_UnknownError -1 -#define SWIG_IOError -2 -#define SWIG_RuntimeError -3 -#define SWIG_IndexError -4 -#define SWIG_TypeError -5 -#define SWIG_DivisionByZero -6 -#define SWIG_OverflowError -7 -#define SWIG_SyntaxError -8 -#define SWIG_ValueError -9 +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 #define SWIG_SystemError -10 #define SWIG_AttributeError -11 -#define SWIG_MemoryError -12 +#define SWIG_MemoryError -12 #define SWIG_NullReferenceError -13 @@ -745,15 +742,15 @@ extern "C" { # define SWIG_PYBUFFER_SIZE 1024 #endif -static PyObject *PyString_FromFormat(const char *fmt, ...) -{ - va_list ap; - char buf[SWIG_PYBUFFER_SIZE * 2]; - int res; - va_start(ap, fmt); - res = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - return (res < 0 || res >= (int) sizeof(buf)) ? 0 : PyString_FromString(buf); +static PyObject * +PyString_FromFormat(const char *fmt, ...) { + va_list ap; + char buf[SWIG_PYBUFFER_SIZE * 2]; + int res; + va_start(ap, fmt); + res = vsnprintf(buf, sizeof(buf), fmt, ap); + va_end(ap); + return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf); } #endif @@ -802,9 +799,9 @@ static PyObject *PyString_FromFormat(const char *fmt, ...) static PyObject *PyBool_FromLong(long ok) { - PyObject *result = ok ? Py_True : Py_False; - Py_INCREF(result); - return result; + PyObject *result = ok ? Py_True : Py_False; + Py_INCREF(result); + return result; } #endif @@ -821,68 +818,68 @@ typedef int Py_ssize_t; * error manipulation * ----------------------------------------------------------------------------- */ -SWIGRUNTIME PyObject *SWIG_Python_ErrorType(int code) -{ - PyObject *type = 0; - switch (code) { - case SWIG_MemoryError: - type = PyExc_MemoryError; - break; - case SWIG_IOError: - type = PyExc_IOError; - break; - case SWIG_RuntimeError: - type = PyExc_RuntimeError; - break; - case SWIG_IndexError: - type = PyExc_IndexError; - break; - case SWIG_TypeError: - type = PyExc_TypeError; - break; - case SWIG_DivisionByZero: - type = PyExc_ZeroDivisionError; - break; - case SWIG_OverflowError: - type = PyExc_OverflowError; - break; - case SWIG_SyntaxError: - type = PyExc_SyntaxError; - break; - case SWIG_ValueError: - type = PyExc_ValueError; - break; - case SWIG_SystemError: - type = PyExc_SystemError; - break; - case SWIG_AttributeError: - type = PyExc_AttributeError; - break; - default: - type = PyExc_RuntimeError; - } - return type; +SWIGRUNTIME PyObject* +SWIG_Python_ErrorType(int code) { + PyObject* type = 0; + switch(code) { + case SWIG_MemoryError: + type = PyExc_MemoryError; + break; + case SWIG_IOError: + type = PyExc_IOError; + break; + case SWIG_RuntimeError: + type = PyExc_RuntimeError; + break; + case SWIG_IndexError: + type = PyExc_IndexError; + break; + case SWIG_TypeError: + type = PyExc_TypeError; + break; + case SWIG_DivisionByZero: + type = PyExc_ZeroDivisionError; + break; + case SWIG_OverflowError: + type = PyExc_OverflowError; + break; + case SWIG_SyntaxError: + type = PyExc_SyntaxError; + break; + case SWIG_ValueError: + type = PyExc_ValueError; + break; + case SWIG_SystemError: + type = PyExc_SystemError; + break; + case SWIG_AttributeError: + type = PyExc_AttributeError; + break; + default: + type = PyExc_RuntimeError; + } + return type; } -SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg) +SWIGRUNTIME void +SWIG_Python_AddErrorMsg(const char* mesg) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; - if (PyErr_Occurred()) - PyErr_Fetch(&type, &value, &traceback); - if (value) { - PyObject *old_str = PyObject_Str(value); - PyErr_Clear(); - Py_XINCREF(type); - PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); - Py_DECREF(old_str); - Py_DECREF(value); - } else { - PyErr_SetString(PyExc_RuntimeError, mesg); - } + if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + PyErr_Clear(); + Py_XINCREF(type); + PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + Py_DECREF(old_str); + Py_DECREF(value); + } else { + PyErr_SetString(PyExc_RuntimeError, mesg); + } } @@ -892,48 +889,33 @@ SWIGRUNTIME void SWIG_Python_AddErrorMsg(const char *mesg) # undef SWIG_PYTHON_THREADS # endif #endif -#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ +#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */ # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL) -# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ +# if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */ # define SWIG_PYTHON_USE_GIL # endif # endif -# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ +# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */ # ifndef SWIG_PYTHON_INITIALIZE_THREADS -# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() +# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads() # endif -# ifdef __cplusplus /* C++ code */ -class SWIG_Python_Thread_Block { - bool status; - PyGILState_STATE state; - public: - void end() { - if (status) { - PyGILState_Release(state); - status = false; - } - } SWIG_Python_Thread_Block():status(true), state(PyGILState_Ensure()) { - } - ~SWIG_Python_Thread_Block() { - end(); - } -}; -class SWIG_Python_Thread_Allow { - bool status; - PyThreadState *save; - public: - void end() { - if (status) { - PyEval_RestoreThread(save); - status = false; - } - } SWIG_Python_Thread_Allow():status(true), save(PyEval_SaveThread()) { - } - ~SWIG_Python_Thread_Allow() { - end(); - } -}; - +# ifdef __cplusplus /* C++ code */ + class SWIG_Python_Thread_Block { + bool status; + PyGILState_STATE state; + public: + void end() { if (status) { PyGILState_Release(state); status = false;} } + SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {} + ~SWIG_Python_Thread_Block() { end(); } + }; + class SWIG_Python_Thread_Allow { + bool status; + PyThreadState *save; + public: + void end() { if (status) { PyEval_RestoreThread(save); status = false; }} + SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {} + ~SWIG_Python_Thread_Allow() { end(); } + }; # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end() # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow @@ -944,7 +926,7 @@ class SWIG_Python_Thread_Allow { # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread() # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow) # endif -# else /* Old thread way, not implemented, user must provide it */ +# else /* Old thread way, not implemented, user must provide it */ # if !defined(SWIG_PYTHON_INITIALIZE_THREADS) # define SWIG_PYTHON_INITIALIZE_THREADS # endif @@ -976,26 +958,31 @@ class SWIG_Python_Thread_Allow { #ifdef __cplusplus extern "C" { #if 0 -} /* cc-mode */ +} /* cc-mode */ #endif #endif + /* ----------------------------------------------------------------------------- * Constant declarations - * ----------------------------------------------------------------------------- *//* Constant Types */ + * ----------------------------------------------------------------------------- */ + +/* Constant Types */ #define SWIG_PY_POINTER 4 #define SWIG_PY_BINARY 5 -/* Constant information structure */ typedef struct swig_const_info { - int type; - char *name; - long lvalue; - double dvalue; - void *pvalue; - swig_type_info **ptype; + +/* Constant information structure */ +typedef struct swig_const_info { + int type; + char *name; + long lvalue; + double dvalue; + void *pvalue; + swig_type_info **ptype; } swig_const_info; #ifdef __cplusplus #if 0 -{ /* cc-mode */ +{ /* cc-mode */ #endif } #endif @@ -1020,7 +1007,7 @@ extern "C" { #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags) #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own) #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags) -#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) +#define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty) #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src) #define swig_owntype int @@ -1047,121 +1034,125 @@ extern "C" { #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer) #define SWIG_NewClientData(obj) PySwigClientData_New(obj) -#define SWIG_SetErrorObj SWIG_Python_SetErrorObj -#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg -#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) -#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) -#define SWIG_fail goto fail +#define SWIG_SetErrorObj SWIG_Python_SetErrorObj +#define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg +#define SWIG_ErrorType(code) SWIG_Python_ErrorType(code) +#define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) +#define SWIG_fail goto fail /* Runtime API implementation */ /* Error manipulation */ -SWIGINTERN void SWIG_Python_SetErrorObj(PyObject * errtype, PyObject * obj) -{ - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetObject(errtype, obj); - Py_DECREF(obj); - SWIG_PYTHON_THREAD_END_BLOCK; +SWIGINTERN void +SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetObject(errtype, obj); + Py_DECREF(obj); + SWIG_PYTHON_THREAD_END_BLOCK; } -SWIGINTERN void SWIG_Python_SetErrorMsg(PyObject * errtype, const char *msg) -{ - SWIG_PYTHON_THREAD_BEGIN_BLOCK; - PyErr_SetString(errtype, (char *) msg); - SWIG_PYTHON_THREAD_END_BLOCK; +SWIGINTERN void +SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) { + SWIG_PYTHON_THREAD_BEGIN_BLOCK; + PyErr_SetString(errtype, (char *) msg); + SWIG_PYTHON_THREAD_END_BLOCK; } #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj) /* Set a constant value */ -SWIGINTERN void SWIG_Python_SetConstant(PyObject * d, const char *name, PyObject * obj) -{ - PyDict_SetItemString(d, (char *) name, obj); - Py_DECREF(obj); +SWIGINTERN void +SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) { + PyDict_SetItemString(d, (char*) name, obj); + Py_DECREF(obj); } /* Append a value to the result obj */ -SWIGINTERN PyObject *SWIG_Python_AppendOutput(PyObject * result, PyObject * obj) -{ +SWIGINTERN PyObject* +SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) { #if !defined(SWIG_PYTHON_OUTPUT_TUPLE) - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyList_Check(result)) { - PyObject *o2 = result; - result = PyList_New(1); - PyList_SetItem(result, 0, o2); - } - PyList_Append(result, obj); - Py_DECREF(obj); - } - return result; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyList_Check(result)) { + PyObject *o2 = result; + result = PyList_New(1); + PyList_SetItem(result, 0, o2); + } + PyList_Append(result,obj); + Py_DECREF(obj); + } + return result; #else - PyObject *o2; - PyObject *o3; - if (!result) { - result = obj; - } else if (result == Py_None) { - Py_DECREF(result); - result = obj; - } else { - if (!PyTuple_Check(result)) { - o2 = result; - result = PyTuple_New(1); - PyTuple_SET_ITEM(result, 0, o2); - } - o3 = PyTuple_New(1); - PyTuple_SET_ITEM(o3, 0, obj); - o2 = result; - result = PySequence_Concat(o2, o3); - Py_DECREF(o2); - Py_DECREF(o3); - } - return result; + PyObject* o2; + PyObject* o3; + if (!result) { + result = obj; + } else if (result == Py_None) { + Py_DECREF(result); + result = obj; + } else { + if (!PyTuple_Check(result)) { + o2 = result; + result = PyTuple_New(1); + PyTuple_SET_ITEM(result, 0, o2); + } + o3 = PyTuple_New(1); + PyTuple_SET_ITEM(o3, 0, obj); + o2 = result; + result = PySequence_Concat(o2, o3); + Py_DECREF(o2); + Py_DECREF(o3); + } + return result; #endif } /* Unpack the argument tuple */ -SWIGINTERN int SWIG_Python_UnpackTuple(PyObject * args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject ** objs) +SWIGINTERN int +SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs) { - if (!args) { - if (!min && !max) { - return 1; - } else { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", name, (min == max ? "" : "at least "), (int) min); - return 0; - } - } - if (!PyTuple_Check(args)) { - PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); - return 0; - } else { - register Py_ssize_t l = PyTuple_GET_SIZE(args); - if (l < min) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at least "), (int) min, (int) l); - return 0; - } else if (l > max) { - PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", name, (min == max ? "" : "at most "), (int) max, (int) l); - return 0; - } else { - register int i; - for (i = 0; i < l; ++i) { - objs[i] = PyTuple_GET_ITEM(args, i); - } - for (; l < max; ++l) { - objs[l] = 0; - } - return i + 1; - } - } + if (!args) { + if (!min && !max) { + return 1; + } else { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", + name, (min == max ? "" : "at least "), (int)min); + return 0; + } + } + if (!PyTuple_Check(args)) { + PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple"); + return 0; + } else { + register Py_ssize_t l = PyTuple_GET_SIZE(args); + if (l < min) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at least "), (int)min, (int)l); + return 0; + } else if (l > max) { + PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", + name, (min == max ? "" : "at most "), (int)max, (int)l); + return 0; + } else { + register int i; + for (i = 0; i < l; ++i) { + objs[i] = PyTuple_GET_ITEM(args, i); + } + for (; l < max; ++l) { + objs[l] = 0; + } + return i + 1; + } + } } /* A functor is a function object with one single object argument */ @@ -1194,9 +1185,10 @@ SWIGINTERN int SWIG_Python_UnpackTuple(PyObject * args, const char *name, Py_ssi #ifdef __cplusplus extern "C" { #if 0 -} /* cc-mode */ +} /* cc-mode */ #endif #endif + /* How to access Py_None */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) # ifndef SWIG_PYTHON_NO_BUILD_NONE @@ -1205,494 +1197,520 @@ extern "C" { # endif # endif #endif + #ifdef SWIG_PYTHON_BUILD_NONE # ifdef Py_None # undef Py_None # define Py_None SWIG_Py_None() # endif -SWIGRUNTIMEINLINE PyObject *_SWIG_Py_None(void) +SWIGRUNTIMEINLINE PyObject * +_SWIG_Py_None(void) { - PyObject *none = Py_BuildValue((char *) ""); - Py_DECREF(none); - return none; + PyObject *none = Py_BuildValue((char*)""); + Py_DECREF(none); + return none; } -SWIGRUNTIME PyObject *SWIG_Py_None(void) +SWIGRUNTIME PyObject * +SWIG_Py_None(void) { - static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); - return none; + static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None(); + return none; } #endif /* The python void return value */ -SWIGRUNTIMEINLINE PyObject *SWIG_Py_Void(void) +SWIGRUNTIMEINLINE PyObject * +SWIG_Py_Void(void) { - PyObject *none = Py_None; - Py_INCREF(none); - return none; + PyObject *none = Py_None; + Py_INCREF(none); + return none; } /* PySwigClientData */ typedef struct { - PyObject *klass; - PyObject *newraw; - PyObject *newargs; - PyObject *destroy; - int delargs; - int implicitconv; + PyObject *klass; + PyObject *newraw; + PyObject *newargs; + PyObject *destroy; + int delargs; + int implicitconv; } PySwigClientData; -SWIGRUNTIMEINLINE int SWIG_Python_CheckImplicit(swig_type_info * ty) +SWIGRUNTIMEINLINE int +SWIG_Python_CheckImplicit(swig_type_info *ty) { - PySwigClientData *data = (PySwigClientData *) ty->clientdata; - return data ? data->implicitconv : 0; + PySwigClientData *data = (PySwigClientData *)ty->clientdata; + return data ? data->implicitconv : 0; } -SWIGRUNTIMEINLINE PyObject *SWIG_Python_ExceptionType(swig_type_info * desc) -{ - PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0; - PyObject *klass = data ? data->klass : 0; - return (klass ? klass : PyExc_RuntimeError); +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_ExceptionType(swig_type_info *desc) { + PySwigClientData *data = desc ? (PySwigClientData *) desc->clientdata : 0; + PyObject *klass = data ? data->klass : 0; + return (klass ? klass : PyExc_RuntimeError); } -SWIGRUNTIME PySwigClientData *PySwigClientData_New(PyObject * obj) +SWIGRUNTIME PySwigClientData * +PySwigClientData_New(PyObject* obj) { - if (!obj) { - return 0; - } else { - PySwigClientData *data = (PySwigClientData *) malloc(sizeof(PySwigClientData)); - /* the klass element */ - data->klass = obj; - Py_INCREF(data->klass); - /* the newraw method and newargs arguments used to create a new raw instance */ - if (PyClass_Check(obj)) { - data->newraw = 0; - data->newargs = obj; - Py_INCREF(obj); - } else { + if (!obj) { + return 0; + } else { + PySwigClientData *data = (PySwigClientData *)malloc(sizeof(PySwigClientData)); + /* the klass element */ + data->klass = obj; + Py_INCREF(data->klass); + /* the newraw method and newargs arguments used to create a new raw instance */ + if (PyClass_Check(obj)) { + data->newraw = 0; + data->newargs = obj; + Py_INCREF(obj); + } else { #if (PY_VERSION_HEX < 0x02020000) - data->newraw = 0; + data->newraw = 0; #else - data->newraw = PyObject_GetAttrString(data->klass, (char *) "__new__"); + data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__"); #endif - if (data->newraw) { - Py_INCREF(data->newraw); - data->newargs = PyTuple_New(1); - PyTuple_SetItem(data->newargs, 0, obj); - } else { - data->newargs = obj; - } - Py_INCREF(data->newargs); - } - /* the destroy method, aka as the C++ delete method */ - data->destroy = PyObject_GetAttrString(data->klass, (char *) "__swig_destroy__"); - if (PyErr_Occurred()) { - PyErr_Clear(); - data->destroy = 0; - } - if (data->destroy) { - int flags; - Py_INCREF(data->destroy); - flags = PyCFunction_GET_FLAGS(data->destroy); + if (data->newraw) { + Py_INCREF(data->newraw); + data->newargs = PyTuple_New(1); + PyTuple_SetItem(data->newargs, 0, obj); + } else { + data->newargs = obj; + } + Py_INCREF(data->newargs); + } + /* the destroy method, aka as the C++ delete method */ + data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__"); + if (PyErr_Occurred()) { + PyErr_Clear(); + data->destroy = 0; + } + if (data->destroy) { + int flags; + Py_INCREF(data->destroy); + flags = PyCFunction_GET_FLAGS(data->destroy); #ifdef METH_O - data->delargs = !(flags & (METH_O)); + data->delargs = !(flags & (METH_O)); #else - data->delargs = 0; + data->delargs = 0; #endif - } else { - data->delargs = 0; - } - data->implicitconv = 0; - return data; - } + } else { + data->delargs = 0; + } + data->implicitconv = 0; + return data; + } } -SWIGRUNTIME void PySwigClientData_Del(PySwigClientData * data) +SWIGRUNTIME void +PySwigClientData_Del(PySwigClientData* data) { - Py_XDECREF(data->newraw); - Py_XDECREF(data->newargs); - Py_XDECREF(data->destroy); + Py_XDECREF(data->newraw); + Py_XDECREF(data->newargs); + Py_XDECREF(data->destroy); } /* =============== PySwigObject =====================*/ typedef struct { - PyObject_HEAD void *ptr; - swig_type_info *ty; - int own; - PyObject *next; + PyObject_HEAD + void *ptr; + swig_type_info *ty; + int own; + PyObject *next; } PySwigObject; -SWIGRUNTIME PyObject *PySwigObject_long(PySwigObject * v) +SWIGRUNTIME PyObject * +PySwigObject_long(PySwigObject *v) { - return PyLong_FromVoidPtr(v->ptr); + return PyLong_FromVoidPtr(v->ptr); } -SWIGRUNTIME PyObject *PySwigObject_format(const char *fmt, PySwigObject * v) +SWIGRUNTIME PyObject * +PySwigObject_format(const char* fmt, PySwigObject *v) { - PyObject *res = NULL; - PyObject *args = PyTuple_New(1); - if (args) { - if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) { - PyObject *ofmt = PyString_FromString(fmt); - if (ofmt) { - res = PyString_Format(ofmt, args); - Py_DECREF(ofmt); - } - Py_DECREF(args); - } - } - return res; + PyObject *res = NULL; + PyObject *args = PyTuple_New(1); + if (args) { + if (PyTuple_SetItem(args, 0, PySwigObject_long(v)) == 0) { + PyObject *ofmt = PyString_FromString(fmt); + if (ofmt) { + res = PyString_Format(ofmt,args); + Py_DECREF(ofmt); + } + Py_DECREF(args); + } + } + return res; } -SWIGRUNTIME PyObject *PySwigObject_oct(PySwigObject * v) +SWIGRUNTIME PyObject * +PySwigObject_oct(PySwigObject *v) { - return PySwigObject_format("%o", v); + return PySwigObject_format("%o",v); } -SWIGRUNTIME PyObject *PySwigObject_hex(PySwigObject * v) +SWIGRUNTIME PyObject * +PySwigObject_hex(PySwigObject *v) { - return PySwigObject_format("%x", v); + return PySwigObject_format("%x",v); } SWIGRUNTIME PyObject * #ifdef METH_NOARGS -PySwigObject_repr(PySwigObject * v) +PySwigObject_repr(PySwigObject *v) #else -PySwigObject_repr(PySwigObject * v, PyObject * args) +PySwigObject_repr(PySwigObject *v, PyObject *args) #endif { - const char *name = SWIG_TypePrettyName(v->ty); - PyObject *hex = PySwigObject_hex(v); - PyObject *repr = PyString_FromFormat("", name, PyString_AsString(hex)); - Py_DECREF(hex); - if (v->next) { + const char *name = SWIG_TypePrettyName(v->ty); + PyObject *hex = PySwigObject_hex(v); + PyObject *repr = PyString_FromFormat("", name, PyString_AsString(hex)); + Py_DECREF(hex); + if (v->next) { #ifdef METH_NOARGS - PyObject *nrep = PySwigObject_repr((PySwigObject *) v->next); + PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next); #else - PyObject *nrep = PySwigObject_repr((PySwigObject *) v->next, args); + PyObject *nrep = PySwigObject_repr((PySwigObject *)v->next, args); #endif - PyString_ConcatAndDel(&repr, nrep); - } - return repr; + PyString_ConcatAndDel(&repr,nrep); + } + return repr; } -SWIGRUNTIME int PySwigObject_print(PySwigObject * v, FILE * fp, int SWIGUNUSEDPARM(flags)) +SWIGRUNTIME int +PySwigObject_print(PySwigObject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { #ifdef METH_NOARGS - PyObject *repr = PySwigObject_repr(v); + PyObject *repr = PySwigObject_repr(v); #else - PyObject *repr = PySwigObject_repr(v, NULL); + PyObject *repr = PySwigObject_repr(v, NULL); #endif - if (repr) { - fputs(PyString_AsString(repr), fp); - Py_DECREF(repr); - return 0; - } else { - return 1; - } + if (repr) { + fputs(PyString_AsString(repr), fp); + Py_DECREF(repr); + return 0; + } else { + return 1; + } } -SWIGRUNTIME PyObject *PySwigObject_str(PySwigObject * v) +SWIGRUNTIME PyObject * +PySwigObject_str(PySwigObject *v) { - char result[SWIG_BUFFER_SIZE]; - return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? PyString_FromString(result) : 0; + char result[SWIG_BUFFER_SIZE]; + return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ? + PyString_FromString(result) : 0; } -SWIGRUNTIME int PySwigObject_compare(PySwigObject * v, PySwigObject * w) +SWIGRUNTIME int +PySwigObject_compare(PySwigObject *v, PySwigObject *w) { - void *i = v->ptr; - void *j = w->ptr; - return (i < j) ? -1 : ((i > j) ? 1 : 0); + void *i = v->ptr; + void *j = w->ptr; + return (i < j) ? -1 : ((i > j) ? 1 : 0); } -SWIGRUNTIME PyTypeObject *_PySwigObject_type(void); +SWIGRUNTIME PyTypeObject* _PySwigObject_type(void); -SWIGRUNTIME PyTypeObject *PySwigObject_type(void) -{ - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); - return type; +SWIGRUNTIME PyTypeObject* +PySwigObject_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type(); + return type; } -SWIGRUNTIMEINLINE int PySwigObject_Check(PyObject * op) -{ - return ((op)->ob_type == PySwigObject_type()) - || (strcmp((op)->ob_type->tp_name, "PySwigObject") == 0); +SWIGRUNTIMEINLINE int +PySwigObject_Check(PyObject *op) { + return ((op)->ob_type == PySwigObject_type()) + || (strcmp((op)->ob_type->tp_name,"PySwigObject") == 0); } -SWIGRUNTIME PyObject *PySwigObject_New(void *ptr, swig_type_info * ty, int own); +SWIGRUNTIME PyObject * +PySwigObject_New(void *ptr, swig_type_info *ty, int own); -SWIGRUNTIME void PySwigObject_dealloc(PyObject * v) +SWIGRUNTIME void +PySwigObject_dealloc(PyObject *v) { - PySwigObject *sobj = (PySwigObject *) v; - PyObject *next = sobj->next; - if (sobj->own == SWIG_POINTER_OWN) { - swig_type_info *ty = sobj->ty; - PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; - PyObject *destroy = data ? data->destroy : 0; - if (destroy) { - /* destroy is always a VARARGS method */ - PyObject *res; - if (data->delargs) { - /* we need to create a temporal object to carry the destroy operation */ - PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0); - res = SWIG_Python_CallFunctor(destroy, tmp); - Py_DECREF(tmp); - } else { - PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); - PyObject *mself = PyCFunction_GET_SELF(destroy); - res = ((*meth) (mself, v)); - } - Py_XDECREF(res); - } + PySwigObject *sobj = (PySwigObject *) v; + PyObject *next = sobj->next; + if (sobj->own == SWIG_POINTER_OWN) { + swig_type_info *ty = sobj->ty; + PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + PyObject *destroy = data ? data->destroy : 0; + if (destroy) { + /* destroy is always a VARARGS method */ + PyObject *res; + if (data->delargs) { + /* we need to create a temporal object to carry the destroy operation */ + PyObject *tmp = PySwigObject_New(sobj->ptr, ty, 0); + res = SWIG_Python_CallFunctor(destroy, tmp); + Py_DECREF(tmp); + } else { + PyCFunction meth = PyCFunction_GET_FUNCTION(destroy); + PyObject *mself = PyCFunction_GET_SELF(destroy); + res = ((*meth)(mself, v)); + } + Py_XDECREF(res); + } #if !defined(SWIG_PYTHON_SILENT_MEMLEAK) - else { - const char *name = SWIG_TypePrettyName(ty); - printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); - } + else { + const char *name = SWIG_TypePrettyName(ty); + printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown")); + } #endif - } - Py_XDECREF(next); - PyObject_DEL(v); + } + Py_XDECREF(next); + PyObject_DEL(v); } -SWIGRUNTIME PyObject *PySwigObject_append(PyObject * v, PyObject * next) +SWIGRUNTIME PyObject* +PySwigObject_append(PyObject* v, PyObject* next) { - PySwigObject *sobj = (PySwigObject *) v; + PySwigObject *sobj = (PySwigObject *) v; #ifndef METH_O - PyObject *tmp = 0; - if (!PyArg_ParseTuple(next, (char *) "O:append", &tmp)) - return NULL; - next = tmp; + PyObject *tmp = 0; + if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL; + next = tmp; #endif - if (!PySwigObject_Check(next)) { - return NULL; - } - sobj->next = next; - Py_INCREF(next); - return SWIG_Py_Void(); + if (!PySwigObject_Check(next)) { + return NULL; + } + sobj->next = next; + Py_INCREF(next); + return SWIG_Py_Void(); } -SWIGRUNTIME PyObject * +SWIGRUNTIME PyObject* #ifdef METH_NOARGS -PySwigObject_next(PyObject * v) +PySwigObject_next(PyObject* v) #else -PySwigObject_next(PyObject * v, PyObject * SWIGUNUSEDPARM(args)) +PySwigObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { - PySwigObject *sobj = (PySwigObject *) v; - if (sobj->next) { - Py_INCREF(sobj->next); - return sobj->next; - } else { - return SWIG_Py_Void(); - } + PySwigObject *sobj = (PySwigObject *) v; + if (sobj->next) { + Py_INCREF(sobj->next); + return sobj->next; + } else { + return SWIG_Py_Void(); + } } -SWIGINTERN PyObject * +SWIGINTERN PyObject* #ifdef METH_NOARGS -PySwigObject_disown(PyObject * v) +PySwigObject_disown(PyObject *v) #else -PySwigObject_disown(PyObject * v, PyObject * SWIGUNUSEDPARM(args)) +PySwigObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { - PySwigObject *sobj = (PySwigObject *) v; - sobj->own = 0; - return SWIG_Py_Void(); + PySwigObject *sobj = (PySwigObject *)v; + sobj->own = 0; + return SWIG_Py_Void(); } -SWIGINTERN PyObject * +SWIGINTERN PyObject* #ifdef METH_NOARGS -PySwigObject_acquire(PyObject * v) +PySwigObject_acquire(PyObject *v) #else -PySwigObject_acquire(PyObject * v, PyObject * SWIGUNUSEDPARM(args)) +PySwigObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args)) #endif { - PySwigObject *sobj = (PySwigObject *) v; - sobj->own = SWIG_POINTER_OWN; - return SWIG_Py_Void(); + PySwigObject *sobj = (PySwigObject *)v; + sobj->own = SWIG_POINTER_OWN; + return SWIG_Py_Void(); } -SWIGINTERN PyObject *PySwigObject_own(PyObject * v, PyObject * args) +SWIGINTERN PyObject* +PySwigObject_own(PyObject *v, PyObject *args) { - PyObject *val = 0; + PyObject *val = 0; #if (PY_VERSION_HEX < 0x02020000) - if (!PyArg_ParseTuple(args, (char *) "|O:own", &val)) + if (!PyArg_ParseTuple(args,(char *)"|O:own",&val)) #else - if (!PyArg_UnpackTuple(args, (char *) "own", 0, 1, &val)) + if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) #endif - { - return NULL; - } else { - PySwigObject *sobj = (PySwigObject *) v; - PyObject *obj = PyBool_FromLong(sobj->own); - if (val) { + { + return NULL; + } + else + { + PySwigObject *sobj = (PySwigObject *)v; + PyObject *obj = PyBool_FromLong(sobj->own); + if (val) { #ifdef METH_NOARGS - if (PyObject_IsTrue(val)) { - PySwigObject_acquire(v); - } else { - PySwigObject_disown(v); - } -#else - if (PyObject_IsTrue(val)) { - PySwigObject_acquire(v, args); - } else { - PySwigObject_disown(v, args); - } -#endif - } - return obj; + if (PyObject_IsTrue(val)) { + PySwigObject_acquire(v); + } else { + PySwigObject_disown(v); } +#else + if (PyObject_IsTrue(val)) { + PySwigObject_acquire(v,args); + } else { + PySwigObject_disown(v,args); + } +#endif + } + return obj; + } } #ifdef METH_O -static PyMethodDef swigobject_methods[] = { - {(char *) "disown", (PyCFunction) PySwigObject_disown, METH_NOARGS, (char *) "releases ownership of the pointer"}, - {(char *) "acquire", (PyCFunction) PySwigObject_acquire, METH_NOARGS, (char *) "aquires ownership of the pointer"}, - {(char *) "own", (PyCFunction) PySwigObject_own, METH_VARARGS, (char *) "returns/sets ownership of the pointer"}, - {(char *) "append", (PyCFunction) PySwigObject_append, METH_O, (char *) "appends another 'this' object"}, - {(char *) "next", (PyCFunction) PySwigObject_next, METH_NOARGS, (char *) "returns the next 'this' object"}, - {(char *) "__repr__", (PyCFunction) PySwigObject_repr, METH_NOARGS, (char *) "returns object representation"}, - {0, 0, 0, 0} +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)PySwigObject_append, METH_O, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)PySwigObject_next, METH_NOARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_NOARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} }; #else -static PyMethodDef swigobject_methods[] = { - {(char *) "disown", (PyCFunction) PySwigObject_disown, METH_VARARGS, (char *) "releases ownership of the pointer"}, - {(char *) "acquire", (PyCFunction) PySwigObject_acquire, METH_VARARGS, (char *) "aquires ownership of the pointer"}, - {(char *) "own", (PyCFunction) PySwigObject_own, METH_VARARGS, (char *) "returns/sets ownership of the pointer"}, - {(char *) "append", (PyCFunction) PySwigObject_append, METH_VARARGS, (char *) "appends another 'this' object"}, - {(char *) "next", (PyCFunction) PySwigObject_next, METH_VARARGS, (char *) "returns the next 'this' object"}, - {(char *) "__repr__", (PyCFunction) PySwigObject_repr, METH_VARARGS, (char *) "returns object representation"}, - {0, 0, 0, 0} +static PyMethodDef +swigobject_methods[] = { + {(char *)"disown", (PyCFunction)PySwigObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"}, + {(char *)"acquire", (PyCFunction)PySwigObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"}, + {(char *)"own", (PyCFunction)PySwigObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"}, + {(char *)"append", (PyCFunction)PySwigObject_append, METH_VARARGS, (char *)"appends another 'this' object"}, + {(char *)"next", (PyCFunction)PySwigObject_next, METH_VARARGS, (char *)"returns the next 'this' object"}, + {(char *)"__repr__",(PyCFunction)PySwigObject_repr, METH_VARARGS, (char *)"returns object representation"}, + {0, 0, 0, 0} }; #endif #if PY_VERSION_HEX < 0x02020000 -SWIGINTERN PyObject *PySwigObject_getattr(PySwigObject * sobj, char *name) +SWIGINTERN PyObject * +PySwigObject_getattr(PySwigObject *sobj,char *name) { - return Py_FindMethod(swigobject_methods, (PyObject *) sobj, name); + return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name); } #endif -SWIGRUNTIME PyTypeObject *_PySwigObject_type(void) -{ - static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; - - static PyNumberMethods PySwigObject_as_number = { - (binaryfunc) 0, /*nb_add */ - (binaryfunc) 0, /*nb_subtract */ - (binaryfunc) 0, /*nb_multiply */ - (binaryfunc) 0, /*nb_divide */ - (binaryfunc) 0, /*nb_remainder */ - (binaryfunc) 0, /*nb_divmod */ - (ternaryfunc) 0, /*nb_power */ - (unaryfunc) 0, /*nb_negative */ - (unaryfunc) 0, /*nb_positive */ - (unaryfunc) 0, /*nb_absolute */ - (inquiry) 0, /*nb_nonzero */ - 0, /*nb_invert */ - 0, /*nb_lshift */ - 0, /*nb_rshift */ - 0, /*nb_and */ - 0, /*nb_xor */ - 0, /*nb_or */ - (coercion) 0, /*nb_coerce */ - (unaryfunc) PySwigObject_long, /*nb_int */ - (unaryfunc) PySwigObject_long, /*nb_long */ - (unaryfunc) 0, /*nb_float */ - (unaryfunc) PySwigObject_oct, /*nb_oct */ - (unaryfunc) PySwigObject_hex, /*nb_hex */ -#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* nb_inplace_add -> nb_index */ -#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* nb_inplace_add -> nb_inplace_true_divide */ -#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 /* nb_inplace_add -> nb_inplace_or */ +SWIGRUNTIME PyTypeObject* +_PySwigObject_type(void) { + static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer"; + + static PyNumberMethods PySwigObject_as_number = { + (binaryfunc)0, /*nb_add*/ + (binaryfunc)0, /*nb_subtract*/ + (binaryfunc)0, /*nb_multiply*/ + (binaryfunc)0, /*nb_divide*/ + (binaryfunc)0, /*nb_remainder*/ + (binaryfunc)0, /*nb_divmod*/ + (ternaryfunc)0,/*nb_power*/ + (unaryfunc)0, /*nb_negative*/ + (unaryfunc)0, /*nb_positive*/ + (unaryfunc)0, /*nb_absolute*/ + (inquiry)0, /*nb_nonzero*/ + 0, /*nb_invert*/ + 0, /*nb_lshift*/ + 0, /*nb_rshift*/ + 0, /*nb_and*/ + 0, /*nb_xor*/ + 0, /*nb_or*/ + (coercion)0, /*nb_coerce*/ + (unaryfunc)PySwigObject_long, /*nb_int*/ + (unaryfunc)PySwigObject_long, /*nb_long*/ + (unaryfunc)0, /*nb_float*/ + (unaryfunc)PySwigObject_oct, /*nb_oct*/ + (unaryfunc)PySwigObject_hex, /*nb_hex*/ +#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */ +#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */ +#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */ + 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */ #endif - }; + }; - static PyTypeObject pyswigobject_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - (char *) "PySwigObject", /* tp_name */ - sizeof(PySwigObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) PySwigObject_dealloc, /* tp_dealloc */ - (printfunc) PySwigObject_print, /* tp_print */ + static PyTypeObject pyswigobject_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ + (char *)"PySwigObject", /* tp_name */ + sizeof(PySwigObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)PySwigObject_dealloc, /* tp_dealloc */ + (printfunc)PySwigObject_print, /* tp_print */ #if PY_VERSION_HEX < 0x02020000 - (getattrfunc) PySwigObject_getattr, /* tp_getattr */ + (getattrfunc)PySwigObject_getattr, /* tp_getattr */ #else - (getattrfunc) 0, /* tp_getattr */ + (getattrfunc)0, /* tp_getattr */ #endif - (setattrfunc) 0, /* tp_setattr */ - (cmpfunc) PySwigObject_compare, /* tp_compare */ - (reprfunc) PySwigObject_repr, /* tp_repr */ - &PySwigObject_as_number, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc) 0, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) PySwigObject_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigobject_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)PySwigObject_compare, /* tp_compare */ + (reprfunc)PySwigObject_repr, /* tp_repr */ + &PySwigObject_as_number, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)PySwigObject_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigobject_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - swigobject_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + swigobject_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ + 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS - 0, 0, 0, 0 /* tp_alloc -> tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif - }; - pyswigobject_type = tmp; - pyswigobject_type.ob_type = &PyType_Type; - type_init = 1; - } - return &pyswigobject_type; + }; + pyswigobject_type = tmp; + pyswigobject_type.ob_type = &PyType_Type; + type_init = 1; + } + return &pyswigobject_type; } -SWIGRUNTIME PyObject *PySwigObject_New(void *ptr, swig_type_info * ty, int own) +SWIGRUNTIME PyObject * +PySwigObject_New(void *ptr, swig_type_info *ty, int own) { - PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type()); - if (sobj) { - sobj->ptr = ptr; - sobj->ty = ty; - sobj->own = own; - sobj->next = 0; - } - return (PyObject *) sobj; + PySwigObject *sobj = PyObject_NEW(PySwigObject, PySwigObject_type()); + if (sobj) { + sobj->ptr = ptr; + sobj->ty = ty; + sobj->own = own; + sobj->next = 0; + } + return (PyObject *)sobj; } /* ----------------------------------------------------------------------------- @@ -1700,402 +1718,404 @@ SWIGRUNTIME PyObject *PySwigObject_New(void *ptr, swig_type_info * ty, int own) * ----------------------------------------------------------------------------- */ typedef struct { - PyObject_HEAD void *pack; - swig_type_info *ty; - size_t size; + PyObject_HEAD + void *pack; + swig_type_info *ty; + size_t size; } PySwigPacked; -SWIGRUNTIME int PySwigPacked_print(PySwigPacked * v, FILE * fp, int SWIGUNUSEDPARM(flags)) +SWIGRUNTIME int +PySwigPacked_print(PySwigPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { - char result[SWIG_BUFFER_SIZE]; - fputs("pack, v->size, 0, sizeof(result))) { - fputs("at ", fp); - fputs(result, fp); - } - fputs(v->ty->name, fp); - fputs(">", fp); - return 0; + char result[SWIG_BUFFER_SIZE]; + fputs("pack, v->size, 0, sizeof(result))) { + fputs("at ", fp); + fputs(result, fp); + } + fputs(v->ty->name,fp); + fputs(">", fp); + return 0; +} + +SWIGRUNTIME PyObject * +PySwigPacked_repr(PySwigPacked *v) +{ + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { + return PyString_FromFormat("", result, v->ty->name); + } else { + return PyString_FromFormat("", v->ty->name); + } } -SWIGRUNTIME PyObject *PySwigPacked_repr(PySwigPacked * v) +SWIGRUNTIME PyObject * +PySwigPacked_str(PySwigPacked *v) { - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return PyString_FromFormat("", result, v->ty->name); - } else { - return PyString_FromFormat("", v->ty->name); - } + char result[SWIG_BUFFER_SIZE]; + if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){ + return PyString_FromFormat("%s%s", result, v->ty->name); + } else { + return PyString_FromString(v->ty->name); + } } -SWIGRUNTIME PyObject *PySwigPacked_str(PySwigPacked * v) +SWIGRUNTIME int +PySwigPacked_compare(PySwigPacked *v, PySwigPacked *w) { - char result[SWIG_BUFFER_SIZE]; - if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) { - return PyString_FromFormat("%s%s", result, v->ty->name); - } else { - return PyString_FromString(v->ty->name); - } + size_t i = v->size; + size_t j = w->size; + int s = (i < j) ? -1 : ((i > j) ? 1 : 0); + return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size); } -SWIGRUNTIME int PySwigPacked_compare(PySwigPacked * v, PySwigPacked * w) -{ - size_t i = v->size; - size_t j = w->size; - int s = (i < j) ? -1 : ((i > j) ? 1 : 0); - return s ? s : strncmp((char *) v->pack, (char *) w->pack, 2 * v->size); +SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void); + +SWIGRUNTIME PyTypeObject* +PySwigPacked_type(void) { + static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); + return type; } -SWIGRUNTIME PyTypeObject *_PySwigPacked_type(void); - -SWIGRUNTIME PyTypeObject *PySwigPacked_type(void) -{ - static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type(); - return type; +SWIGRUNTIMEINLINE int +PySwigPacked_Check(PyObject *op) { + return ((op)->ob_type == _PySwigPacked_type()) + || (strcmp((op)->ob_type->tp_name,"PySwigPacked") == 0); } -SWIGRUNTIMEINLINE int PySwigPacked_Check(PyObject * op) +SWIGRUNTIME void +PySwigPacked_dealloc(PyObject *v) { - return ((op)->ob_type == _PySwigPacked_type()) - || (strcmp((op)->ob_type->tp_name, "PySwigPacked") == 0); + if (PySwigPacked_Check(v)) { + PySwigPacked *sobj = (PySwigPacked *) v; + free(sobj->pack); + } + PyObject_DEL(v); } -SWIGRUNTIME void PySwigPacked_dealloc(PyObject * v) -{ - if (PySwigPacked_Check(v)) { - PySwigPacked *sobj = (PySwigPacked *) v; - free(sobj->pack); - } - PyObject_DEL(v); -} - -SWIGRUNTIME PyTypeObject *_PySwigPacked_type(void) -{ - static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; - static PyTypeObject pyswigpacked_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - (char *) "PySwigPacked", /* tp_name */ - sizeof(PySwigPacked), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor) PySwigPacked_dealloc, /* tp_dealloc */ - (printfunc) PySwigPacked_print, /* tp_print */ - (getattrfunc) 0, /* tp_getattr */ - (setattrfunc) 0, /* tp_setattr */ - (cmpfunc) PySwigPacked_compare, /* tp_compare */ - (reprfunc) PySwigPacked_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc) 0, /* tp_hash */ - (ternaryfunc) 0, /* tp_call */ - (reprfunc) PySwigPacked_str, /* tp_str */ - PyObject_GenericGetAttr, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - swigpacked_doc, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ +SWIGRUNTIME PyTypeObject* +_PySwigPacked_type(void) { + static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer"; + static PyTypeObject pyswigpacked_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* ob_size */ + (char *)"PySwigPacked", /* tp_name */ + sizeof(PySwigPacked), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)PySwigPacked_dealloc, /* tp_dealloc */ + (printfunc)PySwigPacked_print, /* tp_print */ + (getattrfunc)0, /* tp_getattr */ + (setattrfunc)0, /* tp_setattr */ + (cmpfunc)PySwigPacked_compare, /* tp_compare */ + (reprfunc)PySwigPacked_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + (hashfunc)0, /* tp_hash */ + (ternaryfunc)0, /* tp_call */ + (reprfunc)PySwigPacked_str, /* tp_str */ + PyObject_GenericGetAttr, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT, /* tp_flags */ + swigpacked_doc, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ + 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS - 0, 0, 0, 0 /* tp_alloc -> tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif - }; - pyswigpacked_type = tmp; - pyswigpacked_type.ob_type = &PyType_Type; - type_init = 1; - } - return &pyswigpacked_type; + }; + pyswigpacked_type = tmp; + pyswigpacked_type.ob_type = &PyType_Type; + type_init = 1; + } + return &pyswigpacked_type; } -SWIGRUNTIME PyObject *PySwigPacked_New(void *ptr, size_t size, swig_type_info * ty) +SWIGRUNTIME PyObject * +PySwigPacked_New(void *ptr, size_t size, swig_type_info *ty) { - PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type()); - if (sobj) { - void *pack = malloc(size); - if (pack) { - memcpy(pack, ptr, size); - sobj->pack = pack; - sobj->ty = ty; - sobj->size = size; - } else { - PyObject_DEL((PyObject *) sobj); - sobj = 0; - } - } - return (PyObject *) sobj; + PySwigPacked *sobj = PyObject_NEW(PySwigPacked, PySwigPacked_type()); + if (sobj) { + void *pack = malloc(size); + if (pack) { + memcpy(pack, ptr, size); + sobj->pack = pack; + sobj->ty = ty; + sobj->size = size; + } else { + PyObject_DEL((PyObject *) sobj); + sobj = 0; + } + } + return (PyObject *) sobj; } -SWIGRUNTIME swig_type_info *PySwigPacked_UnpackData(PyObject * obj, void *ptr, size_t size) +SWIGRUNTIME swig_type_info * +PySwigPacked_UnpackData(PyObject *obj, void *ptr, size_t size) { - if (PySwigPacked_Check(obj)) { - PySwigPacked *sobj = (PySwigPacked *) obj; - if (sobj->size != size) - return 0; - memcpy(ptr, sobj->pack, size); - return sobj->ty; - } else { - return 0; - } + if (PySwigPacked_Check(obj)) { + PySwigPacked *sobj = (PySwigPacked *)obj; + if (sobj->size != size) return 0; + memcpy(ptr, sobj->pack, size); + return sobj->ty; + } else { + return 0; + } } /* ----------------------------------------------------------------------------- * pointers/data manipulation * ----------------------------------------------------------------------------- */ -SWIGRUNTIMEINLINE PyObject *_SWIG_This(void) +SWIGRUNTIMEINLINE PyObject * +_SWIG_This(void) { - return PyString_FromString("this"); + return PyString_FromString("this"); } -SWIGRUNTIME PyObject *SWIG_This(void) +SWIGRUNTIME PyObject * +SWIG_This(void) { - static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); - return swig_this; + static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This(); + return swig_this; } /* #define SWIG_PYTHON_SLOW_GETSET_THIS */ -SWIGRUNTIME PySwigObject *SWIG_Python_GetSwigThis(PyObject * pyobj) +SWIGRUNTIME PySwigObject * +SWIG_Python_GetSwigThis(PyObject *pyobj) { - if (PySwigObject_Check(pyobj)) { - return (PySwigObject *) pyobj; - } else { - PyObject *obj = 0; + if (PySwigObject_Check(pyobj)) { + return (PySwigObject *) pyobj; + } else { + PyObject *obj = 0; #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000)) - if (PyInstance_Check(pyobj)) { - obj = _PyInstance_Lookup(pyobj, SWIG_This()); - } else { - PyObject **dictptr = _PyObject_GetDictPtr(pyobj); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; - } else { + if (PyInstance_Check(pyobj)) { + obj = _PyInstance_Lookup(pyobj, SWIG_This()); + } else { + PyObject **dictptr = _PyObject_GetDictPtr(pyobj); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0; + } else { #ifdef PyWeakref_CheckProxy - if (PyWeakref_CheckProxy(pyobj)) { - PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); - return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; - } -#endif - obj = PyObject_GetAttr(pyobj, SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) - PyErr_Clear(); - return 0; - } - } - } -#else - obj = PyObject_GetAttr(pyobj, SWIG_This()); - if (obj) { - Py_DECREF(obj); - } else { - if (PyErr_Occurred()) - PyErr_Clear(); - return 0; - } -#endif - if (obj && !PySwigObject_Check(obj)) { - /* a PyObject is called 'this', try to get the 'real this' - PySwigObject from it */ - return SWIG_Python_GetSwigThis(obj); - } - return (PySwigObject *) obj; + if (PyWeakref_CheckProxy(pyobj)) { + PyObject *wobj = PyWeakref_GET_OBJECT(pyobj); + return wobj ? SWIG_Python_GetSwigThis(wobj) : 0; } +#endif + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } + } + } +#else + obj = PyObject_GetAttr(pyobj,SWIG_This()); + if (obj) { + Py_DECREF(obj); + } else { + if (PyErr_Occurred()) PyErr_Clear(); + return 0; + } +#endif + if (obj && !PySwigObject_Check(obj)) { + /* a PyObject is called 'this', try to get the 'real this' + PySwigObject from it */ + return SWIG_Python_GetSwigThis(obj); + } + return (PySwigObject *)obj; + } } /* Acquire a pointer value */ -SWIGRUNTIME int SWIG_Python_AcquirePtr(PyObject * obj, int own) -{ - if (own == SWIG_POINTER_OWN) { - PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); - if (sobj) { - int oldown = sobj->own; - sobj->own = own; - return oldown; - } - } - return 0; +SWIGRUNTIME int +SWIG_Python_AcquirePtr(PyObject *obj, int own) { + if (own == SWIG_POINTER_OWN) { + PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + if (sobj) { + int oldown = sobj->own; + sobj->own = own; + return oldown; + } + } + return 0; } /* Convert a pointer value */ -SWIGRUNTIME int SWIG_Python_ConvertPtrAndOwn(PyObject * obj, void **ptr, swig_type_info * ty, int flags, int *own) -{ - if (!obj) - return SWIG_ERROR; - if (obj == Py_None) { - if (ptr) - *ptr = 0; - return SWIG_OK; +SWIGRUNTIME int +SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) { + if (!obj) return SWIG_ERROR; + if (obj == Py_None) { + if (ptr) *ptr = 0; + return SWIG_OK; + } else { + PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); + if (own) + *own = 0; + while (sobj) { + void *vptr = sobj->ptr; + if (ty) { + swig_type_info *to = sobj->ty; + if (to == ty) { + /* no type cast needed */ + if (ptr) *ptr = vptr; + break; } else { - PySwigObject *sobj = SWIG_Python_GetSwigThis(obj); - if (own) - *own = 0; - while (sobj) { - void *vptr = sobj->ptr; - if (ty) { - swig_type_info *to = sobj->ty; - if (to == ty) { - /* no type cast needed */ - if (ptr) - *ptr = vptr; - break; - } else { - swig_cast_info *tc = SWIG_TypeCheck(to->name, ty); - if (!tc) { - sobj = (PySwigObject *) sobj->next; - } else { - if (ptr) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc, vptr, &newmemory); - if (newmemory == SWIG_CAST_NEW_MEMORY) { - assert(own); - if (own) - *own = *own | SWIG_CAST_NEW_MEMORY; - } - } - break; - } - } - } else { - if (ptr) - *ptr = vptr; - break; - } - } - if (sobj) { - if (own) - *own = *own | sobj->own; - if (flags & SWIG_POINTER_DISOWN) { - sobj->own = 0; - } - return SWIG_OK; - } else { - int res = SWIG_ERROR; - if (flags & SWIG_POINTER_IMPLICIT_CONV) { - PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; - if (data && !data->implicitconv) { - PyObject *klass = data->klass; - if (klass) { - PyObject *impconv; - data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors */ - impconv = SWIG_Python_CallFunctor(klass, obj); - data->implicitconv = 0; - if (PyErr_Occurred()) { - PyErr_Clear(); - impconv = 0; - } - if (impconv) { - PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv); - if (iobj) { - void *vptr; - res = SWIG_Python_ConvertPtrAndOwn((PyObject *) iobj, &vptr, ty, 0, 0); - if (SWIG_IsOK(res)) { - if (ptr) { - *ptr = vptr; - /* transfer the ownership to 'ptr' */ - iobj->own = 0; - res = SWIG_AddCast(res); - res = SWIG_AddNewMask(res); - } else { - res = SWIG_AddCast(res); - } - } - } - Py_DECREF(impconv); - } - } - } - } - return res; - } + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) { + sobj = (PySwigObject *)sobj->next; + } else { + if (ptr) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + if (newmemory == SWIG_CAST_NEW_MEMORY) { + assert(own); + if (own) + *own = *own | SWIG_CAST_NEW_MEMORY; + } + } + break; + } } + } else { + if (ptr) *ptr = vptr; + break; + } + } + if (sobj) { + if (own) + *own = *own | sobj->own; + if (flags & SWIG_POINTER_DISOWN) { + sobj->own = 0; + } + return SWIG_OK; + } else { + int res = SWIG_ERROR; + if (flags & SWIG_POINTER_IMPLICIT_CONV) { + PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0; + if (data && !data->implicitconv) { + PyObject *klass = data->klass; + if (klass) { + PyObject *impconv; + data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/ + impconv = SWIG_Python_CallFunctor(klass, obj); + data->implicitconv = 0; + if (PyErr_Occurred()) { + PyErr_Clear(); + impconv = 0; + } + if (impconv) { + PySwigObject *iobj = SWIG_Python_GetSwigThis(impconv); + if (iobj) { + void *vptr; + res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0); + if (SWIG_IsOK(res)) { + if (ptr) { + *ptr = vptr; + /* transfer the ownership to 'ptr' */ + iobj->own = 0; + res = SWIG_AddCast(res); + res = SWIG_AddNewMask(res); + } else { + res = SWIG_AddCast(res); + } + } + } + Py_DECREF(impconv); + } + } + } + } + return res; + } + } } /* Convert a function ptr value */ -SWIGRUNTIME int SWIG_Python_ConvertFunctionPtr(PyObject * obj, void **ptr, swig_type_info * ty) -{ - if (!PyCFunction_Check(obj)) { - return SWIG_ConvertPtr(obj, ptr, ty, 0); - } else { - void *vptr = 0; - - /* here we get the method pointer for callbacks */ - const char *doc = (((PyCFunctionObject *) obj)->m_ml->ml_doc); - const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; - if (desc) { - desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; - if (!desc) - return SWIG_ERROR; - } - if (ty) { - swig_cast_info *tc = SWIG_TypeCheck(desc, ty); - if (tc) { - int newmemory = 0; - *ptr = SWIG_TypeCast(tc, vptr, &newmemory); - assert(!newmemory); /* newmemory handling not yet implemented */ - } else { - return SWIG_ERROR; - } - } else { - *ptr = vptr; - } - return SWIG_OK; - } +SWIGRUNTIME int +SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) { + if (!PyCFunction_Check(obj)) { + return SWIG_ConvertPtr(obj, ptr, ty, 0); + } else { + void *vptr = 0; + + /* here we get the method pointer for callbacks */ + const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); + const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; + if (desc) { + desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; + if (!desc) return SWIG_ERROR; + } + if (ty) { + swig_cast_info *tc = SWIG_TypeCheck(desc,ty); + if (tc) { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc,vptr,&newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } else { + return SWIG_ERROR; + } + } else { + *ptr = vptr; + } + return SWIG_OK; + } } /* Convert a packed value value */ -SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject * obj, void *ptr, size_t sz, swig_type_info * ty) -{ - swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz); - if (!to) - return SWIG_ERROR; - if (ty) { - if (to != ty) { - /* check type cast? */ - swig_cast_info *tc = SWIG_TypeCheck(to->name, ty); - if (!tc) - return SWIG_ERROR; - } - } - return SWIG_OK; -} +SWIGRUNTIME int +SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) { + swig_type_info *to = PySwigPacked_UnpackData(obj, ptr, sz); + if (!to) return SWIG_ERROR; + if (ty) { + if (to != ty) { + /* check type cast? */ + swig_cast_info *tc = SWIG_TypeCheck(to->name,ty); + if (!tc) return SWIG_ERROR; + } + } + return SWIG_OK; +} /* ----------------------------------------------------------------------------- * Create a new pointer object @@ -2106,131 +2126,133 @@ SWIGRUNTIME int SWIG_Python_ConvertPacked(PyObject * obj, void *ptr, size_t sz, 'this' attribute. */ -SWIGRUNTIME PyObject *SWIG_Python_NewShadowInstance(PySwigClientData * data, PyObject * swig_this) +SWIGRUNTIME PyObject* +SWIG_Python_NewShadowInstance(PySwigClientData *data, PyObject *swig_this) { #if (PY_VERSION_HEX >= 0x02020000) - PyObject *inst = 0; - PyObject *newraw = data->newraw; - if (newraw) { - inst = PyObject_Call(newraw, data->newargs, NULL); - if (inst) { + PyObject *inst = 0; + PyObject *newraw = data->newraw; + if (newraw) { + inst = PyObject_Call(newraw, data->newargs, NULL); + if (inst) { #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - PyObject *dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - PyDict_SetItem(dict, SWIG_This(), swig_this); - } - } -#else - PyObject *key = SWIG_This(); - PyObject_SetAttr(inst, key, swig_this); -#endif - } - } else { - PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + PyObject *dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + PyDict_SetItem(dict, SWIG_This(), swig_this); } - return inst; + } +#else + PyObject *key = SWIG_This(); + PyObject_SetAttr(inst, key, swig_this); +#endif + } + } else { + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + } + return inst; #else #if (PY_VERSION_HEX >= 0x02010000) - PyObject *inst; - PyObject *dict = PyDict_New(); - PyDict_SetItem(dict, SWIG_This(), swig_this); - inst = PyInstance_NewRaw(data->newargs, dict); - Py_DECREF(dict); - return (PyObject *) inst; + PyObject *inst; + PyObject *dict = PyDict_New(); + PyDict_SetItem(dict, SWIG_This(), swig_this); + inst = PyInstance_NewRaw(data->newargs, dict); + Py_DECREF(dict); + return (PyObject *) inst; #else - PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); - if (inst == NULL) { - return NULL; - } - inst->in_class = (PyClassObject *) data->newargs; - Py_INCREF(inst->in_class); - inst->in_dict = PyDict_New(); - if (inst->in_dict == NULL) { - Py_DECREF(inst); - return NULL; - } + PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type); + if (inst == NULL) { + return NULL; + } + inst->in_class = (PyClassObject *)data->newargs; + Py_INCREF(inst->in_class); + inst->in_dict = PyDict_New(); + if (inst->in_dict == NULL) { + Py_DECREF(inst); + return NULL; + } #ifdef Py_TPFLAGS_HAVE_WEAKREFS - inst->in_weakreflist = NULL; + inst->in_weakreflist = NULL; #endif #ifdef Py_TPFLAGS_GC - PyObject_GC_Init(inst); + PyObject_GC_Init(inst); #endif - PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); - return (PyObject *) inst; + PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this); + return (PyObject *) inst; #endif #endif } -SWIGRUNTIME void SWIG_Python_SetSwigThis(PyObject * inst, PyObject * swig_this) +SWIGRUNTIME void +SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this) { - PyObject *dict; + PyObject *dict; #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS) - PyObject **dictptr = _PyObject_GetDictPtr(inst); - if (dictptr != NULL) { - dict = *dictptr; - if (dict == NULL) { - dict = PyDict_New(); - *dictptr = dict; - } - PyDict_SetItem(dict, SWIG_This(), swig_this); - return; - } + PyObject **dictptr = _PyObject_GetDictPtr(inst); + if (dictptr != NULL) { + dict = *dictptr; + if (dict == NULL) { + dict = PyDict_New(); + *dictptr = dict; + } + PyDict_SetItem(dict, SWIG_This(), swig_this); + return; + } #endif - dict = PyObject_GetAttrString(inst, (char *) "__dict__"); - PyDict_SetItem(dict, SWIG_This(), swig_this); - Py_DECREF(dict); -} + dict = PyObject_GetAttrString(inst, (char*)"__dict__"); + PyDict_SetItem(dict, SWIG_This(), swig_this); + Py_DECREF(dict); +} -SWIGINTERN PyObject *SWIG_Python_InitShadowInstance(PyObject * args) -{ - PyObject *obj[2]; - if (!SWIG_Python_UnpackTuple(args, (char *) "swiginit", 2, 2, obj)) { - return NULL; - } else { - PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]); - if (sthis) { - PySwigObject_append((PyObject *) sthis, obj[1]); - } else { - SWIG_Python_SetSwigThis(obj[0], obj[1]); - } - return SWIG_Py_Void(); - } +SWIGINTERN PyObject * +SWIG_Python_InitShadowInstance(PyObject *args) { + PyObject *obj[2]; + if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) { + return NULL; + } else { + PySwigObject *sthis = SWIG_Python_GetSwigThis(obj[0]); + if (sthis) { + PySwigObject_append((PyObject*) sthis, obj[1]); + } else { + SWIG_Python_SetSwigThis(obj[0], obj[1]); + } + return SWIG_Py_Void(); + } } /* Create a new pointer object */ -SWIGRUNTIME PyObject *SWIG_Python_NewPointerObj(void *ptr, swig_type_info * type, int flags) -{ - if (!ptr) { - return SWIG_Py_Void(); - } else { - int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; - PyObject *robj = PySwigObject_New(ptr, type, own); - PySwigClientData *clientdata = type ? (PySwigClientData *) (type->clientdata) : 0; - if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { - PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); - if (inst) { - Py_DECREF(robj); - robj = inst; - } - } - return robj; - } +SWIGRUNTIME PyObject * +SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) { + if (!ptr) { + return SWIG_Py_Void(); + } else { + int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0; + PyObject *robj = PySwigObject_New(ptr, type, own); + PySwigClientData *clientdata = type ? (PySwigClientData *)(type->clientdata) : 0; + if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) { + PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj); + if (inst) { + Py_DECREF(robj); + robj = inst; + } + } + return robj; + } } /* Create a new packed object */ -SWIGRUNTIMEINLINE PyObject *SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info * type) -{ - return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); +SWIGRUNTIMEINLINE PyObject * +SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) { + return ptr ? PySwigPacked_New((void *) ptr, sz, type) : SWIG_Py_Void(); } /* -----------------------------------------------------------------------------* @@ -2241,108 +2263,114 @@ SWIGRUNTIMEINLINE PyObject *SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_ void *SWIG_ReturnGlobalTypeList(void *); #endif -SWIGRUNTIME swig_module_info *SWIG_Python_GetModule(void) -{ - static void *type_pointer = (void *) 0; - /* first check if module already created */ - if (!type_pointer) { +SWIGRUNTIME swig_module_info * +SWIG_Python_GetModule(void) { + static void *type_pointer = (void *)0; + /* first check if module already created */ + if (!type_pointer) { #ifdef SWIG_LINK_RUNTIME - type_pointer = SWIG_ReturnGlobalTypeList((void *) 0); + type_pointer = SWIG_ReturnGlobalTypeList((void *)0); #else - type_pointer = PyCObject_Import((char *) "swig_runtime_data" SWIG_RUNTIME_VERSION, (char *) "type_pointer" SWIG_TYPE_TABLE_NAME); - if (PyErr_Occurred()) { - PyErr_Clear(); - type_pointer = (void *) 0; - } + type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + (char*)"type_pointer" SWIG_TYPE_TABLE_NAME); + if (PyErr_Occurred()) { + PyErr_Clear(); + type_pointer = (void *)0; + } #endif - } - return (swig_module_info *) type_pointer; + } + return (swig_module_info *) type_pointer; } #if PY_MAJOR_VERSION < 2 /* PyModule_AddObject function was introduced in Python 2.0. The following function is copied out of Python/modsupport.c in python version 2.3.4 */ -SWIGINTERN int PyModule_AddObject(PyObject * m, char *name, PyObject * o) +SWIGINTERN int +PyModule_AddObject(PyObject *m, char *name, PyObject *o) { - PyObject *dict; - if (!PyModule_Check(m)) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg"); - return SWIG_ERROR; - } - if (!o) { - PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value"); - return SWIG_ERROR; - } - - dict = PyModule_GetDict(m); - if (dict == NULL) { - /* Internal error -- modules must have a dict! */ - PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", PyModule_GetName(m)); - return SWIG_ERROR; - } - if (PyDict_SetItemString(dict, name, o)) - return SWIG_ERROR; - Py_DECREF(o); - return SWIG_OK; + PyObject *dict; + if (!PyModule_Check(m)) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs module as first arg"); + return SWIG_ERROR; + } + if (!o) { + PyErr_SetString(PyExc_TypeError, + "PyModule_AddObject() needs non-NULL value"); + return SWIG_ERROR; + } + + dict = PyModule_GetDict(m); + if (dict == NULL) { + /* Internal error -- modules must have a dict! */ + PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__", + PyModule_GetName(m)); + return SWIG_ERROR; + } + if (PyDict_SetItemString(dict, name, o)) + return SWIG_ERROR; + Py_DECREF(o); + return SWIG_OK; } #endif -SWIGRUNTIME void SWIG_Python_DestroyModule(void *vptr) +SWIGRUNTIME void +SWIG_Python_DestroyModule(void *vptr) { - swig_module_info *swig_module = (swig_module_info *) vptr; - swig_type_info **types = swig_module->types; - size_t i; - for (i = 0; i < swig_module->size; ++i) { - swig_type_info *ty = types[i]; - if (ty->owndata) { - PySwigClientData *data = (PySwigClientData *) ty->clientdata; - if (data) - PySwigClientData_Del(data); - } - } - Py_DECREF(SWIG_This()); + swig_module_info *swig_module = (swig_module_info *) vptr; + swig_type_info **types = swig_module->types; + size_t i; + for (i =0; i < swig_module->size; ++i) { + swig_type_info *ty = types[i]; + if (ty->owndata) { + PySwigClientData *data = (PySwigClientData *) ty->clientdata; + if (data) PySwigClientData_Del(data); + } + } + Py_DECREF(SWIG_This()); } -SWIGRUNTIME void SWIG_Python_SetModule(swig_module_info * swig_module) -{ - static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */ +SWIGRUNTIME void +SWIG_Python_SetModule(swig_module_info *swig_module) { + static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */ - PyObject *module = Py_InitModule((char *) "swig_runtime_data" SWIG_RUNTIME_VERSION, - swig_empty_runtime_method_table); - PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); - if (pointer && module) { - PyModule_AddObject(module, (char *) "type_pointer" SWIG_TYPE_TABLE_NAME, pointer); - } else { - Py_XDECREF(pointer); - } + PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, + swig_empty_runtime_method_table); + PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule); + if (pointer && module) { + PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer); + } else { + Py_XDECREF(pointer); + } } /* The python cached type query */ -SWIGRUNTIME PyObject *SWIG_Python_TypeCache(void) -{ - static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); - return cache; +SWIGRUNTIME PyObject * +SWIG_Python_TypeCache(void) { + static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); + return cache; } -SWIGRUNTIME swig_type_info *SWIG_Python_TypeQuery(const char *type) +SWIGRUNTIME swig_type_info * +SWIG_Python_TypeQuery(const char *type) { - PyObject *cache = SWIG_Python_TypeCache(); - PyObject *key = PyString_FromString(type); - PyObject *obj = PyDict_GetItem(cache, key); - swig_type_info *descriptor; - if (obj) { - descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); - } else { - swig_module_info *swig_module = SWIG_Python_GetModule(); - descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); - if (descriptor) { - obj = PyCObject_FromVoidPtr(descriptor, NULL); - PyDict_SetItem(cache, key, obj); - Py_DECREF(obj); - } - } - Py_DECREF(key); - return descriptor; + PyObject *cache = SWIG_Python_TypeCache(); + PyObject *key = PyString_FromString(type); + PyObject *obj = PyDict_GetItem(cache, key); + swig_type_info *descriptor; + if (obj) { + descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj); + } else { + swig_module_info *swig_module = SWIG_Python_GetModule(); + descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type); + if (descriptor) { + obj = PyCObject_FromVoidPtr(descriptor, NULL); + PyDict_SetItem(cache, key, obj); + Py_DECREF(obj); + } + } + Py_DECREF(key); + return descriptor; } /* @@ -2352,109 +2380,116 @@ SWIGRUNTIME swig_type_info *SWIG_Python_TypeQuery(const char *type) #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg) #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags) -SWIGRUNTIME int SWIG_Python_AddErrMesg(const char *mesg, int infront) +SWIGRUNTIME int +SWIG_Python_AddErrMesg(const char* mesg, int infront) { - if (PyErr_Occurred()) { - PyObject *type = 0; - PyObject *value = 0; - PyObject *traceback = 0; - PyErr_Fetch(&type, &value, &traceback); - if (value) { - PyObject *old_str = PyObject_Str(value); - Py_XINCREF(type); - PyErr_Clear(); - if (infront) { - PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str)); - } else { - PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); - } - Py_DECREF(old_str); - } - return 1; - } else { - return 0; - } + if (PyErr_Occurred()) { + PyObject *type = 0; + PyObject *value = 0; + PyObject *traceback = 0; + PyErr_Fetch(&type, &value, &traceback); + if (value) { + PyObject *old_str = PyObject_Str(value); + Py_XINCREF(type); + PyErr_Clear(); + if (infront) { + PyErr_Format(type, "%s %s", mesg, PyString_AsString(old_str)); + } else { + PyErr_Format(type, "%s %s", PyString_AsString(old_str), mesg); + } + Py_DECREF(old_str); + } + return 1; + } else { + return 0; + } +} + +SWIGRUNTIME int +SWIG_Python_ArgFail(int argnum) +{ + if (PyErr_Occurred()) { + /* add information about failing argument */ + char mesg[256]; + PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); + return SWIG_Python_AddErrMesg(mesg, 1); + } else { + return 0; + } } -SWIGRUNTIME int SWIG_Python_ArgFail(int argnum) +SWIGRUNTIMEINLINE const char * +PySwigObject_GetDesc(PyObject *self) { - if (PyErr_Occurred()) { - /* add information about failing argument */ - char mesg[256]; - PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum); - return SWIG_Python_AddErrMesg(mesg, 1); - } else { - return 0; - } + PySwigObject *v = (PySwigObject *)self; + swig_type_info *ty = v ? v->ty : 0; + return ty ? ty->str : (char*)""; } -SWIGRUNTIMEINLINE const char *PySwigObject_GetDesc(PyObject * self) +SWIGRUNTIME void +SWIG_Python_TypeError(const char *type, PyObject *obj) { - PySwigObject *v = (PySwigObject *) self; - swig_type_info *ty = v ? v->ty : 0; - return ty ? ty->str : (char *) ""; -} - -SWIGRUNTIME void SWIG_Python_TypeError(const char *type, PyObject * obj) -{ - if (type) { + if (type) { #if defined(SWIG_COBJECT_TYPES) - if (obj && PySwigObject_Check(obj)) { - const char *otype = (const char *) PySwigObject_GetDesc(obj); - if (otype) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received", type, otype); - return; - } - } else -#endif - { - const char *otype = (obj ? obj->ob_type->tp_name : 0); - if (otype) { - PyObject *str = PyObject_Str(obj); - const char *cstr = str ? PyString_AsString(str) : 0; - if (cstr) { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", type, otype, cstr); - } else { - PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", type, otype); - } - Py_XDECREF(str); - return; - } - } - PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + if (obj && PySwigObject_Check(obj)) { + const char *otype = (const char *) PySwigObject_GetDesc(obj); + if (otype) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'PySwigObject(%s)' is received", + type, otype); + return; + } + } else +#endif + { + const char *otype = (obj ? obj->ob_type->tp_name : 0); + if (otype) { + PyObject *str = PyObject_Str(obj); + const char *cstr = str ? PyString_AsString(str) : 0; + if (cstr) { + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received", + type, otype, cstr); } else { - PyErr_Format(PyExc_TypeError, "unexpected type is received"); + PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received", + type, otype); } + Py_XDECREF(str); + return; + } + } + PyErr_Format(PyExc_TypeError, "a '%s' is expected", type); + } else { + PyErr_Format(PyExc_TypeError, "unexpected type is received"); + } } /* Convert a pointer value, signal an exception on a type mismatch */ -SWIGRUNTIME void *SWIG_Python_MustGetPtr(PyObject * obj, swig_type_info * ty, int argnum, int flags) -{ - void *result; - if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { - PyErr_Clear(); - if (flags & SWIG_POINTER_EXCEPTION) { - SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); - SWIG_Python_ArgFail(argnum); - } - } - return result; +SWIGRUNTIME void * +SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) { + void *result; + if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) { + PyErr_Clear(); + if (flags & SWIG_POINTER_EXCEPTION) { + SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj); + SWIG_Python_ArgFail(argnum); + } + } + return result; } #ifdef __cplusplus #if 0 -{ /* cc-mode */ +{ /* cc-mode */ #endif } #endif -#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) -#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else @@ -2481,8 +2516,7 @@ SWIGRUNTIME void *SWIG_Python_MustGetPtr(PyObject * obj, swig_type_info * ty, in #define SWIGTYPE_p_switch_stream_handle_t swig_types[18] #define SWIGTYPE_p_void swig_types[19] static swig_type_info *swig_types[21]; -static swig_module_info swig_module = { swig_types, 20, 0, 0, 0, 0 }; - +static swig_module_info swig_module = {swig_types, 20, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) @@ -2501,59 +2535,76 @@ static swig_module_info swig_module = { swig_types, 20, 0, 0, 0, 0 }; #define SWIG_name "_freeswitch" -#define SWIGVERSION 0x010335 +#define SWIGVERSION 0x010335 #define SWIG_VERSION SWIGVERSION -#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) -#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) +#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) #include namespace swig { - class PyObject_ptr { - protected: - PyObject * _obj; + class PyObject_ptr { + protected: + PyObject *_obj; - public: - PyObject_ptr():_obj(0) { - } PyObject_ptr(const PyObject_ptr & item):_obj(item._obj) { - Py_XINCREF(_obj); - } PyObject_ptr(PyObject * obj, bool initial_ref = true):_obj(obj) { - if (initial_ref) { - Py_XINCREF(_obj); - } - } + public: + PyObject_ptr() :_obj(0) + { + } - PyObject_ptr & operator=(const PyObject_ptr & item) { - Py_XINCREF(item._obj); - Py_XDECREF(_obj); - _obj = item._obj; - return *this; - } + PyObject_ptr(const PyObject_ptr& item) : _obj(item._obj) + { + Py_XINCREF(_obj); + } + + PyObject_ptr(PyObject *obj, bool initial_ref = true) :_obj(obj) + { + if (initial_ref) { + Py_XINCREF(_obj); + } + } + + PyObject_ptr & operator=(const PyObject_ptr& item) + { + Py_XINCREF(item._obj); + Py_XDECREF(_obj); + _obj = item._obj; + return *this; + } + + ~PyObject_ptr() + { + Py_XDECREF(_obj); + } + + operator PyObject *() const + { + return _obj; + } - ~PyObject_ptr() { - Py_XDECREF(_obj); - } - - operator PyObject *() const { - return _obj; - } PyObject *operator->() const { - return _obj; - }}; + PyObject *operator->() const + { + return _obj; + } + }; } namespace swig { - struct PyObject_var:PyObject_ptr { - PyObject_var(PyObject * obj = 0):PyObject_ptr(obj, false) { - } PyObject_var & operator =(PyObject * obj) { - Py_XDECREF(_obj); - _obj = obj; - return *this; - }}; + struct PyObject_var : PyObject_ptr { + PyObject_var(PyObject* obj = 0) : PyObject_ptr(obj, false) { } + + PyObject_var & operator = (PyObject* obj) + { + Py_XDECREF(_obj); + _obj = obj; + return *this; + } + }; } @@ -2561,70 +2612,68 @@ namespace swig { #include "freeswitch_python.h" -SWIGINTERN swig_type_info *SWIG_pchar_descriptor(void) +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) { - static int init = 0; - static swig_type_info *info = 0; - if (!init) { - info = SWIG_TypeQuery("_p_char"); - init = 1; - } - return info; + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; } -SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject * obj, char **cptr, size_t *psize, int *alloc) +SWIGINTERN int +SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) { - if (PyString_Check(obj)) { - char *cstr; - Py_ssize_t len; - PyString_AsStringAndSize(obj, &cstr, &len); - if (cptr) { - if (alloc) { - /* - In python the user should not be able to modify the inner - string representation. To warranty that, if you define - SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string - buffer is always returned. + if (PyString_Check(obj)) { + char *cstr; Py_ssize_t len; + PyString_AsStringAndSize(obj, &cstr, &len); + if (cptr) { + if (alloc) { + /* + In python the user should not be able to modify the inner + string representation. To warranty that, if you define + SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string + buffer is always returned. - The default behavior is just to return the pointer value, - so, be careful. - */ + The default behavior is just to return the pointer value, + so, be careful. + */ #if defined(SWIG_PYTHON_SAFE_CSTRINGS) - if (*alloc != SWIG_OLDOBJ) + if (*alloc != SWIG_OLDOBJ) #else - if (*alloc == SWIG_NEWOBJ) + if (*alloc == SWIG_NEWOBJ) #endif - { - *cptr = reinterpret_cast < char *>(memcpy((new char[len + 1]), cstr, sizeof(char) * (len + 1))); - *alloc = SWIG_NEWOBJ; - } else { - *cptr = cstr; - *alloc = SWIG_OLDOBJ; - } - } else { - *cptr = PyString_AsString(obj); - } - } - if (psize) - *psize = len + 1; - return SWIG_OK; - } else { - swig_type_info *pchar_descriptor = SWIG_pchar_descriptor(); - if (pchar_descriptor) { - void *vptr = 0; - if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { - if (cptr) - *cptr = (char *) vptr; - if (psize) - *psize = vptr ? (strlen((char *) vptr) + 1) : 0; - if (alloc) - *alloc = SWIG_OLDOBJ; - return SWIG_OK; - } - } + { + *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1))); + *alloc = SWIG_NEWOBJ; + } + else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; } - return SWIG_TypeError; + } else { + *cptr = PyString_AsString(obj); + } + } + if (psize) *psize = len + 1; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *) vptr; + if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; } @@ -2641,51 +2690,47 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(PyObject * obj, char **cptr, size_t *psize, #endif -SWIGINTERN int SWIG_AsVal_double(PyObject * obj, double *val) +SWIGINTERN int +SWIG_AsVal_double (PyObject *obj, double *val) { - int res = SWIG_TypeError; - if (PyFloat_Check(obj)) { - if (val) - *val = PyFloat_AsDouble(obj); - return SWIG_OK; - } else if (PyInt_Check(obj)) { - if (val) - *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - double v = PyLong_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) - *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } + int res = SWIG_TypeError; + if (PyFloat_Check(obj)) { + if (val) *val = PyFloat_AsDouble(obj); + return SWIG_OK; + } else if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else if (PyLong_Check(obj)) { + double v = PyLong_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } #ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - double d = PyFloat_AsDouble(obj); - if (!PyErr_Occurred()) { - if (val) - *val = d; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) - *val = v; - return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); - } else { - PyErr_Clear(); - } - } - } + { + int dispatch = 0; + double d = PyFloat_AsDouble(obj); + if (!PyErr_Occurred()) { + if (val) *val = d; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_AddCast(SWIG_OK)); + } else { + PyErr_Clear(); + } + } + } #endif - return res; + return res; } @@ -2695,5461 +2740,5130 @@ SWIGINTERN int SWIG_AsVal_double(PyObject * obj, double *val) #include -SWIGINTERNINLINE int SWIG_CanCastAsInteger(double *d, double min, double max) -{ - double x = *d; - if ((min <= x && x <= max)) { - double fx = floor(x); - double cx = ceil(x); - double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ - if ((errno == EDOM) || (errno == ERANGE)) { - errno = 0; - } else { - double summ, reps, diff; - if (rd < x) { - diff = x - rd; - } else if (rd > x) { - diff = rd - x; - } else { - return 1; - } - summ = rd + x; - reps = diff / summ; - if (reps < 8 * DBL_EPSILON) { - *d = rd; - return 1; - } - } - } - return 0; +SWIGINTERNINLINE int +SWIG_CanCastAsInteger(double *d, double min, double max) { + double x = *d; + if ((min <= x && x <= max)) { + double fx = floor(x); + double cx = ceil(x); + double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */ + if ((errno == EDOM) || (errno == ERANGE)) { + errno = 0; + } else { + double summ, reps, diff; + if (rd < x) { + diff = x - rd; + } else if (rd > x) { + diff = rd - x; + } else { + return 1; + } + summ = rd + x; + reps = diff/summ; + if (reps < 8*DBL_EPSILON) { + *d = rd; + return 1; + } + } + } + return 0; } -SWIGINTERN int SWIG_AsVal_long(PyObject * obj, long *val) +SWIGINTERN int +SWIG_AsVal_long (PyObject *obj, long* val) { - if (PyInt_Check(obj)) { - if (val) - *val = PyInt_AsLong(obj); - return SWIG_OK; - } else if (PyLong_Check(obj)) { - long v = PyLong_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) - *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } + if (PyInt_Check(obj)) { + if (val) *val = PyInt_AsLong(obj); + return SWIG_OK; + } else if (PyLong_Check(obj)) { + long v = PyLong_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } #ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - long v = PyInt_AsLong(obj); - if (!PyErr_Occurred()) { - if (val) - *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double(obj, &d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { - if (val) - *val = (long) (d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERN int SWIG_AsVal_int(PyObject * obj, int *val) -{ - long v; - int res = SWIG_AsVal_long(obj, &v); - if (SWIG_IsOK(res)) { - if ((v < INT_MIN || v > INT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) - *val = static_cast < int >(v); - } - } + { + int dispatch = 0; + long v = PyInt_AsLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) { + if (val) *val = (long)(d); return res; + } + } + } +#endif + return SWIG_TypeError; } -SWIGINTERNINLINE PyObject *SWIG_FromCharPtrAndSize(const char *carray, size_t size) +SWIGINTERN int +SWIG_AsVal_int (PyObject * obj, int *val) { - if (carray) { - if (size > INT_MAX) { - swig_type_info *pchar_descriptor = SWIG_pchar_descriptor(); - return pchar_descriptor ? SWIG_NewPointerObj(const_cast < char *>(carray), pchar_descriptor, 0) : SWIG_Py_Void(); - } else { - return PyString_FromStringAndSize(carray, static_cast < int >(size)); - } - } else { - return SWIG_Py_Void(); - } + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< int >(v); + } + } + return res; } -SWIGINTERNINLINE PyObject *SWIG_FromCharPtr(const char *cptr) +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtrAndSize(const char* carray, size_t size) { - return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); + if (carray) { + if (size > INT_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void(); + } else { + return PyString_FromStringAndSize(carray, static_cast< int >(size)); + } + } else { + return SWIG_Py_Void(); + } } -#define SWIG_From_long PyInt_FromLong - - -SWIGINTERNINLINE PyObject *SWIG_From_int(int value) -{ - return SWIG_From_long(value); +SWIGINTERNINLINE PyObject * +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); } -SWIGINTERNINLINE PyObject *SWIG_From_bool(bool value) -{ - return PyBool_FromLong(value ? 1 : 0); + #define SWIG_From_long PyInt_FromLong + + +SWIGINTERNINLINE PyObject * +SWIG_From_int (int value) +{ + return SWIG_From_long (value); } -SWIGINTERN int SWIG_AsVal_unsigned_SS_long(PyObject * obj, unsigned long *val) +SWIGINTERNINLINE PyObject* + SWIG_From_bool (bool value) { - if (PyInt_Check(obj)) { - long v = PyInt_AsLong(obj); - if (v >= 0) { - if (val) - *val = v; - return SWIG_OK; - } else { - return SWIG_OverflowError; - } - } else if (PyLong_Check(obj)) { - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) - *val = v; - return SWIG_OK; - } else { - PyErr_Clear(); - } - } + return PyBool_FromLong(value ? 1 : 0); +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) +{ + if (PyInt_Check(obj)) { + long v = PyInt_AsLong(obj); + if (v >= 0) { + if (val) *val = v; + return SWIG_OK; + } else { + return SWIG_OverflowError; + } + } else if (PyLong_Check(obj)) { + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_OK; + } else { + PyErr_Clear(); + } + } #ifdef SWIG_PYTHON_CAST_MODE - { - int dispatch = 0; - unsigned long v = PyLong_AsUnsignedLong(obj); - if (!PyErr_Occurred()) { - if (val) - *val = v; - return SWIG_AddCast(SWIG_OK); - } else { - PyErr_Clear(); - } - if (!dispatch) { - double d; - int res = SWIG_AddCast(SWIG_AsVal_double(obj, &d)); - if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { - if (val) - *val = (unsigned long) (d); - return res; - } - } - } -#endif - return SWIG_TypeError; -} - - -SWIGINTERN int SWIG_AsVal_unsigned_SS_int(PyObject * obj, unsigned int *val) -{ - unsigned long v; - int res = SWIG_AsVal_unsigned_SS_long(obj, &v); - if (SWIG_IsOK(res)) { - if ((v > UINT_MAX)) { - return SWIG_OverflowError; - } else { - if (val) - *val = static_cast < unsigned int >(v); - } - } + { + int dispatch = 0; + unsigned long v = PyLong_AsUnsignedLong(obj); + if (!PyErr_Occurred()) { + if (val) *val = v; + return SWIG_AddCast(SWIG_OK); + } else { + PyErr_Clear(); + } + if (!dispatch) { + double d; + int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d)); + if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) { + if (val) *val = (unsigned long)(d); return res; + } + } + } +#endif + return SWIG_TypeError; } -SWIGINTERNINLINE PyObject *SWIG_From_unsigned_SS_long(unsigned long value) +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val) { - return (value > LONG_MAX) ? PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast < long >(value)); + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = static_cast< unsigned int >(v); + } + } + return res; } -SWIGINTERNINLINE PyObject *SWIG_From_unsigned_SS_int(unsigned int value) +SWIGINTERNINLINE PyObject* +SWIG_From_unsigned_SS_long (unsigned long value) { - return SWIG_From_unsigned_SS_long(value); + return (value > LONG_MAX) ? + PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value)); } -SWIGINTERN int SWIG_AsVal_bool(PyObject * obj, bool * val) +SWIGINTERNINLINE PyObject * +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + +SWIGINTERN int +SWIG_AsVal_bool (PyObject *obj, bool *val) { - int r = PyObject_IsTrue(obj); - if (r == -1) - return SWIG_ERROR; - if (val) - *val = r ? true : false; - return SWIG_OK; + int r = PyObject_IsTrue(obj); + if (r == -1) + return SWIG_ERROR; + if (val) *val = r ? true : false; + return SWIG_OK; } #ifdef __cplusplus extern "C" { #endif - SWIGINTERN PyObject *_wrap_consoleLog(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:consoleLog", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleLog" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "consoleLog" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - consoleLog(arg1, arg2); - resultobj = SWIG_Py_Void(); - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_consoleCleanLog(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:consoleCleanLog", &obj0)) - SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleCleanLog" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - consoleCleanLog(arg1); - resultobj = SWIG_Py_Void(); - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - return resultobj; - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - 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; - int arg9; - int arg10; - int arg11; - int arg12; - int arg13; - IVRMenu *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int res5; - char *buf5 = 0; - int alloc5 = 0; - int res6; - char *buf6 = 0; - int alloc6 = 0; - int res7; - char *buf7 = 0; - int alloc7 = 0; - int res8; - char *buf8 = 0; - int alloc8 = 0; - int val9; - int ecode9 = 0; - int val10; - int ecode10 = 0; - int val11; - int ecode11 = 0; - int val12; - int ecode12 = 0; - int val13; - int ecode13 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - PyObject *obj4 = 0; - PyObject *obj5 = 0; - PyObject *obj6 = 0; - PyObject *obj7 = 0; - PyObject *obj8 = 0; - PyObject *obj9 = 0; - PyObject *obj10 = 0; - PyObject *obj11 = 0; - PyObject *obj12 = 0; - - if (!PyArg_ParseTuple - (args, (char *) "OOOOOOOOOOOOO:new_IVRMenu", &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8, &obj9, &obj10, &obj11, &obj12)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IVRMenu, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IVRMenu" "', argument " "1" " of type '" "IVRMenu *" "'"); - } - arg1 = reinterpret_cast < IVRMenu * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IVRMenu" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IVRMenu" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IVRMenu" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_IVRMenu" "', argument " "5" " of type '" "char const *" "'"); - } - arg5 = reinterpret_cast < char *>(buf5); - res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IVRMenu" "', argument " "6" " of type '" "char const *" "'"); - } - arg6 = reinterpret_cast < char *>(buf6); - res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7); - if (!SWIG_IsOK(res7)) { - SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_IVRMenu" "', argument " "7" " of type '" "char const *" "'"); - } - arg7 = reinterpret_cast < char *>(buf7); - res8 = SWIG_AsCharPtrAndSize(obj7, &buf8, NULL, &alloc8); - if (!SWIG_IsOK(res8)) { - SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IVRMenu" "', argument " "8" " of type '" "char const *" "'"); - } - arg8 = reinterpret_cast < char *>(buf8); - ecode9 = SWIG_AsVal_int(obj8, &val9); - if (!SWIG_IsOK(ecode9)) { - SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_IVRMenu" "', argument " "9" " of type '" "int" "'"); - } - arg9 = static_cast < int >(val9); - ecode10 = SWIG_AsVal_int(obj9, &val10); - if (!SWIG_IsOK(ecode10)) { - SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_IVRMenu" "', argument " "10" " of type '" "int" "'"); - } - arg10 = static_cast < int >(val10); - ecode11 = SWIG_AsVal_int(obj10, &val11); - if (!SWIG_IsOK(ecode11)) { - SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_IVRMenu" "', argument " "11" " of type '" "int" "'"); - } - arg11 = static_cast < int >(val11); - ecode12 = SWIG_AsVal_int(obj11, &val12); - if (!SWIG_IsOK(ecode12)) { - SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_IVRMenu" "', argument " "12" " of type '" "int" "'"); - } - arg12 = static_cast < int >(val12); - ecode13 = SWIG_AsVal_int(obj12, &val13); - if (!SWIG_IsOK(ecode13)) { - SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_IVRMenu" "', argument " "13" " of type '" "int" "'"); - } - arg13 = static_cast < int >(val13); - 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, arg9, arg10, arg11, arg12, arg13); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVRMenu, SWIG_POINTER_NEW | 0); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc5 == SWIG_NEWOBJ) - delete[]buf5; - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - if (alloc7 == SWIG_NEWOBJ) - delete[]buf7; - if (alloc8 == SWIG_NEWOBJ) - delete[]buf8; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc5 == SWIG_NEWOBJ) - delete[]buf5; - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - if (alloc7 == SWIG_NEWOBJ) - delete[]buf7; - if (alloc8 == SWIG_NEWOBJ) - delete[]buf8; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_delete_IVRMenu(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - IVRMenu *arg1 = (IVRMenu *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:delete_IVRMenu", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IVRMenu, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVRMenu" "', argument " "1" " of type '" "IVRMenu *" "'"); - } - arg1 = reinterpret_cast < IVRMenu * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_IVRMenu_bindAction(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - IVRMenu *arg1 = (IVRMenu *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOO:IVRMenu_bindAction", &obj0, &obj1, &obj2, &obj3)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IVRMenu, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_bindAction" "', argument " "1" " of type '" "IVRMenu *" "'"); - } - arg1 = reinterpret_cast < IVRMenu * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_bindAction" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_bindAction" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IVRMenu_bindAction" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - (arg1)->bindAction(arg2, (char const *) arg3, (char const *) arg4); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_IVRMenu_execute(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - IVRMenu *arg1 = (IVRMenu *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:IVRMenu_execute", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_IVRMenu, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_execute" "', argument " "1" " of type '" "IVRMenu *" "'"); - } - arg1 = reinterpret_cast < IVRMenu * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_execute" "', argument " "2" " of type '" "CoreSession *" "'"); - } - arg2 = reinterpret_cast < CoreSession * >(argp2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_execute" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->execute(arg2, (char const *) arg3); - resultobj = SWIG_Py_Void(); - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *IVRMenu_swigregister(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, (char *) "O:swigregister", &obj)) - return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_IVRMenu, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); - } - - SWIGINTERN PyObject *_wrap_new_API(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - API *result = 0; - - if (!PyArg_ParseTuple(args, (char *) ":new_API")) - SWIG_fail; - result = (API *) new API(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_API, SWIG_POINTER_NEW | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_delete_API(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - API *arg1 = (API *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:delete_API", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_API, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_API" "', argument " "1" " of type '" "API *" "'"); - } - arg1 = reinterpret_cast < API * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_API_execute(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - API *arg1 = (API *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:API_execute", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_API, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_execute" "', argument " "1" " of type '" "API *" "'"); - } - arg1 = reinterpret_cast < API * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_execute" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "API_execute" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - result = (char *) (arg1)->execute((char const *) arg2, (char const *) arg3); - resultobj = SWIG_FromCharPtr((const char *) result); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_API_executeString(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - API *arg1 = (API *) 0; - char *arg2 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:API_executeString", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_API, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_executeString" "', argument " "1" " of type '" "API *" "'"); - } - arg1 = reinterpret_cast < API * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_executeString" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (char *) (arg1)->executeString((char const *) arg2); - resultobj = SWIG_FromCharPtr((const char *) result); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *API_swigregister(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, (char *) "O:swigregister", &obj)) - return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_API, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); - } - - SWIGINTERN PyObject *_wrap_input_callback_state_t_function_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *arg2 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:input_callback_state_t_function_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_function_set" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_function_set" "', argument " "2" " of type '" "void *" "'"); - } - if (arg1) - (arg1)->function = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_input_callback_state_t_function_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:input_callback_state_t_function_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_function_get" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - result = (void *) ((arg1)->function); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_input_callback_state_t_threadState_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *arg2 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:input_callback_state_t_threadState_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_threadState_set" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_threadState_set" "', argument " "2" " of type '" "void *" "'"); - } - if (arg1) - (arg1)->threadState = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_input_callback_state_t_threadState_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:input_callback_state_t_threadState_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_threadState_get" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - result = (void *) ((arg1)->threadState); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_input_callback_state_t_extra_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *arg2 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:input_callback_state_t_extra_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_extra_set" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_extra_set" "', argument " "2" " of type '" "void *" "'"); - } - if (arg1) - (arg1)->extra = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_input_callback_state_t_extra_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:input_callback_state_t_extra_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_extra_get" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - result = (void *) ((arg1)->extra); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_input_callback_state_t_funcargs_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:input_callback_state_t_funcargs_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_funcargs_set" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_funcargs_set" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - if (arg1->funcargs) - delete[]arg1->funcargs; - if (arg2) { - size_t size = strlen(reinterpret_cast < const char *>(arg2)) + 1; - arg1->funcargs = (char *) reinterpret_cast < char *>(memcpy((new char[size]), reinterpret_cast < const char *>(arg2), sizeof(char) * (size))); - } else { - arg1->funcargs = 0; - } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_input_callback_state_t_funcargs_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:input_callback_state_t_funcargs_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "input_callback_state_t_funcargs_get" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - result = (char *) ((arg1)->funcargs); - resultobj = SWIG_FromCharPtr((const char *) result); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_input_callback_state_t(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *result = 0; - - if (!PyArg_ParseTuple(args, (char *) ":new_input_callback_state_t")) - SWIG_fail; - result = (input_callback_state_t *) new input_callback_state_t(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input_callback_state, SWIG_POINTER_NEW | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_delete_input_callback_state_t(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - input_callback_state_t *arg1 = (input_callback_state_t *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:delete_input_callback_state_t", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_input_callback_state, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "delete_input_callback_state_t" "', argument " "1" " of type '" "input_callback_state_t *" "'"); - } - arg1 = reinterpret_cast < input_callback_state_t * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *input_callback_state_t_swigregister(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, (char *) "O:swigregister", &obj)) - return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_input_callback_state, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); - } - - SWIGINTERN PyObject *_wrap_new_Stream__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Stream *result = 0; - - if (!PyArg_ParseTuple(args, (char *) ":new_Stream")) - SWIG_fail; - result = (Stream *) new Stream(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_POINTER_NEW | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_Stream__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0; - Stream *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:new_Stream", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_switch_stream_handle_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stream" "', argument " "1" " of type '" "switch_stream_handle_t *" "'"); - } - arg1 = reinterpret_cast < switch_stream_handle_t *>(argp1); - result = (Stream *) new Stream(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_POINTER_NEW | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_Stream(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 0) { - return _wrap_new_Stream__SWIG_0(self, args); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_stream_handle_t, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Stream__SWIG_1(self, args); - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'new_Stream'.\n" - " Possible C/C++ prototypes are:\n" " Stream()\n" " Stream(switch_stream_handle_t *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_delete_Stream(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Stream *arg1 = (Stream *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:delete_Stream", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Stream, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stream" "', argument " "1" " of type '" "Stream *" "'"); - } - arg1 = reinterpret_cast < Stream * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Stream_write(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Stream *arg1 = (Stream *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Stream_write", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Stream, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_write" "', argument " "1" " of type '" "Stream *" "'"); - } - arg1 = reinterpret_cast < Stream * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stream_write" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->write((char const *) arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Stream_get_data(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Stream *arg1 = (Stream *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Stream_get_data", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Stream, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_get_data" "', argument " "1" " of type '" "Stream *" "'"); - } - arg1 = reinterpret_cast < Stream * >(argp1); - result = (char *) (arg1)->get_data(); - resultobj = SWIG_FromCharPtr((const char *) result); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *Stream_swigregister(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, (char *) "O:swigregister", &obj)) - return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Stream, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); - } - - SWIGINTERN PyObject *_wrap_Event_event_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - switch_event_t *arg2 = (switch_event_t *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Event_event_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_set" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_event_t, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_event_set" "', argument " "2" " of type '" "switch_event_t *" "'"); - } - arg2 = reinterpret_cast < switch_event_t *>(argp2); - if (arg1) - (arg1)->event = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_event_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - switch_event_t *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Event_event_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_get" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (switch_event_t *) ((arg1)->event); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_event_t, 0 | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_serialized_string_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Event_serialized_string_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_set" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialized_string_set" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - if (arg1->serialized_string) - delete[]arg1->serialized_string; - if (arg2) { - size_t size = strlen(reinterpret_cast < const char *>(arg2)) + 1; - arg1->serialized_string = - (char *) reinterpret_cast < char *>(memcpy((new char[size]), reinterpret_cast < const char *>(arg2), sizeof(char) * (size))); - } else { - arg1->serialized_string = 0; - } - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_serialized_string_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Event_serialized_string_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_get" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (char *) ((arg1)->serialized_string); - resultobj = SWIG_FromCharPtr((const char *) result); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_mine_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - int arg2; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Event_mine_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_set" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Event_mine_set" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - if (arg1) - (arg1)->mine = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_mine_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Event_mine_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_get" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (int) ((arg1)->mine); - resultobj = SWIG_From_int(static_cast < int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_Event__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - Event *result = 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:new_Event", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1" " of type '" "char const *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Event" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (Event *) new Event((char const *) arg1, (char const *) arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0); - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_Event__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0; - Event *result = 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:new_Event", &obj0)) - SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1" " of type '" "char const *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - result = (Event *) new Event((char const *) arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0); - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - return resultobj; - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_Event__SWIG_2(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - switch_event_t *arg1 = (switch_event_t *) 0; - int arg2; - Event *result = 0; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:new_Event", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_switch_event_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1" " of type '" "switch_event_t *" "'"); - } - arg1 = reinterpret_cast < switch_event_t *>(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - result = (Event *) new Event(arg1, arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_Event__SWIG_3(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - switch_event_t *arg1 = (switch_event_t *) 0; - Event *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:new_Event", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_switch_event_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1" " of type '" "switch_event_t *" "'"); - } - arg1 = reinterpret_cast < switch_event_t *>(argp1); - result = (Event *) new Event(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_Event(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 2); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_event_t, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Event__SWIG_3(self, args); - } - } - if (argc == 1) { - int _v; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Event__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_event_t, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[1], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_new_Event__SWIG_2(self, args); - } - } - } - if (argc == 2) { - int _v; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_Event__SWIG_0(self, args); - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'new_Event'.\n" - " Possible C/C++ prototypes are:\n" - " Event(char const *,char const *)\n" - " Event(char const *)\n" " Event(switch_event_t *,int)\n" " Event(switch_event_t *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_delete_Event(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:delete_Event", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Event" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_serialize__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Event_serialize", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (char *) (arg1)->serialize((char const *) arg2); - resultobj = SWIG_FromCharPtr((const char *) result); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_serialize__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Event_serialize", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (char *) (arg1)->serialize(); - resultobj = SWIG_FromCharPtr((const char *) result); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_serialize(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 2); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Event_serialize__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Event_serialize__SWIG_0(self, args); - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'Event_serialize'.\n" - " Possible C/C++ prototypes are:\n" " serialize(Event *,char const *)\n" " serialize(Event *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_setPriority__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - switch_priority_t arg2; - bool result; - void *argp1 = 0; - int res1 = 0; - void *argp2; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Event_setPriority", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_priority_t, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_setPriority" "', argument " "2" " of type '" "switch_priority_t" "'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "Event_setPriority" "', argument " "2" " of type '" "switch_priority_t" "'"); - } else { - switch_priority_t *temp = reinterpret_cast < switch_priority_t *>(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) - delete temp; - } - } - result = (bool) (arg1)->setPriority(arg2); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_setPriority__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Event_setPriority", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (bool) (arg1)->setPriority(); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_setPriority(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 2); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Event_setPriority__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_switch_priority_t, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_Event_setPriority__SWIG_0(self, args); - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'Event_setPriority'.\n" - " Possible C/C++ prototypes are:\n" " setPriority(Event *,switch_priority_t)\n" " setPriority(Event *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_getHeader(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Event_getHeader", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getHeader" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getHeader" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (char *) (arg1)->getHeader(arg2); - resultobj = SWIG_FromCharPtr((const char *) result); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_getBody(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Event_getBody", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getBody" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (char *) (arg1)->getBody(); - resultobj = SWIG_FromCharPtr((const char *) result); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_getType(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Event_getType", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getType" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (char *) (arg1)->getType(); - resultobj = SWIG_FromCharPtr((const char *) result); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_addBody(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Event_addBody", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addBody" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addBody" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (bool) (arg1)->addBody((char const *) arg2); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_addHeader(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:Event_addHeader", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addHeader" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addHeader" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_addHeader" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - result = (bool) (arg1)->addHeader((char const *) arg2, (char const *) arg3); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_delHeader(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - char *arg2 = (char *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:Event_delHeader", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_delHeader" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_delHeader" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (bool) (arg1)->delHeader((char const *) arg2); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_Event_fire(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - Event *arg1 = (Event *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:Event_fire", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_fire" "', argument " "1" " of type '" "Event *" "'"); - } - arg1 = reinterpret_cast < Event * >(argp1); - result = (bool) (arg1)->fire(); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *Event_swigregister(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, (char *) "O:swigregister", &obj)) - return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_Event, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); - } - - SWIGINTERN PyObject *_wrap_delete_CoreSession(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:delete_CoreSession", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoreSession" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_session_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - switch_core_session_t *arg2 = (switch_core_session_t *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_session_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_session_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_core_session_t, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" "CoreSession_session_set" "', argument " "2" " of type '" "switch_core_session_t *" "'"); - } - arg2 = reinterpret_cast < switch_core_session_t *>(argp2); - if (arg1) - (arg1)->session = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_session_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - switch_core_session_t *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_session_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_session_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (switch_core_session_t *) ((arg1)->session); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_core_session_t, 0 | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_channel_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_t *arg2 = (switch_channel_t *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_channel_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_channel_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_channel_t, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_channel_set" "', argument " "2" " of type '" "switch_channel_t *" "'"); - } - arg2 = reinterpret_cast < switch_channel_t *>(argp2); - if (arg1) - (arg1)->channel = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_channel_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_t *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_channel_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_channel_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (switch_channel_t *) ((arg1)->channel); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_channel_t, 0 | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_flags_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - unsigned int arg2; - void *argp1 = 0; - int res1 = 0; - unsigned int val2; - int ecode2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_flags_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flags_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_flags_set" "', argument " "2" " of type '" "unsigned int" "'"); - } - arg2 = static_cast < unsigned int >(val2); - if (arg1) - (arg1)->flags = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_flags_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - unsigned int result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_flags_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flags_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (unsigned int) ((arg1)->flags); - resultobj = SWIG_From_unsigned_SS_int(static_cast < unsigned int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_allocated_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_allocated_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_allocated_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_allocated_set" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - if (arg1) - (arg1)->allocated = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_allocated_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_allocated_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_allocated_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) ((arg1)->allocated); - resultobj = SWIG_From_int(static_cast < int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_cb_state_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - input_callback_state *arg2 = (input_callback_state *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_cb_state_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_cb_state_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_input_callback_state, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" "CoreSession_cb_state_set" "', argument " "2" " of type '" "input_callback_state *" "'"); - } - arg2 = reinterpret_cast < input_callback_state * >(argp2); - if (arg1) - (arg1)->cb_state = *arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_cb_state_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - input_callback_state *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_cb_state_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_cb_state_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (input_callback_state *) & ((arg1)->cb_state); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input_callback_state, 0 | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_hook_state_set(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_state_t arg2; - void *argp1 = 0; - int res1 = 0; - void *argp2; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_hook_state_set", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hook_state_set" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - { - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_channel_state_t, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), - "in method '" "CoreSession_hook_state_set" "', argument " "2" " of type '" "switch_channel_state_t" "'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "CoreSession_hook_state_set" "', argument " "2" " of type '" - "switch_channel_state_t" "'"); - } else { - switch_channel_state_t *temp = reinterpret_cast < switch_channel_state_t *>(argp2); - arg2 = *temp; - if (SWIG_IsNewObj(res2)) - delete temp; - } - } - if (arg1) - (arg1)->hook_state = arg2; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_hook_state_get(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - switch_channel_state_t result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_hook_state_get", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hook_state_get" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = ((arg1)->hook_state); - resultobj = - SWIG_NewPointerObj((new switch_channel_state_t (static_cast < const switch_channel_state_t &>(result))), SWIGTYPE_p_switch_channel_state_t, - SWIG_POINTER_OWN | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_answer(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_answer", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_answer" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) (arg1)->answer(); - resultobj = SWIG_From_int(static_cast < int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_preAnswer(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_preAnswer", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_preAnswer" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) (arg1)->preAnswer(); - resultobj = SWIG_From_int(static_cast < int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_hangup__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_hangup", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->hangup(arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_hangup__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_hangup", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - (arg1)->hangup(); - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_hangup(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[3]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 2); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_hangup__SWIG_1(self, args); - } - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_hangup__SWIG_0(self, args); - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'CoreSession_hangup'.\n" - " Possible C/C++ prototypes are:\n" " hangup(CoreSession *,char *)\n" " hangup(CoreSession *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_setVariable(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_setVariable", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setVariable" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setVariable" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setVariable" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setVariable(arg2, arg3); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_setPrivate(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *arg3 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_setPrivate", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setPrivate" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setPrivate" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&arg3), 0, 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setPrivate" "', argument " "3" " of type '" "void *" "'"); - } - (arg1)->setPrivate(arg2, arg3); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_getPrivate(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_getPrivate", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getPrivate" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getPrivate" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (void *) (arg1)->getPrivate(arg2); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_getVariable(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_getVariable", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getVariable" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getVariable" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (char *) (arg1)->getVariable(arg2); - resultobj = SWIG_FromCharPtr((const char *) result); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_process_callback_result(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - switch_status_t result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_process_callback_result", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), - "in method '" "CoreSession_process_callback_result" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_process_callback_result" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (arg1)->process_callback_result(arg2); - resultobj = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_say(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - char *arg5 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int res5; - char *buf5 = 0; - int alloc5 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - PyObject *obj4 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOOO:CoreSession_say", &obj0, &obj1, &obj2, &obj3, &obj4)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_say" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_say" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_say" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_say" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); - if (!SWIG_IsOK(res5)) { - SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CoreSession_say" "', argument " "5" " of type '" "char const *" "'"); - } - arg5 = reinterpret_cast < char *>(buf5); - (arg1)->say((char const *) arg2, (char const *) arg3, (char const *) arg4, (char const *) arg5); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc5 == SWIG_NEWOBJ) - delete[]buf5; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc5 == SWIG_NEWOBJ) - delete[]buf5; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_sayPhrase__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOO:CoreSession_sayPhrase", &obj0, &obj1, &obj2, &obj3)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_sayPhrase" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_sayPhrase" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - (arg1)->sayPhrase((char const *) arg2, (char const *) arg3, (char const *) arg4); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_sayPhrase__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_sayPhrase", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_sayPhrase" "', argument " "3" " of type '" "char const *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->sayPhrase((char const *) arg2, (char const *) arg3); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_sayPhrase__SWIG_2(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_sayPhrase", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2" " of type '" "char const *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->sayPhrase((char const *) arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_sayPhrase(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 4); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_sayPhrase__SWIG_2(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_sayPhrase__SWIG_1(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_sayPhrase__SWIG_0(self, args); - } - } - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'CoreSession_sayPhrase'.\n" - " Possible C/C++ prototypes are:\n" - " sayPhrase(CoreSession *,char const *,char const *,char const *)\n" - " sayPhrase(CoreSession *,char const *,char const *)\n" " sayPhrase(CoreSession *,char const *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int arg4; - int arg5; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - int val4; - int ecode4 = 0; - int val5; - int ecode5 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - PyObject *obj4 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOOO:CoreSession_recordFile", &obj0, &obj1, &obj2, &obj3, &obj4)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_recordFile" "', argument " "5" " of type '" "int" "'"); - } - arg5 = static_cast < int >(val5); - result = (int) (arg1)->recordFile(arg2, arg3, arg4, arg5); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int arg4; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - int val4; - int ecode4 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOO:CoreSession_recordFile", &obj0, &obj1, &obj2, &obj3)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - result = (int) (arg1)->recordFile(arg2, arg3, arg4); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_2(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_recordFile", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - result = (int) (arg1)->recordFile(arg2, arg3); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_3(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_recordFile", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (int) (arg1)->recordFile(arg2); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_recordFile(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[6]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 5); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_recordFile__SWIG_3(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_CoreSession_recordFile__SWIG_2(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_CoreSession_recordFile__SWIG_1(self, args); - } - } - } - } - } - if (argc == 5) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - { - int res = SWIG_AsVal_int(argv[4], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_CoreSession_recordFile__SWIG_0(self, args); - } - } - } - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'CoreSession_recordFile'.\n" - " Possible C/C++ prototypes are:\n" - " recordFile(CoreSession *,char *,int,int,int)\n" - " recordFile(CoreSession *,char *,int,int)\n" - " recordFile(CoreSession *,char *,int)\n" " recordFile(CoreSession *,char *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_setCallerData(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_setCallerData", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setCallerData" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setCallerData" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setCallerData" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setCallerData(arg2, arg3); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_originate__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - int arg4; - int result; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int val4; - int ecode4 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOO:CoreSession_originate", &obj0, &obj1, &obj2, &obj3)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2" " of type '" "CoreSession *" "'"); - } - arg2 = reinterpret_cast < CoreSession * >(argp2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_originate" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - result = (int) (arg1)->originate(arg2, arg3, arg4); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_originate__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - CoreSession *arg2 = (CoreSession *) 0; - char *arg3 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_originate", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2" " of type '" "CoreSession *" "'"); - } - arg2 = reinterpret_cast < CoreSession * >(argp2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - result = (int) (arg1)->originate(arg2, arg3); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_originate(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[5]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 4); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_originate__SWIG_1(self, args); - } - } - } - } - if (argc == 4) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[3], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_CoreSession_originate__SWIG_0(self, args); - } - } - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'CoreSession_originate'.\n" - " Possible C/C++ prototypes are:\n" - " originate(CoreSession *,CoreSession *,char *,int)\n" " originate(CoreSession *,CoreSession *,char *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_setDTMFCallback(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - void *arg2 = (void *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_setDTMFCallback", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setDTMFCallback" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setDTMFCallback" "', argument " "2" " of type '" "void *" "'"); - } - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setDTMFCallback" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setDTMFCallback(arg2, arg3); - resultobj = SWIG_Py_Void(); - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_speak(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_speak", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_speak" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_speak" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (int) (arg1)->speak(arg2); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_set_tts_parms(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_set_tts_parms", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_set_tts_parms" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_set_tts_parms" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_set_tts_parms" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->set_tts_parms(arg2, arg3); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_collectDigits(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - int result; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_collectDigits", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_collectDigits" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_collectDigits" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - result = (int) (arg1)->collectDigits(arg2); - resultobj = SWIG_From_int(static_cast < int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_getDigits(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - char *arg3 = (char *) 0; - int arg4; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int val4; - int ecode4 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOO:CoreSession_getDigits", &obj0, &obj1, &obj2, &obj3)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getDigits" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_getDigits" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_getDigits" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_getDigits" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - result = (char *) (arg1)->getDigits(arg2, arg3, arg4); - resultobj = SWIG_FromCharPtr((const char *) result); - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_transfer(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - char *arg4 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOO:CoreSession_transfer", &obj0, &obj1, &obj2, &obj3)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_transfer" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_transfer" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_transfer" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_transfer" "', argument " "4" " of type '" "char *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - result = (int) (arg1)->transfer(arg2, arg3, arg4); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_read(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int arg2; - int arg3; - char *arg4 = (char *) 0; - int arg5; - char *arg6 = (char *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int val3; - int ecode3 = 0; - int res4; - char *buf4 = 0; - int alloc4 = 0; - int val5; - int ecode5 = 0; - int res6; - char *buf6 = 0; - int alloc6 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - PyObject *obj4 = 0; - PyObject *obj5 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOOOO:CoreSession_read", &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_read" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_read" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_read" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_read" "', argument " "4" " of type '" "char const *" "'"); - } - arg4 = reinterpret_cast < char *>(buf4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_read" "', argument " "5" " of type '" "int" "'"); - } - arg5 = static_cast < int >(val5); - res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_read" "', argument " "6" " of type '" "char const *" "'"); - } - arg6 = reinterpret_cast < char *>(buf6); - result = (char *) (arg1)->read(arg2, arg3, (char const *) arg4, arg5, (char const *) arg6); - resultobj = SWIG_FromCharPtr((const char *) result); - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - return resultobj; - fail: - if (alloc4 == SWIG_NEWOBJ) - delete[]buf4; - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_playAndGetDigits(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - 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 *result = 0; - void *argp1 = 0; - int res1 = 0; - int val2; - int ecode2 = 0; - int val3; - int ecode3 = 0; - int val4; - int ecode4 = 0; - int val5; - int ecode5 = 0; - int res6; - char *buf6 = 0; - int alloc6 = 0; - int res7; - char *buf7 = 0; - int alloc7 = 0; - int res8; - char *buf8 = 0; - int alloc8 = 0; - int res9; - char *buf9 = 0; - int alloc9 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - PyObject *obj4 = 0; - PyObject *obj5 = 0; - PyObject *obj6 = 0; - PyObject *obj7 = 0; - PyObject *obj8 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOOOOOOO:CoreSession_playAndGetDigits", &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_playAndGetDigits" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_int(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_playAndGetDigits" "', argument " "2" " of type '" "int" "'"); - } - arg2 = static_cast < int >(val2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_playAndGetDigits" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - ecode4 = SWIG_AsVal_int(obj3, &val4); - if (!SWIG_IsOK(ecode4)) { - SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_playAndGetDigits" "', argument " "4" " of type '" "int" "'"); - } - arg4 = static_cast < int >(val4); - ecode5 = SWIG_AsVal_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_playAndGetDigits" "', argument " "5" " of type '" "int" "'"); - } - arg5 = static_cast < int >(val5); - res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); - if (!SWIG_IsOK(res6)) { - SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_playAndGetDigits" "', argument " "6" " of type '" "char *" "'"); - } - arg6 = reinterpret_cast < char *>(buf6); - res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7); - if (!SWIG_IsOK(res7)) { - SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CoreSession_playAndGetDigits" "', argument " "7" " of type '" "char *" "'"); - } - arg7 = reinterpret_cast < char *>(buf7); - res8 = SWIG_AsCharPtrAndSize(obj7, &buf8, NULL, &alloc8); - if (!SWIG_IsOK(res8)) { - SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CoreSession_playAndGetDigits" "', argument " "8" " of type '" "char *" "'"); - } - arg8 = reinterpret_cast < char *>(buf8); - res9 = SWIG_AsCharPtrAndSize(obj8, &buf9, NULL, &alloc9); - if (!SWIG_IsOK(res9)) { - SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CoreSession_playAndGetDigits" "', argument " "9" " of type '" "char *" "'"); - } - arg9 = reinterpret_cast < char *>(buf9); - result = (char *) (arg1)->playAndGetDigits(arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9); - resultobj = SWIG_FromCharPtr((const char *) result); - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - if (alloc7 == SWIG_NEWOBJ) - delete[]buf7; - if (alloc8 == SWIG_NEWOBJ) - delete[]buf8; - if (alloc9 == SWIG_NEWOBJ) - delete[]buf9; - return resultobj; - fail: - if (alloc6 == SWIG_NEWOBJ) - delete[]buf6; - if (alloc7 == SWIG_NEWOBJ) - delete[]buf7; - if (alloc8 == SWIG_NEWOBJ) - delete[]buf8; - if (alloc9 == SWIG_NEWOBJ) - delete[]buf9; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_streamFile__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int arg3; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int val3; - int ecode3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_streamFile", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - ecode3 = SWIG_AsVal_int(obj2, &val3); - if (!SWIG_IsOK(ecode3)) { - SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_streamFile" "', argument " "3" " of type '" "int" "'"); - } - arg3 = static_cast < int >(val3); - result = (int) (arg1)->streamFile(arg2, arg3); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_streamFile__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_streamFile", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - result = (int) (arg1)->streamFile(arg2); - resultobj = SWIG_From_int(static_cast < int >(result)); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_streamFile(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 3); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_streamFile__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - { - int res = SWIG_AsVal_int(argv[2], NULL); - _v = SWIG_CheckState(res); - } - if (_v) { - return _wrap_CoreSession_streamFile__SWIG_0(self, args); - } - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'CoreSession_streamFile'.\n" - " Possible C/C++ prototypes are:\n" " streamFile(CoreSession *,char *,int)\n" " streamFile(CoreSession *,char *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_flushEvents(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_flushEvents", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flushEvents" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) (arg1)->flushEvents(); - resultobj = SWIG_From_int(static_cast < int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_flushDigits(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - int result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_flushDigits", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flushDigits" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (int) (arg1)->flushDigits(); - resultobj = SWIG_From_int(static_cast < int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_setAutoHangup(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - bool arg2; - int result; - void *argp1 = 0; - int res1 = 0; - bool val2; - int ecode2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_setAutoHangup", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setAutoHangup" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - ecode2 = SWIG_AsVal_bool(obj1, &val2); - if (!SWIG_IsOK(ecode2)) { - SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_setAutoHangup" "', argument " "2" " of type '" "bool" "'"); - } - arg2 = static_cast < bool > (val2); - result = (int) (arg1)->setAutoHangup(arg2); - resultobj = SWIG_From_int(static_cast < int >(result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_setHangupHook(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - void *arg2 = (void *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_setHangupHook", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setHangupHook" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setHangupHook" "', argument " "2" " of type '" "void *" "'"); - } - (arg1)->setHangupHook(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_ready(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_ready", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_ready" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (bool) (arg1)->ready(); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_execute", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->execute(arg2, arg3); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_execute", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->execute(arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_execute(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[4]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 3); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 2) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_execute__SWIG_1(self, args); - } - } - } - if (argc == 3) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_CoreSession_execute__SWIG_0(self, args); - } - } - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'CoreSession_execute'.\n" - " Possible C/C++ prototypes are:\n" " execute(CoreSession *,char *,char *)\n" " execute(CoreSession *,char *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_sendEvent(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - Event *arg2 = (Event *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_sendEvent", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sendEvent" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sendEvent" "', argument " "2" " of type '" "Event *" "'"); - } - arg2 = reinterpret_cast < Event * >(argp2); - (arg1)->sendEvent(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_setEventData(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - Event *arg2 = (Event *) 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:CoreSession_setEventData", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setEventData" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_Event, 0 | 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setEventData" "', argument " "2" " of type '" "Event *" "'"); - } - arg2 = reinterpret_cast < Event * >(argp2); - (arg1)->setEventData(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_getXMLCDR(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_getXMLCDR", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getXMLCDR" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (char *) (arg1)->getXMLCDR(); - resultobj = SWIG_FromCharPtr((const char *) result); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_begin_allow_threads(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_begin_allow_threads", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_begin_allow_threads" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (bool) (arg1)->begin_allow_threads(); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_end_allow_threads(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_end_allow_threads", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_end_allow_threads" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (bool) (arg1)->end_allow_threads(); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_get_uuid(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - char *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_get_uuid", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_get_uuid" "', argument " "1" " of type '" "CoreSession const *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - result = (char *) ((CoreSession const *) arg1)->get_uuid(); - resultobj = SWIG_FromCharPtr((const char *) result); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_get_cb_args(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - switch_input_args_t *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_get_cb_args", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_get_cb_args" "', argument " "1" " of type '" "CoreSession const *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - { - switch_input_args_t const &_result_ref = ((CoreSession const *) arg1)->get_cb_args(); - result = (switch_input_args_t *) &_result_ref; - } - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_input_args_t, 0 | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_check_hangup_hook(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:CoreSession_check_hangup_hook", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_check_hangup_hook" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - (arg1)->check_hangup_hook(); - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_CoreSession_run_dtmf_callback(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = (CoreSession *) 0; - void *arg2 = (void *) 0; - switch_input_type_t arg3; - switch_status_t result; - void *argp1 = 0; - int res1 = 0; - int res2; - void *argp3; - int res3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:CoreSession_run_dtmf_callback", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_run_dtmf_callback" "', argument " "1" " of type '" "CoreSession *" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_run_dtmf_callback" "', argument " "2" " of type '" "void *" "'"); - } - { - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_switch_input_type_t, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" "CoreSession_run_dtmf_callback" "', argument " "3" " of type '" "switch_input_type_t" "'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "CoreSession_run_dtmf_callback" "', argument " "3" " of type '" - "switch_input_type_t" "'"); - } else { - switch_input_type_t *temp = reinterpret_cast < switch_input_type_t *>(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) - delete temp; - } - } - result = (arg1)->run_dtmf_callback(arg2, arg3); - resultobj = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *CoreSession_swigregister(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, (char *) "O:swigregister", &obj)) - return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_CoreSession, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); - } - - SWIGINTERN PyObject *_wrap_console_log(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0; - char *arg2 = (char *) 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:console_log", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_log" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "console_log" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - console_log(arg1, arg2); - resultobj = SWIG_Py_Void(); - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_console_clean_log(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:console_clean_log", &obj0)) - SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_clean_log" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - console_clean_log(arg1); - resultobj = SWIG_Py_Void(); - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - return resultobj; - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_bridge(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - CoreSession *arg1 = 0; - CoreSession *arg2 = 0; - void *argp1 = 0; - int res1 = 0; - void *argp2 = 0; - int res2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:bridge", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bridge" "', argument " "1" " of type '" "CoreSession &" "'"); - } - if (!argp1) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "bridge" "', argument " "1" " of type '" "CoreSession &" "'"); - } - arg1 = reinterpret_cast < CoreSession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CoreSession, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bridge" "', argument " "2" " of type '" "CoreSession &" "'"); - } - if (!argp2) { - SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "bridge" "', argument " "2" " of type '" "CoreSession &" "'"); - } - arg2 = reinterpret_cast < CoreSession * >(argp2); - bridge(*arg1, *arg2); - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_hanguphook(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - switch_core_session_t *arg1 = (switch_core_session_t *) 0; - switch_status_t result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:hanguphook", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_switch_core_session_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hanguphook" "', argument " "1" " of type '" "switch_core_session_t *" "'"); - } - arg1 = reinterpret_cast < switch_core_session_t *>(argp1); - result = hanguphook(arg1); - resultobj = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_dtmf_callback(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - 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; - void *argp1 = 0; - int res1 = 0; - int res2; - void *argp3; - int res3 = 0; - int res4; - unsigned int val5; - int ecode5 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - PyObject *obj3 = 0; - PyObject *obj4 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOOOO:dtmf_callback", &obj0, &obj1, &obj2, &obj3, &obj4)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_switch_core_session_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dtmf_callback" "', argument " "1" " of type '" "switch_core_session_t *" "'"); - } - arg1 = reinterpret_cast < switch_core_session_t *>(argp1); - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dtmf_callback" "', argument " "2" " of type '" "void *" "'"); - } - { - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_switch_input_type_t, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dtmf_callback" "', argument " "3" " of type '" "switch_input_type_t" "'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "dtmf_callback" "', argument " "3" " of type '" "switch_input_type_t" "'"); - } else { - switch_input_type_t *temp = reinterpret_cast < switch_input_type_t *>(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) - delete temp; - } - } - res4 = SWIG_ConvertPtr(obj3, SWIG_as_voidptrptr(&arg4), 0, 0); - if (!SWIG_IsOK(res4)) { - SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dtmf_callback" "', argument " "4" " of type '" "void *" "'"); - } - ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5); - if (!SWIG_IsOK(ecode5)) { - SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dtmf_callback" "', argument " "5" " of type '" "unsigned int" "'"); - } - arg5 = static_cast < unsigned int >(val5); - result = dtmf_callback(arg1, arg2, arg3, arg4, arg5); - resultobj = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_PySession__SWIG_0(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *result = 0; - - if (!PyArg_ParseTuple(args, (char *) ":new_PySession")) - SWIG_fail; - result = (PySession *) new PySession(); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PySession, SWIG_POINTER_NEW | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_PySession__SWIG_1(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0; - PySession *result = 0; - int res1; - char *buf1 = 0; - int alloc1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:new_PySession", &obj0)) - SWIG_fail; - res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PySession" "', argument " "1" " of type '" "char *" "'"); - } - arg1 = reinterpret_cast < char *>(buf1); - result = (PySession *) new PySession(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PySession, SWIG_POINTER_NEW | 0); - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - return resultobj; - fail: - if (alloc1 == SWIG_NEWOBJ) - delete[]buf1; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_PySession__SWIG_2(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - switch_core_session_t *arg1 = (switch_core_session_t *) 0; - PySession *result = 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:new_PySession", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_switch_core_session_t, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PySession" "', argument " "1" " of type '" "switch_core_session_t *" "'"); - } - arg1 = reinterpret_cast < switch_core_session_t *>(argp1); - result = (PySession *) new PySession(arg1); - resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PySession, SWIG_POINTER_NEW | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_new_PySession(PyObject * self, PyObject * args) { - int argc; - PyObject *argv[2]; - int ii; - - if (!PyTuple_Check(args)) - SWIG_fail; - argc = (int) PyObject_Length(args); - for (ii = 0; (ii < argc) && (ii < 1); ii++) { - argv[ii] = PyTuple_GET_ITEM(args, ii); - } - if (argc == 0) { - return _wrap_new_PySession__SWIG_0(self, args); - } - if (argc == 1) { - int _v; - void *vptr = 0; - int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_core_session_t, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_PySession__SWIG_2(self, args); - } - } - if (argc == 1) { - int _v; - int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); - _v = SWIG_CheckState(res); - if (_v) { - return _wrap_new_PySession__SWIG_1(self, args); - } - } - - fail: - SWIG_SetErrorMsg(PyExc_NotImplementedError, "Wrong number of arguments for overloaded function 'new_PySession'.\n" - " Possible C/C++ prototypes are:\n" " PySession()\n" " PySession(char *)\n" " PySession(switch_core_session_t *)\n"); - return NULL; - } - - - SWIGINTERN PyObject *_wrap_delete_PySession(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *arg1 = (PySession *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:delete_PySession", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PySession, SWIG_POINTER_DISOWN | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PySession" "', argument " "1" " of type '" "PySession *" "'"); - } - arg1 = reinterpret_cast < PySession * >(argp1); - delete arg1; - - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_PySession_setDTMFCallback(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *arg1 = (PySession *) 0; - PyObject *arg2 = (PyObject *) 0; - char *arg3 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res3; - char *buf3 = 0; - int alloc3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:PySession_setDTMFCallback", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PySession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_setDTMFCallback" "', argument " "1" " of type '" "PySession *" "'"); - } - arg1 = reinterpret_cast < PySession * >(argp1); - arg2 = obj1; - res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PySession_setDTMFCallback" "', argument " "3" " of type '" "char *" "'"); - } - arg3 = reinterpret_cast < char *>(buf3); - (arg1)->setDTMFCallback(arg2, arg3); - resultobj = SWIG_Py_Void(); - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return resultobj; - fail: - if (alloc3 == SWIG_NEWOBJ) - delete[]buf3; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_PySession_setHangupHook(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *arg1 = (PySession *) 0; - PyObject *arg2 = (PyObject *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:PySession_setHangupHook", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PySession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_setHangupHook" "', argument " "1" " of type '" "PySession *" "'"); - } - arg1 = reinterpret_cast < PySession * >(argp1); - arg2 = obj1; - (arg1)->setHangupHook(arg2); - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_PySession_check_hangup_hook(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *arg1 = (PySession *) 0; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:PySession_check_hangup_hook", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PySession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_check_hangup_hook" "', argument " "1" " of type '" "PySession *" "'"); - } - arg1 = reinterpret_cast < PySession * >(argp1); - (arg1)->check_hangup_hook(); - resultobj = SWIG_Py_Void(); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_PySession_hangup(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *arg1 = (PySession *) 0; - char *arg2 = (char *) 0; - void *argp1 = 0; - int res1 = 0; - int res2; - char *buf2 = 0; - int alloc2 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OO:PySession_hangup", &obj0, &obj1)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PySession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_hangup" "', argument " "1" " of type '" "PySession *" "'"); - } - arg1 = reinterpret_cast < PySession * >(argp1); - res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySession_hangup" "', argument " "2" " of type '" "char *" "'"); - } - arg2 = reinterpret_cast < char *>(buf2); - (arg1)->hangup(arg2); - resultobj = SWIG_Py_Void(); - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return resultobj; - fail: - if (alloc2 == SWIG_NEWOBJ) - delete[]buf2; - return NULL; - } - - - SWIGINTERN PyObject *_wrap_PySession_begin_allow_threads(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *arg1 = (PySession *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:PySession_begin_allow_threads", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PySession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_begin_allow_threads" "', argument " "1" " of type '" "PySession *" "'"); - } - arg1 = reinterpret_cast < PySession * >(argp1); - result = (bool) (arg1)->begin_allow_threads(); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_PySession_end_allow_threads(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *arg1 = (PySession *) 0; - bool result; - void *argp1 = 0; - int res1 = 0; - PyObject *obj0 = 0; - - if (!PyArg_ParseTuple(args, (char *) "O:PySession_end_allow_threads", &obj0)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PySession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_end_allow_threads" "', argument " "1" " of type '" "PySession *" "'"); - } - arg1 = reinterpret_cast < PySession * >(argp1); - result = (bool) (arg1)->end_allow_threads(); - resultobj = SWIG_From_bool(static_cast < bool > (result)); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *_wrap_PySession_run_dtmf_callback(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *resultobj = 0; - PySession *arg1 = (PySession *) 0; - void *arg2 = (void *) 0; - switch_input_type_t arg3; - switch_status_t result; - void *argp1 = 0; - int res1 = 0; - int res2; - void *argp3; - int res3 = 0; - PyObject *obj0 = 0; - PyObject *obj1 = 0; - PyObject *obj2 = 0; - - if (!PyArg_ParseTuple(args, (char *) "OOO:PySession_run_dtmf_callback", &obj0, &obj1, &obj2)) - SWIG_fail; - res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_PySession, 0 | 0); - if (!SWIG_IsOK(res1)) { - SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_run_dtmf_callback" "', argument " "1" " of type '" "PySession *" "'"); - } - arg1 = reinterpret_cast < PySession * >(argp1); - res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), 0, 0); - if (!SWIG_IsOK(res2)) { - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySession_run_dtmf_callback" "', argument " "2" " of type '" "void *" "'"); - } - { - res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_switch_input_type_t, 0 | 0); - if (!SWIG_IsOK(res3)) { - SWIG_exception_fail(SWIG_ArgError(res3), - "in method '" "PySession_run_dtmf_callback" "', argument " "3" " of type '" "switch_input_type_t" "'"); - } - if (!argp3) { - SWIG_exception_fail(SWIG_ValueError, - "invalid null reference " "in method '" "PySession_run_dtmf_callback" "', argument " "3" " of type '" - "switch_input_type_t" "'"); - } else { - switch_input_type_t *temp = reinterpret_cast < switch_input_type_t *>(argp3); - arg3 = *temp; - if (SWIG_IsNewObj(res3)) - delete temp; - } - } - result = (arg1)->run_dtmf_callback(arg2, arg3); - resultobj = - SWIG_NewPointerObj((new switch_status_t (static_cast < const switch_status_t &>(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0); - return resultobj; - fail: - return NULL; - } - - - SWIGINTERN PyObject *PySession_swigregister(PyObject * SWIGUNUSEDPARM(self), PyObject * args) { - PyObject *obj; - if (!PyArg_ParseTuple(args, (char *) "O:swigregister", &obj)) - return NULL; - SWIG_TypeNewClientData(SWIGTYPE_p_PySession, SWIG_NewClientData(obj)); - return SWIG_Py_Void(); - } - - static PyMethodDef SwigMethods[] = { - {(char *) "consoleLog", _wrap_consoleLog, METH_VARARGS, NULL}, - {(char *) "consoleCleanLog", _wrap_consoleCleanLog, METH_VARARGS, NULL}, - {(char *) "new_IVRMenu", _wrap_new_IVRMenu, METH_VARARGS, NULL}, - {(char *) "delete_IVRMenu", _wrap_delete_IVRMenu, METH_VARARGS, NULL}, - {(char *) "IVRMenu_bindAction", _wrap_IVRMenu_bindAction, METH_VARARGS, NULL}, - {(char *) "IVRMenu_execute", _wrap_IVRMenu_execute, METH_VARARGS, NULL}, - {(char *) "IVRMenu_swigregister", IVRMenu_swigregister, METH_VARARGS, NULL}, - {(char *) "new_API", _wrap_new_API, METH_VARARGS, NULL}, - {(char *) "delete_API", _wrap_delete_API, METH_VARARGS, NULL}, - {(char *) "API_execute", _wrap_API_execute, METH_VARARGS, NULL}, - {(char *) "API_executeString", _wrap_API_executeString, METH_VARARGS, NULL}, - {(char *) "API_swigregister", API_swigregister, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_threadState_get", _wrap_input_callback_state_t_threadState_get, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_extra_set", _wrap_input_callback_state_t_extra_set, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_extra_get", _wrap_input_callback_state_t_extra_get, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_funcargs_set", _wrap_input_callback_state_t_funcargs_set, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_funcargs_get", _wrap_input_callback_state_t_funcargs_get, METH_VARARGS, NULL}, - {(char *) "new_input_callback_state_t", _wrap_new_input_callback_state_t, METH_VARARGS, NULL}, - {(char *) "delete_input_callback_state_t", _wrap_delete_input_callback_state_t, METH_VARARGS, NULL}, - {(char *) "input_callback_state_t_swigregister", input_callback_state_t_swigregister, METH_VARARGS, NULL}, - {(char *) "new_Stream", _wrap_new_Stream, METH_VARARGS, NULL}, - {(char *) "delete_Stream", _wrap_delete_Stream, METH_VARARGS, NULL}, - {(char *) "Stream_write", _wrap_Stream_write, METH_VARARGS, NULL}, - {(char *) "Stream_get_data", _wrap_Stream_get_data, METH_VARARGS, NULL}, - {(char *) "Stream_swigregister", Stream_swigregister, METH_VARARGS, NULL}, - {(char *) "Event_event_set", _wrap_Event_event_set, METH_VARARGS, NULL}, - {(char *) "Event_event_get", _wrap_Event_event_get, METH_VARARGS, NULL}, - {(char *) "Event_serialized_string_set", _wrap_Event_serialized_string_set, METH_VARARGS, NULL}, - {(char *) "Event_serialized_string_get", _wrap_Event_serialized_string_get, METH_VARARGS, NULL}, - {(char *) "Event_mine_set", _wrap_Event_mine_set, METH_VARARGS, NULL}, - {(char *) "Event_mine_get", _wrap_Event_mine_get, METH_VARARGS, NULL}, - {(char *) "new_Event", _wrap_new_Event, METH_VARARGS, NULL}, - {(char *) "delete_Event", _wrap_delete_Event, METH_VARARGS, NULL}, - {(char *) "Event_serialize", _wrap_Event_serialize, METH_VARARGS, NULL}, - {(char *) "Event_setPriority", _wrap_Event_setPriority, METH_VARARGS, NULL}, - {(char *) "Event_getHeader", _wrap_Event_getHeader, METH_VARARGS, NULL}, - {(char *) "Event_getBody", _wrap_Event_getBody, METH_VARARGS, NULL}, - {(char *) "Event_getType", _wrap_Event_getType, METH_VARARGS, NULL}, - {(char *) "Event_addBody", _wrap_Event_addBody, METH_VARARGS, NULL}, - {(char *) "Event_addHeader", _wrap_Event_addHeader, METH_VARARGS, NULL}, - {(char *) "Event_delHeader", _wrap_Event_delHeader, METH_VARARGS, NULL}, - {(char *) "Event_fire", _wrap_Event_fire, METH_VARARGS, NULL}, - {(char *) "Event_swigregister", Event_swigregister, METH_VARARGS, NULL}, - {(char *) "delete_CoreSession", _wrap_delete_CoreSession, METH_VARARGS, NULL}, - {(char *) "CoreSession_session_set", _wrap_CoreSession_session_set, METH_VARARGS, NULL}, - {(char *) "CoreSession_session_get", _wrap_CoreSession_session_get, METH_VARARGS, NULL}, - {(char *) "CoreSession_channel_set", _wrap_CoreSession_channel_set, METH_VARARGS, NULL}, - {(char *) "CoreSession_channel_get", _wrap_CoreSession_channel_get, METH_VARARGS, NULL}, - {(char *) "CoreSession_flags_set", _wrap_CoreSession_flags_set, METH_VARARGS, NULL}, - {(char *) "CoreSession_flags_get", _wrap_CoreSession_flags_get, METH_VARARGS, NULL}, - {(char *) "CoreSession_allocated_set", _wrap_CoreSession_allocated_set, METH_VARARGS, NULL}, - {(char *) "CoreSession_allocated_get", _wrap_CoreSession_allocated_get, METH_VARARGS, NULL}, - {(char *) "CoreSession_cb_state_set", _wrap_CoreSession_cb_state_set, METH_VARARGS, NULL}, - {(char *) "CoreSession_cb_state_get", _wrap_CoreSession_cb_state_get, METH_VARARGS, NULL}, - {(char *) "CoreSession_hook_state_set", _wrap_CoreSession_hook_state_set, METH_VARARGS, NULL}, - {(char *) "CoreSession_hook_state_get", _wrap_CoreSession_hook_state_get, METH_VARARGS, NULL}, - {(char *) "CoreSession_answer", _wrap_CoreSession_answer, METH_VARARGS, NULL}, - {(char *) "CoreSession_preAnswer", _wrap_CoreSession_preAnswer, METH_VARARGS, NULL}, - {(char *) "CoreSession_hangup", _wrap_CoreSession_hangup, METH_VARARGS, NULL}, - {(char *) "CoreSession_setVariable", _wrap_CoreSession_setVariable, METH_VARARGS, NULL}, - {(char *) "CoreSession_setPrivate", _wrap_CoreSession_setPrivate, METH_VARARGS, NULL}, - {(char *) "CoreSession_getPrivate", _wrap_CoreSession_getPrivate, METH_VARARGS, NULL}, - {(char *) "CoreSession_getVariable", _wrap_CoreSession_getVariable, METH_VARARGS, NULL}, - {(char *) "CoreSession_process_callback_result", _wrap_CoreSession_process_callback_result, METH_VARARGS, NULL}, - {(char *) "CoreSession_say", _wrap_CoreSession_say, METH_VARARGS, NULL}, - {(char *) "CoreSession_sayPhrase", _wrap_CoreSession_sayPhrase, METH_VARARGS, NULL}, - {(char *) "CoreSession_recordFile", _wrap_CoreSession_recordFile, METH_VARARGS, NULL}, - {(char *) "CoreSession_setCallerData", _wrap_CoreSession_setCallerData, METH_VARARGS, NULL}, - {(char *) "CoreSession_originate", _wrap_CoreSession_originate, METH_VARARGS, NULL}, - {(char *) "CoreSession_setDTMFCallback", _wrap_CoreSession_setDTMFCallback, METH_VARARGS, NULL}, - {(char *) "CoreSession_speak", _wrap_CoreSession_speak, METH_VARARGS, NULL}, - {(char *) "CoreSession_set_tts_parms", _wrap_CoreSession_set_tts_parms, METH_VARARGS, NULL}, - {(char *) "CoreSession_collectDigits", _wrap_CoreSession_collectDigits, METH_VARARGS, NULL}, - {(char *) "CoreSession_getDigits", _wrap_CoreSession_getDigits, METH_VARARGS, NULL}, - {(char *) "CoreSession_transfer", _wrap_CoreSession_transfer, METH_VARARGS, NULL}, - {(char *) "CoreSession_read", _wrap_CoreSession_read, METH_VARARGS, NULL}, - {(char *) "CoreSession_playAndGetDigits", _wrap_CoreSession_playAndGetDigits, METH_VARARGS, NULL}, - {(char *) "CoreSession_streamFile", _wrap_CoreSession_streamFile, METH_VARARGS, NULL}, - {(char *) "CoreSession_flushEvents", _wrap_CoreSession_flushEvents, METH_VARARGS, NULL}, - {(char *) "CoreSession_flushDigits", _wrap_CoreSession_flushDigits, METH_VARARGS, NULL}, - {(char *) "CoreSession_setAutoHangup", _wrap_CoreSession_setAutoHangup, METH_VARARGS, NULL}, - {(char *) "CoreSession_setHangupHook", _wrap_CoreSession_setHangupHook, METH_VARARGS, NULL}, - {(char *) "CoreSession_ready", _wrap_CoreSession_ready, METH_VARARGS, NULL}, - {(char *) "CoreSession_execute", _wrap_CoreSession_execute, METH_VARARGS, NULL}, - {(char *) "CoreSession_sendEvent", _wrap_CoreSession_sendEvent, METH_VARARGS, NULL}, - {(char *) "CoreSession_setEventData", _wrap_CoreSession_setEventData, METH_VARARGS, NULL}, - {(char *) "CoreSession_getXMLCDR", _wrap_CoreSession_getXMLCDR, METH_VARARGS, NULL}, - {(char *) "CoreSession_begin_allow_threads", _wrap_CoreSession_begin_allow_threads, METH_VARARGS, NULL}, - {(char *) "CoreSession_end_allow_threads", _wrap_CoreSession_end_allow_threads, METH_VARARGS, NULL}, - {(char *) "CoreSession_get_uuid", _wrap_CoreSession_get_uuid, METH_VARARGS, NULL}, - {(char *) "CoreSession_get_cb_args", _wrap_CoreSession_get_cb_args, METH_VARARGS, NULL}, - {(char *) "CoreSession_check_hangup_hook", _wrap_CoreSession_check_hangup_hook, METH_VARARGS, NULL}, - {(char *) "CoreSession_run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback, METH_VARARGS, NULL}, - {(char *) "CoreSession_swigregister", CoreSession_swigregister, METH_VARARGS, NULL}, - {(char *) "console_log", _wrap_console_log, METH_VARARGS, NULL}, - {(char *) "console_clean_log", _wrap_console_clean_log, METH_VARARGS, NULL}, - {(char *) "bridge", _wrap_bridge, METH_VARARGS, NULL}, - {(char *) "hanguphook", _wrap_hanguphook, METH_VARARGS, NULL}, - {(char *) "dtmf_callback", _wrap_dtmf_callback, METH_VARARGS, NULL}, - {(char *) "new_PySession", _wrap_new_PySession, METH_VARARGS, NULL}, - {(char *) "delete_PySession", _wrap_delete_PySession, METH_VARARGS, NULL}, - {(char *) "PySession_setDTMFCallback", _wrap_PySession_setDTMFCallback, METH_VARARGS, NULL}, - {(char *) "PySession_setHangupHook", _wrap_PySession_setHangupHook, METH_VARARGS, NULL}, - {(char *) "PySession_check_hangup_hook", _wrap_PySession_check_hangup_hook, METH_VARARGS, NULL}, - {(char *) "PySession_hangup", _wrap_PySession_hangup, METH_VARARGS, NULL}, - {(char *) "PySession_begin_allow_threads", _wrap_PySession_begin_allow_threads, METH_VARARGS, NULL}, - {(char *) "PySession_end_allow_threads", _wrap_PySession_end_allow_threads, METH_VARARGS, NULL}, - {(char *) "PySession_run_dtmf_callback", _wrap_PySession_run_dtmf_callback, METH_VARARGS, NULL}, - {(char *) "PySession_swigregister", PySession_swigregister, METH_VARARGS, NULL}, - {NULL, NULL, 0, NULL} - }; +SWIGINTERN PyObject *_wrap_consoleLog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:consoleLog",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleLog" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "consoleLog" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + consoleLog(arg1,arg2); + resultobj = SWIG_Py_Void(); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_consoleCleanLog(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:consoleCleanLog",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "consoleCleanLog" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + consoleCleanLog(arg1); + resultobj = SWIG_Py_Void(); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + 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 ; + int arg9 ; + int arg10 ; + int arg11 ; + int arg12 ; + int arg13 ; + IVRMenu *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int res5 ; + char *buf5 = 0 ; + int alloc5 = 0 ; + int res6 ; + char *buf6 = 0 ; + int alloc6 = 0 ; + int res7 ; + char *buf7 = 0 ; + int alloc7 = 0 ; + int res8 ; + char *buf8 = 0 ; + int alloc8 = 0 ; + int val9 ; + int ecode9 = 0 ; + int val10 ; + int ecode10 = 0 ; + int val11 ; + int ecode11 = 0 ; + int val12 ; + int ecode12 = 0 ; + int val13 ; + int ecode13 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + PyObject * obj9 = 0 ; + PyObject * obj10 = 0 ; + PyObject * obj11 = 0 ; + PyObject * obj12 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOOOOO:new_IVRMenu",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10,&obj11,&obj12)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IVRMenu" "', argument " "1"" of type '" "IVRMenu *""'"); + } + arg1 = reinterpret_cast< IVRMenu * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IVRMenu" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IVRMenu" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_IVRMenu" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_IVRMenu" "', argument " "5"" of type '" "char const *""'"); + } + arg5 = reinterpret_cast< char * >(buf5); + res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "new_IVRMenu" "', argument " "6"" of type '" "char const *""'"); + } + arg6 = reinterpret_cast< char * >(buf6); + res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7); + if (!SWIG_IsOK(res7)) { + SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "new_IVRMenu" "', argument " "7"" of type '" "char const *""'"); + } + arg7 = reinterpret_cast< char * >(buf7); + res8 = SWIG_AsCharPtrAndSize(obj7, &buf8, NULL, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "new_IVRMenu" "', argument " "8"" of type '" "char const *""'"); + } + arg8 = reinterpret_cast< char * >(buf8); + ecode9 = SWIG_AsVal_int(obj8, &val9); + if (!SWIG_IsOK(ecode9)) { + SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_IVRMenu" "', argument " "9"" of type '" "int""'"); + } + arg9 = static_cast< int >(val9); + ecode10 = SWIG_AsVal_int(obj9, &val10); + if (!SWIG_IsOK(ecode10)) { + SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_IVRMenu" "', argument " "10"" of type '" "int""'"); + } + arg10 = static_cast< int >(val10); + ecode11 = SWIG_AsVal_int(obj10, &val11); + if (!SWIG_IsOK(ecode11)) { + SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "new_IVRMenu" "', argument " "11"" of type '" "int""'"); + } + arg11 = static_cast< int >(val11); + ecode12 = SWIG_AsVal_int(obj11, &val12); + if (!SWIG_IsOK(ecode12)) { + SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "new_IVRMenu" "', argument " "12"" of type '" "int""'"); + } + arg12 = static_cast< int >(val12); + ecode13 = SWIG_AsVal_int(obj12, &val13); + if (!SWIG_IsOK(ecode13)) { + SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "new_IVRMenu" "', argument " "13"" of type '" "int""'"); + } + arg13 = static_cast< int >(val13); + 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,arg9,arg10,arg11,arg12,arg13); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_IVRMenu, SWIG_POINTER_NEW | 0 ); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc5 == SWIG_NEWOBJ) delete[] buf5; + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + if (alloc7 == SWIG_NEWOBJ) delete[] buf7; + if (alloc8 == SWIG_NEWOBJ) delete[] buf8; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc5 == SWIG_NEWOBJ) delete[] buf5; + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + if (alloc7 == SWIG_NEWOBJ) delete[] buf7; + if (alloc8 == SWIG_NEWOBJ) delete[] buf8; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_IVRMenu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IVRMenu *arg1 = (IVRMenu *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_IVRMenu",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IVRMenu, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVRMenu" "', argument " "1"" of type '" "IVRMenu *""'"); + } + arg1 = reinterpret_cast< IVRMenu * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IVRMenu_bindAction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IVRMenu *arg1 = (IVRMenu *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:IVRMenu_bindAction",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_bindAction" "', argument " "1"" of type '" "IVRMenu *""'"); + } + arg1 = reinterpret_cast< IVRMenu * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_bindAction" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_bindAction" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IVRMenu_bindAction" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + (arg1)->bindAction(arg2,(char const *)arg3,(char const *)arg4); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_IVRMenu_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + IVRMenu *arg1 = (IVRMenu *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:IVRMenu_execute",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_IVRMenu, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVRMenu_execute" "', argument " "1"" of type '" "IVRMenu *""'"); + } + arg1 = reinterpret_cast< IVRMenu * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IVRMenu_execute" "', argument " "2"" of type '" "CoreSession *""'"); + } + arg2 = reinterpret_cast< CoreSession * >(argp2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IVRMenu_execute" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->execute(arg2,(char const *)arg3); + resultobj = SWIG_Py_Void(); + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *IVRMenu_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_IVRMenu, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_API(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + API *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_API")) SWIG_fail; + result = (API *)new API(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_API, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_API(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + API *arg1 = (API *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_API",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_API, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_API" "', argument " "1"" of type '" "API *""'"); + } + arg1 = reinterpret_cast< API * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_API_execute(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + API *arg1 = (API *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:API_execute",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_API, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_execute" "', argument " "1"" of type '" "API *""'"); + } + arg1 = reinterpret_cast< API * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_execute" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "API_execute" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (char *)(arg1)->execute((char const *)arg2,(char const *)arg3); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_API_executeString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + API *arg1 = (API *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:API_executeString",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_API, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "API_executeString" "', argument " "1"" of type '" "API *""'"); + } + arg1 = reinterpret_cast< API * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "API_executeString" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (char *)(arg1)->executeString((char const *)arg2); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *API_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_API, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_input_callback_state_t_function_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:input_callback_state_t_function_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_function_set" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_function_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->function = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_input_callback_state_t_function_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:input_callback_state_t_function_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_function_get" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + result = (void *) ((arg1)->function); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_input_callback_state_t_threadState_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:input_callback_state_t_threadState_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_threadState_set" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_threadState_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->threadState = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_input_callback_state_t_threadState_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:input_callback_state_t_threadState_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_threadState_get" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + result = (void *) ((arg1)->threadState); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_input_callback_state_t_extra_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:input_callback_state_t_extra_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_extra_set" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_extra_set" "', argument " "2"" of type '" "void *""'"); + } + if (arg1) (arg1)->extra = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_input_callback_state_t_extra_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:input_callback_state_t_extra_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_extra_get" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + result = (void *) ((arg1)->extra); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_input_callback_state_t_funcargs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:input_callback_state_t_funcargs_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_funcargs_set" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "input_callback_state_t_funcargs_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg1->funcargs) delete[] arg1->funcargs; + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->funcargs = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); + } else { + arg1->funcargs = 0; + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_input_callback_state_t_funcargs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:input_callback_state_t_funcargs_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "input_callback_state_t_funcargs_get" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + result = (char *) ((arg1)->funcargs); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_input_callback_state_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_input_callback_state_t")) SWIG_fail; + result = (input_callback_state_t *)new input_callback_state_t(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input_callback_state, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_input_callback_state_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + input_callback_state_t *arg1 = (input_callback_state_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_input_callback_state_t",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_input_callback_state, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_input_callback_state_t" "', argument " "1"" of type '" "input_callback_state_t *""'"); + } + arg1 = reinterpret_cast< input_callback_state_t * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *input_callback_state_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_input_callback_state, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_new_Stream__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stream *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_Stream")) SWIG_fail; + result = (Stream *)new Stream(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Stream__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + switch_stream_handle_t *arg1 = (switch_stream_handle_t *) 0 ; + Stream *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Stream",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_stream_handle_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stream" "', argument " "1"" of type '" "switch_stream_handle_t *""'"); + } + arg1 = reinterpret_cast< switch_stream_handle_t * >(argp1); + result = (Stream *)new Stream(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Stream, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Stream(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_Stream__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_stream_handle_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Stream__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Stream'.\n" + " Possible C/C++ prototypes are:\n" + " Stream()\n" + " Stream(switch_stream_handle_t *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Stream(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stream *arg1 = (Stream *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Stream",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stream, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stream" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stream_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stream *arg1 = (Stream *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Stream_write",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_write" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stream_write" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->write((char const *)arg2); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Stream_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Stream *arg1 = (Stream *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Stream_get_data",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Stream, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stream_get_data" "', argument " "1"" of type '" "Stream *""'"); + } + arg1 = reinterpret_cast< Stream * >(argp1); + result = (char *)(arg1)->get_data(); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Stream_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Stream, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_Event_event_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + switch_event_t *arg2 = (switch_event_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Event_event_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_set" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_switch_event_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_event_set" "', argument " "2"" of type '" "switch_event_t *""'"); + } + arg2 = reinterpret_cast< switch_event_t * >(argp2); + if (arg1) (arg1)->event = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_event_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + switch_event_t *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Event_event_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_event_get" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (switch_event_t *) ((arg1)->event); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_event_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_serialized_string_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Event_serialized_string_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_set" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialized_string_set" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + if (arg1->serialized_string) delete[] arg1->serialized_string; + if (arg2) { + size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1; + arg1->serialized_string = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size))); + } else { + arg1->serialized_string = 0; + } + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_serialized_string_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Event_serialized_string_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialized_string_get" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (char *) ((arg1)->serialized_string); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_mine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Event_mine_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_set" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Event_mine_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->mine = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_mine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Event_mine_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_mine_get" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (int) ((arg1)->mine); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Event__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + Event *result = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Event",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Event" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (Event *)new Event((char const *)arg1,(char const *)arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 ); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Event__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + Event *result = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Event",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "char const *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + result = (Event *)new Event((char const *)arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 ); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Event__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + switch_event_t *arg1 = (switch_event_t *) 0 ; + int arg2 ; + Event *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:new_Event",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'"); + } + arg1 = reinterpret_cast< switch_event_t * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Event" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (Event *)new Event(arg1,arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Event__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + switch_event_t *arg1 = (switch_event_t *) 0 ; + Event *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_Event",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_event_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Event" "', argument " "1"" of type '" "switch_event_t *""'"); + } + arg1 = reinterpret_cast< switch_event_t * >(argp1); + result = (Event *)new Event(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_Event(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_event_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Event__SWIG_3(self, args); + } + } + if (argc == 1) { + int _v; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Event__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_event_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[1], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_new_Event__SWIG_2(self, args); + } + } + } + if (argc == 2) { + int _v; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_Event__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_Event'.\n" + " Possible C/C++ prototypes are:\n" + " Event(char const *,char const *)\n" + " Event(char const *)\n" + " Event(switch_event_t *,int)\n" + " Event(switch_event_t *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_Event(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_Event",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Event" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_serialize__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Event_serialize",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_serialize" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (char *)(arg1)->serialize((char const *)arg2); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_serialize__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Event_serialize",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_serialize" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (char *)(arg1)->serialize(); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_serialize(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Event_serialize__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Event_serialize__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Event_serialize'.\n" + " Possible C/C++ prototypes are:\n" + " serialize(Event *,char const *)\n" + " serialize(Event *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_setPriority__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + switch_priority_t arg2 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Event_setPriority",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_priority_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_setPriority" "', argument " "2"" of type '" "switch_priority_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Event_setPriority" "', argument " "2"" of type '" "switch_priority_t""'"); + } else { + switch_priority_t * temp = reinterpret_cast< switch_priority_t * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + result = (bool)(arg1)->setPriority(arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_setPriority__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Event_setPriority",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_setPriority" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (bool)(arg1)->setPriority(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_setPriority(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Event_setPriority__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Event, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_switch_priority_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_Event_setPriority__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Event_setPriority'.\n" + " Possible C/C++ prototypes are:\n" + " setPriority(Event *,switch_priority_t)\n" + " setPriority(Event *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_getHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Event_getHeader",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getHeader" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_getHeader" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (char *)(arg1)->getHeader(arg2); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_getBody(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Event_getBody",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getBody" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (char *)(arg1)->getBody(); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_getType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Event_getType",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_getType" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (char *)(arg1)->getType(); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_addBody(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Event_addBody",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addBody" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addBody" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (bool)(arg1)->addBody((char const *)arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_addHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:Event_addHeader",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_addHeader" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_addHeader" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Event_addHeader" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (bool)(arg1)->addHeader((char const *)arg2,(char const *)arg3); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_delHeader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + char *arg2 = (char *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:Event_delHeader",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_delHeader" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Event_delHeader" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (bool)(arg1)->delHeader((char const *)arg2); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_Event_fire(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + Event *arg1 = (Event *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:Event_fire",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Event_fire" "', argument " "1"" of type '" "Event *""'"); + } + arg1 = reinterpret_cast< Event * >(argp1); + result = (bool)(arg1)->fire(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *Event_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_Event, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_delete_CoreSession(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_CoreSession",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoreSession" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_session_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_core_session_t *arg2 = (switch_core_session_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_session_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_session_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_switch_core_session_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_session_set" "', argument " "2"" of type '" "switch_core_session_t *""'"); + } + arg2 = reinterpret_cast< switch_core_session_t * >(argp2); + if (arg1) (arg1)->session = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_session_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_core_session_t *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_session_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_session_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (switch_core_session_t *) ((arg1)->session); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_core_session_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_channel_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_t *arg2 = (switch_channel_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_channel_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_channel_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_switch_channel_t, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_channel_set" "', argument " "2"" of type '" "switch_channel_t *""'"); + } + arg2 = reinterpret_cast< switch_channel_t * >(argp2); + if (arg1) (arg1)->channel = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_channel_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_t *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_channel_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_channel_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (switch_channel_t *) ((arg1)->channel); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_channel_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_flags_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + unsigned int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_flags_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flags_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_flags_set" "', argument " "2"" of type '" "unsigned int""'"); + } + arg2 = static_cast< unsigned int >(val2); + if (arg1) (arg1)->flags = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_flags_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + unsigned int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_flags_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flags_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (unsigned int) ((arg1)->flags); + resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_allocated_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_allocated_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_allocated_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_allocated_set" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + if (arg1) (arg1)->allocated = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_allocated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_allocated_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_allocated_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int) ((arg1)->allocated); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_cb_state_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + input_callback_state *arg2 = (input_callback_state *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_cb_state_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_cb_state_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_input_callback_state, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_cb_state_set" "', argument " "2"" of type '" "input_callback_state *""'"); + } + arg2 = reinterpret_cast< input_callback_state * >(argp2); + if (arg1) (arg1)->cb_state = *arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_cb_state_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + input_callback_state *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_cb_state_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_cb_state_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (input_callback_state *)& ((arg1)->cb_state); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_input_callback_state, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_hook_state_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_state_t arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_hook_state_set",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hook_state_set" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + { + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_switch_channel_state_t, 0 | 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hook_state_set" "', argument " "2"" of type '" "switch_channel_state_t""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CoreSession_hook_state_set" "', argument " "2"" of type '" "switch_channel_state_t""'"); + } else { + switch_channel_state_t * temp = reinterpret_cast< switch_channel_state_t * >(argp2); + arg2 = *temp; + if (SWIG_IsNewObj(res2)) delete temp; + } + } + if (arg1) (arg1)->hook_state = arg2; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_hook_state_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_channel_state_t result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_hook_state_get",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hook_state_get" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = ((arg1)->hook_state); + resultobj = SWIG_NewPointerObj((new switch_channel_state_t(static_cast< const switch_channel_state_t& >(result))), SWIGTYPE_p_switch_channel_state_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_answer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_answer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_answer" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int)(arg1)->answer(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_preAnswer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_preAnswer",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_preAnswer" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int)(arg1)->preAnswer(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_hangup__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_hangup",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_hangup" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->hangup(arg2); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_hangup__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_hangup",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_hangup" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + (arg1)->hangup(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_hangup(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[3]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 2); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_hangup__SWIG_1(self, args); + } + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_hangup__SWIG_0(self, args); + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_hangup'.\n" + " Possible C/C++ prototypes are:\n" + " hangup(CoreSession *,char *)\n" + " hangup(CoreSession *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_setVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_setVariable",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setVariable" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setVariable" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setVariable" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setVariable(arg2,arg3); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_setPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_setPrivate",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setPrivate" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setPrivate" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setPrivate" "', argument " "3"" of type '" "void *""'"); + } + (arg1)->setPrivate(arg2,arg3); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_getPrivate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_getPrivate",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getPrivate" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getPrivate" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (void *)(arg1)->getPrivate(arg2); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_getVariable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_getVariable",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getVariable" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_getVariable" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (char *)(arg1)->getVariable(arg2); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_process_callback_result(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + switch_status_t result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_process_callback_result",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_process_callback_result" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_process_callback_result" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (arg1)->process_callback_result(arg2); + resultobj = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0 ); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_say(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + char *arg5 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int res5 ; + char *buf5 = 0 ; + int alloc5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:CoreSession_say",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_say" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_say" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_say" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_say" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + res5 = SWIG_AsCharPtrAndSize(obj4, &buf5, NULL, &alloc5); + if (!SWIG_IsOK(res5)) { + SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CoreSession_say" "', argument " "5"" of type '" "char const *""'"); + } + arg5 = reinterpret_cast< char * >(buf5); + (arg1)->say((char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc5 == SWIG_NEWOBJ) delete[] buf5; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc5 == SWIG_NEWOBJ) delete[] buf5; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_sayPhrase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:CoreSession_sayPhrase",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_sayPhrase" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_sayPhrase" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + (arg1)->sayPhrase((char const *)arg2,(char const *)arg3,(char const *)arg4); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_sayPhrase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_sayPhrase",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_sayPhrase" "', argument " "3"" of type '" "char const *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->sayPhrase((char const *)arg2,(char const *)arg3); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_sayPhrase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_sayPhrase",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sayPhrase" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sayPhrase" "', argument " "2"" of type '" "char const *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->sayPhrase((char const *)arg2); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_sayPhrase(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_sayPhrase__SWIG_2(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_sayPhrase__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[3], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_sayPhrase__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_sayPhrase'.\n" + " Possible C/C++ prototypes are:\n" + " sayPhrase(CoreSession *,char const *,char const *,char const *)\n" + " sayPhrase(CoreSession *,char const *,char const *)\n" + " sayPhrase(CoreSession *,char const *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int arg5 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:CoreSession_recordFile",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_recordFile" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + result = (int)(arg1)->recordFile(arg2,arg3,arg4,arg5); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int arg4 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:CoreSession_recordFile",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_recordFile" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (int)(arg1)->recordFile(arg2,arg3,arg4); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_recordFile",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_recordFile" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (int)(arg1)->recordFile(arg2,arg3); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_recordFile__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_recordFile",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_recordFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_recordFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->recordFile(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_recordFile(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[6]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 5); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_recordFile__SWIG_3(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CoreSession_recordFile__SWIG_2(self, args); + } + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CoreSession_recordFile__SWIG_1(self, args); + } + } + } + } + } + if (argc == 5) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + { + int res = SWIG_AsVal_int(argv[4], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CoreSession_recordFile__SWIG_0(self, args); + } + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_recordFile'.\n" + " Possible C/C++ prototypes are:\n" + " recordFile(CoreSession *,char *,int,int,int)\n" + " recordFile(CoreSession *,char *,int,int)\n" + " recordFile(CoreSession *,char *,int)\n" + " recordFile(CoreSession *,char *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_setCallerData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_setCallerData",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setCallerData" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setCallerData" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setCallerData" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setCallerData(arg2,arg3); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_originate__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + int arg4 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:CoreSession_originate",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2"" of type '" "CoreSession *""'"); + } + arg2 = reinterpret_cast< CoreSession * >(argp2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_originate" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (int)(arg1)->originate(arg2,arg3,arg4); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_originate__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + CoreSession *arg2 = (CoreSession *) 0 ; + char *arg3 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_originate",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_originate" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_originate" "', argument " "2"" of type '" "CoreSession *""'"); + } + arg2 = reinterpret_cast< CoreSession * >(argp2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_originate" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + result = (int)(arg1)->originate(arg2,arg3); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_originate(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[5]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 4); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_originate__SWIG_1(self, args); + } + } + } + } + if (argc == 4) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[3], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CoreSession_originate__SWIG_0(self, args); + } + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_originate'.\n" + " Possible C/C++ prototypes are:\n" + " originate(CoreSession *,CoreSession *,char *,int)\n" + " originate(CoreSession *,CoreSession *,char *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_setDTMFCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + void *arg2 = (void *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_setDTMFCallback",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setDTMFCallback" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setDTMFCallback" "', argument " "2"" of type '" "void *""'"); + } + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_setDTMFCallback" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setDTMFCallback(arg2,arg3); + resultobj = SWIG_Py_Void(); + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_speak(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_speak",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_speak" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_speak" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->speak(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_set_tts_parms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_set_tts_parms",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_set_tts_parms" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_set_tts_parms" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_set_tts_parms" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->set_tts_parms(arg2,arg3); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_collectDigits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_collectDigits",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_collectDigits" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_collectDigits" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + result = (int)(arg1)->collectDigits(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_getDigits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + char *arg3 = (char *) 0 ; + int arg4 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int val4 ; + int ecode4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:CoreSession_getDigits",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getDigits" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_getDigits" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_getDigits" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_getDigits" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + result = (char *)(arg1)->getDigits(arg2,arg3,arg4); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_transfer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + char *arg4 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOO:CoreSession_transfer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_transfer" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_transfer" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_transfer" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_transfer" "', argument " "4"" of type '" "char *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + result = (int)(arg1)->transfer(arg2,arg3,arg4); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_read(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int arg2 ; + int arg3 ; + char *arg4 = (char *) 0 ; + int arg5 ; + char *arg6 = (char *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int res6 ; + char *buf6 = 0 ; + int alloc6 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOO:CoreSession_read",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_read" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_read" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_read" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "CoreSession_read" "', argument " "4"" of type '" "char const *""'"); + } + arg4 = reinterpret_cast< char * >(buf4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_read" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_read" "', argument " "6"" of type '" "char const *""'"); + } + arg6 = reinterpret_cast< char * >(buf6); + result = (char *)(arg1)->read(arg2,arg3,(char const *)arg4,arg5,(char const *)arg6); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + return resultobj; +fail: + if (alloc4 == SWIG_NEWOBJ) delete[] buf4; + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_playAndGetDigits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + 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 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + int val5 ; + int ecode5 = 0 ; + int res6 ; + char *buf6 = 0 ; + int alloc6 = 0 ; + int res7 ; + char *buf7 = 0 ; + int alloc7 = 0 ; + int res8 ; + char *buf8 = 0 ; + int alloc8 = 0 ; + int res9 ; + char *buf9 = 0 ; + int alloc9 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + PyObject * obj5 = 0 ; + PyObject * obj6 = 0 ; + PyObject * obj7 = 0 ; + PyObject * obj8 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:CoreSession_playAndGetDigits",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_playAndGetDigits" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_int(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_playAndGetDigits" "', argument " "2"" of type '" "int""'"); + } + arg2 = static_cast< int >(val2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_playAndGetDigits" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + ecode4 = SWIG_AsVal_int(obj3, &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoreSession_playAndGetDigits" "', argument " "4"" of type '" "int""'"); + } + arg4 = static_cast< int >(val4); + ecode5 = SWIG_AsVal_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoreSession_playAndGetDigits" "', argument " "5"" of type '" "int""'"); + } + arg5 = static_cast< int >(val5); + res6 = SWIG_AsCharPtrAndSize(obj5, &buf6, NULL, &alloc6); + if (!SWIG_IsOK(res6)) { + SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "CoreSession_playAndGetDigits" "', argument " "6"" of type '" "char *""'"); + } + arg6 = reinterpret_cast< char * >(buf6); + res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7); + if (!SWIG_IsOK(res7)) { + SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "CoreSession_playAndGetDigits" "', argument " "7"" of type '" "char *""'"); + } + arg7 = reinterpret_cast< char * >(buf7); + res8 = SWIG_AsCharPtrAndSize(obj7, &buf8, NULL, &alloc8); + if (!SWIG_IsOK(res8)) { + SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "CoreSession_playAndGetDigits" "', argument " "8"" of type '" "char *""'"); + } + arg8 = reinterpret_cast< char * >(buf8); + res9 = SWIG_AsCharPtrAndSize(obj8, &buf9, NULL, &alloc9); + if (!SWIG_IsOK(res9)) { + SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "CoreSession_playAndGetDigits" "', argument " "9"" of type '" "char *""'"); + } + arg9 = reinterpret_cast< char * >(buf9); + result = (char *)(arg1)->playAndGetDigits(arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + resultobj = SWIG_FromCharPtr((const char *)result); + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + if (alloc7 == SWIG_NEWOBJ) delete[] buf7; + if (alloc8 == SWIG_NEWOBJ) delete[] buf8; + if (alloc9 == SWIG_NEWOBJ) delete[] buf9; + return resultobj; +fail: + if (alloc6 == SWIG_NEWOBJ) delete[] buf6; + if (alloc7 == SWIG_NEWOBJ) delete[] buf7; + if (alloc8 == SWIG_NEWOBJ) delete[] buf8; + if (alloc9 == SWIG_NEWOBJ) delete[] buf9; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_streamFile__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_streamFile",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + ecode3 = SWIG_AsVal_int(obj2, &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoreSession_streamFile" "', argument " "3"" of type '" "int""'"); + } + arg3 = static_cast< int >(val3); + result = (int)(arg1)->streamFile(arg2,arg3); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_streamFile__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_streamFile",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_streamFile" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_streamFile" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + result = (int)(arg1)->streamFile(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_streamFile(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_streamFile__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + { + int res = SWIG_AsVal_int(argv[2], NULL); + _v = SWIG_CheckState(res); + } + if (_v) { + return _wrap_CoreSession_streamFile__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_streamFile'.\n" + " Possible C/C++ prototypes are:\n" + " streamFile(CoreSession *,char *,int)\n" + " streamFile(CoreSession *,char *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_flushEvents(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_flushEvents",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flushEvents" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int)(arg1)->flushEvents(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_flushDigits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_flushDigits",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_flushDigits" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (int)(arg1)->flushDigits(); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_setAutoHangup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + bool arg2 ; + int result; + void *argp1 = 0 ; + int res1 = 0 ; + bool val2 ; + int ecode2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_setAutoHangup",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setAutoHangup" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + ecode2 = SWIG_AsVal_bool(obj1, &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoreSession_setAutoHangup" "', argument " "2"" of type '" "bool""'"); + } + arg2 = static_cast< bool >(val2); + result = (int)(arg1)->setAutoHangup(arg2); + resultobj = SWIG_From_int(static_cast< int >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_setHangupHook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + void *arg2 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_setHangupHook",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setHangupHook" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setHangupHook" "', argument " "2"" of type '" "void *""'"); + } + (arg1)->setHangupHook(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_ready(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_ready",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_ready" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (bool)(arg1)->ready(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_execute",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_execute" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->execute(arg2,arg3); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_execute__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_execute",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_execute" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_execute" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->execute(arg2); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_execute(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[4]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 3); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 2) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_execute__SWIG_1(self, args); + } + } + } + if (argc == 3) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_CoreSession, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_CoreSession_execute__SWIG_0(self, args); + } + } + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoreSession_execute'.\n" + " Possible C/C++ prototypes are:\n" + " execute(CoreSession *,char *,char *)\n" + " execute(CoreSession *,char *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_sendEvent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + Event *arg2 = (Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_sendEvent",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_sendEvent" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_sendEvent" "', argument " "2"" of type '" "Event *""'"); + } + arg2 = reinterpret_cast< Event * >(argp2); + (arg1)->sendEvent(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_setEventData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + Event *arg2 = (Event *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:CoreSession_setEventData",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_setEventData" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_Event, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_setEventData" "', argument " "2"" of type '" "Event *""'"); + } + arg2 = reinterpret_cast< Event * >(argp2); + (arg1)->setEventData(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_getXMLCDR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_getXMLCDR",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_getXMLCDR" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (char *)(arg1)->getXMLCDR(); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_begin_allow_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_begin_allow_threads",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_begin_allow_threads" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (bool)(arg1)->begin_allow_threads(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_end_allow_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_end_allow_threads",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_end_allow_threads" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (bool)(arg1)->end_allow_threads(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_get_uuid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + char *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_get_uuid",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_get_uuid" "', argument " "1"" of type '" "CoreSession const *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + result = (char *)((CoreSession const *)arg1)->get_uuid(); + resultobj = SWIG_FromCharPtr((const char *)result); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_get_cb_args(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + switch_input_args_t *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_get_cb_args",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_get_cb_args" "', argument " "1"" of type '" "CoreSession const *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + { + switch_input_args_t const &_result_ref = ((CoreSession const *)arg1)->get_cb_args(); + result = (switch_input_args_t *) &_result_ref; + } + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_switch_input_args_t, 0 | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_check_hangup_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:CoreSession_check_hangup_hook",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_check_hangup_hook" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + (arg1)->check_hangup_hook(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_CoreSession_run_dtmf_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = (CoreSession *) 0 ; + void *arg2 = (void *) 0 ; + switch_input_type_t arg3 ; + switch_status_t result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:CoreSession_run_dtmf_callback",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_CoreSession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoreSession_run_dtmf_callback" "', argument " "1"" of type '" "CoreSession *""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoreSession_run_dtmf_callback" "', argument " "2"" of type '" "void *""'"); + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_switch_input_type_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CoreSession_run_dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CoreSession_run_dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } else { + switch_input_type_t * temp = reinterpret_cast< switch_input_type_t * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + result = (arg1)->run_dtmf_callback(arg2,arg3); + resultobj = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *CoreSession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_CoreSession, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +SWIGINTERN PyObject *_wrap_console_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + char *arg2 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:console_log",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_log" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "console_log" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + console_log(arg1,arg2); + resultobj = SWIG_Py_Void(); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_console_clean_log(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:console_clean_log",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "console_clean_log" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + console_clean_log(arg1); + resultobj = SWIG_Py_Void(); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_bridge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + CoreSession *arg1 = 0 ; + CoreSession *arg2 = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:bridge",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_CoreSession, 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bridge" "', argument " "1"" of type '" "CoreSession &""'"); + } + if (!argp1) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "bridge" "', argument " "1"" of type '" "CoreSession &""'"); + } + arg1 = reinterpret_cast< CoreSession * >(argp1); + res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_CoreSession, 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "bridge" "', argument " "2"" of type '" "CoreSession &""'"); + } + if (!argp2) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "bridge" "', argument " "2"" of type '" "CoreSession &""'"); + } + arg2 = reinterpret_cast< CoreSession * >(argp2); + bridge(*arg1,*arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_hanguphook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + switch_status_t result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:hanguphook",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_core_session_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hanguphook" "', argument " "1"" of type '" "switch_core_session_t *""'"); + } + arg1 = reinterpret_cast< switch_core_session_t * >(argp1); + result = hanguphook(arg1); + resultobj = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_dtmf_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + 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; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + void *argp3 ; + int res3 = 0 ; + int res4 ; + unsigned int val5 ; + int ecode5 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOOOO:dtmf_callback",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_core_session_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dtmf_callback" "', argument " "1"" of type '" "switch_core_session_t *""'"); + } + arg1 = reinterpret_cast< switch_core_session_t * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dtmf_callback" "', argument " "2"" of type '" "void *""'"); + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_switch_input_type_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } else { + switch_input_type_t * temp = reinterpret_cast< switch_input_type_t * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + res4 = SWIG_ConvertPtr(obj3,SWIG_as_voidptrptr(&arg4), 0, 0); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dtmf_callback" "', argument " "4"" of type '" "void *""'"); + } + ecode5 = SWIG_AsVal_unsigned_SS_int(obj4, &val5); + if (!SWIG_IsOK(ecode5)) { + SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dtmf_callback" "', argument " "5"" of type '" "unsigned int""'"); + } + arg5 = static_cast< unsigned int >(val5); + result = dtmf_callback(arg1,arg2,arg3,arg4,arg5); + resultobj = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PySession__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *result = 0 ; + + if (!PyArg_ParseTuple(args,(char *)":new_PySession")) SWIG_fail; + result = (PySession *)new PySession(); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PySession, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PySession__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + char *arg1 = (char *) 0 ; + PySession *result = 0 ; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_PySession",&obj0)) SWIG_fail; + res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PySession" "', argument " "1"" of type '" "char *""'"); + } + arg1 = reinterpret_cast< char * >(buf1); + result = (PySession *)new PySession(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PySession, SWIG_POINTER_NEW | 0 ); + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return resultobj; +fail: + if (alloc1 == SWIG_NEWOBJ) delete[] buf1; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PySession__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; + PySession *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:new_PySession",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_switch_core_session_t, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PySession" "', argument " "1"" of type '" "switch_core_session_t *""'"); + } + arg1 = reinterpret_cast< switch_core_session_t * >(argp1); + result = (PySession *)new PySession(arg1); + resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_PySession, SWIG_POINTER_NEW | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_new_PySession(PyObject *self, PyObject *args) { + int argc; + PyObject *argv[2]; + int ii; + + if (!PyTuple_Check(args)) SWIG_fail; + argc = (int)PyObject_Length(args); + for (ii = 0; (ii < argc) && (ii < 1); ii++) { + argv[ii] = PyTuple_GET_ITEM(args,ii); + } + if (argc == 0) { + return _wrap_new_PySession__SWIG_0(self, args); + } + if (argc == 1) { + int _v; + void *vptr = 0; + int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_switch_core_session_t, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_PySession__SWIG_2(self, args); + } + } + if (argc == 1) { + int _v; + int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0); + _v = SWIG_CheckState(res); + if (_v) { + return _wrap_new_PySession__SWIG_1(self, args); + } + } + +fail: + SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'new_PySession'.\n" + " Possible C/C++ prototypes are:\n" + " PySession()\n" + " PySession(char *)\n" + " PySession(switch_core_session_t *)\n"); + return NULL; +} + + +SWIGINTERN PyObject *_wrap_delete_PySession(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *arg1 = (PySession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:delete_PySession",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PySession, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PySession" "', argument " "1"" of type '" "PySession *""'"); + } + arg1 = reinterpret_cast< PySession * >(argp1); + delete arg1; + + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySession_setDTMFCallback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *arg1 = (PySession *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:PySession_setDTMFCallback",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PySession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_setDTMFCallback" "', argument " "1"" of type '" "PySession *""'"); + } + arg1 = reinterpret_cast< PySession * >(argp1); + arg2 = obj1; + res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PySession_setDTMFCallback" "', argument " "3"" of type '" "char *""'"); + } + arg3 = reinterpret_cast< char * >(buf3); + (arg1)->setDTMFCallback(arg2,arg3); + resultobj = SWIG_Py_Void(); + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return resultobj; +fail: + if (alloc3 == SWIG_NEWOBJ) delete[] buf3; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySession_setHangupHook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *arg1 = (PySession *) 0 ; + PyObject *arg2 = (PyObject *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySession_setHangupHook",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PySession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_setHangupHook" "', argument " "1"" of type '" "PySession *""'"); + } + arg1 = reinterpret_cast< PySession * >(argp1); + arg2 = obj1; + (arg1)->setHangupHook(arg2); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySession_check_hangup_hook(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *arg1 = (PySession *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySession_check_hangup_hook",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PySession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_check_hangup_hook" "', argument " "1"" of type '" "PySession *""'"); + } + arg1 = reinterpret_cast< PySession * >(argp1); + (arg1)->check_hangup_hook(); + resultobj = SWIG_Py_Void(); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySession_hangup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *arg1 = (PySession *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OO:PySession_hangup",&obj0,&obj1)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PySession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_hangup" "', argument " "1"" of type '" "PySession *""'"); + } + arg1 = reinterpret_cast< PySession * >(argp1); + res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySession_hangup" "', argument " "2"" of type '" "char *""'"); + } + arg2 = reinterpret_cast< char * >(buf2); + (arg1)->hangup(arg2); + resultobj = SWIG_Py_Void(); + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return resultobj; +fail: + if (alloc2 == SWIG_NEWOBJ) delete[] buf2; + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySession_begin_allow_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *arg1 = (PySession *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySession_begin_allow_threads",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PySession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_begin_allow_threads" "', argument " "1"" of type '" "PySession *""'"); + } + arg1 = reinterpret_cast< PySession * >(argp1); + result = (bool)(arg1)->begin_allow_threads(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySession_end_allow_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *arg1 = (PySession *) 0 ; + bool result; + void *argp1 = 0 ; + int res1 = 0 ; + PyObject * obj0 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"O:PySession_end_allow_threads",&obj0)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PySession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_end_allow_threads" "', argument " "1"" of type '" "PySession *""'"); + } + arg1 = reinterpret_cast< PySession * >(argp1); + result = (bool)(arg1)->end_allow_threads(); + resultobj = SWIG_From_bool(static_cast< bool >(result)); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *_wrap_PySession_run_dtmf_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *resultobj = 0; + PySession *arg1 = (PySession *) 0 ; + void *arg2 = (void *) 0 ; + switch_input_type_t arg3 ; + switch_status_t result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + void *argp3 ; + int res3 = 0 ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + + if (!PyArg_ParseTuple(args,(char *)"OOO:PySession_run_dtmf_callback",&obj0,&obj1,&obj2)) SWIG_fail; + res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_PySession, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PySession_run_dtmf_callback" "', argument " "1"" of type '" "PySession *""'"); + } + arg1 = reinterpret_cast< PySession * >(argp1); + res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PySession_run_dtmf_callback" "', argument " "2"" of type '" "void *""'"); + } + { + res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_switch_input_type_t, 0 | 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PySession_run_dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } + if (!argp3) { + SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PySession_run_dtmf_callback" "', argument " "3"" of type '" "switch_input_type_t""'"); + } else { + switch_input_type_t * temp = reinterpret_cast< switch_input_type_t * >(argp3); + arg3 = *temp; + if (SWIG_IsNewObj(res3)) delete temp; + } + } + result = (arg1)->run_dtmf_callback(arg2,arg3); + resultobj = SWIG_NewPointerObj((new switch_status_t(static_cast< const switch_status_t& >(result))), SWIGTYPE_p_switch_status_t, SWIG_POINTER_OWN | 0 ); + return resultobj; +fail: + return NULL; +} + + +SWIGINTERN PyObject *PySession_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { + PyObject *obj; + if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL; + SWIG_TypeNewClientData(SWIGTYPE_p_PySession, SWIG_NewClientData(obj)); + return SWIG_Py_Void(); +} + +static PyMethodDef SwigMethods[] = { + { (char *)"consoleLog", _wrap_consoleLog, METH_VARARGS, NULL}, + { (char *)"consoleCleanLog", _wrap_consoleCleanLog, METH_VARARGS, NULL}, + { (char *)"new_IVRMenu", _wrap_new_IVRMenu, METH_VARARGS, NULL}, + { (char *)"delete_IVRMenu", _wrap_delete_IVRMenu, METH_VARARGS, NULL}, + { (char *)"IVRMenu_bindAction", _wrap_IVRMenu_bindAction, METH_VARARGS, NULL}, + { (char *)"IVRMenu_execute", _wrap_IVRMenu_execute, METH_VARARGS, NULL}, + { (char *)"IVRMenu_swigregister", IVRMenu_swigregister, METH_VARARGS, NULL}, + { (char *)"new_API", _wrap_new_API, METH_VARARGS, NULL}, + { (char *)"delete_API", _wrap_delete_API, METH_VARARGS, NULL}, + { (char *)"API_execute", _wrap_API_execute, METH_VARARGS, NULL}, + { (char *)"API_executeString", _wrap_API_executeString, METH_VARARGS, NULL}, + { (char *)"API_swigregister", API_swigregister, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_function_set", _wrap_input_callback_state_t_function_set, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_function_get", _wrap_input_callback_state_t_function_get, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_threadState_set", _wrap_input_callback_state_t_threadState_set, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_threadState_get", _wrap_input_callback_state_t_threadState_get, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_extra_set", _wrap_input_callback_state_t_extra_set, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_extra_get", _wrap_input_callback_state_t_extra_get, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_funcargs_set", _wrap_input_callback_state_t_funcargs_set, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_funcargs_get", _wrap_input_callback_state_t_funcargs_get, METH_VARARGS, NULL}, + { (char *)"new_input_callback_state_t", _wrap_new_input_callback_state_t, METH_VARARGS, NULL}, + { (char *)"delete_input_callback_state_t", _wrap_delete_input_callback_state_t, METH_VARARGS, NULL}, + { (char *)"input_callback_state_t_swigregister", input_callback_state_t_swigregister, METH_VARARGS, NULL}, + { (char *)"new_Stream", _wrap_new_Stream, METH_VARARGS, NULL}, + { (char *)"delete_Stream", _wrap_delete_Stream, METH_VARARGS, NULL}, + { (char *)"Stream_write", _wrap_Stream_write, METH_VARARGS, NULL}, + { (char *)"Stream_get_data", _wrap_Stream_get_data, METH_VARARGS, NULL}, + { (char *)"Stream_swigregister", Stream_swigregister, METH_VARARGS, NULL}, + { (char *)"Event_event_set", _wrap_Event_event_set, METH_VARARGS, NULL}, + { (char *)"Event_event_get", _wrap_Event_event_get, METH_VARARGS, NULL}, + { (char *)"Event_serialized_string_set", _wrap_Event_serialized_string_set, METH_VARARGS, NULL}, + { (char *)"Event_serialized_string_get", _wrap_Event_serialized_string_get, METH_VARARGS, NULL}, + { (char *)"Event_mine_set", _wrap_Event_mine_set, METH_VARARGS, NULL}, + { (char *)"Event_mine_get", _wrap_Event_mine_get, METH_VARARGS, NULL}, + { (char *)"new_Event", _wrap_new_Event, METH_VARARGS, NULL}, + { (char *)"delete_Event", _wrap_delete_Event, METH_VARARGS, NULL}, + { (char *)"Event_serialize", _wrap_Event_serialize, METH_VARARGS, NULL}, + { (char *)"Event_setPriority", _wrap_Event_setPriority, METH_VARARGS, NULL}, + { (char *)"Event_getHeader", _wrap_Event_getHeader, METH_VARARGS, NULL}, + { (char *)"Event_getBody", _wrap_Event_getBody, METH_VARARGS, NULL}, + { (char *)"Event_getType", _wrap_Event_getType, METH_VARARGS, NULL}, + { (char *)"Event_addBody", _wrap_Event_addBody, METH_VARARGS, NULL}, + { (char *)"Event_addHeader", _wrap_Event_addHeader, METH_VARARGS, NULL}, + { (char *)"Event_delHeader", _wrap_Event_delHeader, METH_VARARGS, NULL}, + { (char *)"Event_fire", _wrap_Event_fire, METH_VARARGS, NULL}, + { (char *)"Event_swigregister", Event_swigregister, METH_VARARGS, NULL}, + { (char *)"delete_CoreSession", _wrap_delete_CoreSession, METH_VARARGS, NULL}, + { (char *)"CoreSession_session_set", _wrap_CoreSession_session_set, METH_VARARGS, NULL}, + { (char *)"CoreSession_session_get", _wrap_CoreSession_session_get, METH_VARARGS, NULL}, + { (char *)"CoreSession_channel_set", _wrap_CoreSession_channel_set, METH_VARARGS, NULL}, + { (char *)"CoreSession_channel_get", _wrap_CoreSession_channel_get, METH_VARARGS, NULL}, + { (char *)"CoreSession_flags_set", _wrap_CoreSession_flags_set, METH_VARARGS, NULL}, + { (char *)"CoreSession_flags_get", _wrap_CoreSession_flags_get, METH_VARARGS, NULL}, + { (char *)"CoreSession_allocated_set", _wrap_CoreSession_allocated_set, METH_VARARGS, NULL}, + { (char *)"CoreSession_allocated_get", _wrap_CoreSession_allocated_get, METH_VARARGS, NULL}, + { (char *)"CoreSession_cb_state_set", _wrap_CoreSession_cb_state_set, METH_VARARGS, NULL}, + { (char *)"CoreSession_cb_state_get", _wrap_CoreSession_cb_state_get, METH_VARARGS, NULL}, + { (char *)"CoreSession_hook_state_set", _wrap_CoreSession_hook_state_set, METH_VARARGS, NULL}, + { (char *)"CoreSession_hook_state_get", _wrap_CoreSession_hook_state_get, METH_VARARGS, NULL}, + { (char *)"CoreSession_answer", _wrap_CoreSession_answer, METH_VARARGS, NULL}, + { (char *)"CoreSession_preAnswer", _wrap_CoreSession_preAnswer, METH_VARARGS, NULL}, + { (char *)"CoreSession_hangup", _wrap_CoreSession_hangup, METH_VARARGS, NULL}, + { (char *)"CoreSession_setVariable", _wrap_CoreSession_setVariable, METH_VARARGS, NULL}, + { (char *)"CoreSession_setPrivate", _wrap_CoreSession_setPrivate, METH_VARARGS, NULL}, + { (char *)"CoreSession_getPrivate", _wrap_CoreSession_getPrivate, METH_VARARGS, NULL}, + { (char *)"CoreSession_getVariable", _wrap_CoreSession_getVariable, METH_VARARGS, NULL}, + { (char *)"CoreSession_process_callback_result", _wrap_CoreSession_process_callback_result, METH_VARARGS, NULL}, + { (char *)"CoreSession_say", _wrap_CoreSession_say, METH_VARARGS, NULL}, + { (char *)"CoreSession_sayPhrase", _wrap_CoreSession_sayPhrase, METH_VARARGS, NULL}, + { (char *)"CoreSession_recordFile", _wrap_CoreSession_recordFile, METH_VARARGS, NULL}, + { (char *)"CoreSession_setCallerData", _wrap_CoreSession_setCallerData, METH_VARARGS, NULL}, + { (char *)"CoreSession_originate", _wrap_CoreSession_originate, METH_VARARGS, NULL}, + { (char *)"CoreSession_setDTMFCallback", _wrap_CoreSession_setDTMFCallback, METH_VARARGS, NULL}, + { (char *)"CoreSession_speak", _wrap_CoreSession_speak, METH_VARARGS, NULL}, + { (char *)"CoreSession_set_tts_parms", _wrap_CoreSession_set_tts_parms, METH_VARARGS, NULL}, + { (char *)"CoreSession_collectDigits", _wrap_CoreSession_collectDigits, METH_VARARGS, NULL}, + { (char *)"CoreSession_getDigits", _wrap_CoreSession_getDigits, METH_VARARGS, NULL}, + { (char *)"CoreSession_transfer", _wrap_CoreSession_transfer, METH_VARARGS, NULL}, + { (char *)"CoreSession_read", _wrap_CoreSession_read, METH_VARARGS, NULL}, + { (char *)"CoreSession_playAndGetDigits", _wrap_CoreSession_playAndGetDigits, METH_VARARGS, NULL}, + { (char *)"CoreSession_streamFile", _wrap_CoreSession_streamFile, METH_VARARGS, NULL}, + { (char *)"CoreSession_flushEvents", _wrap_CoreSession_flushEvents, METH_VARARGS, NULL}, + { (char *)"CoreSession_flushDigits", _wrap_CoreSession_flushDigits, METH_VARARGS, NULL}, + { (char *)"CoreSession_setAutoHangup", _wrap_CoreSession_setAutoHangup, METH_VARARGS, NULL}, + { (char *)"CoreSession_setHangupHook", _wrap_CoreSession_setHangupHook, METH_VARARGS, NULL}, + { (char *)"CoreSession_ready", _wrap_CoreSession_ready, METH_VARARGS, NULL}, + { (char *)"CoreSession_execute", _wrap_CoreSession_execute, METH_VARARGS, NULL}, + { (char *)"CoreSession_sendEvent", _wrap_CoreSession_sendEvent, METH_VARARGS, NULL}, + { (char *)"CoreSession_setEventData", _wrap_CoreSession_setEventData, METH_VARARGS, NULL}, + { (char *)"CoreSession_getXMLCDR", _wrap_CoreSession_getXMLCDR, METH_VARARGS, NULL}, + { (char *)"CoreSession_begin_allow_threads", _wrap_CoreSession_begin_allow_threads, METH_VARARGS, NULL}, + { (char *)"CoreSession_end_allow_threads", _wrap_CoreSession_end_allow_threads, METH_VARARGS, NULL}, + { (char *)"CoreSession_get_uuid", _wrap_CoreSession_get_uuid, METH_VARARGS, NULL}, + { (char *)"CoreSession_get_cb_args", _wrap_CoreSession_get_cb_args, METH_VARARGS, NULL}, + { (char *)"CoreSession_check_hangup_hook", _wrap_CoreSession_check_hangup_hook, METH_VARARGS, NULL}, + { (char *)"CoreSession_run_dtmf_callback", _wrap_CoreSession_run_dtmf_callback, METH_VARARGS, NULL}, + { (char *)"CoreSession_swigregister", CoreSession_swigregister, METH_VARARGS, NULL}, + { (char *)"console_log", _wrap_console_log, METH_VARARGS, NULL}, + { (char *)"console_clean_log", _wrap_console_clean_log, METH_VARARGS, NULL}, + { (char *)"bridge", _wrap_bridge, METH_VARARGS, NULL}, + { (char *)"hanguphook", _wrap_hanguphook, METH_VARARGS, NULL}, + { (char *)"dtmf_callback", _wrap_dtmf_callback, METH_VARARGS, NULL}, + { (char *)"new_PySession", _wrap_new_PySession, METH_VARARGS, NULL}, + { (char *)"delete_PySession", _wrap_delete_PySession, METH_VARARGS, NULL}, + { (char *)"PySession_setDTMFCallback", _wrap_PySession_setDTMFCallback, METH_VARARGS, NULL}, + { (char *)"PySession_setHangupHook", _wrap_PySession_setHangupHook, METH_VARARGS, NULL}, + { (char *)"PySession_check_hangup_hook", _wrap_PySession_check_hangup_hook, METH_VARARGS, NULL}, + { (char *)"PySession_hangup", _wrap_PySession_hangup, METH_VARARGS, NULL}, + { (char *)"PySession_begin_allow_threads", _wrap_PySession_begin_allow_threads, METH_VARARGS, NULL}, + { (char *)"PySession_end_allow_threads", _wrap_PySession_end_allow_threads, METH_VARARGS, NULL}, + { (char *)"PySession_run_dtmf_callback", _wrap_PySession_run_dtmf_callback, METH_VARARGS, NULL}, + { (char *)"PySession_swigregister", PySession_swigregister, METH_VARARGS, NULL}, + { NULL, NULL, 0, NULL } +}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - static void *_p_PySessionTo_p_CoreSession(void *x, int *newmemory) { - return (void *) ((CoreSession *) ((PySession *) x)); - } - static swig_type_info _swigt__p_API = { "_p_API", "API *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_CoreSession = { "_p_CoreSession", "CoreSession *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_Event = { "_p_Event", "Event *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_IVRMenu = { "_p_IVRMenu", "IVRMenu *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_PySession = { "_p_PySession", "PySession *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_Stream = { "_p_Stream", "Stream *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_char = { "_p_char", "char *", 0, 0, (void *) 0, 0 }; - static swig_type_info _swigt__p_input_callback_state = - { "_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void *) 0, 0 }; - 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 }; - static swig_type_info _swigt__p_swap_state_t = { "_p_swap_state_t", "enum swap_state_t *|swap_state_t *", 0, 0, (void *) 0, 0 }; - 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 }; - 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 }; - 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 }; - static swig_type_info _swigt__p_void = { "_p_void", "void *", 0, 0, (void *) 0, 0 }; +static void *_p_PySessionTo_p_CoreSession(void *x, int *newmemory) { + return (void *)((CoreSession *) ((PySession *) x)); +} +static swig_type_info _swigt__p_API = {"_p_API", "API *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_CoreSession = {"_p_CoreSession", "CoreSession *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Event = {"_p_Event", "Event *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_IVRMenu = {"_p_IVRMenu", "IVRMenu *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_PySession = {"_p_PySession", "PySession *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_Stream = {"_p_Stream", "Stream *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_input_callback_state = {"_p_input_callback_state", "input_callback_state_t *|input_callback_state *", 0, 0, (void*)0, 0}; +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}; +static swig_type_info _swigt__p_swap_state_t = {"_p_swap_state_t", "enum swap_state_t *|swap_state_t *", 0, 0, (void*)0, 0}; +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}; +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}; +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}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; - static swig_type_info *swig_type_initial[] = { - &_swigt__p_API, - &_swigt__p_CoreSession, - &_swigt__p_Event, - &_swigt__p_IVRMenu, - &_swigt__p_PySession, - &_swigt__p_Stream, - &_swigt__p_char, - &_swigt__p_input_callback_state, - &_swigt__p_session_flag_t, - &_swigt__p_swap_state_t, - &_swigt__p_switch_channel_state_t, - &_swigt__p_switch_channel_t, - &_swigt__p_switch_core_session_t, - &_swigt__p_switch_event_t, - &_swigt__p_switch_input_args_t, - &_swigt__p_switch_input_type_t, - &_swigt__p_switch_priority_t, - &_swigt__p_switch_status_t, - &_swigt__p_switch_stream_handle_t, - &_swigt__p_void, - }; +static swig_type_info *swig_type_initial[] = { + &_swigt__p_API, + &_swigt__p_CoreSession, + &_swigt__p_Event, + &_swigt__p_IVRMenu, + &_swigt__p_PySession, + &_swigt__p_Stream, + &_swigt__p_char, + &_swigt__p_input_callback_state, + &_swigt__p_session_flag_t, + &_swigt__p_swap_state_t, + &_swigt__p_switch_channel_state_t, + &_swigt__p_switch_channel_t, + &_swigt__p_switch_core_session_t, + &_swigt__p_switch_event_t, + &_swigt__p_switch_input_args_t, + &_swigt__p_switch_input_type_t, + &_swigt__p_switch_priority_t, + &_swigt__p_switch_status_t, + &_swigt__p_switch_stream_handle_t, + &_swigt__p_void, +}; - 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_PySession, _p_PySessionTo_p_CoreSession, 0, 0}, {0, 0, 0, 0} }; - static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0}, {0, 0, 0, 0} }; - static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0}, {0, 0, 0, 0} }; - static swig_cast_info _swigc__p_PySession[] = { {&_swigt__p_PySession, 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_char[] = { {&_swigt__p_char, 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_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0}, {0, 0, 0, 0} }; - static swig_cast_info _swigc__p_swap_state_t[] = { {&_swigt__p_swap_state_t, 0, 0, 0}, {0, 0, 0, 0} }; - 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} }; - 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} }; - 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} }; - static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0}, {0, 0, 0, 0} }; +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_PySession, _p_PySessionTo_p_CoreSession, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_Event[] = { {&_swigt__p_Event, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_IVRMenu[] = { {&_swigt__p_IVRMenu, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_PySession[] = { {&_swigt__p_PySession, 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_char[] = { {&_swigt__p_char, 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_session_flag_t[] = { {&_swigt__p_session_flag_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_swap_state_t[] = { {&_swigt__p_swap_state_t, 0, 0, 0},{0, 0, 0, 0}}; +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}}; +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}}; +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}}; +static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; - static swig_cast_info *swig_cast_initial[] = { - _swigc__p_API, - _swigc__p_CoreSession, - _swigc__p_Event, - _swigc__p_IVRMenu, - _swigc__p_PySession, - _swigc__p_Stream, - _swigc__p_char, - _swigc__p_input_callback_state, - _swigc__p_session_flag_t, - _swigc__p_swap_state_t, - _swigc__p_switch_channel_state_t, - _swigc__p_switch_channel_t, - _swigc__p_switch_core_session_t, - _swigc__p_switch_event_t, - _swigc__p_switch_input_args_t, - _swigc__p_switch_input_type_t, - _swigc__p_switch_priority_t, - _swigc__p_switch_status_t, - _swigc__p_switch_stream_handle_t, - _swigc__p_void, - }; +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_API, + _swigc__p_CoreSession, + _swigc__p_Event, + _swigc__p_IVRMenu, + _swigc__p_PySession, + _swigc__p_Stream, + _swigc__p_char, + _swigc__p_input_callback_state, + _swigc__p_session_flag_t, + _swigc__p_swap_state_t, + _swigc__p_switch_channel_state_t, + _swigc__p_switch_channel_t, + _swigc__p_switch_core_session_t, + _swigc__p_switch_event_t, + _swigc__p_switch_input_args_t, + _swigc__p_switch_input_type_t, + _swigc__p_switch_priority_t, + _swigc__p_switch_status_t, + _swigc__p_switch_stream_handle_t, + _swigc__p_void, +}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ - static swig_const_info swig_const_table[] = { - {0, 0, 0, 0.0, 0, 0} - }; +static swig_const_info swig_const_table[] = { +{0, 0, 0, 0.0, 0, 0}}; #ifdef __cplusplus } @@ -8198,162 +7912,160 @@ extern "C" { #ifdef __cplusplus extern "C" { #if 0 -} /* c-mode */ +} /* c-mode */ #endif #endif + #if 0 #define SWIGRUNTIME_DEBUG #endif -SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) -{ - size_t i; - swig_module_info *module_head, *iter; - int found, init; - clientdata = clientdata; - /* check to see if the circular list has been setup, if not, set it up */ - if (swig_module.next == 0) { - /* Initialize the swig_module */ - swig_module.type_initial = swig_type_initial; - swig_module.cast_initial = swig_cast_initial; - swig_module.next = &swig_module; - init = 1; - } else { - init = 0; - } - - /* Try and load any already created modules */ - module_head = SWIG_GetModule(clientdata); - if (!module_head) { - /* This is the first module loaded for this interpreter */ - /* so set the swig module into the interpreter */ - SWIG_SetModule(clientdata, &swig_module); - module_head = &swig_module; - } else { - /* the interpreter has loaded a SWIG module, but has it loaded this one? */ - found = 0; - iter = module_head; - do { - if (iter == &swig_module) { - found = 1; - break; - } - iter = iter->next; - } while (iter != module_head); - - /* if the is found in the list, then all is done and we may leave */ - if (found) - return; - /* otherwise we must add out module into the list */ - swig_module.next = module_head->next; - module_head->next = &swig_module; - } - - /* When multiple interpeters are used, a module could have already been initialized in - a different interpreter, but not yet have a pointer in this interpreter. - In this case, we do not want to continue adding types... everything should be - set up already */ - if (init == 0) - return; - - /* Now work on filling in swig_module.types */ +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found, init; + + clientdata = clientdata; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + swig_module.type_initial = swig_type_initial; + swig_module.cast_initial = swig_cast_initial; + swig_module.next = &swig_module; + init = 1; + } else { + init = 0; + } + + /* Try and load any already created modules */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + module_head->next = &swig_module; + } + + /* When multiple interpeters are used, a module could have already been initialized in + a different interpreter, but not yet have a pointer in this interpreter. + In this case, we do not want to continue adding types... everything should be + set up already */ + if (init == 0) return; + + /* Now work on filling in swig_module.types */ #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: size %d\n", swig_module.size); + printf("SWIG_InitializeModule: size %d\n", swig_module.size); #endif - for (i = 0; i < swig_module.size; ++i) { - swig_type_info *type = 0; - swig_type_info *ret; - swig_cast_info *cast; - + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); #endif - - /* 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 */ + + /* 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 */ #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found type %s\n", type->name); + printf("SWIG_InitializeModule: found type %s\n", type->name); #endif - if (swig_module.type_initial[i]->clientdata) { - type->clientdata = swig_module.type_initial[i]->clientdata; + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); #endif - } - } else { - type = swig_module.type_initial[i]; - } - - /* Insert casting types */ - cast = swig_module.cast_initial[i]; - while (cast->type) { - /* Don't need to add information already in the list */ - ret = 0; + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + /* Don't need to add information already in the list */ + ret = 0; #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); #endif - if (swig_module.next != &swig_module) { - ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); #ifdef SWIGRUNTIME_DEBUG - if (ret) - printf("SWIG_InitializeModule: found cast %s\n", ret->name); + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); #endif - } - if (ret) { - if (type == swig_module.type_initial[i]) { + } + if (ret) { + if (type == swig_module.type_initial[i]) { #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: skip old type %s\n", ret->name); + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); #endif - cast->type = ret; - ret = 0; - } else { - /* Check for casting already in the list */ - swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); #ifdef SWIGRUNTIME_DEBUG - if (ocast) - printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); #endif - if (!ocast) - ret = 0; - } - } - - if (!ret) { + if (!ocast) ret = 0; + } + } + + if (!ret) { #ifdef SWIGRUNTIME_DEBUG - printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); #endif - 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; - + 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; + #ifdef SWIGRUNTIME_DEBUG - 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"); + 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"); #endif } @@ -8362,34 +8074,33 @@ SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) * of equivalent types. It is like calling * SWIG_TypeClientData(type, clientdata) a second time. */ -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; - } - } - } +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; + } + } + } } #ifdef __cplusplus #if 0 { - /* c-mode */ + /* c-mode */ #endif } #endif @@ -8399,240 +8110,258 @@ SWIGRUNTIME void SWIG_PropagateClientData(void) #ifdef __cplusplus extern "C" { #endif - - /* Python-specific SWIG API */ + + /* Python-specific SWIG API */ #define SWIG_newvarlink() SWIG_Python_newvarlink() #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr) #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants) - - /* ----------------------------------------------------------------------------- - * global variable support code. - * ----------------------------------------------------------------------------- */ - - typedef struct swig_globalvar { - char *name; /* Name of global variable */ - PyObject *(*get_attr) (void); /* Return the current value */ - int (*set_attr) (PyObject *); /* Set the value */ - struct swig_globalvar *next; - } swig_globalvar; - - typedef struct swig_varlinkobject { - PyObject_HEAD swig_globalvar * vars; - } swig_varlinkobject; - - SWIGINTERN PyObject *swig_varlink_repr(swig_varlinkobject * SWIGUNUSEDPARM(v)) { - return PyString_FromString(""); - } SWIGINTERN PyObject *swig_varlink_str(swig_varlinkobject * v) { - PyObject *str = PyString_FromString("("); - swig_globalvar *var; - for (var = v->vars; var; var = var->next) { - PyString_ConcatAndDel(&str, PyString_FromString(var->name)); - if (var->next) - PyString_ConcatAndDel(&str, PyString_FromString(", ")); - } - PyString_ConcatAndDel(&str, PyString_FromString(")")); - return str; - } - - SWIGINTERN int swig_varlink_print(swig_varlinkobject * v, FILE * fp, int SWIGUNUSEDPARM(flags)) { - PyObject *str = swig_varlink_str(v); - fprintf(fp, "Swig global variables "); - fprintf(fp, "%s\n", PyString_AsString(str)); - Py_DECREF(str); - return 0; - } - - SWIGINTERN void swig_varlink_dealloc(swig_varlinkobject * v) { - swig_globalvar *var = v->vars; - while (var) { - swig_globalvar *n = var->next; - free(var->name); - free(var); - var = n; - } - } - - SWIGINTERN PyObject *swig_varlink_getattr(swig_varlinkobject * v, char *n) { - PyObject *res = NULL; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name, n) == 0) { - res = (*var->get_attr) (); - break; - } - var = var->next; - } - if (res == NULL && !PyErr_Occurred()) { - PyErr_SetString(PyExc_NameError, "Unknown C global variable"); - } - return res; - } - - SWIGINTERN int swig_varlink_setattr(swig_varlinkobject * v, char *n, PyObject * p) { - int res = 1; - swig_globalvar *var = v->vars; - while (var) { - if (strcmp(var->name, n) == 0) { - res = (*var->set_attr) (p); - break; - } - var = var->next; - } - if (res == 1 && !PyErr_Occurred()) { - PyErr_SetString(PyExc_NameError, "Unknown C global variable"); - } - return res; - } - - SWIGINTERN PyTypeObject *swig_varlink_type(void) { - static char varlink__doc__[] = "Swig var link object"; - static PyTypeObject varlink_type; - static int type_init = 0; - if (!type_init) { - const PyTypeObject tmp = { - PyObject_HEAD_INIT(NULL) - 0, /* Number of items in variable part (ob_size) */ - (char *) "swigvarlink", /* Type name (tp_name) */ - sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ - 0, /* Itemsize (tp_itemsize) */ - (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ - (printfunc) swig_varlink_print, /* Print (tp_print) */ - (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ - (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ - 0, /* tp_compare */ - (reprfunc) swig_varlink_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - (reprfunc) swig_varlink_str, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - 0, /* tp_flags */ - varlink__doc__, /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ + + /* ----------------------------------------------------------------------------- + * global variable support code. + * ----------------------------------------------------------------------------- */ + + typedef struct swig_globalvar { + char *name; /* Name of global variable */ + PyObject *(*get_attr)(void); /* Return the current value */ + int (*set_attr)(PyObject *); /* Set the value */ + struct swig_globalvar *next; + } swig_globalvar; + + typedef struct swig_varlinkobject { + PyObject_HEAD + swig_globalvar *vars; + } swig_varlinkobject; + + SWIGINTERN PyObject * + swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) { + return PyString_FromString(""); + } + + SWIGINTERN PyObject * + swig_varlink_str(swig_varlinkobject *v) { + PyObject *str = PyString_FromString("("); + swig_globalvar *var; + for (var = v->vars; var; var=var->next) { + PyString_ConcatAndDel(&str,PyString_FromString(var->name)); + if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", ")); + } + PyString_ConcatAndDel(&str,PyString_FromString(")")); + return str; + } + + SWIGINTERN int + swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) { + PyObject *str = swig_varlink_str(v); + fprintf(fp,"Swig global variables "); + fprintf(fp,"%s\n", PyString_AsString(str)); + Py_DECREF(str); + return 0; + } + + SWIGINTERN void + swig_varlink_dealloc(swig_varlinkobject *v) { + swig_globalvar *var = v->vars; + while (var) { + swig_globalvar *n = var->next; + free(var->name); + free(var); + var = n; + } + } + + SWIGINTERN PyObject * + swig_varlink_getattr(swig_varlinkobject *v, char *n) { + PyObject *res = NULL; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->get_attr)(); + break; + } + var = var->next; + } + if (res == NULL && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + + SWIGINTERN int + swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) { + int res = 1; + swig_globalvar *var = v->vars; + while (var) { + if (strcmp(var->name,n) == 0) { + res = (*var->set_attr)(p); + break; + } + var = var->next; + } + if (res == 1 && !PyErr_Occurred()) { + PyErr_SetString(PyExc_NameError,"Unknown C global variable"); + } + return res; + } + + SWIGINTERN PyTypeObject* + swig_varlink_type(void) { + static char varlink__doc__[] = "Swig var link object"; + static PyTypeObject varlink_type; + static int type_init = 0; + if (!type_init) { + const PyTypeObject tmp + = { + PyObject_HEAD_INIT(NULL) + 0, /* Number of items in variable part (ob_size) */ + (char *)"swigvarlink", /* Type name (tp_name) */ + sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ + 0, /* Itemsize (tp_itemsize) */ + (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ + (printfunc) swig_varlink_print, /* Print (tp_print) */ + (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ + (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */ + 0, /* tp_compare */ + (reprfunc) swig_varlink_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + (reprfunc)swig_varlink_str, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + 0, /* tp_flags */ + varlink__doc__, /* tp_doc */ + 0, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ #if PY_VERSION_HEX >= 0x02020000 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* tp_iter -> tp_weaklist */ + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */ #endif #if PY_VERSION_HEX >= 0x02030000 - 0, /* tp_del */ + 0, /* tp_del */ #endif #ifdef COUNT_ALLOCS - 0, 0, 0, 0 /* tp_alloc -> tp_next */ + 0,0,0,0 /* tp_alloc -> tp_next */ #endif - }; - varlink_type = tmp; - varlink_type.ob_type = &PyType_Type; - type_init = 1; - } - return &varlink_type; - } - - /* Create a variable linking object for use later */ - SWIGINTERN PyObject *SWIG_Python_newvarlink(void) { - swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); - if (result) { - result->vars = 0; - } - return ((PyObject *) result); - } - - SWIGINTERN void SWIG_Python_addvarlink(PyObject * p, char *name, PyObject * (*get_attr) (void), int (*set_attr) (PyObject * p)) { - swig_varlinkobject *v = (swig_varlinkobject *) p; - swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); - if (gv) { - size_t size = strlen(name) + 1; - gv->name = (char *) malloc(size); - if (gv->name) { - strncpy(gv->name, name, size); - gv->get_attr = get_attr; - gv->set_attr = set_attr; - gv->next = v->vars; - } - } - v->vars = gv; - } - - SWIGINTERN PyObject *SWIG_globals(void) { - static PyObject *_SWIG_globals = 0; - if (!_SWIG_globals) - _SWIG_globals = SWIG_newvarlink(); - return _SWIG_globals; - } - - /* ----------------------------------------------------------------------------- - * constants/methods manipulation - * ----------------------------------------------------------------------------- */ - - /* Install Constants */ - SWIGINTERN void SWIG_Python_InstallConstants(PyObject * d, swig_const_info constants[]) { - PyObject *obj = 0; - size_t i; - for (i = 0; constants[i].type; ++i) { - switch (constants[i].type) { - case SWIG_PY_POINTER: - obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype, 0); - break; - case SWIG_PY_BINARY: - obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); - break; - default: - obj = 0; - break; - } - if (obj) { - PyDict_SetItemString(d, constants[i].name, obj); - Py_DECREF(obj); - } - } - } - - /* ----------------------------------------------------------------------------- */ - /* Fix SwigMethods to carry the callback ptrs when needed */ - /* ----------------------------------------------------------------------------- */ - - SWIGINTERN void SWIG_Python_FixMethods(PyMethodDef * methods, swig_const_info * const_table, swig_type_info ** types, swig_type_info ** types_initial) { - size_t i; - for (i = 0; methods[i].ml_name; ++i) { - const char *c = methods[i].ml_doc; - if (c && (c = strstr(c, "swig_ptr: "))) { - int j; - swig_const_info *ci = 0; - const char *name = c + 10; - for (j = 0; const_table[j].type; ++j) { - if (strncmp(const_table[j].name, name, strlen(const_table[j].name)) == 0) { - ci = &(const_table[j]); - break; - } - } - if (ci) { - size_t shift = (ci->ptype) - types; - swig_type_info *ty = types_initial[shift]; - size_t ldoc = (c - methods[i].ml_doc); - size_t lptr = strlen(ty->name) + 2 * sizeof(void *) + 2; - char *ndoc = (char *) malloc(ldoc + lptr + 10); - if (ndoc) { - char *buff = ndoc; - void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; - if (ptr) { - strncpy(buff, methods[i].ml_doc, ldoc); - buff += ldoc; - strncpy(buff, "swig_ptr: ", 10); - buff += 10; - SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); - methods[i].ml_doc = ndoc; - } - } - } - } - } - } - + }; + varlink_type = tmp; + varlink_type.ob_type = &PyType_Type; + type_init = 1; + } + return &varlink_type; + } + + /* Create a variable linking object for use later */ + SWIGINTERN PyObject * + SWIG_Python_newvarlink(void) { + swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type()); + if (result) { + result->vars = 0; + } + return ((PyObject*) result); + } + + SWIGINTERN void + SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) { + swig_varlinkobject *v = (swig_varlinkobject *) p; + swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar)); + if (gv) { + size_t size = strlen(name)+1; + gv->name = (char *)malloc(size); + if (gv->name) { + strncpy(gv->name,name,size); + gv->get_attr = get_attr; + gv->set_attr = set_attr; + gv->next = v->vars; + } + } + v->vars = gv; + } + + SWIGINTERN PyObject * + SWIG_globals(void) { + static PyObject *_SWIG_globals = 0; + if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink(); + return _SWIG_globals; + } + + /* ----------------------------------------------------------------------------- + * constants/methods manipulation + * ----------------------------------------------------------------------------- */ + + /* Install Constants */ + SWIGINTERN void + SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) { + PyObject *obj = 0; + size_t i; + for (i = 0; constants[i].type; ++i) { + switch(constants[i].type) { + case SWIG_PY_POINTER: + obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0); + break; + case SWIG_PY_BINARY: + obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype)); + break; + default: + obj = 0; + break; + } + if (obj) { + PyDict_SetItemString(d, constants[i].name, obj); + Py_DECREF(obj); + } + } + } + + /* -----------------------------------------------------------------------------*/ + /* Fix SwigMethods to carry the callback ptrs when needed */ + /* -----------------------------------------------------------------------------*/ + + SWIGINTERN void + SWIG_Python_FixMethods(PyMethodDef *methods, + swig_const_info *const_table, + swig_type_info **types, + swig_type_info **types_initial) { + size_t i; + for (i = 0; methods[i].ml_name; ++i) { + const char *c = methods[i].ml_doc; + if (c && (c = strstr(c, "swig_ptr: "))) { + int j; + swig_const_info *ci = 0; + const char *name = c + 10; + for (j = 0; const_table[j].type; ++j) { + if (strncmp(const_table[j].name, name, + strlen(const_table[j].name)) == 0) { + ci = &(const_table[j]); + break; + } + } + if (ci) { + size_t shift = (ci->ptype) - types; + swig_type_info *ty = types_initial[shift]; + size_t ldoc = (c - methods[i].ml_doc); + size_t lptr = strlen(ty->name)+2*sizeof(void*)+2; + char *ndoc = (char*)malloc(ldoc + lptr + 10); + if (ndoc) { + char *buff = ndoc; + void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0; + if (ptr) { + strncpy(buff, methods[i].ml_doc, ldoc); + buff += ldoc; + strncpy(buff, "swig_ptr: ", 10); + buff += 10; + SWIG_PackVoidPtr(buff, ptr, ty->name, lptr); + methods[i].ml_doc = ndoc; + } + } + } + } + } + } + #ifdef __cplusplus } #endif @@ -8644,23 +8373,23 @@ extern "C" { #ifdef __cplusplus extern "C" #endif - SWIGEXPORT void SWIG_init(void) -{ - PyObject *m, *d; - - /* Fix SwigMethods to carry the callback ptrs when needed */ - SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); - - m = Py_InitModule((char *) SWIG_name, SwigMethods); - d = PyModule_GetDict(m); - - SWIG_InitializeModule(0); - SWIG_InstallConstants(d, swig_const_table); - - - SWIG_Python_SetConstant(d, "S_HUP", SWIG_From_int(static_cast < int >(S_HUP))); - SWIG_Python_SetConstant(d, "S_FREE", SWIG_From_int(static_cast < int >(S_FREE))); - SWIG_Python_SetConstant(d, "S_RDLOCK", SWIG_From_int(static_cast < int >(S_RDLOCK))); - SWIG_Python_SetConstant(d, "S_SWAPPED_IN", SWIG_From_int(static_cast < int >(S_SWAPPED_IN))); - SWIG_Python_SetConstant(d, "S_SWAPPED_OUT", SWIG_From_int(static_cast < int >(S_SWAPPED_OUT))); +SWIGEXPORT void SWIG_init(void) { + PyObject *m, *d; + + /* Fix SwigMethods to carry the callback ptrs when needed */ + SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial); + + m = Py_InitModule((char *) SWIG_name, SwigMethods); + d = PyModule_GetDict(m); + + SWIG_InitializeModule(0); + SWIG_InstallConstants(d,swig_const_table); + + + SWIG_Python_SetConstant(d, "S_HUP",SWIG_From_int(static_cast< int >(S_HUP))); + SWIG_Python_SetConstant(d, "S_FREE",SWIG_From_int(static_cast< int >(S_FREE))); + SWIG_Python_SetConstant(d, "S_RDLOCK",SWIG_From_int(static_cast< int >(S_RDLOCK))); + SWIG_Python_SetConstant(d, "S_SWAPPED_IN",SWIG_From_int(static_cast< int >(S_SWAPPED_IN))); + SWIG_Python_SetConstant(d, "S_SWAPPED_OUT",SWIG_From_int(static_cast< int >(S_SWAPPED_OUT))); } + diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index 7a98bafc86..fab6f58bbe 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -761,6 +761,20 @@ SWITCH_DECLARE(bool) CoreSession::ready() { return switch_channel_ready(channel) != 0; } +SWITCH_DECLARE(bool) CoreSession::mediaReady() { + + this_check(false); + sanity_check(false); + return switch_channel_media_ready(channel) != 0; +} + +SWITCH_DECLARE(bool) CoreSession::answered() { + + this_check(false); + sanity_check(false); + return switch_channel_test_flag(channel, CF_ANSWERED) != 0; +} + SWITCH_DECLARE(int) CoreSession::originate(CoreSession *a_leg_session, char *dest, int timeout) {