minor fixups
[lwes-perl.git] / lwes_wrap.c
blobf836fef46cad41721e9d48ebce277435aae71a05
1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 1.3.24
4 *
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
15 # else
16 # define SWIG_TEMPLATE_DISAMBIGUATOR
17 # endif
18 #endif
20 /***********************************************************************
21 * swigrun.swg
23 * This file contains generic CAPI SWIG runtime support for pointer
24 * type checking.
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)
37 #else
38 #define SWIG_TYPE_TABLE_NAME
39 #endif
41 #include <string.h>
43 #ifndef SWIGINLINE
44 #if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
45 # define SWIGINLINE inline
46 #else
47 # define SWIGINLINE
48 #endif
49 #endif
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.
59 #ifndef SWIGRUNTIME
60 #define SWIGRUNTIME static
61 #endif
62 #ifndef SWIGRUNTIMEINLINE
63 #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
64 #endif
66 #ifdef __cplusplus
67 extern "C" {
68 #endif
70 typedef void *(*swig_converter_func)(void *);
71 typedef struct swig_type_info *(*swig_dycast_func)(void **);
73 typedef struct swig_type_info {
74 const char *name;
75 swig_converter_func converter;
76 const char *str;
77 void *clientdata;
78 swig_dycast_func dcast;
79 struct swig_type_info *next;
80 struct swig_type_info *prev;
81 } swig_type_info;
83 /*
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 ' '.
90 SWIGRUNTIME int
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>|...
104 SWIGRUNTIME int
105 SWIG_TypeEquiv(const char *nb, const char *tb) {
106 int equiv = 0;
107 const char* te = tb + strlen(tb);
108 const char* ne = nb;
109 while (!equiv && *ne) {
110 for (nb = ne; *ne; ++ne) {
111 if (*ne == '|') break;
113 equiv = SWIG_TypeNameComp(nb, ne, tb, te) == 0;
114 if (*ne) ++ne;
116 return equiv;
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 */
126 tc = *tl;
127 while (tc) {
128 /* check simple type equivalence */
129 int typeequiv = (strcmp(tc->name, ti->name) == 0);
130 /* check full type equivalence, resolving typedefs */
131 if (!typeequiv) {
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);
137 if (typeequiv) {
138 /* Already exists in the table. Just add additional types to the list */
139 if (ti->clientdata) tc->clientdata = ti->clientdata;
140 head = tc;
141 next = tc->next;
142 goto l1;
144 tc = tc->prev;
146 head = ti;
147 next = 0;
149 /* Place in list */
150 ti->prev = *tl;
151 *tl = ti;
153 /* Build linked lists */
155 ret = head;
156 tc = ti + 1;
157 /* Patch up the rest of the links */
158 while (tc->name) {
159 head->next = tc;
160 tc->prev = head;
161 head = tc;
162 tc++;
164 if (next) next->prev = head;
165 head->next = next;
167 return ret;
171 Check the typename
173 SWIGRUNTIME swig_type_info *
174 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
175 swig_type_info *s;
176 if (!ty) return 0; /* Void pointer */
177 s = ty->next; /* First element always just a name */
178 do {
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;
183 if (s->next) {
184 s->next->prev = s->prev;
186 /* Insert s as second element in the list */
187 s->next = ty->next;
188 if (ty->next) ty->next->prev = s;
189 ty->next = s;
190 s->prev = ty;
191 return s;
193 s = s->next;
194 } while (s && (s != ty->next));
195 return 0;
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);
215 if (ty) lastty = ty;
217 return lastty;
221 Return the name associated with this type
223 SWIGRUNTIMEINLINE const char *
224 SWIG_TypeName(const swig_type_info *ty) {
225 return ty->name;
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
237 specific. */
238 if (type->str != NULL) {
239 const char *last_name = type->str;
240 const char *s;
241 for (s = type->str; *s; s++)
242 if (*s == '|') last_name = s+1;
243 return last_name;
245 else
246 return type->name;
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;
255 while (ty) {
256 if (ty->str && (SWIG_TypeEquiv(ty->str,name))) return ty;
257 if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
258 ty = ty->prev;
260 return 0;
264 Set the clientdata field for a type
266 SWIGRUNTIME void
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;
272 equiv = ti->next;
273 while (equiv) {
274 if (!equiv->converter) {
275 tc = tl;
276 while (tc) {
277 if ((strcmp(tc->name, equiv->name) == 0))
278 SWIG_TypeClientDataTL(tl,tc,clientdata);
279 tc = tc->prev;
282 equiv = equiv->next;
287 Pack binary data into a string
289 SWIGRUNTIME char *
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) {
296 uu = *u;
297 *(c++) = hex[(uu & 0xf0) >> 4];
298 *(c++) = hex[uu & 0xf];
300 return c;
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);
317 else
318 return (char *) 0;
319 d = *(c++);
320 if ((d >= '0') && (d <= '9'))
321 uu |= (d - '0');
322 else if ((d >= 'a') && (d <= 'f'))
323 uu |= (d - ('a'-10));
324 else
325 return (char *) 0;
326 *u = uu;
328 return c;
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.
337 SWIGRUNTIME void
338 SWIG_PropagateClientDataTL(swig_type_info *tl, swig_type_info *type) {
339 swig_type_info *equiv = type->next;
340 swig_type_info *tc;
341 if (!type->clientdata) return;
342 while (equiv) {
343 if (!equiv->converter) {
344 tc = tl;
345 while (tc) {
346 if ((strcmp(tc->name, equiv->name) == 0) && !tc->clientdata)
347 SWIG_TypeClientDataTL(tl,tc, type->clientdata);
348 tc = tc->prev;
351 equiv = equiv->next;
356 Pack 'void *' into a string buffer.
358 SWIGRUNTIME char *
359 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
360 char *r = buff;
361 if ((2*sizeof(void *) + 2) > bsz) return 0;
362 *(r++) = '_';
363 r = SWIG_PackData(r,&ptr,sizeof(void *));
364 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
365 strcpy(r,name);
366 return buff;
369 SWIGRUNTIME const char *
370 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
371 if (*c != '_') {
372 if (strcmp(c,"NULL") == 0) {
373 *ptr = (void *) 0;
374 return name;
375 } else {
376 return 0;
379 return SWIG_UnpackData(++c,ptr,sizeof(void *));
382 SWIGRUNTIME char *
383 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
384 char *r = buff;
385 size_t lname = (name ? strlen(name) : 0);
386 if ((2*sz + 2 + lname) > bsz) return 0;
387 *(r++) = '_';
388 r = SWIG_PackData(r,ptr,sz);
389 if (lname) {
390 strncpy(r,name,lname+1);
391 } else {
392 *r = 0;
394 return buff;
397 SWIGRUNTIME const char *
398 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
399 if (*c != '_') {
400 if (strcmp(c,"NULL") == 0) {
401 memset(ptr,0,sz);
402 return name;
403 } else {
404 return 0;
407 return SWIG_UnpackData(++c,ptr,sz);
410 #ifdef __cplusplus
412 #endif
414 /***********************************************************************
415 * common.swg
417 * This file contains generic SWIG runtime support for pointer
418 * type checking as well as a few commonly used macros to control
419 * external linkage.
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
433 # else
434 # define SWIGEXPORT(a) a
435 # endif
436 #else
437 # define SWIGEXPORT(a) a
438 #endif
440 #ifdef __cplusplus
441 extern "C" {
442 #endif
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 */
467 static void
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.
477 static void
478 SWIG_PropagateClientData(swig_type_info *type) {
479 SWIG_PropagateClientDataTL(*swig_type_list_handle, type);
482 #ifdef __cplusplus
484 #endif
486 /* ---------------------------------------------------------------------- -*- c -*-
487 * perl5.swg
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 * ----------------------------------------------------------------------------- */
493 #define SWIGPERL
494 #define SWIGPERL5
495 #ifdef __cplusplus
496 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
497 #include <math.h>
498 #include <stdlib.h>
499 extern "C" {
500 #endif
501 #include "EXTERN.h"
502 #include "perl.h"
503 #include "XSUB.h"
505 /* Get rid of free and malloc defined by perl */
506 #undef free
507 #undef malloc
509 #ifndef pTHX_
510 #define pTHX_
511 #endif
513 #include <string.h>
514 #ifdef __cplusplus
516 #endif
518 /* Macro to call an XS function */
520 #ifdef PERL_OBJECT
521 # define SWIG_CALLXS(_name) _name(cv,pPerl)
522 #else
523 # ifndef MULTIPLICITY
524 # define SWIG_CALLXS(_name) _name(cv)
525 # else
526 # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
527 # endif
528 #endif
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 */
536 #ifdef PERL_OBJECT
537 #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
538 typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
540 #ifdef __cplusplus
541 extern "C" {
542 #endif
543 typedef int (CPerlObj::*SwigMagicFuncHack)(SV *, MAGIC *);
544 #ifdef __cplusplus
546 #endif
548 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
549 #define SWIGCLASS_STATIC
550 #else
551 #define MAGIC_PPERL
552 #define SWIGCLASS_STATIC static
553 #ifndef MULTIPLICITY
554 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
555 typedef int (*SwigMagicFunc)(SV *, MAGIC *);
557 #ifdef __cplusplus
558 extern "C" {
559 #endif
560 typedef int (*SwigMagicFuncHack)(SV *, MAGIC *);
561 #ifdef __cplusplus
563 #endif
566 #else
567 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
568 typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
569 #ifdef __cplusplus
570 extern "C" {
571 #endif
572 typedef int (*SwigMagicFuncHack)(struct interpreter *, SV *, MAGIC *);
573 #ifdef __cplusplus
575 #endif
577 #endif
578 #endif
580 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
581 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
582 #endif
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))))
587 # ifndef PL_sv_yes
588 # define PL_sv_yes sv_yes
589 # endif
590 # ifndef PL_sv_undef
591 # define PL_sv_undef sv_undef
592 # endif
593 # ifndef PL_na
594 # define PL_na na
595 # endif
596 #endif
598 #include <stdlib.h>
600 #ifdef __cplusplus
601 extern "C" {
602 #endif
604 #define SWIG_OWNER 1
605 #define SWIG_SHADOW 2
607 /* Common SWIG API */
609 #ifdef PERL_OBJECT
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)
619 #else
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)
628 #endif
630 /* Perl-specific API */
631 #ifdef PERL_OBJECT
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)
636 #else
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)
643 #endif
645 #define SWIG_SetErrorf SWIG_Perl_SetErrorf
648 #ifdef PERL_OBJECT
649 # define SWIG_MAYBE_PERL_OBJECT CPerlObj *pPerl,
650 #else
651 # define SWIG_MAYBE_PERL_OBJECT
652 #endif
654 static swig_type_info **
655 SWIG_Perl_GetTypeListHandle() {
656 static void *type_pointer = (void *)0;
657 SV *pointer;
659 /* first check if pointer already created */
660 if (!type_pointer) {
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) {
683 swig_type_info *s;
684 if (!ty) return 0; /* Void pointer */
685 s = ty->next; /* First element always just a name */
686 do {
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;
691 if (s->next) {
692 s->next->prev = s->prev;
694 /* Insert s as second element in the list */
695 s->next = ty->next;
696 if (ty->next) ty->next->prev = s;
697 ty->next = s;
698 s->prev = ty;
699 return s;
701 s = s->next;
702 } while (s && (s != ty->next));
703 return 0;
706 /* Function for getting a pointer value */
708 static int
709 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
710 swig_type_info *tc;
711 void *voidptr = (void *)0;
713 /* If magical, apply more magic */
714 if (SvGMAGICAL(sv))
715 mg_get(sv);
717 /* Check to see if this is an object */
718 if (sv_isobject(sv)) {
719 SV *tsv = (SV*) SvRV(sv);
720 IV tmp = 0;
721 if ((SvTYPE(tsv) == SVt_PVHV)) {
722 MAGIC *mg;
723 if (SvMAGICAL(tsv)) {
724 mg = mg_find(tsv,'P');
725 if (mg) {
726 sv = mg->mg_obj;
727 if (sv_isobject(sv)) {
728 tmp = SvIV((SV*)SvRV(sv));
731 } else {
732 return -1;
734 } else {
735 tmp = SvIV((SV*)SvRV(sv));
737 voidptr = (void *)tmp;
738 if (!_t) {
739 *(ptr) = voidptr;
740 return 0;
742 } else if (! SvOK(sv)) { /* Check for undef */
743 *(ptr) = (void *) 0;
744 return 0;
745 } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */
746 *(ptr) = (void *) 0;
747 if (!SvROK(sv))
748 return 0;
749 else
750 return -1;
751 } else { /* Don't know what it is */
752 *(ptr) = (void *) 0;
753 return -1;
755 if (_t) {
756 /* Now see if the types match */
757 char *_c = HvNAME(SvSTASH(SvRV(sv)));
758 tc = SWIG_TypeCheck(_c,_t);
759 if (!tc) {
760 *ptr = voidptr;
761 return -1;
763 *ptr = SWIG_TypeCast(tc,voidptr);
764 return 0;
766 *ptr = voidptr;
767 return 0;
770 static void
771 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
772 if (ptr && (flags & SWIG_SHADOW)) {
773 SV *self;
774 SV *obj=newSV(0);
775 HV *hash=newHV();
776 HV *stash;
777 sv_setref_pv(obj, (char *) t->name, ptr);
778 stash=SvSTASH(SvRV(obj));
779 if (flags & SWIG_OWNER) {
780 HV *hv;
781 GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
782 if (!isGV(gv))
783 gv_init(gv, stash, "OWNER", 5, FALSE);
784 hv=GvHVn(gv);
785 hv_store_ent(hv, obj, newSViv(1), 0);
787 sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
788 SvREFCNT_dec(obj);
789 self=newRV_noinc((SV *)hash);
790 sv_setsv(sv, self);
791 SvREFCNT_dec((SV *)self);
792 sv_bless(sv, stash);
794 else {
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);
803 return result;
806 static void
807 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
808 char result[1024];
809 char *r = result;
810 if ((2*sz + 1 + strlen(type->name)) > 1000) return;
811 *(r++) = '_';
812 r = SWIG_PackData(r,ptr,sz);
813 strcpy(r,type->name);
814 sv_setpv(sv, result);
817 /* Convert a packed value value */
818 static int
819 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty, int flags) {
820 swig_type_info *tc;
821 const char *c = 0;
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;
827 c++;
828 c = SWIG_UnpackData(c,ptr,sz);
829 if (ty) {
830 tc = SWIG_TypeCheck(c,ty);
831 if (!tc) return -1;
833 return 0;
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);
846 static void
847 SWIG_Perl_SetErrorf(const char *fmt, ...) {
848 va_list args;
849 va_start(args, fmt);
850 sv_vsetpvfn(perl_get_sv("@", TRUE), fmt, strlen(fmt), &args, Null(SV**), 0, Null(bool*));
851 va_end(args);
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 */
866 typedef struct {
867 const char *name;
868 SwigPerlWrapperPtr wrapper;
869 } swig_command_info;
871 /* Information for constant table */
873 #define SWIG_INT 1
874 #define SWIG_FLOAT 2
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 {
881 int type;
882 const char *name;
883 long lvalue;
884 double dvalue;
885 void *pvalue;
886 swig_type_info **ptype;
887 } swig_constant_info;
889 #ifdef __cplusplus
891 #endif
893 /* Structure for variable table */
894 typedef struct {
895 const char *name;
896 SwigMagicFunc set;
897 SwigMagicFunc get;
898 swig_type_info **type;
899 } swig_variable_info;
901 /* Magic variable code */
902 #ifndef PERL_OBJECT
903 #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
904 #ifndef MULTIPLICITY
905 static void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) {
906 #else
907 static void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) {
908 #endif
909 #else
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 *)) {
912 #endif
913 MAGIC *mg;
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;
929 #ifdef do_open
930 #undef do_open
931 #endif
932 #ifdef do_close
933 #undef do_close
934 #endif
935 #ifdef scalar
936 #undef scalar
937 #endif
938 #ifdef list
939 #undef list
940 #endif
941 #ifdef apply
942 #undef apply
943 #endif
944 #ifdef convert
945 #undef convert
946 #endif
947 #ifdef Error
948 #undef Error
949 #endif
950 #ifdef form
951 #undef form
952 #endif
953 #ifdef vform
954 #undef vform
955 #endif
956 #ifdef LABEL
957 #undef LABEL
958 #endif
959 #ifdef METHOD
960 #undef METHOD
961 #endif
962 #ifdef Move
963 #undef Move
964 #endif
965 #ifdef yylex
966 #undef yylex
967 #endif
968 #ifdef yyparse
969 #undef yyparse
970 #endif
971 #ifdef yyerror
972 #undef yyerror
973 #endif
974 #ifdef invert
975 #undef invert
976 #endif
977 #ifdef ref
978 #undef ref
979 #endif
980 #ifdef ENTER
981 #undef ENTER
982 #endif
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::"
1007 #ifdef __cplusplus
1008 extern "C"
1009 #endif
1010 #ifndef PERL_OBJECT
1011 #ifndef MULTIPLICITY
1012 SWIGEXPORT(void) SWIG_init (CV* cv);
1013 #else
1014 SWIGEXPORT(void) SWIG_init (pTHXo_ CV* cv);
1015 #endif
1016 #else
1017 SWIGEXPORT(void) SWIG_init (CV *cv, CPerlObj *);
1018 #endif
1021 #include "lwes.h"
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,
1049 freq, ttl);
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);
1071 struct lwes_event *
1072 create_event(struct lwes_event_type_db* db, char *event_name)
1074 return lwes_event_create(db, event_name);
1077 struct lwes_event *
1078 create_event_with_encoding(struct lwes_event_type_db *db, char *event_name,
1079 short encoding)
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,
1100 short an_int16)
1102 return lwes_event_set_INT_16(event, attribute_name, an_int16);
1106 get_int16(struct lwes_event* event, char* attribute_name,
1107 short* an_int16)
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,
1128 int an_int32)
1130 return lwes_event_set_INT_32(event, attribute_name, an_int32);
1134 get_int32(struct lwes_event* event, char* attribute_name,
1135 int* an_int32)
1137 return lwes_event_get_INT_32(event, attribute_name, an_int32);
1141 set_uint64(struct lwes_event* event, char* attribute_name,
1142 char* a_uint64)
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,
1156 char* an_int64)
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,
1170 char* a_string)
1172 return lwes_event_set_STRING(event, attribute_name, a_string);
1176 get_string(struct lwes_event* event, char* attribute_name,
1177 char** a_string)
1179 return lwes_event_get_STRING(event, attribute_name, a_string);
1183 set_ip_addr(struct lwes_event* event, char* attribute_name,
1184 char* an_ip_addr)
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,
1198 int a_boolean)
1200 return lwes_event_set_BOOLEAN(event, attribute_name, a_boolean);
1204 get_boolean(struct lwes_event *event, char *attribute_name,
1205 int *a_boolean)
1207 return lwes_event_get_BOOLEAN(event, attribute_name, a_boolean);
1211 destroy_event(struct lwes_event *event)
1213 return lwes_event_destroy(event);
1216 void
1217 current_time_millis(char *buffer)
1219 LWES_INT_64 current_time = 0LL;
1220 current_time = currentTimeMillisLongLong();
1221 snprintf(buffer,17,"%016llX",current_time);
1225 #ifdef PERL_OBJECT
1226 #define MAGIC_CLASS _wrap_LWES_var::
1227 class _wrap_LWES_var : public CPerlObj {
1228 public:
1229 #else
1230 #define MAGIC_CLASS
1231 #endif
1232 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *sv, MAGIC *mg) {
1233 MAGIC_PPERL
1234 sv = sv; mg = mg;
1235 croak("Value is read-only.");
1236 return 0;
1240 #ifdef PERL_OBJECT
1242 #endif
1244 #ifdef __cplusplus
1245 extern "C" {
1246 #endif
1247 XS(_wrap_create_db) {
1249 char *arg1 = (char *) 0 ;
1250 struct lwes_event_type_db *result;
1251 int argvi = 0;
1252 dXSARGS;
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);
1263 XSRETURN(argvi);
1264 fail:
1267 croak(Nullch);
1271 XS(_wrap_destroy_db) {
1273 struct lwes_event_type_db *arg1 = (struct lwes_event_type_db *) 0 ;
1274 int result;
1275 int argvi = 0;
1276 dXSARGS;
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);
1290 XSRETURN(argvi);
1291 fail:
1294 croak(Nullch);
1298 XS(_wrap_create_emitter) {
1300 char *arg1 = (char *) 0 ;
1301 char *arg2 = (char *) 0 ;
1302 int arg3 ;
1303 int arg4 ;
1304 short arg5 ;
1305 struct lwes_emitter *result;
1306 int argvi = 0;
1307 dXSARGS;
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);
1323 XSRETURN(argvi);
1324 fail:
1327 croak(Nullch);
1331 XS(_wrap_create_emitter_with_ttl) {
1333 char *arg1 = (char *) 0 ;
1334 char *arg2 = (char *) 0 ;
1335 int arg3 ;
1336 int arg4 ;
1337 short arg5 ;
1338 int arg6 ;
1339 struct lwes_emitter *result;
1340 int argvi = 0;
1341 dXSARGS;
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);
1358 XSRETURN(argvi);
1359 fail:
1362 croak(Nullch);
1366 XS(_wrap_emit) {
1368 struct lwes_emitter *arg1 = (struct lwes_emitter *) 0 ;
1369 struct lwes_event *arg2 = (struct lwes_event *) 0 ;
1370 int result;
1371 int argvi = 0;
1372 dXSARGS;
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);
1391 XSRETURN(argvi);
1392 fail:
1395 croak(Nullch);
1399 XS(_wrap_emitto) {
1401 char *arg1 = (char *) 0 ;
1402 char *arg2 = (char *) 0 ;
1403 int arg3 ;
1404 struct lwes_emitter *arg4 = (struct lwes_emitter *) 0 ;
1405 struct lwes_event *arg5 = (struct lwes_event *) 0 ;
1406 int result;
1407 int argvi = 0;
1408 dXSARGS;
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);
1432 XSRETURN(argvi);
1433 fail:
1436 croak(Nullch);
1440 XS(_wrap_destroy_emitter) {
1442 struct lwes_emitter *arg1 = (struct lwes_emitter *) 0 ;
1443 int result;
1444 int argvi = 0;
1445 dXSARGS;
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);
1459 XSRETURN(argvi);
1460 fail:
1463 croak(Nullch);
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;
1472 int argvi = 0;
1473 dXSARGS;
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);
1489 XSRETURN(argvi);
1490 fail:
1493 croak(Nullch);
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 ;
1501 short arg3 ;
1502 struct lwes_event *result;
1503 int argvi = 0;
1504 dXSARGS;
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);
1521 XSRETURN(argvi);
1522 fail:
1525 croak(Nullch);
1529 XS(_wrap_set_uint16) {
1531 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1532 char *arg2 = (char *) 0 ;
1533 unsigned short arg3 ;
1534 int result;
1535 int argvi = 0;
1536 dXSARGS;
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);
1553 XSRETURN(argvi);
1554 fail:
1557 croak(Nullch);
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 ;
1566 int result;
1567 int argvi = 0;
1568 dXSARGS;
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);
1589 XSRETURN(argvi);
1590 fail:
1593 croak(Nullch);
1597 XS(_wrap_set_int16) {
1599 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1600 char *arg2 = (char *) 0 ;
1601 short arg3 ;
1602 int result;
1603 int argvi = 0;
1604 dXSARGS;
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);
1621 XSRETURN(argvi);
1622 fail:
1625 croak(Nullch);
1629 XS(_wrap_get_int16) {
1631 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1632 char *arg2 = (char *) 0 ;
1633 short *arg3 = (short *) 0 ;
1634 int result;
1635 int argvi = 0;
1636 dXSARGS;
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);
1657 XSRETURN(argvi);
1658 fail:
1661 croak(Nullch);
1665 XS(_wrap_set_uint32) {
1667 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1668 char *arg2 = (char *) 0 ;
1669 unsigned int arg3 ;
1670 int result;
1671 int argvi = 0;
1672 dXSARGS;
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);
1689 XSRETURN(argvi);
1690 fail:
1693 croak(Nullch);
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 ;
1702 int result;
1703 int argvi = 0;
1704 dXSARGS;
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);
1725 XSRETURN(argvi);
1726 fail:
1729 croak(Nullch);
1733 XS(_wrap_set_int32) {
1735 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1736 char *arg2 = (char *) 0 ;
1737 int arg3 ;
1738 int result;
1739 int argvi = 0;
1740 dXSARGS;
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);
1757 XSRETURN(argvi);
1758 fail:
1761 croak(Nullch);
1765 XS(_wrap_get_int32) {
1767 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1768 char *arg2 = (char *) 0 ;
1769 int *arg3 = (int *) 0 ;
1770 int result;
1771 int argvi = 0;
1772 dXSARGS;
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);
1793 XSRETURN(argvi);
1794 fail:
1797 croak(Nullch);
1801 XS(_wrap_set_uint64) {
1803 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1804 char *arg2 = (char *) 0 ;
1805 char *arg3 = (char *) 0 ;
1806 int result;
1807 int argvi = 0;
1808 dXSARGS;
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);
1826 XSRETURN(argvi);
1827 fail:
1830 croak(Nullch);
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 ;
1839 int result;
1840 int argvi = 0;
1841 dXSARGS;
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);
1862 XSRETURN(argvi);
1863 fail:
1866 croak(Nullch);
1870 XS(_wrap_set_int64) {
1872 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1873 char *arg2 = (char *) 0 ;
1874 char *arg3 = (char *) 0 ;
1875 int result;
1876 int argvi = 0;
1877 dXSARGS;
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);
1895 XSRETURN(argvi);
1896 fail:
1899 croak(Nullch);
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 ;
1908 int result;
1909 int argvi = 0;
1910 dXSARGS;
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);
1931 XSRETURN(argvi);
1932 fail:
1935 croak(Nullch);
1939 XS(_wrap_set_string) {
1941 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1942 char *arg2 = (char *) 0 ;
1943 char *arg3 = (char *) 0 ;
1944 int result;
1945 int argvi = 0;
1946 dXSARGS;
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);
1964 XSRETURN(argvi);
1965 fail:
1968 croak(Nullch);
1972 XS(_wrap_get_string) {
1974 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
1975 char *arg2 = (char *) 0 ;
1976 char **arg3 = (char **) 0 ;
1977 int result;
1978 int argvi = 0;
1979 dXSARGS;
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);
2000 XSRETURN(argvi);
2001 fail:
2004 croak(Nullch);
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 ;
2013 int result;
2014 int argvi = 0;
2015 dXSARGS;
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);
2033 XSRETURN(argvi);
2034 fail:
2037 croak(Nullch);
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 ;
2046 int result;
2047 int argvi = 0;
2048 dXSARGS;
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);
2069 XSRETURN(argvi);
2070 fail:
2073 croak(Nullch);
2077 XS(_wrap_set_boolean) {
2079 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
2080 char *arg2 = (char *) 0 ;
2081 int arg3 ;
2082 int result;
2083 int argvi = 0;
2084 dXSARGS;
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);
2101 XSRETURN(argvi);
2102 fail:
2105 croak(Nullch);
2109 XS(_wrap_get_boolean) {
2111 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
2112 char *arg2 = (char *) 0 ;
2113 int *arg3 = (int *) 0 ;
2114 int result;
2115 int argvi = 0;
2116 dXSARGS;
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);
2137 XSRETURN(argvi);
2138 fail:
2141 croak(Nullch);
2145 XS(_wrap_destroy_event) {
2147 struct lwes_event *arg1 = (struct lwes_event *) 0 ;
2148 int result;
2149 int argvi = 0;
2150 dXSARGS;
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);
2164 XSRETURN(argvi);
2165 fail:
2168 croak(Nullch);
2172 XS(_wrap_current_time_millis) {
2174 char *arg1 = (char *) 0 ;
2175 int argvi = 0;
2176 dXSARGS;
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);
2186 XSRETURN(argvi);
2187 fail:
2190 croak(Nullch);
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,
2213 _swigt__p_in_addr,
2214 _swigt__p_lwes_emitter,
2215 _swigt__p_p_char,
2216 _swigt__p_lwes_event,
2217 _swigt__p_unsigned_int,
2218 _swigt__p_unsigned_short,
2219 _swigt__p_short,
2220 _swigt__p_int,
2225 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
2227 static swig_constant_info swig_constants[] = {
2228 {0,0,0,0,0,0}
2230 #ifdef __cplusplus
2232 #endif
2233 static swig_variable_info swig_variables[] = {
2234 {0,0,0,0}
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},
2266 {0,0}
2270 static void SWIG_Perl_SetTypeListHandle(swig_type_info **handle) {
2271 SV *pointer;
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();
2284 if (type_pointer) {
2285 return type_pointer;
2286 } else {
2287 /* create a new module and variable */
2288 SWIG_Perl_SetTypeListHandle(type_list_handle);
2289 return type_list_handle;
2294 #ifdef __cplusplus
2295 extern "C"
2296 #endif
2298 XS(SWIG_init) {
2299 dXSARGS;
2300 int i;
2301 static int _init = 0;
2302 if (!_init) {
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]);
2307 _init = 1;
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++) {
2317 SV *sv;
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);
2321 } else {
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++) {
2329 SV *sv;
2330 sv = perl_get_sv((char*)swig_constants[i].name, TRUE | 0x2);
2331 switch(swig_constants[i].type) {
2332 case SWIG_INT:
2333 sv_setiv(sv, (IV) swig_constants[i].lvalue);
2334 break;
2335 case SWIG_FLOAT:
2336 sv_setnv(sv, (double) swig_constants[i].dvalue);
2337 break;
2338 case SWIG_STRING:
2339 sv_setpv(sv, (char *) swig_constants[i].pvalue);
2340 break;
2341 case SWIG_POINTER:
2342 SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
2343 break;
2344 case SWIG_BINARY:
2345 SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
2346 break;
2347 default:
2348 break;
2350 SvREADONLY_on(sv);
2353 ST(0) = &PL_sv_yes;
2354 XSRETURN(1);