提交 0191360b authored 作者: Anthony Minessale's avatar Anthony Minessale

show doc

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2592 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 7142a03c
...@@ -61,6 +61,7 @@ package fs_perl; ...@@ -61,6 +61,7 @@ package fs_perl;
*fs_channel_get_variable = *fs_perlc::fs_channel_get_variable; *fs_channel_get_variable = *fs_perlc::fs_channel_get_variable;
*fs_channel_set_state = *fs_perlc::fs_channel_set_state; *fs_channel_set_state = *fs_perlc::fs_channel_set_state;
*fs_ivr_play_file = *fs_perlc::fs_ivr_play_file; *fs_ivr_play_file = *fs_perlc::fs_ivr_play_file;
*fs_ivr_play_file2 = *fs_perlc::fs_ivr_play_file2;
# ------- VARIABLE STUBS -------- # ------- VARIABLE STUBS --------
......
...@@ -55,9 +55,15 @@ int fs_console_loop(void) ...@@ -55,9 +55,15 @@ int fs_console_loop(void)
return 0; return 0;
} }
void fs_console_log(char *msg) void fs_console_log(char *level_str, char *msg)
{ {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, msg); switch_log_level_t level = SWITCH_LOG_DEBUG;
if (level_str) {
level = switch_log_str2level(level_str);
}
switch_log_printf(SWITCH_CHANNEL_LOG, level, msg);
} }
void fs_console_clean(char *msg) void fs_console_clean(char *msg)
......
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org). * This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.26 * Version 1.3.21
* *
* This file is not intended to be easily readable and contains a number of * This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make * coding conventions designed to improve portability and efficiency. Do not make
...@@ -8,113 +8,72 @@ ...@@ -8,113 +8,72 @@
* interface file instead. * interface file instead.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
/*********************************************************************** /*************************************************************** -*- c -*-
* perl5/precommon.swg
* *
* This section contains generic SWIG labels for method/variable * Rename all exported symbols from common.swg, to avoid symbol
* declarations/attributes, and other compiler dependent labels. * clashes if multiple interpreters are included
* *
************************************************************************/ ************************************************************************/
/* template workaround for compilers that cannot correctly implement the C++ standard */ #define SWIG_TypeRegister SWIG_Perl_TypeRegister
#ifndef SWIGTEMPLATEDISAMBIGUATOR #define SWIG_TypeCheck SWIG_Perl_TypeCheck
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) #define SWIG_TypeCast SWIG_Perl_TypeCast
# define SWIGTEMPLATEDISAMBIGUATOR template #define SWIG_TypeDynamicCast SWIG_Perl_TypeDynamicCast
# else #define SWIG_TypeName SWIG_Perl_TypeName
# define SWIGTEMPLATEDISAMBIGUATOR #define SWIG_TypeQuery SWIG_Perl_TypeQuery
# endif #define SWIG_TypeClientData SWIG_Perl_TypeClientData
#endif #define SWIG_PackData SWIG_Perl_PackData
#define SWIG_UnpackData SWIG_Perl_UnpackData
/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
# define SWIGINLINE inline
# else
# define SWIGINLINE
# endif
#endif
/* attribute recognised by some compilers to avoid 'unused' warnings */ /***********************************************************************
#ifndef SWIGUNUSED * common.swg
# if defined(__GNUC__) || defined(__ICC) *
# define SWIGUNUSED __attribute__ ((unused)) * This file contains generic SWIG runtime support for pointer
# else * type checking as well as a few commonly used macros to control
# define SWIGUNUSED * external linkage.
# endif *
#endif * Author : David Beazley (beazley@cs.uchicago.edu)
*
/* internal SWIG method */ * Copyright (c) 1999-2000, The University of Chicago
#ifndef SWIGINTERN *
# define SWIGINTERN static SWIGUNUSED * This file may be freely redistributed without license or fee provided
#endif * this copyright message remains intact.
************************************************************************/
/* internal inline SWIG method */ #include <string.h>
#ifndef SWIGINTERNINLINE #include <switch.h>
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif
/* exporting methods for Windows DLLs */ #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#ifndef SWIGEXPORT # if defined(_MSC_VER) || defined(__GNUC__)
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# if defined(STATIC_LINKED) # if defined(STATIC_LINKED)
# define SWIGEXPORT # define SWIGEXPORT(a) a
# define SWIGIMPORT(a) extern a
# else # else
# define SWIGEXPORT __declspec(dllexport) # define SWIGEXPORT(a) __declspec(dllexport) a
# define SWIGIMPORT(a) extern a
# endif # endif
# else # else
# define SWIGEXPORT # if defined(__BORLANDC__)
# endif # define SWIGEXPORT(a) a _export
#endif # define SWIGIMPORT(a) a _export
/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# define SWIGSTDCALL __stdcall
# else # else
# define SWIGSTDCALL # define SWIGEXPORT(a) a
# define SWIGIMPORT(a) a
# endif
# endif # endif
#endif
/***********************************************************************
* swigrun.swg
*
* This file contains generic CAPI SWIG runtime support for pointer
* type checking.
*
************************************************************************/
/* This should only be incremented when either the layout of swig_type_info changes,
or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "2"
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else #else
# define SWIG_TYPE_TABLE_NAME # define SWIGEXPORT(a) a
#endif # define SWIGIMPORT(a) a
/*
You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
creating a static or dynamic library from the swig runtime code.
In 99.9% of the cases, swig just needs to declare them as 'static'.
But only do this if is strictly necessary, ie, if you have problems
with your compiler or so.
*/
#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif #endif
#ifndef SWIGRUNTIMEINLINE #ifdef SWIG_GLOBAL
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE # define SWIGRUNTIME(a) SWIGEXPORT(a)
#else
# define SWIGRUNTIME(a) static a
#endif #endif
#include <string.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
...@@ -122,141 +81,106 @@ extern "C" { ...@@ -122,141 +81,106 @@ extern "C" {
typedef void *(*swig_converter_func)(void *); typedef void *(*swig_converter_func)(void *);
typedef struct swig_type_info *(*swig_dycast_func)(void **); typedef struct swig_type_info *(*swig_dycast_func)(void **);
/* Structure to store inforomation on one type */
typedef struct swig_type_info { typedef struct swig_type_info {
const char *name; /* mangled name of this type */ const char *name;
const char *str; /* human readable name of this type */ swig_converter_func converter;
swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ const char *str;
struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata;
void *clientdata; /* language specific type data */ swig_dycast_func dcast;
struct swig_type_info *next;
struct swig_type_info *prev;
} swig_type_info; } swig_type_info;
/* Structure to store a type and conversion function used for casting */ #ifdef SWIG_NOINCLUDE
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;
/*
Compare two type names skipping the space characters, therefore
"char*" == "char *" and "Class<int>" == "Class<int >", etc.
Return 0 when the two name types are equivalent, as in
strncmp, but skipping ' '.
*/
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 (int)(*f1 - *f2);
}
return (l1 - f1) - (l2 - f2);
}
/*
Check type equivalence in a name list like <name1>|<name2>|...
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;
}
/* SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
Check type equivalence in a name list like <name1>|<name2>|... SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
Return 0 if equal, -1 if nb < tb, 1 if nb > tb SWIGIMPORT(void *) SWIG_TypeCast(swig_type_info *, void *);
*/ SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
SWIGRUNTIME int SWIGIMPORT(const char *) SWIG_TypeName(const swig_type_info *);
SWIG_TypeCompare(const char *nb, const char *tb) { SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
int equiv = 0; SWIGIMPORT(void) SWIG_TypeClientData(swig_type_info *, void *);
const char* te = tb + strlen(tb); SWIGIMPORT(char *) SWIG_PackData(char *, void *, int);
const char* ne = nb; SWIGIMPORT(char *) SWIG_UnpackData(char *, void *, int);
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;
}
#else
/* think of this as a c++ template<> or a scheme macro */ static swig_type_info *swig_type_list = 0;
#define SWIG_TypeCheck_Template(comparison, ty) \
if (ty) { \ /* Register a type mapping with the type-checking */
swig_cast_info *iter = ty->cast; \ SWIGRUNTIME(swig_type_info *)
while (iter) { \ SWIG_TypeRegister(swig_type_info *ti) {
if (comparison) { \ swig_type_info *tc, *head, *ret, *next;
if (iter == ty->cast) return iter; \ /* Check to see if this type has already been registered */
/* Move iter to the top of the linked list */ \ tc = swig_type_list;
iter->prev->next = iter->next; \ while (tc) {
if (iter->next) \ if (strcmp(tc->name, ti->name) == 0) {
iter->next->prev = iter->prev; \ /* Already exists in the table. Just add additional types to the list */
iter->next = ty->cast; \ if (tc->clientdata) ti->clientdata = tc->clientdata;
iter->prev = 0; \ head = tc;
if (ty->cast) ty->cast->prev = iter; \ next = tc->next;
ty->cast = iter; \ goto l1;
return iter; \ }
} \ tc = tc->prev;
iter = iter->next; \ }
} \ head = ti;
} \ next = 0;
return 0
/* Place in list */
/* ti->prev = swig_type_list;
Check the typename swig_type_list = ti;
*/
SWIGRUNTIME swig_cast_info * /* Build linked lists */
SWIG_TypeCheck(const char *c, swig_type_info *ty) { l1:
SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty); ret = head;
tc = ti + 1;
/* Patch up the rest of the links */
while (tc->name) {
head->next = tc;
tc->prev = head;
head = tc;
tc++;
}
if (next) next->prev = head;
head->next = next;
return ret;
} }
/* Same as previous function, except strcmp is replaced with a pointer comparison */ /* Check the typename */
SWIGRUNTIME swig_cast_info * SWIGRUNTIME(swig_type_info *)
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) { SWIG_TypeCheck(char *c, swig_type_info *ty) {
SWIG_TypeCheck_Template(iter->type == from, into); swig_type_info *s;
if (!ty) return 0; /* Void pointer */
s = ty->next; /* First element always just a name */
do {
if (strcmp(s->name,c) == 0) {
if (s == ty->next) return s;
/* Move s to the top of the linked list */
s->prev->next = s->next;
if (s->next) {
s->next->prev = s->prev;
}
/* Insert s as second element in the list */
s->next = ty->next;
if (ty->next) ty->next->prev = s;
ty->next = s;
s->prev = ty;
return s;
}
s = s->next;
} while (s && (s != ty->next));
return 0;
} }
/* /* Cast a pointer up an inheritance hierarchy */
Cast a pointer up an inheritance hierarchy SWIGRUNTIME(void *)
*/ SWIG_TypeCast(swig_type_info *ty, void *ptr) {
SWIGRUNTIMEINLINE void * if ((!ty) || (!ty->converter)) return ptr;
SWIG_TypeCast(swig_cast_info *ty, void *ptr) { return (*ty->converter)(ptr);
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
} }
/* /* Dynamic pointer casting. Down an inheritance hierarchy */
Dynamic pointer casting. Down an inheritance hierarchy SWIGRUNTIME(swig_type_info *)
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
swig_type_info *lastty = ty; swig_type_info *lastty = ty;
if (!ty || !ty->dcast) return ty; if (!ty || !ty->dcast) return ty;
...@@ -267,233 +191,83 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { ...@@ -267,233 +191,83 @@ SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
return lastty; return lastty;
} }
/* /* Return the name associated with this type */
Return the name associated with this type SWIGRUNTIME(const char *)
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) { SWIG_TypeName(const swig_type_info *ty) {
return ty->name; return ty->name;
} }
/* /* Search for a swig_type_info structure */
Return the pretty name associated with this type, SWIGRUNTIME(swig_type_info *)
that is an unmangled type name in a form presentable to the user. SWIG_TypeQuery(const char *name) {
*/ swig_type_info *ty = swig_type_list;
SWIGRUNTIME const char * while (ty) {
SWIG_TypePrettyName(const swig_type_info *type) { if (ty->str && (strcmp(name,ty->str) == 0)) return ty;
/* The "str" field contains the equivalent pretty names of the if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
type, separated by vertical-bar characters. We choose ty = ty->prev;
to print the last name, as it is often (?) the most
specific. */
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 0;
return type->name;
} }
/* /* Set the clientdata field for a type */
Set the clientdata field for a type SWIGRUNTIME(void)
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
swig_cast_info *cast = ti->cast; swig_type_info *tc, *equiv;
/* if (ti->clientdata == clientdata) return; */ if (ti->clientdata == clientdata) return;
ti->clientdata = clientdata; ti->clientdata = clientdata;
equiv = ti->next;
while (cast) { while (equiv) {
if (!cast->converter) { if (!equiv->converter) {
swig_type_info *tc = cast->type; tc = swig_type_list;
if (!tc->clientdata) { while (tc) {
SWIG_TypeClientData(tc, clientdata); if ((strcmp(tc->name, equiv->name) == 0))
} SWIG_TypeClientData(tc,clientdata);
} tc = tc->prev;
cast = cast->next;
}
}
/*
Search for a swig_type_info structure only by mangled name
Search is a O(log #types)
We start searching at module start, and finish searching when start == end.
Note: if start == end at the beginning of the function, we go all the way around
the circular list.
*/
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; equiv = equiv->next;
} while (iter != end);
return 0;
}
/*
Search for a swig_type_info structure for either a mangled name or a human readable name.
It first searches the mangled names of the types, which is a O(log #types)
If a type is not found it then searches the human readable names, which is O(#types).
We start searching at module start, and finish searching when start == end.
Note: if start == end at the beginning of the function, we go all the way around
the circular list.
*/
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 *)
Pack binary data into a string SWIG_PackData(char *c, void *ptr, int sz) {
*/ static char hex[17] = "0123456789abcdef";
SWIGRUNTIME char * int i;
SWIG_PackData(char *c, void *ptr, size_t sz) { unsigned char *u = (unsigned char *) ptr;
static const char hex[17] = "0123456789abcdef"; register unsigned char uu;
register const unsigned char *u = (unsigned char *) ptr; for (i = 0; i < sz; i++,u++) {
register const unsigned char *eu = u + sz; uu = *u;
for (; u != eu; ++u) {
register unsigned char uu = *u;
*(c++) = hex[(uu & 0xf0) >> 4]; *(c++) = hex[(uu & 0xf0) >> 4];
*(c++) = hex[uu & 0xf]; *(c++) = hex[uu & 0xf];
} }
return c; return c;
} }
/* /* Unpack binary data from a string */
Unpack binary data from a string SWIGRUNTIME(char *)
*/ SWIG_UnpackData(char *c, void *ptr, int sz) {
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 = 0; register unsigned char uu = 0;
register int d;
unsigned char *u = (unsigned char *) ptr;
int i;
for (i = 0; i < sz; i++, u++) {
d = *(c++);
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu = ((d - '0') << 4); uu = ((d - '0') << 4);
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu = ((d - ('a'-10)) << 4); uu = ((d - ('a'-10)) << 4);
else
return (char *) 0;
d = *(c++); d = *(c++);
if ((d >= '0') && (d <= '9')) if ((d >= '0') && (d <= '9'))
uu |= (d - '0'); uu |= (d - '0');
else if ((d >= 'a') && (d <= 'f')) else if ((d >= 'a') && (d <= 'f'))
uu |= (d - ('a'-10)); uu |= (d - ('a'-10));
else
return (char *) 0;
*u = uu; *u = uu;
} }
return c; return c;
} }
/* #endif
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 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 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 #ifdef __cplusplus
} }
...@@ -503,7 +277,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { ...@@ -503,7 +277,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
* perl5.swg * perl5.swg
* *
* Perl5 runtime library * Perl5 runtime library
* $Header: /cvsroot/swig/SWIG/Lib/perl5/perlrun.swg,v 1.21 2005/02/01 00:08:17 wuzzeb Exp $ * $Header: /cvsroot/SWIG/Lib/perl5/perlrun.swg,v 1.14 2003/12/04 19:14:14 beazley Exp $
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
#define SWIGPERL #define SWIGPERL
...@@ -643,19 +417,19 @@ extern "C" { ...@@ -643,19 +417,19 @@ extern "C" {
SWIG_Perl_ConvertPacked(obj, p, s, type, flags) SWIG_Perl_ConvertPacked(obj, p, s, type, flags)
#endif #endif
/* Runtime API */
#define SWIG_GetModule(clientdata) SWIG_Perl_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
/* Perl-specific API */ /* Perl-specific API */
#ifdef PERL_OBJECT #ifdef PERL_OBJECT
# define SWIG_MakePtr(sv, ptr, type, flags) \ # define SWIG_MakePtr(sv, ptr, type, flags) \
SWIG_Perl_MakePtr(pPerl, sv, ptr, type, flags) SWIG_Perl_MakePtr(pPerl, sv, ptr, type, flags)
# define SWIG_TypeCheckRV(rv, ty) \
SWIG_Perl_TypeCheckRV(pPerl, rv, ty)
# define SWIG_SetError(str) \ # define SWIG_SetError(str) \
SWIG_Perl_SetError(pPerl, str) SWIG_Perl_SetError(pPerl, str)
#else #else
# define SWIG_MakePtr(sv, ptr, type, flags) \ # define SWIG_MakePtr(sv, ptr, type, flags) \
SWIG_Perl_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(sv, ptr, type, flags)
# define SWIG_TypeCheckRV(rv, ty) \
SWIG_Perl_TypeCheckRV(rv, ty)
# define SWIG_SetError(str) \ # define SWIG_SetError(str) \
SWIG_Perl_SetError(str) SWIG_Perl_SetError(str)
# define SWIG_SetErrorSV(str) \ # define SWIG_SetErrorSV(str) \
...@@ -671,16 +445,48 @@ extern "C" { ...@@ -671,16 +445,48 @@ extern "C" {
# define SWIG_MAYBE_PERL_OBJECT # define SWIG_MAYBE_PERL_OBJECT
#endif #endif
static swig_cast_info * #ifdef SWIG_NOINCLUDE
SWIGIMPORT(int) SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *, void **, swig_type_info *, int flags);
SWIGIMPORT(void) SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *, void *, swig_type_info *, int flags);
SWIGIMPORT(SV *) SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *, swig_type_info *, int flags);
SWIGIMPORT(void) SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *, void *, int, swig_type_info *);
SWIGIMPORT(int) SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *, void *, int, swig_type_info *, int flags);
SWIGIMPORT(swig_type_info *) SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty);
SWIGIMPORT(SV *) SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT char *);
#else
SWIGRUNTIME(swig_type_info *)
SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) { SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV *rv, swig_type_info *ty) {
SWIG_TypeCheck_Template(sv_derived_from(rv, (char *) iter->type->name), ty); swig_type_info *s;
if (!ty) return 0; /* Void pointer */
s = ty->next; /* First element always just a name */
do {
if (sv_derived_from(rv, (char *) s->name)) {
if (s == ty->next) return s;
/* Move s to the top of the linked list */
s->prev->next = s->next;
if (s->next) {
s->next->prev = s->prev;
}
/* Insert s as second element in the list */
s->next = ty->next;
if (ty->next) ty->next->prev = s;
ty->next = s;
s->prev = ty;
return s;
}
s = s->next;
} while (s && (s != ty->next));
return 0;
} }
/* Function for getting a pointer value */ /* Function for getting a pointer value */
static int SWIGRUNTIME(int)
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) { SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
swig_cast_info *tc; swig_type_info *tc;
void *voidptr = (void *)0; void *voidptr = (void *)0;
/* If magical, apply more magic */ /* If magical, apply more magic */
...@@ -696,9 +502,9 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info * ...@@ -696,9 +502,9 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *
if (SvMAGICAL(tsv)) { if (SvMAGICAL(tsv)) {
mg = mg_find(tsv,'P'); mg = mg_find(tsv,'P');
if (mg) { if (mg) {
sv = mg->mg_obj; SV *rsv = mg->mg_obj;
if (sv_isobject(sv)) { if (sv_isobject(rsv)) {
tmp = SvIV((SV*)SvRV(sv)); tmp = SvIV((SV*)SvRV(rsv));
} }
} }
} else { } else {
...@@ -727,8 +533,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info * ...@@ -727,8 +533,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *
} }
if (_t) { if (_t) {
/* Now see if the types match */ /* Now see if the types match */
char *_c = HvNAME(SvSTASH(SvRV(sv))); tc = SWIG_TypeCheckRV(sv,_t);
tc = SWIG_TypeCheck(_c,_t);
if (!tc) { if (!tc) {
*ptr = voidptr; *ptr = voidptr;
return -1; return -1;
...@@ -740,7 +545,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info * ...@@ -740,7 +545,7 @@ SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *
return 0; return 0;
} }
static void SWIGRUNTIME(void)
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) { SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
if (ptr && (flags & SWIG_SHADOW)) { if (ptr && (flags & SWIG_SHADOW)) {
SV *self; SV *self;
...@@ -769,14 +574,14 @@ SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, i ...@@ -769,14 +574,14 @@ SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, i
} }
} }
static SWIGINLINE SV * SWIGRUNTIME(SV *)
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) { SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
SV *result = sv_newmortal(); SV *result = sv_newmortal();
SWIG_MakePtr(result, ptr, t, flags); SWIG_MakePtr(result, ptr, t, flags);
return result; return result;
} }
static void SWIGRUNTIME(void)
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) { SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
char result[1024]; char result[1024];
char *r = result; char *r = result;
...@@ -788,10 +593,10 @@ static void ...@@ -788,10 +593,10 @@ static void
} }
/* Convert a packed value value */ /* Convert a packed value value */
static int SWIGRUNTIME(int)
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty, int flags) { SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
swig_cast_info *tc; swig_type_info *tc;
const char *c = 0; char *c = 0;
if ((!obj) || (!SvOK(obj))) return -1; if ((!obj) || (!SvOK(obj))) return -1;
c = SvPV(obj, PL_na); c = SvPV(obj, PL_na);
...@@ -806,17 +611,17 @@ SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_ ...@@ -806,17 +611,17 @@ SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_
return 0; return 0;
} }
static SWIGINLINE void SWIGRUNTIME(void)
SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) { SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT const char *error) {
if (error) sv_setpv(perl_get_sv("@", TRUE), error); if (error) sv_setpv(perl_get_sv("@", TRUE), error);
} }
static SWIGINLINE void SWIGRUNTIME(void)
SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) { SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV *error) {
if (error) sv_setsv(perl_get_sv("@", TRUE), error); if (error) sv_setsv(perl_get_sv("@", TRUE), error);
} }
static void SWIGRUNTIME(void)
SWIG_Perl_SetErrorf(const char *fmt, ...) { SWIG_Perl_SetErrorf(const char *fmt, ...) {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
...@@ -824,6 +629,8 @@ SWIG_Perl_SetErrorf(const char *fmt, ...) { ...@@ -824,6 +629,8 @@ SWIG_Perl_SetErrorf(const char *fmt, ...) {
va_end(args); va_end(args);
} }
#endif
/* Macros for low-level exception handling */ /* Macros for low-level exception handling */
#define SWIG_fail goto fail #define SWIG_fail goto fail
#define SWIG_croak(x) { SWIG_SetError(x); goto fail; } #define SWIG_croak(x) { SWIG_SetError(x); goto fail; }
...@@ -895,30 +702,9 @@ static void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (C ...@@ -895,30 +702,9 @@ static void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (C
} }
static swig_module_info *
SWIG_Perl_GetModule() {
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);
if (pointer && SvOK(pointer)) {
type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
}
}
return (swig_module_info *) type_pointer;
}
static 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);
sv_setiv(pointer, PTR2IV(module));
}
#ifdef do_open #ifdef do_open
#undef do_open #undef do_open
...@@ -974,19 +760,6 @@ SWIG_Perl_SetModule(swig_module_info *module) { ...@@ -974,19 +760,6 @@ SWIG_Perl_SetModule(swig_module_info *module) {
#ifdef ENTER #ifdef ENTER
#undef ENTER #undef ENTER
#endif #endif
#ifdef read
#undef read
#endif
#ifdef write
#undef write
#endif
#ifdef eof
#undef eof
#endif
#ifdef bool
#undef bool
#endif
/* -------- TYPES TABLE (BEGIN) -------- */ /* -------- TYPES TABLE (BEGIN) -------- */
...@@ -994,9 +767,6 @@ SWIG_Perl_SetModule(swig_module_info *module) { ...@@ -994,9 +767,6 @@ SWIG_Perl_SetModule(swig_module_info *module) {
#define SWIGTYPE_p_switch_core_session_t swig_types[0] #define SWIGTYPE_p_switch_core_session_t swig_types[0]
#define SWIGTYPE_p_switch_input_callback_function_t swig_types[1] #define SWIGTYPE_p_switch_input_callback_function_t swig_types[1]
static swig_type_info *swig_types[3]; static swig_type_info *swig_types[3];
static swig_module_info swig_module = {swig_types, 2, 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)
/* -------- TYPES TABLE (END) -------- */ /* -------- TYPES TABLE (END) -------- */
...@@ -1010,14 +780,31 @@ extern "C" ...@@ -1010,14 +780,31 @@ extern "C"
#endif #endif
#ifndef PERL_OBJECT #ifndef PERL_OBJECT
#ifndef MULTIPLICITY #ifndef MULTIPLICITY
SWIGEXPORT void SWIG_init (CV* cv); SWIGEXPORT(void) SWIG_init (CV* cv);
#else #else
SWIGEXPORT void SWIG_init (pTHXo_ CV* cv); SWIGEXPORT(void) SWIG_init (pTHXo_ CV* cv);
#endif #endif
#else #else
SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *); SWIGEXPORT(void) SWIG_init (CV *cv, CPerlObj *);
#endif #endif
extern void fs_core_set_globals(void);
extern int fs_core_init(char *);
extern int fs_core_destroy(void);
extern int fs_loadable_module_init(void);
extern int fs_loadable_module_shutdown(void);
extern int fs_console_loop(void);
extern void fs_console_log(char *,char *);
extern void fs_console_clean(char *);
extern switch_core_session_t *fs_core_session_locate(char *);
extern void fs_channel_answer(switch_core_session_t *);
extern void fs_channel_pre_answer(switch_core_session_t *);
extern void fs_channel_hangup(switch_core_session_t *,char *);
extern void fs_channel_set_variable(switch_core_session_t *,char *,char *);
extern void fs_channel_get_variable(switch_core_session_t *,char *);
extern void fs_channel_set_state(switch_core_session_t *,char *);
extern int fs_ivr_play_file(switch_core_session_t *,char *,char *,switch_input_callback_function_t,void *,unsigned int);
extern int fs_ivr_play_file2(switch_core_session_t *,char *);
#include <switch.h> #include <switch.h>
...@@ -1064,7 +851,7 @@ XS(_wrap_fs_core_set_globals) { ...@@ -1064,7 +851,7 @@ XS(_wrap_fs_core_set_globals) {
XS(_wrap_fs_core_init) { XS(_wrap_fs_core_init) {
{ {
char *arg1 = (char *) 0 ; char *arg1 ;
int result; int result;
int argvi = 0; int argvi = 0;
dXSARGS; dXSARGS;
...@@ -1172,16 +959,19 @@ XS(_wrap_fs_console_loop) { ...@@ -1172,16 +959,19 @@ XS(_wrap_fs_console_loop) {
XS(_wrap_fs_console_log) { XS(_wrap_fs_console_log) {
{ {
char *arg1 = (char *) 0 ; char *arg1 ;
char *arg2 ;
int argvi = 0; int argvi = 0;
dXSARGS; dXSARGS;
if ((items < 1) || (items > 1)) { if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: fs_console_log(msg);"); SWIG_croak("Usage: fs_console_log(level_str,msg);");
} }
if (!SvOK((SV*) ST(0))) arg1 = 0; if (!SvOK((SV*) ST(0))) arg1 = 0;
else arg1 = (char *) SvPV(ST(0), PL_na); else arg1 = (char *) SvPV(ST(0), PL_na);
fs_console_log(arg1); if (!SvOK((SV*) ST(1))) arg2 = 0;
else arg2 = (char *) SvPV(ST(1), PL_na);
fs_console_log(arg1,arg2);
XSRETURN(argvi); XSRETURN(argvi);
...@@ -1194,7 +984,7 @@ XS(_wrap_fs_console_log) { ...@@ -1194,7 +984,7 @@ XS(_wrap_fs_console_log) {
XS(_wrap_fs_console_clean) { XS(_wrap_fs_console_clean) {
{ {
char *arg1 = (char *) 0 ; char *arg1 ;
int argvi = 0; int argvi = 0;
dXSARGS; dXSARGS;
...@@ -1216,7 +1006,7 @@ XS(_wrap_fs_console_clean) { ...@@ -1216,7 +1006,7 @@ XS(_wrap_fs_console_clean) {
XS(_wrap_fs_core_session_locate) { XS(_wrap_fs_core_session_locate) {
{ {
char *arg1 = (char *) 0 ; char *arg1 ;
switch_core_session_t *result; switch_core_session_t *result;
int argvi = 0; int argvi = 0;
dXSARGS; dXSARGS;
...@@ -1291,7 +1081,7 @@ XS(_wrap_fs_channel_pre_answer) { ...@@ -1291,7 +1081,7 @@ XS(_wrap_fs_channel_pre_answer) {
XS(_wrap_fs_channel_hangup) { XS(_wrap_fs_channel_hangup) {
{ {
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ; char *arg2 ;
int argvi = 0; int argvi = 0;
dXSARGS; dXSARGS;
...@@ -1319,8 +1109,8 @@ XS(_wrap_fs_channel_hangup) { ...@@ -1319,8 +1109,8 @@ XS(_wrap_fs_channel_hangup) {
XS(_wrap_fs_channel_set_variable) { XS(_wrap_fs_channel_set_variable) {
{ {
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ; char *arg2 ;
char *arg3 = (char *) 0 ; char *arg3 ;
int argvi = 0; int argvi = 0;
dXSARGS; dXSARGS;
...@@ -1350,7 +1140,7 @@ XS(_wrap_fs_channel_set_variable) { ...@@ -1350,7 +1140,7 @@ XS(_wrap_fs_channel_set_variable) {
XS(_wrap_fs_channel_get_variable) { XS(_wrap_fs_channel_get_variable) {
{ {
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ; char *arg2 ;
int argvi = 0; int argvi = 0;
dXSARGS; dXSARGS;
...@@ -1378,7 +1168,7 @@ XS(_wrap_fs_channel_get_variable) { ...@@ -1378,7 +1168,7 @@ XS(_wrap_fs_channel_get_variable) {
XS(_wrap_fs_channel_set_state) { XS(_wrap_fs_channel_set_state) {
{ {
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ; char *arg2 ;
int argvi = 0; int argvi = 0;
dXSARGS; dXSARGS;
...@@ -1406,8 +1196,8 @@ XS(_wrap_fs_channel_set_state) { ...@@ -1406,8 +1196,8 @@ XS(_wrap_fs_channel_set_state) {
XS(_wrap_fs_ivr_play_file) { XS(_wrap_fs_ivr_play_file) {
{ {
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ; switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 = (char *) 0 ; char *arg2 ;
char *arg3 = (char *) 0 ; char *arg3 ;
switch_input_callback_function_t arg4 ; switch_input_callback_function_t arg4 ;
void *arg5 = (void *) 0 ; void *arg5 = (void *) 0 ;
unsigned int arg6 ; unsigned int arg6 ;
...@@ -1452,36 +1242,59 @@ XS(_wrap_fs_ivr_play_file) { ...@@ -1452,36 +1242,59 @@ XS(_wrap_fs_ivr_play_file) {
} }
XS(_wrap_fs_ivr_play_file2) {
{
switch_core_session_t *arg1 = (switch_core_session_t *) 0 ;
char *arg2 ;
int result;
int argvi = 0;
dXSARGS;
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ if ((items < 2) || (items > 2)) {
SWIG_croak("Usage: fs_ivr_play_file2(session,file);");
}
{
if (SWIG_ConvertPtr(ST(0), (void **) &arg1, SWIGTYPE_p_switch_core_session_t,0) < 0) {
SWIG_croak("Type error in argument 1 of fs_ivr_play_file2. Expected _p_switch_core_session_t");
}
}
if (!SvOK((SV*) ST(1))) arg2 = 0;
else arg2 = (char *) SvPV(ST(1), PL_na);
result = (int)fs_ivr_play_file2(arg1,arg2);
ST(argvi) = sv_newmortal();
sv_setiv(ST(argvi++), (IV) result);
XSRETURN(argvi);
fail:
;
}
croak(Nullch);
}
static swig_type_info _swigt__p_switch_core_session_t = {"_p_switch_core_session_t", "switch_core_session_t *", 0, 0, 0};
static swig_type_info _swigt__p_switch_input_callback_function_t = {"_p_switch_input_callback_function_t", "switch_input_callback_function_t *", 0, 0, 0};
static swig_type_info *swig_type_initial[] = {
&_swigt__p_switch_core_session_t,
&_swigt__p_switch_input_callback_function_t,
};
static swig_cast_info _swigc__p_switch_core_session_t[] = { {&_swigt__p_switch_core_session_t, 0, 0, 0},{0, 0, 0, 0}}; /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
static swig_cast_info _swigc__p_switch_input_callback_function_t[] = { {&_swigt__p_switch_input_callback_function_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_type_info _swigt__p_switch_core_session_t[] = {{"_p_switch_core_session_t", 0, "switch_core_session_t *", 0},{"_p_switch_core_session_t"},{0}};
static swig_type_info _swigt__p_switch_input_callback_function_t[] = {{"_p_switch_input_callback_function_t", 0, "switch_input_callback_function_t *", 0},{"_p_switch_input_callback_function_t"},{0}};
static swig_cast_info *swig_cast_initial[] = { static swig_type_info *swig_types_initial[] = {
_swigc__p_switch_core_session_t, _swigt__p_switch_core_session_t,
_swigc__p_switch_input_callback_function_t, _swigt__p_switch_input_callback_function_t,
0
}; };
/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
static swig_constant_info swig_constants[] = { static swig_constant_info swig_constants[] = {
{0,0,0,0,0,0} {0}
}; };
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
static swig_variable_info swig_variables[] = { static swig_variable_info swig_variables[] = {
{0,0,0,0} {0}
}; };
static swig_command_info swig_commands[] = { static swig_command_info swig_commands[] = {
{"fs_perlc::fs_core_set_globals", _wrap_fs_core_set_globals}, {"fs_perlc::fs_core_set_globals", _wrap_fs_core_set_globals},
...@@ -1500,159 +1313,9 @@ static swig_command_info swig_commands[] = { ...@@ -1500,159 +1313,9 @@ static swig_command_info swig_commands[] = {
{"fs_perlc::fs_channel_get_variable", _wrap_fs_channel_get_variable}, {"fs_perlc::fs_channel_get_variable", _wrap_fs_channel_get_variable},
{"fs_perlc::fs_channel_set_state", _wrap_fs_channel_set_state}, {"fs_perlc::fs_channel_set_state", _wrap_fs_channel_set_state},
{"fs_perlc::fs_ivr_play_file", _wrap_fs_ivr_play_file}, {"fs_perlc::fs_ivr_play_file", _wrap_fs_ivr_play_file},
{"fs_perlc::fs_ivr_play_file2", _wrap_fs_ivr_play_file2},
{0,0} {0,0}
}; };
/*************************************************************************
* Type initialization:
* This problem is tough by the requirement that no dynamic
* memory is used. Also, since swig_type_info structures store pointers to
* swig_cast_info structures and swig_cast_info structures store pointers back
* to swig_type_info structures, we need some lookup code at initialization.
* The idea is that swig generates all the structures that are needed.
* The runtime then collects these partially filled structures.
* The SWIG_InitializeModule function takes these initial arrays out of
* swig_module, and does all the lookup, filling in the swig_module.types
* array with the correct data and linking the correct swig_cast_info
* structures together.
* The generated swig_type_info structures are assigned staticly to an initial
* array. We just loop though that array, and handle each type individually.
* First we lookup if this type has been already loaded, and if so, use the
* loaded structure instead of the generated one. Then we have to fill in the
* cast linked list. The cast data is initially stored in something like a
* two-dimensional array. Each row corresponds to a type (there are the same
* number of rows as there are in the swig_type_initial array). Each entry in
* a column is one of the swig_cast_info structures for that type.
* The cast_initial array is actually an array of arrays, because each row has
* a variable number of columns. So to actually build the cast linked list,
* we find the array of casts associated with the type, and loop through it
* adding the casts to the list. The one last trick we need to do is making
* sure the type pointer in the swig_cast_info struct is correct.
* First off, we lookup the cast->type name to see if it is already loaded.
* There are three cases to handle:
* 1) If the cast->type has already been loaded AND the type we are adding
* casting info to has not been loaded (it is in this module), THEN we
* replace the cast->type pointer with the type pointer that has already
* been loaded.
* 2) If BOTH types (the one we are adding casting info to, and the
* cast->type) are loaded, THEN the cast info has already been loaded by
* the previous module so we just ignore it.
* 3) Finally, if cast->type has not already been loaded, then we add that
* swig_cast_info to the linked list (because the cast->type) pointer will
* be correct.
**/
#ifdef __cplusplus
extern "C" {
#endif
SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
swig_type_info *type, *ret;
swig_cast_info *cast;
size_t i;
swig_module_info *module_head;
static int init_run = 0;
clientdata = clientdata;
if (init_run) return;
init_run = 1;
/* Initialize the swig_module */
swig_module.type_initial = swig_type_initial;
swig_module.cast_initial = swig_cast_initial;
/* Try and load any already created modules */
module_head = SWIG_GetModule(clientdata);
if (module_head) {
swig_module.next = module_head->next;
module_head->next = &swig_module;
} else {
/* This is the first module loaded */
swig_module.next = &swig_module;
SWIG_SetModule(clientdata, &swig_module);
}
/* Now work on filling in swig_module.types */
for (i = 0; i < swig_module.size; ++i) {
type = 0;
/* 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 (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata;
} 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;
if (swig_module.next != &swig_module) {
ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
}
if (ret && type == swig_module.type_initial[i]) {
cast->type = ret;
ret = 0;
}
if (!ret) {
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;
}
/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types. It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
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
}
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
...@@ -1661,8 +1324,13 @@ extern "C" ...@@ -1661,8 +1324,13 @@ extern "C"
XS(SWIG_init) { XS(SWIG_init) {
dXSARGS; dXSARGS;
int i; int i;
static int _init = 0;
SWIG_InitializeModule(0); if (!_init) {
for (i = 0; swig_types_initial[i]; i++) {
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
}
_init = 1;
}
/* Install commands */ /* Install commands */
for (i = 0; swig_commands[i].name; i++) { for (i = 0; swig_commands[i].name; i++) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论