1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
12 #ifndef SWIG_TEMPLATE_DISAMBIGUATOR
13 # if defined(__SUNPRO_CC)
14 # define SWIG_TEMPLATE_DISAMBIGUATOR template
16 # define SWIG_TEMPLATE_DISAMBIGUATOR
20 /***********************************************************************
23 * This file contains generic CAPI SWIG runtime support for pointer
26 ************************************************************************/
28 /* This should only be incremented when either the layout of swig_type_info changes,
29 or for whatever reason, the runtime changes incompatibly */
30 #define SWIG_RUNTIME_VERSION "1"
32 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
33 #ifdef SWIG_TYPE_TABLE
34 #define SWIG_QUOTE_STRING(x) #x
35 #define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
36 #define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
38 #define SWIG_TYPE_TABLE_NAME
44 #if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
45 # define SWIGINLINE inline
52 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
53 creating a static or dynamic library from the swig runtime code.
54 In 99.9% of the cases, swig just needs to declare them as 'static'.
56 But only do this if is strictly necessary, ie, if you have problems
57 with your compiler or so.
60 #define SWIGRUNTIME static
62 #ifndef SWIGRUNTIMEINLINE
63 #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
70 typedef void *(*swig_converter_func
)(void *);
71 typedef struct swig_type_info
*(*swig_dycast_func
)(void **);
73 typedef struct swig_type_info
{
75 swig_converter_func converter
;
78 swig_dycast_func dcast
;
79 struct swig_type_info
*next
;
80 struct swig_type_info
*prev
;
84 Compare two type names skipping the space characters, therefore
85 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
87 Return 0 when the two name types are equivalent, as in
88 strncmp, but skipping ' '.
91 SWIG_TypeNameComp(const char *f1
, const char *l1
,
92 const char *f2
, const char *l2
) {
93 for (;(f1
!= l1
) && (f2
!= l2
); ++f1
, ++f2
) {
94 while ((*f1
== ' ') && (f1
!= l1
)) ++f1
;
95 while ((*f2
== ' ') && (f2
!= l2
)) ++f2
;
96 if (*f1
!= *f2
) return *f1
- *f2
;
98 return (l1
- f1
) - (l2
- f2
);
102 Check type equivalence in a name list like <name1>|<name2>|...
105 SWIG_TypeEquiv(const char *nb
, const char *tb
) {
107 const char* te
= tb
+ strlen(tb
);
109 while (!equiv
&& *ne
) {
110 for (nb
= ne
; *ne
; ++ne
) {
111 if (*ne
== '|') break;
113 equiv
= SWIG_TypeNameComp(nb
, ne
, tb
, te
) == 0;
120 Register a type mapping with the type-checking
122 SWIGRUNTIME swig_type_info
*
123 SWIG_TypeRegisterTL(swig_type_info
**tl
, swig_type_info
*ti
) {
124 swig_type_info
*tc
, *head
, *ret
, *next
;
125 /* Check to see if this type has already been registered */
128 /* check simple type equivalence */
129 int typeequiv
= (strcmp(tc
->name
, ti
->name
) == 0);
130 /* check full type equivalence, resolving typedefs */
132 /* only if tc is not a typedef (no '|' on it) */
133 if (tc
->str
&& ti
->str
&& !strstr(tc
->str
,"|")) {
134 typeequiv
= SWIG_TypeEquiv(ti
->str
,tc
->str
);
138 /* Already exists in the table. Just add additional types to the list */
139 if (ti
->clientdata
) tc
->clientdata
= ti
->clientdata
;
153 /* Build linked lists */
157 /* Patch up the rest of the links */
164 if (next
) next
->prev
= head
;
173 SWIGRUNTIME swig_type_info
*
174 SWIG_TypeCheck(const char *c
, swig_type_info
*ty
) {
176 if (!ty
) return 0; /* Void pointer */
177 s
= ty
->next
; /* First element always just a name */
179 if (strcmp(s
->name
,c
) == 0) {
180 if (s
== ty
->next
) return s
;
181 /* Move s to the top of the linked list */
182 s
->prev
->next
= s
->next
;
184 s
->next
->prev
= s
->prev
;
186 /* Insert s as second element in the list */
188 if (ty
->next
) ty
->next
->prev
= s
;
194 } while (s
&& (s
!= ty
->next
));
199 Cast a pointer up an inheritance hierarchy
201 SWIGRUNTIMEINLINE
void *
202 SWIG_TypeCast(swig_type_info
*ty
, void *ptr
) {
203 return ((!ty
) || (!ty
->converter
)) ? ptr
: (*ty
->converter
)(ptr
);
207 Dynamic pointer casting. Down an inheritance hierarchy
209 SWIGRUNTIME swig_type_info
*
210 SWIG_TypeDynamicCast(swig_type_info
*ty
, void **ptr
) {
211 swig_type_info
*lastty
= ty
;
212 if (!ty
|| !ty
->dcast
) return ty
;
213 while (ty
&& (ty
->dcast
)) {
214 ty
= (*ty
->dcast
)(ptr
);
221 Return the name associated with this type
223 SWIGRUNTIMEINLINE
const char *
224 SWIG_TypeName(const swig_type_info
*ty
) {
229 Return the pretty name associated with this type,
230 that is an unmangled type name in a form presentable to the user.
232 SWIGRUNTIME
const char *
233 SWIG_TypePrettyName(const swig_type_info
*type
) {
234 /* The "str" field contains the equivalent pretty names of the
235 type, separated by vertical-bar characters. We choose
236 to print the last name, as it is often (?) the most
238 if (type
->str
!= NULL
) {
239 const char *last_name
= type
->str
;
241 for (s
= type
->str
; *s
; s
++)
242 if (*s
== '|') last_name
= s
+1;
250 Search for a swig_type_info structure
252 SWIGRUNTIME swig_type_info
*
253 SWIG_TypeQueryTL(swig_type_info
*tl
, const char *name
) {
254 swig_type_info
*ty
= tl
;
256 if (ty
->str
&& (SWIG_TypeEquiv(ty
->str
,name
))) return ty
;
257 if (ty
->name
&& (strcmp(name
,ty
->name
) == 0)) return ty
;
264 Set the clientdata field for a type
267 SWIG_TypeClientDataTL(swig_type_info
*tl
, swig_type_info
*ti
, void *clientdata
) {
268 swig_type_info
*tc
, *equiv
;
269 if (ti
->clientdata
) return;
270 /* if (ti->clientdata == clientdata) return; */
271 ti
->clientdata
= clientdata
;
274 if (!equiv
->converter
) {
277 if ((strcmp(tc
->name
, equiv
->name
) == 0))
278 SWIG_TypeClientDataTL(tl
,tc
,clientdata
);
287 Pack binary data into a string
290 SWIG_PackData(char *c
, void *ptr
, size_t sz
) {
291 static char hex
[17] = "0123456789abcdef";
292 unsigned char *u
= (unsigned char *) ptr
;
293 const unsigned char *eu
= u
+ sz
;
294 register unsigned char uu
;
295 for (; u
!= eu
; ++u
) {
297 *(c
++) = hex
[(uu
& 0xf0) >> 4];
298 *(c
++) = hex
[uu
& 0xf];
304 Unpack binary data from a string
306 SWIGRUNTIME
const char *
307 SWIG_UnpackData(const char *c
, void *ptr
, size_t sz
) {
308 register unsigned char *u
= (unsigned char *) ptr
;
309 register const unsigned char *eu
= u
+ sz
;
310 for (; u
!= eu
; ++u
) {
311 register int d
= *(c
++);
312 register unsigned char uu
= 0;
313 if ((d
>= '0') && (d
<= '9'))
314 uu
= ((d
- '0') << 4);
315 else if ((d
>= 'a') && (d
<= 'f'))
316 uu
= ((d
- ('a'-10)) << 4);
320 if ((d
>= '0') && (d
<= '9'))
322 else if ((d
>= 'a') && (d
<= 'f'))
323 uu
|= (d
- ('a'-10));
332 This function will propagate the clientdata field of type to any new
333 swig_type_info structures that have been added into the list of
334 equivalent types. It is like calling SWIG_TypeClientData(type,
335 clientdata) a second time.
338 SWIG_PropagateClientDataTL(swig_type_info
*tl
, swig_type_info
*type
) {
339 swig_type_info
*equiv
= type
->next
;
341 if (!type
->clientdata
) return;
343 if (!equiv
->converter
) {
346 if ((strcmp(tc
->name
, equiv
->name
) == 0) && !tc
->clientdata
)
347 SWIG_TypeClientDataTL(tl
,tc
, type
->clientdata
);
356 Pack 'void *' into a string buffer.
359 SWIG_PackVoidPtr(char *buff
, void *ptr
, const char *name
, size_t bsz
) {
361 if ((2*sizeof(void *) + 2) > bsz
) return 0;
363 r
= SWIG_PackData(r
,&ptr
,sizeof(void *));
364 if (strlen(name
) + 1 > (bsz
- (r
- buff
))) return 0;
369 SWIGRUNTIME
const char *
370 SWIG_UnpackVoidPtr(const char *c
, void **ptr
, const char *name
) {
372 if (strcmp(c
,"NULL") == 0) {
379 return SWIG_UnpackData(++c
,ptr
,sizeof(void *));
383 SWIG_PackDataName(char *buff
, void *ptr
, size_t sz
, const char *name
, size_t bsz
) {
385 size_t lname
= (name
? strlen(name
) : 0);
386 if ((2*sz
+ 2 + lname
) > bsz
) return 0;
388 r
= SWIG_PackData(r
,ptr
,sz
);
390 strncpy(r
,name
,lname
+1);
397 SWIGRUNTIME
const char *
398 SWIG_UnpackDataName(const char *c
, void *ptr
, size_t sz
, const char *name
) {
400 if (strcmp(c
,"NULL") == 0) {
407 return SWIG_UnpackData(++c
,ptr
,sz
);
414 /***********************************************************************
417 * This file contains generic SWIG runtime support for pointer
418 * type checking as well as a few commonly used macros to control
421 * Author : David Beazley (beazley@cs.uchicago.edu)
423 * Copyright (c) 1999-2000, The University of Chicago
425 * This file may be freely redistributed without license or fee provided
426 * this copyright message remains intact.
427 ************************************************************************/
430 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
431 # if !defined(STATIC_LINKED)
432 # define SWIGEXPORT(a) __declspec(dllexport) a
434 # define SWIGEXPORT(a) a
437 # define SWIGEXPORT(a) a
445 /*************************************************************************/
448 /* The static type info list */
450 static swig_type_info
*swig_type_list
= 0;
451 static swig_type_info
**swig_type_list_handle
= &swig_type_list
;
454 /* Register a type mapping with the type-checking */
455 static swig_type_info
*
456 SWIG_TypeRegister(swig_type_info
*ti
) {
457 return SWIG_TypeRegisterTL(swig_type_list_handle
, ti
);
460 /* Search for a swig_type_info structure */
461 static swig_type_info
*
462 SWIG_TypeQuery(const char *name
) {
463 return SWIG_TypeQueryTL(*swig_type_list_handle
, name
);
466 /* Set the clientdata field for a type */
468 SWIG_TypeClientData(swig_type_info
*ti
, void *clientdata
) {
469 SWIG_TypeClientDataTL(*swig_type_list_handle
, ti
, clientdata
);
472 /* This function will propagate the clientdata field of type to
473 * any new swig_type_info structures that have been added into the list
474 * of equivalent types. It is like calling
475 * SWIG_TypeClientData(type, clientdata) a second time.
478 SWIG_PropagateClientData(swig_type_info
*type
) {
479 SWIG_PropagateClientDataTL(*swig_type_list_handle
, type
);
486 /* ---------------------------------------------------------------------- -*- c -*-
489 * Perl5 runtime library
490 * $Header: /cvsroot/swig/SWIG/Lib/perl5/perlrun.swg,v 1.20 2004/11/29 23:13:57 wuzzeb Exp $
491 * ----------------------------------------------------------------------------- */
496 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
505 /* Get rid of free and malloc defined by perl */
518 /* Macro to call an XS function */
521 # define SWIG_CALLXS(_name) _name(cv,pPerl)
523 # ifndef MULTIPLICITY
524 # define SWIG_CALLXS(_name) _name(cv)
526 # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
530 /* Contract support */
532 #define SWIG_contract_assert(expr,msg) if (!(expr)) { SWIG_croak(msg); } else
534 /* Note: SwigMagicFuncHack is a typedef used to get the C++ compiler to just shut up already */
537 #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
538 typedef int (CPerlObj::*SwigMagicFunc
)(SV
*, MAGIC
*);
543 typedef int (CPerlObj::*SwigMagicFuncHack
)(SV
*, MAGIC
*);
548 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
549 #define SWIGCLASS_STATIC
552 #define SWIGCLASS_STATIC static
554 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
555 typedef int (*SwigMagicFunc
)(SV
*, MAGIC
*);
560 typedef int (*SwigMagicFuncHack
)(SV
*, MAGIC
*);
567 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
568 typedef int (*SwigMagicFunc
)(struct interpreter
*, SV
*, MAGIC
*);
572 typedef int (*SwigMagicFuncHack
)(struct interpreter
*, SV
*, MAGIC
*);
580 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
581 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
584 /* Modifications for newer Perl 5.005 releases */
586 #if !defined(PERL_REVISION) || ((PERL_REVISION >= 5) && ((PERL_VERSION < 5) || ((PERL_VERSION == 5) && (PERL_SUBVERSION < 50))))
588 # define PL_sv_yes sv_yes
591 # define PL_sv_undef sv_undef
605 #define SWIG_SHADOW 2
607 /* Common SWIG API */
610 # define SWIG_ConvertPtr(obj, pp, type, flags) \
611 SWIG_Perl_ConvertPtr(pPerl, obj, pp, type, flags)
612 # define SWIG_NewPointerObj(p, type, flags) \
613 SWIG_Perl_NewPointerObj(pPerl, p, type, flags)
614 # define SWIG_MakePackedObj(sv, p, s, type) \
615 SWIG_Perl_MakePackedObj(pPerl, sv, p, s, type)
616 # define SWIG_ConvertPacked(obj, p, s, type, flags) \
617 SWIG_Perl_ConvertPacked(pPerl, obj, p, s, type, flags)
620 # define SWIG_ConvertPtr(obj, pp, type, flags) \
621 SWIG_Perl_ConvertPtr(obj, pp, type, flags)
622 # define SWIG_NewPointerObj(p, type, flags) \
623 SWIG_Perl_NewPointerObj(p, type, flags)
624 # define SWIG_MakePackedObj(sv, p, s, type) \
625 SWIG_Perl_MakePackedObj(sv, p, s, type )
626 # define SWIG_ConvertPacked(obj, p, s, type, flags) \
627 SWIG_Perl_ConvertPacked(obj, p, s, type, flags)
630 /* Perl-specific API */
632 # define SWIG_MakePtr(sv, ptr, type, flags) \
633 SWIG_Perl_MakePtr(pPerl, sv, ptr, type, flags)
634 # define SWIG_SetError(str) \
635 SWIG_Perl_SetError(pPerl, str)
637 # define SWIG_MakePtr(sv, ptr, type, flags) \
638 SWIG_Perl_MakePtr(sv, ptr, type, flags)
639 # define SWIG_SetError(str) \
640 SWIG_Perl_SetError(str)
641 # define SWIG_SetErrorSV(str) \
642 SWIG_Perl_SetErrorSV(str)
645 #define SWIG_SetErrorf SWIG_Perl_SetErrorf
649 # define SWIG_MAYBE_PERL_OBJECT CPerlObj *pPerl,
651 # define SWIG_MAYBE_PERL_OBJECT
654 static swig_type_info
**
655 SWIG_Perl_GetTypeListHandle() {
656 static void *type_pointer
= (void *)0;
659 /* first check if pointer already created */
661 pointer
= get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
, FALSE
);
662 if (pointer
&& SvOK(pointer
)) {
663 type_pointer
= INT2PTR(swig_type_info
**, SvIV(pointer
));
667 return (swig_type_info
**) type_pointer
;
671 Search for a swig_type_info structure
673 SWIGRUNTIMEINLINE swig_type_info
*
674 SWIG_Perl_GetTypeList() {
675 swig_type_info
**tlh
= SWIG_Perl_GetTypeListHandle();
676 return tlh
? *tlh
: (swig_type_info
*)0;
679 #define SWIG_Runtime_GetTypeList SWIG_Perl_GetTypeList
681 static swig_type_info
*
682 SWIG_Perl_TypeCheckRV(SWIG_MAYBE_PERL_OBJECT SV
*rv
, swig_type_info
*ty
) {
684 if (!ty
) return 0; /* Void pointer */
685 s
= ty
->next
; /* First element always just a name */
687 if (sv_derived_from(rv
, (char *) s
->name
)) {
688 if (s
== ty
->next
) return s
;
689 /* Move s to the top of the linked list */
690 s
->prev
->next
= s
->next
;
692 s
->next
->prev
= s
->prev
;
694 /* Insert s as second element in the list */
696 if (ty
->next
) ty
->next
->prev
= s
;
702 } while (s
&& (s
!= ty
->next
));
706 /* Function for getting a pointer value */
709 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void **ptr
, swig_type_info
*_t
, int flags
) {
711 void *voidptr
= (void *)0;
713 /* If magical, apply more magic */
717 /* Check to see if this is an object */
718 if (sv_isobject(sv
)) {
719 SV
*tsv
= (SV
*) SvRV(sv
);
721 if ((SvTYPE(tsv
) == SVt_PVHV
)) {
723 if (SvMAGICAL(tsv
)) {
724 mg
= mg_find(tsv
,'P');
727 if (sv_isobject(sv
)) {
728 tmp
= SvIV((SV
*)SvRV(sv
));
735 tmp
= SvIV((SV
*)SvRV(sv
));
737 voidptr
= (void *)tmp
;
742 } else if (! SvOK(sv
)) { /* Check for undef */
745 } else if (SvTYPE(sv
) == SVt_RV
) { /* Check for NULL pointer */
751 } else { /* Don't know what it is */
756 /* Now see if the types match */
757 char *_c
= HvNAME(SvSTASH(SvRV(sv
)));
758 tc
= SWIG_TypeCheck(_c
,_t
);
763 *ptr
= SWIG_TypeCast(tc
,voidptr
);
771 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void *ptr
, swig_type_info
*t
, int flags
) {
772 if (ptr
&& (flags
& SWIG_SHADOW
)) {
777 sv_setref_pv(obj
, (char *) t
->name
, ptr
);
778 stash
=SvSTASH(SvRV(obj
));
779 if (flags
& SWIG_OWNER
) {
781 GV
*gv
=*(GV
**)hv_fetch(stash
, "OWNER", 5, TRUE
);
783 gv_init(gv
, stash
, "OWNER", 5, FALSE
);
785 hv_store_ent(hv
, obj
, newSViv(1), 0);
787 sv_magic((SV
*)hash
, (SV
*)obj
, 'P', Nullch
, 0);
789 self
=newRV_noinc((SV
*)hash
);
791 SvREFCNT_dec((SV
*)self
);
795 sv_setref_pv(sv
, (char *) t
->name
, ptr
);
799 static SWIGINLINE SV
*
800 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT
void *ptr
, swig_type_info
*t
, int flags
) {
801 SV
*result
= sv_newmortal();
802 SWIG_MakePtr(result
, ptr
, t
, flags
);
807 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV
*sv
, void *ptr
, int sz
, swig_type_info
*type
) {
810 if ((2*sz
+ 1 + strlen(type
->name
)) > 1000) return;
812 r
= SWIG_PackData(r
,ptr
,sz
);
813 strcpy(r
,type
->name
);
814 sv_setpv(sv
, result
);
817 /* Convert a packed value value */
819 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV
*obj
, void *ptr
, int sz
, swig_type_info
*ty
, int flags
) {
823 if ((!obj
) || (!SvOK(obj
))) return -1;
824 c
= SvPV(obj
, PL_na
);
825 /* Pointer values must start with leading underscore */
826 if (*c
!= '_') return -1;
828 c
= SWIG_UnpackData(c
,ptr
,sz
);
830 tc
= SWIG_TypeCheck(c
,ty
);
836 static SWIGINLINE
void
837 SWIG_Perl_SetError(SWIG_MAYBE_PERL_OBJECT
const char *error
) {
838 if (error
) sv_setpv(perl_get_sv("@", TRUE
), error
);
841 static SWIGINLINE
void
842 SWIG_Perl_SetErrorSV(SWIG_MAYBE_PERL_OBJECT SV
*error
) {
843 if (error
) sv_setsv(perl_get_sv("@", TRUE
), error
);
847 SWIG_Perl_SetErrorf(const char *fmt
, ...) {
850 sv_vsetpvfn(perl_get_sv("@", TRUE
), fmt
, strlen(fmt
), &args
, Null(SV
**), 0, Null(bool*));
854 /* Macros for low-level exception handling */
855 #define SWIG_fail goto fail
856 #define SWIG_croak(x) { SWIG_SetError(x); goto fail; }
857 #define SWIG_croakSV(x) { SWIG_SetErrorSV(x); goto fail; }
858 /* most preprocessors do not support vararg macros :-( */
859 /* #define SWIG_croakf(x...) { SWIG_SetErrorf(x); goto fail; } */
862 typedef XS(SwigPerlWrapper
);
863 typedef SwigPerlWrapper
*SwigPerlWrapperPtr
;
865 /* Structure for command table */
868 SwigPerlWrapperPtr wrapper
;
871 /* Information for constant table */
875 #define SWIG_STRING 3
876 #define SWIG_POINTER 4
877 #define SWIG_BINARY 5
879 /* Constant information structure */
880 typedef struct swig_constant_info
{
886 swig_type_info
**ptype
;
887 } swig_constant_info
;
893 /* Structure for variable table */
898 swig_type_info
**type
;
899 } swig_variable_info
;
901 /* Magic variable code */
903 #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
905 static void _swig_create_magic(SV
*sv
, char *name
, int (*set
)(SV
*, MAGIC
*), int (*get
)(SV
*,MAGIC
*)) {
907 static void _swig_create_magic(SV
*sv
, char *name
, int (*set
)(struct interpreter
*, SV
*, MAGIC
*), int (*get
)(struct interpreter
*, SV
*,MAGIC
*)) {
910 # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
911 static void _swig_create_magic(CPerlObj
*pPerl
, SV
*sv
, const char *name
, int (CPerlObj::*set
)(SV
*, MAGIC
*), int (CPerlObj::*get
)(SV
*, MAGIC
*)) {
914 sv_magic(sv
,sv
,'U',(char *) name
,strlen(name
));
915 mg
= mg_find(sv
,'U');
916 mg
->mg_virtual
= (MGVTBL
*) malloc(sizeof(MGVTBL
));
917 mg
->mg_virtual
->svt_get
= (SwigMagicFuncHack
) get
;
918 mg
->mg_virtual
->svt_set
= (SwigMagicFuncHack
) set
;
919 mg
->mg_virtual
->svt_len
= 0;
920 mg
->mg_virtual
->svt_clear
= 0;
921 mg
->mg_virtual
->svt_free
= 0;
985 /* -------- TYPES TABLE (BEGIN) -------- */
987 #define SWIGTYPE_p_lwes_event_type_db swig_types[0]
988 #define SWIGTYPE_p_unsigned_long_long swig_types[1]
989 #define SWIGTYPE_p_long_long swig_types[2]
990 #define SWIGTYPE_p_in_addr swig_types[3]
991 #define SWIGTYPE_p_lwes_emitter swig_types[4]
992 #define SWIGTYPE_p_p_char swig_types[5]
993 #define SWIGTYPE_p_lwes_event swig_types[6]
994 #define SWIGTYPE_p_unsigned_int swig_types[7]
995 #define SWIGTYPE_p_unsigned_short swig_types[8]
996 #define SWIGTYPE_p_short swig_types[9]
997 #define SWIGTYPE_p_int swig_types[10]
998 static swig_type_info
*swig_types
[12];
1000 /* -------- TYPES TABLE (END) -------- */
1002 #define SWIG_init boot_LWES
1004 #define SWIG_name "LWESc::boot_LWES"
1005 #define SWIG_prefix "LWESc::"
1011 #ifndef MULTIPLICITY
1012 SWIGEXPORT(void) SWIG_init (CV
* cv
);
1014 SWIGEXPORT(void) SWIG_init (pTHXo_ CV
* cv
);
1017 SWIGEXPORT(void) SWIG_init (CV
*cv
, CPerlObj
*);
1025 struct lwes_event_type_db
*
1026 create_db(char *filename
)
1028 return lwes_event_type_db_create(filename
);
1032 destroy_db(struct lwes_event_type_db
* db
)
1034 return lwes_event_type_db_destroy(db
);
1037 struct lwes_emitter
*
1038 create_emitter(char *address
, char *iface
, int port
,
1039 int emit_heartbeat
, short freq
)
1041 return lwes_emitter_create(address
, iface
, port
, emit_heartbeat
, freq
);
1044 struct lwes_emitter
*
1045 create_emitter_with_ttl(char *address
, char *iface
, int port
,
1046 int emit_heartbeat
, short freq
, int ttl
)
1048 return lwes_emitter_create_with_ttl(address
, iface
, port
, emit_heartbeat
,
1053 emit(struct lwes_emitter
*emitter
, struct lwes_event
*event
)
1055 return lwes_emitter_emit(emitter
, event
);
1059 emitto(char *address
, char *iface
, int port
, struct lwes_emitter
*emitter
,
1060 struct lwes_event
*event
)
1062 return lwes_emitter_emitto(address
, iface
, port
, emitter
, event
);
1066 destroy_emitter(struct lwes_emitter
*emitter
)
1068 return lwes_emitter_destroy(emitter
);
1072 create_event(struct lwes_event_type_db
* db
, char *event_name
)
1074 return lwes_event_create(db
, event_name
);
1078 create_event_with_encoding(struct lwes_event_type_db
*db
, char *event_name
,
1081 return lwes_event_create_with_encoding(db
, event_name
, encoding
);
1085 set_uint16(struct lwes_event
*event
, char *attribute_name
,
1086 unsigned short a_uint16
)
1088 return lwes_event_set_U_INT_16(event
, attribute_name
, a_uint16
);
1092 get_uint16(struct lwes_event
* event
, char* attribute_name
,
1093 unsigned short *a_uint16
)
1095 return lwes_event_get_U_INT_16(event
, attribute_name
, a_uint16
);
1099 set_int16(struct lwes_event
* event
, char* attribute_name
,
1102 return lwes_event_set_INT_16(event
, attribute_name
, an_int16
);
1106 get_int16(struct lwes_event
* event
, char* attribute_name
,
1109 return lwes_event_get_INT_16(event
, attribute_name
, an_int16
);
1113 set_uint32(struct lwes_event
* event
, char* attribute_name
,
1114 unsigned int a_uint32
)
1116 return lwes_event_set_U_INT_32(event
, attribute_name
, a_uint32
);
1120 get_uint32(struct lwes_event
* event
, char* attribute_name
,
1121 unsigned int * a_uint32
)
1123 return lwes_event_get_U_INT_32(event
, attribute_name
, a_uint32
);
1127 set_int32(struct lwes_event
* event
, char* attribute_name
,
1130 return lwes_event_set_INT_32(event
, attribute_name
, an_int32
);
1134 get_int32(struct lwes_event
* event
, char* attribute_name
,
1137 return lwes_event_get_INT_32(event
, attribute_name
, an_int32
);
1141 set_uint64(struct lwes_event
* event
, char* attribute_name
,
1144 return lwes_event_set_U_INT_64_w_string(event
, attribute_name
, a_uint64
);
1148 get_uint64(struct lwes_event
* event
, char* attribute_name
,
1149 unsigned long long * a_uint64
)
1151 return lwes_event_get_U_INT_64(event
, attribute_name
, a_uint64
);
1155 set_int64(struct lwes_event
* event
, char* attribute_name
,
1158 return lwes_event_set_INT_64_w_string(event
, attribute_name
, an_int64
);
1162 get_int64(struct lwes_event
* event
, char* attribute_name
,
1163 long long* an_int64
)
1165 return lwes_event_get_INT_64(event
, attribute_name
, an_int64
);
1169 set_string(struct lwes_event
* event
, char* attribute_name
,
1172 return lwes_event_set_STRING(event
, attribute_name
, a_string
);
1176 get_string(struct lwes_event
* event
, char* attribute_name
,
1179 return lwes_event_get_STRING(event
, attribute_name
, a_string
);
1183 set_ip_addr(struct lwes_event
* event
, char* attribute_name
,
1186 return lwes_event_set_IP_ADDR_w_string(event
, attribute_name
, an_ip_addr
);
1190 get_ip_addr(struct lwes_event
*event
, char *attribute_name
,
1191 struct in_addr
*an_ip_addr
)
1193 return lwes_event_get_IP_ADDR(event
, attribute_name
, an_ip_addr
);
1197 set_boolean(struct lwes_event
* event
, char* attribute_name
,
1200 return lwes_event_set_BOOLEAN(event
, attribute_name
, a_boolean
);
1204 get_boolean(struct lwes_event
*event
, char *attribute_name
,
1207 return lwes_event_get_BOOLEAN(event
, attribute_name
, a_boolean
);
1211 destroy_event(struct lwes_event
*event
)
1213 return lwes_event_destroy(event
);
1217 current_time_millis(char *buffer
)
1219 LWES_INT_64 current_time
= 0LL;
1220 current_time
= currentTimeMillisLongLong();
1221 snprintf(buffer
,17,"%016llX",current_time
);
1226 #define MAGIC_CLASS _wrap_LWES_var::
1227 class _wrap_LWES_var
: public CPerlObj
{
1232 SWIGCLASS_STATIC
int swig_magic_readonly(pTHX_ SV
*sv
, MAGIC
*mg
) {
1235 croak("Value is read-only.");
1247 XS(_wrap_create_db
) {
1249 char *arg1
= (char *) 0 ;
1250 struct lwes_event_type_db
*result
;
1254 if ((items
< 1) || (items
> 1)) {
1255 SWIG_croak("Usage: create_db(filename);");
1257 if (!SvOK((SV
*) ST(0))) arg1
= 0;
1258 else arg1
= (char *) SvPV(ST(0), PL_na
);
1259 result
= (struct lwes_event_type_db
*)create_db(arg1
);
1261 ST(argvi
) = sv_newmortal();
1262 SWIG_MakePtr(ST(argvi
++), (void *) result
, SWIGTYPE_p_lwes_event_type_db
, 0|0);
1271 XS(_wrap_destroy_db
) {
1273 struct lwes_event_type_db
*arg1
= (struct lwes_event_type_db
*) 0 ;
1278 if ((items
< 1) || (items
> 1)) {
1279 SWIG_croak("Usage: destroy_db(db);");
1282 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event_type_db
,0) < 0) {
1283 SWIG_croak("Type error in argument 1 of destroy_db. Expected _p_lwes_event_type_db");
1286 result
= (int)destroy_db(arg1
);
1288 ST(argvi
) = sv_newmortal();
1289 sv_setiv(ST(argvi
++), (IV
) result
);
1298 XS(_wrap_create_emitter
) {
1300 char *arg1
= (char *) 0 ;
1301 char *arg2
= (char *) 0 ;
1305 struct lwes_emitter
*result
;
1309 if ((items
< 5) || (items
> 5)) {
1310 SWIG_croak("Usage: create_emitter(address,iface,port,emit_heartbeat,freq);");
1312 if (!SvOK((SV
*) ST(0))) arg1
= 0;
1313 else arg1
= (char *) SvPV(ST(0), PL_na
);
1314 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1315 else arg2
= (char *) SvPV(ST(1), PL_na
);
1316 arg3
= (int) SvIV(ST(2));
1317 arg4
= (int) SvIV(ST(3));
1318 arg5
= (short) SvIV(ST(4));
1319 result
= (struct lwes_emitter
*)create_emitter(arg1
,arg2
,arg3
,arg4
,arg5
);
1321 ST(argvi
) = sv_newmortal();
1322 SWIG_MakePtr(ST(argvi
++), (void *) result
, SWIGTYPE_p_lwes_emitter
, 0|0);
1331 XS(_wrap_create_emitter_with_ttl
) {
1333 char *arg1
= (char *) 0 ;
1334 char *arg2
= (char *) 0 ;
1339 struct lwes_emitter
*result
;
1343 if ((items
< 6) || (items
> 6)) {
1344 SWIG_croak("Usage: create_emitter_with_ttl(address,iface,port,emit_heartbeat,freq,ttl);");
1346 if (!SvOK((SV
*) ST(0))) arg1
= 0;
1347 else arg1
= (char *) SvPV(ST(0), PL_na
);
1348 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1349 else arg2
= (char *) SvPV(ST(1), PL_na
);
1350 arg3
= (int) SvIV(ST(2));
1351 arg4
= (int) SvIV(ST(3));
1352 arg5
= (short) SvIV(ST(4));
1353 arg6
= (int) SvIV(ST(5));
1354 result
= (struct lwes_emitter
*)create_emitter_with_ttl(arg1
,arg2
,arg3
,arg4
,arg5
,arg6
);
1356 ST(argvi
) = sv_newmortal();
1357 SWIG_MakePtr(ST(argvi
++), (void *) result
, SWIGTYPE_p_lwes_emitter
, 0|0);
1368 struct lwes_emitter
*arg1
= (struct lwes_emitter
*) 0 ;
1369 struct lwes_event
*arg2
= (struct lwes_event
*) 0 ;
1374 if ((items
< 2) || (items
> 2)) {
1375 SWIG_croak("Usage: emit(emitter,event);");
1378 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_emitter
,0) < 0) {
1379 SWIG_croak("Type error in argument 1 of emit. Expected _p_lwes_emitter");
1383 if (SWIG_ConvertPtr(ST(1), (void **) &arg2
, SWIGTYPE_p_lwes_event
,0) < 0) {
1384 SWIG_croak("Type error in argument 2 of emit. Expected _p_lwes_event");
1387 result
= (int)emit(arg1
,arg2
);
1389 ST(argvi
) = sv_newmortal();
1390 sv_setiv(ST(argvi
++), (IV
) result
);
1401 char *arg1
= (char *) 0 ;
1402 char *arg2
= (char *) 0 ;
1404 struct lwes_emitter
*arg4
= (struct lwes_emitter
*) 0 ;
1405 struct lwes_event
*arg5
= (struct lwes_event
*) 0 ;
1410 if ((items
< 5) || (items
> 5)) {
1411 SWIG_croak("Usage: emitto(address,iface,port,emitter,event);");
1413 if (!SvOK((SV
*) ST(0))) arg1
= 0;
1414 else arg1
= (char *) SvPV(ST(0), PL_na
);
1415 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1416 else arg2
= (char *) SvPV(ST(1), PL_na
);
1417 arg3
= (int) SvIV(ST(2));
1419 if (SWIG_ConvertPtr(ST(3), (void **) &arg4
, SWIGTYPE_p_lwes_emitter
,0) < 0) {
1420 SWIG_croak("Type error in argument 4 of emitto. Expected _p_lwes_emitter");
1424 if (SWIG_ConvertPtr(ST(4), (void **) &arg5
, SWIGTYPE_p_lwes_event
,0) < 0) {
1425 SWIG_croak("Type error in argument 5 of emitto. Expected _p_lwes_event");
1428 result
= (int)emitto(arg1
,arg2
,arg3
,arg4
,arg5
);
1430 ST(argvi
) = sv_newmortal();
1431 sv_setiv(ST(argvi
++), (IV
) result
);
1440 XS(_wrap_destroy_emitter
) {
1442 struct lwes_emitter
*arg1
= (struct lwes_emitter
*) 0 ;
1447 if ((items
< 1) || (items
> 1)) {
1448 SWIG_croak("Usage: destroy_emitter(emitter);");
1451 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_emitter
,0) < 0) {
1452 SWIG_croak("Type error in argument 1 of destroy_emitter. Expected _p_lwes_emitter");
1455 result
= (int)destroy_emitter(arg1
);
1457 ST(argvi
) = sv_newmortal();
1458 sv_setiv(ST(argvi
++), (IV
) result
);
1467 XS(_wrap_create_event
) {
1469 struct lwes_event_type_db
*arg1
= (struct lwes_event_type_db
*) 0 ;
1470 char *arg2
= (char *) 0 ;
1471 struct lwes_event
*result
;
1475 if ((items
< 2) || (items
> 2)) {
1476 SWIG_croak("Usage: create_event(db,event_name);");
1479 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event_type_db
,0) < 0) {
1480 SWIG_croak("Type error in argument 1 of create_event. Expected _p_lwes_event_type_db");
1483 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1484 else arg2
= (char *) SvPV(ST(1), PL_na
);
1485 result
= (struct lwes_event
*)create_event(arg1
,arg2
);
1487 ST(argvi
) = sv_newmortal();
1488 SWIG_MakePtr(ST(argvi
++), (void *) result
, SWIGTYPE_p_lwes_event
, 0|0);
1497 XS(_wrap_create_event_with_encoding
) {
1499 struct lwes_event_type_db
*arg1
= (struct lwes_event_type_db
*) 0 ;
1500 char *arg2
= (char *) 0 ;
1502 struct lwes_event
*result
;
1506 if ((items
< 3) || (items
> 3)) {
1507 SWIG_croak("Usage: create_event_with_encoding(db,event_name,encoding);");
1510 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event_type_db
,0) < 0) {
1511 SWIG_croak("Type error in argument 1 of create_event_with_encoding. Expected _p_lwes_event_type_db");
1514 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1515 else arg2
= (char *) SvPV(ST(1), PL_na
);
1516 arg3
= (short) SvIV(ST(2));
1517 result
= (struct lwes_event
*)create_event_with_encoding(arg1
,arg2
,arg3
);
1519 ST(argvi
) = sv_newmortal();
1520 SWIG_MakePtr(ST(argvi
++), (void *) result
, SWIGTYPE_p_lwes_event
, 0|0);
1529 XS(_wrap_set_uint16
) {
1531 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1532 char *arg2
= (char *) 0 ;
1533 unsigned short arg3
;
1538 if ((items
< 3) || (items
> 3)) {
1539 SWIG_croak("Usage: set_uint16(event,attribute_name,a_uint16);");
1542 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1543 SWIG_croak("Type error in argument 1 of set_uint16. Expected _p_lwes_event");
1546 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1547 else arg2
= (char *) SvPV(ST(1), PL_na
);
1548 arg3
= (unsigned short) SvUV(ST(2));
1549 result
= (int)set_uint16(arg1
,arg2
,arg3
);
1551 ST(argvi
) = sv_newmortal();
1552 sv_setiv(ST(argvi
++), (IV
) result
);
1561 XS(_wrap_get_uint16
) {
1563 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1564 char *arg2
= (char *) 0 ;
1565 unsigned short *arg3
= (unsigned short *) 0 ;
1570 if ((items
< 3) || (items
> 3)) {
1571 SWIG_croak("Usage: get_uint16(event,attribute_name,a_uint16);");
1574 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1575 SWIG_croak("Type error in argument 1 of get_uint16. Expected _p_lwes_event");
1578 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1579 else arg2
= (char *) SvPV(ST(1), PL_na
);
1581 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_unsigned_short
,0) < 0) {
1582 SWIG_croak("Type error in argument 3 of get_uint16. Expected _p_unsigned_short");
1585 result
= (int)get_uint16(arg1
,arg2
,arg3
);
1587 ST(argvi
) = sv_newmortal();
1588 sv_setiv(ST(argvi
++), (IV
) result
);
1597 XS(_wrap_set_int16
) {
1599 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1600 char *arg2
= (char *) 0 ;
1606 if ((items
< 3) || (items
> 3)) {
1607 SWIG_croak("Usage: set_int16(event,attribute_name,an_int16);");
1610 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1611 SWIG_croak("Type error in argument 1 of set_int16. Expected _p_lwes_event");
1614 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1615 else arg2
= (char *) SvPV(ST(1), PL_na
);
1616 arg3
= (short) SvIV(ST(2));
1617 result
= (int)set_int16(arg1
,arg2
,arg3
);
1619 ST(argvi
) = sv_newmortal();
1620 sv_setiv(ST(argvi
++), (IV
) result
);
1629 XS(_wrap_get_int16
) {
1631 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1632 char *arg2
= (char *) 0 ;
1633 short *arg3
= (short *) 0 ;
1638 if ((items
< 3) || (items
> 3)) {
1639 SWIG_croak("Usage: get_int16(event,attribute_name,an_int16);");
1642 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1643 SWIG_croak("Type error in argument 1 of get_int16. Expected _p_lwes_event");
1646 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1647 else arg2
= (char *) SvPV(ST(1), PL_na
);
1649 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_short
,0) < 0) {
1650 SWIG_croak("Type error in argument 3 of get_int16. Expected _p_short");
1653 result
= (int)get_int16(arg1
,arg2
,arg3
);
1655 ST(argvi
) = sv_newmortal();
1656 sv_setiv(ST(argvi
++), (IV
) result
);
1665 XS(_wrap_set_uint32
) {
1667 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1668 char *arg2
= (char *) 0 ;
1674 if ((items
< 3) || (items
> 3)) {
1675 SWIG_croak("Usage: set_uint32(event,attribute_name,a_uint32);");
1678 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1679 SWIG_croak("Type error in argument 1 of set_uint32. Expected _p_lwes_event");
1682 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1683 else arg2
= (char *) SvPV(ST(1), PL_na
);
1684 arg3
= (unsigned int) SvUV(ST(2));
1685 result
= (int)set_uint32(arg1
,arg2
,arg3
);
1687 ST(argvi
) = sv_newmortal();
1688 sv_setiv(ST(argvi
++), (IV
) result
);
1697 XS(_wrap_get_uint32
) {
1699 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1700 char *arg2
= (char *) 0 ;
1701 unsigned int *arg3
= (unsigned int *) 0 ;
1706 if ((items
< 3) || (items
> 3)) {
1707 SWIG_croak("Usage: get_uint32(event,attribute_name,a_uint32);");
1710 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1711 SWIG_croak("Type error in argument 1 of get_uint32. Expected _p_lwes_event");
1714 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1715 else arg2
= (char *) SvPV(ST(1), PL_na
);
1717 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_unsigned_int
,0) < 0) {
1718 SWIG_croak("Type error in argument 3 of get_uint32. Expected _p_unsigned_int");
1721 result
= (int)get_uint32(arg1
,arg2
,arg3
);
1723 ST(argvi
) = sv_newmortal();
1724 sv_setiv(ST(argvi
++), (IV
) result
);
1733 XS(_wrap_set_int32
) {
1735 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1736 char *arg2
= (char *) 0 ;
1742 if ((items
< 3) || (items
> 3)) {
1743 SWIG_croak("Usage: set_int32(event,attribute_name,an_int32);");
1746 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1747 SWIG_croak("Type error in argument 1 of set_int32. Expected _p_lwes_event");
1750 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1751 else arg2
= (char *) SvPV(ST(1), PL_na
);
1752 arg3
= (int) SvIV(ST(2));
1753 result
= (int)set_int32(arg1
,arg2
,arg3
);
1755 ST(argvi
) = sv_newmortal();
1756 sv_setiv(ST(argvi
++), (IV
) result
);
1765 XS(_wrap_get_int32
) {
1767 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1768 char *arg2
= (char *) 0 ;
1769 int *arg3
= (int *) 0 ;
1774 if ((items
< 3) || (items
> 3)) {
1775 SWIG_croak("Usage: get_int32(event,attribute_name,an_int32);");
1778 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1779 SWIG_croak("Type error in argument 1 of get_int32. Expected _p_lwes_event");
1782 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1783 else arg2
= (char *) SvPV(ST(1), PL_na
);
1785 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_int
,0) < 0) {
1786 SWIG_croak("Type error in argument 3 of get_int32. Expected _p_int");
1789 result
= (int)get_int32(arg1
,arg2
,arg3
);
1791 ST(argvi
) = sv_newmortal();
1792 sv_setiv(ST(argvi
++), (IV
) result
);
1801 XS(_wrap_set_uint64
) {
1803 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1804 char *arg2
= (char *) 0 ;
1805 char *arg3
= (char *) 0 ;
1810 if ((items
< 3) || (items
> 3)) {
1811 SWIG_croak("Usage: set_uint64(event,attribute_name,a_uint64);");
1814 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1815 SWIG_croak("Type error in argument 1 of set_uint64. Expected _p_lwes_event");
1818 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1819 else arg2
= (char *) SvPV(ST(1), PL_na
);
1820 if (!SvOK((SV
*) ST(2))) arg3
= 0;
1821 else arg3
= (char *) SvPV(ST(2), PL_na
);
1822 result
= (int)set_uint64(arg1
,arg2
,arg3
);
1824 ST(argvi
) = sv_newmortal();
1825 sv_setiv(ST(argvi
++), (IV
) result
);
1834 XS(_wrap_get_uint64
) {
1836 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1837 char *arg2
= (char *) 0 ;
1838 unsigned long long *arg3
= (unsigned long long *) 0 ;
1843 if ((items
< 3) || (items
> 3)) {
1844 SWIG_croak("Usage: get_uint64(event,attribute_name,a_uint64);");
1847 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1848 SWIG_croak("Type error in argument 1 of get_uint64. Expected _p_lwes_event");
1851 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1852 else arg2
= (char *) SvPV(ST(1), PL_na
);
1854 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_unsigned_long_long
,0) < 0) {
1855 SWIG_croak("Type error in argument 3 of get_uint64. Expected _p_unsigned_long_long");
1858 result
= (int)get_uint64(arg1
,arg2
,arg3
);
1860 ST(argvi
) = sv_newmortal();
1861 sv_setiv(ST(argvi
++), (IV
) result
);
1870 XS(_wrap_set_int64
) {
1872 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1873 char *arg2
= (char *) 0 ;
1874 char *arg3
= (char *) 0 ;
1879 if ((items
< 3) || (items
> 3)) {
1880 SWIG_croak("Usage: set_int64(event,attribute_name,an_int64);");
1883 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1884 SWIG_croak("Type error in argument 1 of set_int64. Expected _p_lwes_event");
1887 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1888 else arg2
= (char *) SvPV(ST(1), PL_na
);
1889 if (!SvOK((SV
*) ST(2))) arg3
= 0;
1890 else arg3
= (char *) SvPV(ST(2), PL_na
);
1891 result
= (int)set_int64(arg1
,arg2
,arg3
);
1893 ST(argvi
) = sv_newmortal();
1894 sv_setiv(ST(argvi
++), (IV
) result
);
1903 XS(_wrap_get_int64
) {
1905 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1906 char *arg2
= (char *) 0 ;
1907 long long *arg3
= (long long *) 0 ;
1912 if ((items
< 3) || (items
> 3)) {
1913 SWIG_croak("Usage: get_int64(event,attribute_name,an_int64);");
1916 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1917 SWIG_croak("Type error in argument 1 of get_int64. Expected _p_lwes_event");
1920 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1921 else arg2
= (char *) SvPV(ST(1), PL_na
);
1923 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_long_long
,0) < 0) {
1924 SWIG_croak("Type error in argument 3 of get_int64. Expected _p_long_long");
1927 result
= (int)get_int64(arg1
,arg2
,arg3
);
1929 ST(argvi
) = sv_newmortal();
1930 sv_setiv(ST(argvi
++), (IV
) result
);
1939 XS(_wrap_set_string
) {
1941 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1942 char *arg2
= (char *) 0 ;
1943 char *arg3
= (char *) 0 ;
1948 if ((items
< 3) || (items
> 3)) {
1949 SWIG_croak("Usage: set_string(event,attribute_name,a_string);");
1952 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1953 SWIG_croak("Type error in argument 1 of set_string. Expected _p_lwes_event");
1956 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1957 else arg2
= (char *) SvPV(ST(1), PL_na
);
1958 if (!SvOK((SV
*) ST(2))) arg3
= 0;
1959 else arg3
= (char *) SvPV(ST(2), PL_na
);
1960 result
= (int)set_string(arg1
,arg2
,arg3
);
1962 ST(argvi
) = sv_newmortal();
1963 sv_setiv(ST(argvi
++), (IV
) result
);
1972 XS(_wrap_get_string
) {
1974 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
1975 char *arg2
= (char *) 0 ;
1976 char **arg3
= (char **) 0 ;
1981 if ((items
< 3) || (items
> 3)) {
1982 SWIG_croak("Usage: get_string(event,attribute_name,a_string);");
1985 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
1986 SWIG_croak("Type error in argument 1 of get_string. Expected _p_lwes_event");
1989 if (!SvOK((SV
*) ST(1))) arg2
= 0;
1990 else arg2
= (char *) SvPV(ST(1), PL_na
);
1992 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_p_char
,0) < 0) {
1993 SWIG_croak("Type error in argument 3 of get_string. Expected _p_p_char");
1996 result
= (int)get_string(arg1
,arg2
,arg3
);
1998 ST(argvi
) = sv_newmortal();
1999 sv_setiv(ST(argvi
++), (IV
) result
);
2008 XS(_wrap_set_ip_addr
) {
2010 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2011 char *arg2
= (char *) 0 ;
2012 char *arg3
= (char *) 0 ;
2017 if ((items
< 3) || (items
> 3)) {
2018 SWIG_croak("Usage: set_ip_addr(event,attribute_name,an_ip_addr);");
2021 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
2022 SWIG_croak("Type error in argument 1 of set_ip_addr. Expected _p_lwes_event");
2025 if (!SvOK((SV
*) ST(1))) arg2
= 0;
2026 else arg2
= (char *) SvPV(ST(1), PL_na
);
2027 if (!SvOK((SV
*) ST(2))) arg3
= 0;
2028 else arg3
= (char *) SvPV(ST(2), PL_na
);
2029 result
= (int)set_ip_addr(arg1
,arg2
,arg3
);
2031 ST(argvi
) = sv_newmortal();
2032 sv_setiv(ST(argvi
++), (IV
) result
);
2041 XS(_wrap_get_ip_addr
) {
2043 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2044 char *arg2
= (char *) 0 ;
2045 struct in_addr
*arg3
= (struct in_addr
*) 0 ;
2050 if ((items
< 3) || (items
> 3)) {
2051 SWIG_croak("Usage: get_ip_addr(event,attribute_name,an_ip_addr);");
2054 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
2055 SWIG_croak("Type error in argument 1 of get_ip_addr. Expected _p_lwes_event");
2058 if (!SvOK((SV
*) ST(1))) arg2
= 0;
2059 else arg2
= (char *) SvPV(ST(1), PL_na
);
2061 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_in_addr
,0) < 0) {
2062 SWIG_croak("Type error in argument 3 of get_ip_addr. Expected _p_in_addr");
2065 result
= (int)get_ip_addr(arg1
,arg2
,arg3
);
2067 ST(argvi
) = sv_newmortal();
2068 sv_setiv(ST(argvi
++), (IV
) result
);
2077 XS(_wrap_set_boolean
) {
2079 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2080 char *arg2
= (char *) 0 ;
2086 if ((items
< 3) || (items
> 3)) {
2087 SWIG_croak("Usage: set_boolean(event,attribute_name,a_boolean);");
2090 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
2091 SWIG_croak("Type error in argument 1 of set_boolean. Expected _p_lwes_event");
2094 if (!SvOK((SV
*) ST(1))) arg2
= 0;
2095 else arg2
= (char *) SvPV(ST(1), PL_na
);
2096 arg3
= (int) SvIV(ST(2));
2097 result
= (int)set_boolean(arg1
,arg2
,arg3
);
2099 ST(argvi
) = sv_newmortal();
2100 sv_setiv(ST(argvi
++), (IV
) result
);
2109 XS(_wrap_get_boolean
) {
2111 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2112 char *arg2
= (char *) 0 ;
2113 int *arg3
= (int *) 0 ;
2118 if ((items
< 3) || (items
> 3)) {
2119 SWIG_croak("Usage: get_boolean(event,attribute_name,a_boolean);");
2122 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
2123 SWIG_croak("Type error in argument 1 of get_boolean. Expected _p_lwes_event");
2126 if (!SvOK((SV
*) ST(1))) arg2
= 0;
2127 else arg2
= (char *) SvPV(ST(1), PL_na
);
2129 if (SWIG_ConvertPtr(ST(2), (void **) &arg3
, SWIGTYPE_p_int
,0) < 0) {
2130 SWIG_croak("Type error in argument 3 of get_boolean. Expected _p_int");
2133 result
= (int)get_boolean(arg1
,arg2
,arg3
);
2135 ST(argvi
) = sv_newmortal();
2136 sv_setiv(ST(argvi
++), (IV
) result
);
2145 XS(_wrap_destroy_event
) {
2147 struct lwes_event
*arg1
= (struct lwes_event
*) 0 ;
2152 if ((items
< 1) || (items
> 1)) {
2153 SWIG_croak("Usage: destroy_event(event);");
2156 if (SWIG_ConvertPtr(ST(0), (void **) &arg1
, SWIGTYPE_p_lwes_event
,0) < 0) {
2157 SWIG_croak("Type error in argument 1 of destroy_event. Expected _p_lwes_event");
2160 result
= (int)destroy_event(arg1
);
2162 ST(argvi
) = sv_newmortal();
2163 sv_setiv(ST(argvi
++), (IV
) result
);
2172 XS(_wrap_current_time_millis
) {
2174 char *arg1
= (char *) 0 ;
2178 if ((items
< 1) || (items
> 1)) {
2179 SWIG_croak("Usage: current_time_millis(buffer);");
2181 if (!SvOK((SV
*) ST(0))) arg1
= 0;
2182 else arg1
= (char *) SvPV(ST(0), PL_na
);
2183 current_time_millis(arg1
);
2195 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
2197 static swig_type_info _swigt__p_lwes_event_type_db
[] = {{"_p_lwes_event_type_db", 0, "struct lwes_event_type_db *", 0, 0, 0, 0},{"_p_lwes_event_type_db", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2198 static swig_type_info _swigt__p_unsigned_long_long
[] = {{"_p_unsigned_long_long", 0, "unsigned long long *", 0, 0, 0, 0},{"_p_unsigned_long_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2199 static swig_type_info _swigt__p_long_long
[] = {{"_p_long_long", 0, "long long *", 0, 0, 0, 0},{"_p_long_long", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2200 static swig_type_info _swigt__p_in_addr
[] = {{"_p_in_addr", 0, "struct in_addr *", 0, 0, 0, 0},{"_p_in_addr", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2201 static swig_type_info _swigt__p_lwes_emitter
[] = {{"_p_lwes_emitter", 0, "struct lwes_emitter *", 0, 0, 0, 0},{"_p_lwes_emitter", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2202 static swig_type_info _swigt__p_p_char
[] = {{"_p_p_char", 0, "char **", 0, 0, 0, 0},{"_p_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2203 static swig_type_info _swigt__p_lwes_event
[] = {{"_p_lwes_event", 0, "struct lwes_event *", 0, 0, 0, 0},{"_p_lwes_event", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2204 static swig_type_info _swigt__p_unsigned_int
[] = {{"_p_unsigned_int", 0, "unsigned int *", 0, 0, 0, 0},{"_p_unsigned_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2205 static swig_type_info _swigt__p_unsigned_short
[] = {{"_p_unsigned_short", 0, "unsigned short *", 0, 0, 0, 0},{"_p_unsigned_short", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2206 static swig_type_info _swigt__p_short
[] = {{"_p_short", 0, "short *", 0, 0, 0, 0},{"_p_short", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2207 static swig_type_info _swigt__p_int
[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
2209 static swig_type_info
*swig_types_initial
[] = {
2210 _swigt__p_lwes_event_type_db
,
2211 _swigt__p_unsigned_long_long
,
2212 _swigt__p_long_long
,
2214 _swigt__p_lwes_emitter
,
2216 _swigt__p_lwes_event
,
2217 _swigt__p_unsigned_int
,
2218 _swigt__p_unsigned_short
,
2225 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
2227 static swig_constant_info swig_constants
[] = {
2233 static swig_variable_info swig_variables
[] = {
2236 static swig_command_info swig_commands
[] = {
2237 {"LWESc::create_db", _wrap_create_db
},
2238 {"LWESc::destroy_db", _wrap_destroy_db
},
2239 {"LWESc::create_emitter", _wrap_create_emitter
},
2240 {"LWESc::create_emitter_with_ttl", _wrap_create_emitter_with_ttl
},
2241 {"LWESc::emit", _wrap_emit
},
2242 {"LWESc::emitto", _wrap_emitto
},
2243 {"LWESc::destroy_emitter", _wrap_destroy_emitter
},
2244 {"LWESc::create_event", _wrap_create_event
},
2245 {"LWESc::create_event_with_encoding", _wrap_create_event_with_encoding
},
2246 {"LWESc::set_uint16", _wrap_set_uint16
},
2247 {"LWESc::get_uint16", _wrap_get_uint16
},
2248 {"LWESc::set_int16", _wrap_set_int16
},
2249 {"LWESc::get_int16", _wrap_get_int16
},
2250 {"LWESc::set_uint32", _wrap_set_uint32
},
2251 {"LWESc::get_uint32", _wrap_get_uint32
},
2252 {"LWESc::set_int32", _wrap_set_int32
},
2253 {"LWESc::get_int32", _wrap_get_int32
},
2254 {"LWESc::set_uint64", _wrap_set_uint64
},
2255 {"LWESc::get_uint64", _wrap_get_uint64
},
2256 {"LWESc::set_int64", _wrap_set_int64
},
2257 {"LWESc::get_int64", _wrap_get_int64
},
2258 {"LWESc::set_string", _wrap_set_string
},
2259 {"LWESc::get_string", _wrap_get_string
},
2260 {"LWESc::set_ip_addr", _wrap_set_ip_addr
},
2261 {"LWESc::get_ip_addr", _wrap_get_ip_addr
},
2262 {"LWESc::set_boolean", _wrap_set_boolean
},
2263 {"LWESc::get_boolean", _wrap_get_boolean
},
2264 {"LWESc::destroy_event", _wrap_destroy_event
},
2265 {"LWESc::current_time_millis", _wrap_current_time_millis
},
2270 static void SWIG_Perl_SetTypeListHandle(swig_type_info
**handle
) {
2273 /* create a new pointer */
2274 pointer
= get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME
, TRUE
);
2275 sv_setiv(pointer
, PTR2IV(swig_type_list_handle
));
2278 static swig_type_info
**
2279 SWIG_Perl_LookupTypePointer(swig_type_info
**type_list_handle
) {
2280 swig_type_info
**type_pointer
;
2282 /* first check if module already created */
2283 type_pointer
= SWIG_Perl_GetTypeListHandle();
2285 return type_pointer
;
2287 /* create a new module and variable */
2288 SWIG_Perl_SetTypeListHandle(type_list_handle
);
2289 return type_list_handle
;
2301 static int _init
= 0;
2303 swig_type_list_handle
= SWIG_Perl_LookupTypePointer(swig_type_list_handle
);
2304 for (i
= 0; swig_types_initial
[i
]; i
++) {
2305 swig_types
[i
] = SWIG_TypeRegister(swig_types_initial
[i
]);
2310 /* Install commands */
2311 for (i
= 0; swig_commands
[i
].name
; i
++) {
2312 newXS((char*) swig_commands
[i
].name
,swig_commands
[i
].wrapper
, (char*)__FILE__
);
2315 /* Install variables */
2316 for (i
= 0; swig_variables
[i
].name
; i
++) {
2318 sv
= perl_get_sv((char*) swig_variables
[i
].name
, TRUE
| 0x2);
2319 if (swig_variables
[i
].type
) {
2320 SWIG_MakePtr(sv
,(void *)1, *swig_variables
[i
].type
,0);
2322 sv_setiv(sv
,(IV
) 0);
2324 swig_create_magic(sv
, (char *) swig_variables
[i
].name
, swig_variables
[i
].set
, swig_variables
[i
].get
);
2327 /* Install constant */
2328 for (i
= 0; swig_constants
[i
].type
; i
++) {
2330 sv
= perl_get_sv((char*)swig_constants
[i
].name
, TRUE
| 0x2);
2331 switch(swig_constants
[i
].type
) {
2333 sv_setiv(sv
, (IV
) swig_constants
[i
].lvalue
);
2336 sv_setnv(sv
, (double) swig_constants
[i
].dvalue
);
2339 sv_setpv(sv
, (char *) swig_constants
[i
].pvalue
);
2342 SWIG_MakePtr(sv
, swig_constants
[i
].pvalue
, *(swig_constants
[i
].ptype
),0);
2345 SWIG_MakePackedObj(sv
, swig_constants
[i
].pvalue
, swig_constants
[i
].lvalue
, *(swig_constants
[i
].ptype
));