Add QUVIOPT_CATEGORY support
[www-quvi.git] / Quvi_wrap.cxx
blob903ab785a4dff8a963d5180f477cf3674da2a236
1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 2.0.1
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 * ----------------------------------------------------------------------------- */
11 #define SWIGPERL
12 #define SWIG_CASTRANK_MODE
15 #ifdef __cplusplus
16 /* SwigValueWrapper is described in swig.swg */
17 template<typename T> class SwigValueWrapper {
18 struct SwigMovePointer {
19 T *ptr;
20 SwigMovePointer(T *p) : ptr(p) { }
21 ~SwigMovePointer() { delete ptr; }
22 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
23 } pointer;
24 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
25 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
26 public:
27 SwigValueWrapper() : pointer(0) { }
28 SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
29 operator T&() const { return *pointer.ptr; }
30 T *operator&() { return pointer.ptr; }
33 template <typename T> T SwigValueInit() {
34 return T();
36 #endif
38 /* -----------------------------------------------------------------------------
39 * This section contains generic SWIG labels for method/variable
40 * declarations/attributes, and other compiler dependent labels.
41 * ----------------------------------------------------------------------------- */
43 /* template workaround for compilers that cannot correctly implement the C++ standard */
44 #ifndef SWIGTEMPLATEDISAMBIGUATOR
45 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
46 # define SWIGTEMPLATEDISAMBIGUATOR template
47 # elif defined(__HP_aCC)
48 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
49 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # else
52 # define SWIGTEMPLATEDISAMBIGUATOR
53 # endif
54 #endif
56 /* inline attribute */
57 #ifndef SWIGINLINE
58 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
59 # define SWIGINLINE inline
60 # else
61 # define SWIGINLINE
62 # endif
63 #endif
65 /* attribute recognised by some compilers to avoid 'unused' warnings */
66 #ifndef SWIGUNUSED
67 # if defined(__GNUC__)
68 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
69 # define SWIGUNUSED __attribute__ ((__unused__))
70 # else
71 # define SWIGUNUSED
72 # endif
73 # elif defined(__ICC)
74 # define SWIGUNUSED __attribute__ ((__unused__))
75 # else
76 # define SWIGUNUSED
77 # endif
78 #endif
80 #ifndef SWIG_MSC_UNSUPPRESS_4505
81 # if defined(_MSC_VER)
82 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
83 # endif
84 #endif
86 #ifndef SWIGUNUSEDPARM
87 # ifdef __cplusplus
88 # define SWIGUNUSEDPARM(p)
89 # else
90 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
91 # endif
92 #endif
94 /* internal SWIG method */
95 #ifndef SWIGINTERN
96 # define SWIGINTERN static SWIGUNUSED
97 #endif
99 /* internal inline SWIG method */
100 #ifndef SWIGINTERNINLINE
101 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
102 #endif
104 /* exporting methods */
105 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
106 # ifndef GCC_HASCLASSVISIBILITY
107 # define GCC_HASCLASSVISIBILITY
108 # endif
109 #endif
111 #ifndef SWIGEXPORT
112 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113 # if defined(STATIC_LINKED)
114 # define SWIGEXPORT
115 # else
116 # define SWIGEXPORT __declspec(dllexport)
117 # endif
118 # else
119 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
120 # define SWIGEXPORT __attribute__ ((visibility("default")))
121 # else
122 # define SWIGEXPORT
123 # endif
124 # endif
125 #endif
127 /* calling conventions for Windows */
128 #ifndef SWIGSTDCALL
129 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
130 # define SWIGSTDCALL __stdcall
131 # else
132 # define SWIGSTDCALL
133 # endif
134 #endif
136 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
137 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
138 # define _CRT_SECURE_NO_DEPRECATE
139 #endif
141 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
142 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
143 # define _SCL_SECURE_NO_DEPRECATE
144 #endif
147 /* -----------------------------------------------------------------------------
148 * swigrun.swg
150 * This file contains generic C API SWIG runtime support for pointer
151 * type checking.
152 * ----------------------------------------------------------------------------- */
154 /* This should only be incremented when either the layout of swig_type_info changes,
155 or for whatever reason, the runtime changes incompatibly */
156 #define SWIG_RUNTIME_VERSION "4"
158 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
159 #ifdef SWIG_TYPE_TABLE
160 # define SWIG_QUOTE_STRING(x) #x
161 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
162 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
163 #else
164 # define SWIG_TYPE_TABLE_NAME
165 #endif
168 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
169 creating a static or dynamic library from the SWIG runtime code.
170 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
172 But only do this if strictly necessary, ie, if you have problems
173 with your compiler or suchlike.
176 #ifndef SWIGRUNTIME
177 # define SWIGRUNTIME SWIGINTERN
178 #endif
180 #ifndef SWIGRUNTIMEINLINE
181 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
182 #endif
184 /* Generic buffer size */
185 #ifndef SWIG_BUFFER_SIZE
186 # define SWIG_BUFFER_SIZE 1024
187 #endif
189 /* Flags for pointer conversions */
190 #define SWIG_POINTER_DISOWN 0x1
191 #define SWIG_CAST_NEW_MEMORY 0x2
193 /* Flags for new pointer objects */
194 #define SWIG_POINTER_OWN 0x1
198 Flags/methods for returning states.
200 The SWIG conversion methods, as ConvertPtr, return an integer
201 that tells if the conversion was successful or not. And if not,
202 an error code can be returned (see swigerrors.swg for the codes).
204 Use the following macros/flags to set or process the returning
205 states.
207 In old versions of SWIG, code such as the following was usually written:
209 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
210 // success code
211 } else {
212 //fail code
215 Now you can be more explicit:
217 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
218 if (SWIG_IsOK(res)) {
219 // success code
220 } else {
221 // fail code
224 which is the same really, but now you can also do
226 Type *ptr;
227 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
228 if (SWIG_IsOK(res)) {
229 // success code
230 if (SWIG_IsNewObj(res) {
232 delete *ptr;
233 } else {
236 } else {
237 // fail code
240 I.e., now SWIG_ConvertPtr can return new objects and you can
241 identify the case and take care of the deallocation. Of course that
242 also requires SWIG_ConvertPtr to return new result values, such as
244 int SWIG_ConvertPtr(obj, ptr,...) {
245 if (<obj is ok>) {
246 if (<need new object>) {
247 *ptr = <ptr to new allocated object>;
248 return SWIG_NEWOBJ;
249 } else {
250 *ptr = <ptr to old object>;
251 return SWIG_OLDOBJ;
253 } else {
254 return SWIG_BADOBJ;
258 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
259 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
260 SWIG errors code.
262 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
263 allows to return the 'cast rank', for example, if you have this
265 int food(double)
266 int fooi(int);
268 and you call
270 food(1) // cast rank '1' (1 -> 1.0)
271 fooi(1) // cast rank '0'
273 just use the SWIG_AddCast()/SWIG_CheckState()
276 #define SWIG_OK (0)
277 #define SWIG_ERROR (-1)
278 #define SWIG_IsOK(r) (r >= 0)
279 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
281 /* The CastRankLimit says how many bits are used for the cast rank */
282 #define SWIG_CASTRANKLIMIT (1 << 8)
283 /* The NewMask denotes the object was created (using new/malloc) */
284 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
285 /* The TmpMask is for in/out typemaps that use temporal objects */
286 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
287 /* Simple returning values */
288 #define SWIG_BADOBJ (SWIG_ERROR)
289 #define SWIG_OLDOBJ (SWIG_OK)
290 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
291 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
292 /* Check, add and del mask methods */
293 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
294 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
295 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
296 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
297 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
298 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
300 /* Cast-Rank Mode */
301 #if defined(SWIG_CASTRANK_MODE)
302 # ifndef SWIG_TypeRank
303 # define SWIG_TypeRank unsigned long
304 # endif
305 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
306 # define SWIG_MAXCASTRANK (2)
307 # endif
308 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
309 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
310 SWIGINTERNINLINE int SWIG_AddCast(int r) {
311 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
313 SWIGINTERNINLINE int SWIG_CheckState(int r) {
314 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
316 #else /* no cast-rank mode */
317 # define SWIG_AddCast
318 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
319 #endif
322 #include <string.h>
324 #ifdef __cplusplus
325 extern "C" {
326 #endif
328 typedef void *(*swig_converter_func)(void *, int *);
329 typedef struct swig_type_info *(*swig_dycast_func)(void **);
331 /* Structure to store information on one type */
332 typedef struct swig_type_info {
333 const char *name; /* mangled name of this type */
334 const char *str; /* human readable name of this type */
335 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
336 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
337 void *clientdata; /* language specific type data */
338 int owndata; /* flag if the structure owns the clientdata */
339 } swig_type_info;
341 /* Structure to store a type and conversion function used for casting */
342 typedef struct swig_cast_info {
343 swig_type_info *type; /* pointer to type that is equivalent to this type */
344 swig_converter_func converter; /* function to cast the void pointers */
345 struct swig_cast_info *next; /* pointer to next cast in linked list */
346 struct swig_cast_info *prev; /* pointer to the previous cast */
347 } swig_cast_info;
349 /* Structure used to store module information
350 * Each module generates one structure like this, and the runtime collects
351 * all of these structures and stores them in a circularly linked list.*/
352 typedef struct swig_module_info {
353 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
354 size_t size; /* Number of types in this module */
355 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
356 swig_type_info **type_initial; /* Array of initially generated type structures */
357 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
358 void *clientdata; /* Language specific module data */
359 } swig_module_info;
362 Compare two type names skipping the space characters, therefore
363 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
365 Return 0 when the two name types are equivalent, as in
366 strncmp, but skipping ' '.
368 SWIGRUNTIME int
369 SWIG_TypeNameComp(const char *f1, const char *l1,
370 const char *f2, const char *l2) {
371 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
372 while ((*f1 == ' ') && (f1 != l1)) ++f1;
373 while ((*f2 == ' ') && (f2 != l2)) ++f2;
374 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
376 return (int)((l1 - f1) - (l2 - f2));
380 Check type equivalence in a name list like <name1>|<name2>|...
381 Return 0 if not equal, 1 if equal
383 SWIGRUNTIME int
384 SWIG_TypeEquiv(const char *nb, const char *tb) {
385 int equiv = 0;
386 const char* te = tb + strlen(tb);
387 const char* ne = nb;
388 while (!equiv && *ne) {
389 for (nb = ne; *ne; ++ne) {
390 if (*ne == '|') break;
392 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
393 if (*ne) ++ne;
395 return equiv;
399 Check type equivalence in a name list like <name1>|<name2>|...
400 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
402 SWIGRUNTIME int
403 SWIG_TypeCompare(const char *nb, const char *tb) {
404 int equiv = 0;
405 const char* te = tb + strlen(tb);
406 const char* ne = nb;
407 while (!equiv && *ne) {
408 for (nb = ne; *ne; ++ne) {
409 if (*ne == '|') break;
411 equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
412 if (*ne) ++ne;
414 return equiv;
419 Check the typename
421 SWIGRUNTIME swig_cast_info *
422 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
423 if (ty) {
424 swig_cast_info *iter = ty->cast;
425 while (iter) {
426 if (strcmp(iter->type->name, c) == 0) {
427 if (iter == ty->cast)
428 return iter;
429 /* Move iter to the top of the linked list */
430 iter->prev->next = iter->next;
431 if (iter->next)
432 iter->next->prev = iter->prev;
433 iter->next = ty->cast;
434 iter->prev = 0;
435 if (ty->cast) ty->cast->prev = iter;
436 ty->cast = iter;
437 return iter;
439 iter = iter->next;
442 return 0;
446 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
448 SWIGRUNTIME swig_cast_info *
449 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
450 if (ty) {
451 swig_cast_info *iter = ty->cast;
452 while (iter) {
453 if (iter->type == from) {
454 if (iter == ty->cast)
455 return iter;
456 /* Move iter to the top of the linked list */
457 iter->prev->next = iter->next;
458 if (iter->next)
459 iter->next->prev = iter->prev;
460 iter->next = ty->cast;
461 iter->prev = 0;
462 if (ty->cast) ty->cast->prev = iter;
463 ty->cast = iter;
464 return iter;
466 iter = iter->next;
469 return 0;
473 Cast a pointer up an inheritance hierarchy
475 SWIGRUNTIMEINLINE void *
476 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
477 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
481 Dynamic pointer casting. Down an inheritance hierarchy
483 SWIGRUNTIME swig_type_info *
484 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
485 swig_type_info *lastty = ty;
486 if (!ty || !ty->dcast) return ty;
487 while (ty && (ty->dcast)) {
488 ty = (*ty->dcast)(ptr);
489 if (ty) lastty = ty;
491 return lastty;
495 Return the name associated with this type
497 SWIGRUNTIMEINLINE const char *
498 SWIG_TypeName(const swig_type_info *ty) {
499 return ty->name;
503 Return the pretty name associated with this type,
504 that is an unmangled type name in a form presentable to the user.
506 SWIGRUNTIME const char *
507 SWIG_TypePrettyName(const swig_type_info *type) {
508 /* The "str" field contains the equivalent pretty names of the
509 type, separated by vertical-bar characters. We choose
510 to print the last name, as it is often (?) the most
511 specific. */
512 if (!type) return NULL;
513 if (type->str != NULL) {
514 const char *last_name = type->str;
515 const char *s;
516 for (s = type->str; *s; s++)
517 if (*s == '|') last_name = s+1;
518 return last_name;
520 else
521 return type->name;
525 Set the clientdata field for a type
527 SWIGRUNTIME void
528 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
529 swig_cast_info *cast = ti->cast;
530 /* if (ti->clientdata == clientdata) return; */
531 ti->clientdata = clientdata;
533 while (cast) {
534 if (!cast->converter) {
535 swig_type_info *tc = cast->type;
536 if (!tc->clientdata) {
537 SWIG_TypeClientData(tc, clientdata);
540 cast = cast->next;
543 SWIGRUNTIME void
544 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
545 SWIG_TypeClientData(ti, clientdata);
546 ti->owndata = 1;
550 Search for a swig_type_info structure only by mangled name
551 Search is a O(log #types)
553 We start searching at module start, and finish searching when start == end.
554 Note: if start == end at the beginning of the function, we go all the way around
555 the circular list.
557 SWIGRUNTIME swig_type_info *
558 SWIG_MangledTypeQueryModule(swig_module_info *start,
559 swig_module_info *end,
560 const char *name) {
561 swig_module_info *iter = start;
562 do {
563 if (iter->size) {
564 register size_t l = 0;
565 register size_t r = iter->size - 1;
566 do {
567 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
568 register size_t i = (l + r) >> 1;
569 const char *iname = iter->types[i]->name;
570 if (iname) {
571 register int compare = strcmp(name, iname);
572 if (compare == 0) {
573 return iter->types[i];
574 } else if (compare < 0) {
575 if (i) {
576 r = i - 1;
577 } else {
578 break;
580 } else if (compare > 0) {
581 l = i + 1;
583 } else {
584 break; /* should never happen */
586 } while (l <= r);
588 iter = iter->next;
589 } while (iter != end);
590 return 0;
594 Search for a swig_type_info structure for either a mangled name or a human readable name.
595 It first searches the mangled names of the types, which is a O(log #types)
596 If a type is not found it then searches the human readable names, which is O(#types).
598 We start searching at module start, and finish searching when start == end.
599 Note: if start == end at the beginning of the function, we go all the way around
600 the circular list.
602 SWIGRUNTIME swig_type_info *
603 SWIG_TypeQueryModule(swig_module_info *start,
604 swig_module_info *end,
605 const char *name) {
606 /* STEP 1: Search the name field using binary search */
607 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
608 if (ret) {
609 return ret;
610 } else {
611 /* STEP 2: If the type hasn't been found, do a complete search
612 of the str field (the human readable name) */
613 swig_module_info *iter = start;
614 do {
615 register size_t i = 0;
616 for (; i < iter->size; ++i) {
617 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
618 return iter->types[i];
620 iter = iter->next;
621 } while (iter != end);
624 /* neither found a match */
625 return 0;
629 Pack binary data into a string
631 SWIGRUNTIME char *
632 SWIG_PackData(char *c, void *ptr, size_t sz) {
633 static const char hex[17] = "0123456789abcdef";
634 register const unsigned char *u = (unsigned char *) ptr;
635 register const unsigned char *eu = u + sz;
636 for (; u != eu; ++u) {
637 register unsigned char uu = *u;
638 *(c++) = hex[(uu & 0xf0) >> 4];
639 *(c++) = hex[uu & 0xf];
641 return c;
645 Unpack binary data from a string
647 SWIGRUNTIME const char *
648 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
649 register unsigned char *u = (unsigned char *) ptr;
650 register const unsigned char *eu = u + sz;
651 for (; u != eu; ++u) {
652 register char d = *(c++);
653 register unsigned char uu;
654 if ((d >= '0') && (d <= '9'))
655 uu = ((d - '0') << 4);
656 else if ((d >= 'a') && (d <= 'f'))
657 uu = ((d - ('a'-10)) << 4);
658 else
659 return (char *) 0;
660 d = *(c++);
661 if ((d >= '0') && (d <= '9'))
662 uu |= (d - '0');
663 else if ((d >= 'a') && (d <= 'f'))
664 uu |= (d - ('a'-10));
665 else
666 return (char *) 0;
667 *u = uu;
669 return c;
673 Pack 'void *' into a string buffer.
675 SWIGRUNTIME char *
676 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
677 char *r = buff;
678 if ((2*sizeof(void *) + 2) > bsz) return 0;
679 *(r++) = '_';
680 r = SWIG_PackData(r,&ptr,sizeof(void *));
681 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
682 strcpy(r,name);
683 return buff;
686 SWIGRUNTIME const char *
687 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
688 if (*c != '_') {
689 if (strcmp(c,"NULL") == 0) {
690 *ptr = (void *) 0;
691 return name;
692 } else {
693 return 0;
696 return SWIG_UnpackData(++c,ptr,sizeof(void *));
699 SWIGRUNTIME char *
700 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
701 char *r = buff;
702 size_t lname = (name ? strlen(name) : 0);
703 if ((2*sz + 2 + lname) > bsz) return 0;
704 *(r++) = '_';
705 r = SWIG_PackData(r,ptr,sz);
706 if (lname) {
707 strncpy(r,name,lname+1);
708 } else {
709 *r = 0;
711 return buff;
714 SWIGRUNTIME const char *
715 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
716 if (*c != '_') {
717 if (strcmp(c,"NULL") == 0) {
718 memset(ptr,0,sz);
719 return name;
720 } else {
721 return 0;
724 return SWIG_UnpackData(++c,ptr,sz);
727 #ifdef __cplusplus
729 #endif
731 /* Errors in SWIG */
732 #define SWIG_UnknownError -1
733 #define SWIG_IOError -2
734 #define SWIG_RuntimeError -3
735 #define SWIG_IndexError -4
736 #define SWIG_TypeError -5
737 #define SWIG_DivisionByZero -6
738 #define SWIG_OverflowError -7
739 #define SWIG_SyntaxError -8
740 #define SWIG_ValueError -9
741 #define SWIG_SystemError -10
742 #define SWIG_AttributeError -11
743 #define SWIG_MemoryError -12
744 #define SWIG_NullReferenceError -13
748 #ifdef __cplusplus
749 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
750 #include <math.h>
751 #include <stdlib.h>
752 extern "C" {
753 #endif
754 #include "EXTERN.h"
755 #include "perl.h"
756 #include "XSUB.h"
758 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
760 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
761 #ifndef PERL_REVISION
762 # if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
763 # define PERL_PATCHLEVEL_H_IMPLICIT
764 # include <patchlevel.h>
765 # endif
766 # if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
767 # include <could_not_find_Perl_patchlevel.h>
768 # endif
769 # ifndef PERL_REVISION
770 # define PERL_REVISION (5)
771 # define PERL_VERSION PATCHLEVEL
772 # define PERL_SUBVERSION SUBVERSION
773 # endif
774 #endif
776 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
777 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
778 #endif
780 #ifndef SvIOK_UV
781 # define SvIOK_UV(sv) (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
782 #endif
784 #ifndef SvUOK
785 # define SvUOK(sv) SvIOK_UV(sv)
786 #endif
788 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
789 # define PL_sv_undef sv_undef
790 # define PL_na na
791 # define PL_errgv errgv
792 # define PL_sv_no sv_no
793 # define PL_sv_yes sv_yes
794 # define PL_markstack_ptr markstack_ptr
795 #endif
797 #ifndef IVSIZE
798 # ifdef LONGSIZE
799 # define IVSIZE LONGSIZE
800 # else
801 # define IVSIZE 4 /* A bold guess, but the best we can make. */
802 # endif
803 #endif
805 #ifndef INT2PTR
806 # if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
807 # define PTRV UV
808 # define INT2PTR(any,d) (any)(d)
809 # else
810 # if PTRSIZE == LONGSIZE
811 # define PTRV unsigned long
812 # else
813 # define PTRV unsigned
814 # endif
815 # define INT2PTR(any,d) (any)(PTRV)(d)
816 # endif
818 # define NUM2PTR(any,d) (any)(PTRV)(d)
819 # define PTR2IV(p) INT2PTR(IV,p)
820 # define PTR2UV(p) INT2PTR(UV,p)
821 # define PTR2NV(p) NUM2PTR(NV,p)
823 # if PTRSIZE == LONGSIZE
824 # define PTR2ul(p) (unsigned long)(p)
825 # else
826 # define PTR2ul(p) INT2PTR(unsigned long,p)
827 # endif
828 #endif /* !INT2PTR */
830 #ifndef SvPV_nolen
831 # define SvPV_nolen(x) SvPV(x,PL_na)
832 #endif
834 #ifndef get_sv
835 # define get_sv perl_get_sv
836 #endif
838 #ifndef ERRSV
839 # define ERRSV get_sv("@",FALSE)
840 #endif
842 #ifndef pTHX_
843 #define pTHX_
844 #endif
846 #include <string.h>
847 #ifdef __cplusplus
849 #endif
851 /* -----------------------------------------------------------------------------
852 * error manipulation
853 * ----------------------------------------------------------------------------- */
855 SWIGINTERN const char*
856 SWIG_Perl_ErrorType(int code) {
857 const char* type = 0;
858 switch(code) {
859 case SWIG_MemoryError:
860 type = "MemoryError";
861 break;
862 case SWIG_IOError:
863 type = "IOError";
864 break;
865 case SWIG_RuntimeError:
866 type = "RuntimeError";
867 break;
868 case SWIG_IndexError:
869 type = "IndexError";
870 break;
871 case SWIG_TypeError:
872 type = "TypeError";
873 break;
874 case SWIG_DivisionByZero:
875 type = "ZeroDivisionError";
876 break;
877 case SWIG_OverflowError:
878 type = "OverflowError";
879 break;
880 case SWIG_SyntaxError:
881 type = "SyntaxError";
882 break;
883 case SWIG_ValueError:
884 type = "ValueError";
885 break;
886 case SWIG_SystemError:
887 type = "SystemError";
888 break;
889 case SWIG_AttributeError:
890 type = "AttributeError";
891 break;
892 default:
893 type = "RuntimeError";
895 return type;
901 /* -----------------------------------------------------------------------------
902 * perlrun.swg
904 * This file contains the runtime support for Perl modules
905 * and includes code for managing global variables and pointer
906 * type checking.
907 * ----------------------------------------------------------------------------- */
909 #ifdef PERL_OBJECT
910 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
911 #define SWIG_PERL_OBJECT_CALL pPerl,
912 #else
913 #define SWIG_PERL_OBJECT_DECL
914 #define SWIG_PERL_OBJECT_CALL
915 #endif
917 /* Common SWIG API */
919 /* for raw pointers */
920 #define SWIG_ConvertPtr(obj, pp, type, flags) SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
921 #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
922 #define SWIG_NewPointerObj(p, type, flags) SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
924 /* for raw packed data */
925 #define SWIG_ConvertPacked(obj, p, s, type) SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
926 #define SWIG_NewPackedObj(p, s, type) SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
928 /* for class or struct pointers */
929 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
930 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
932 /* for C or C++ function pointers */
933 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0)
934 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0)
936 /* for C++ member pointers, ie, member methods */
937 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_ConvertPacked(obj, ptr, sz, ty)
938 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_NewPackedObj(ptr, sz, type)
941 /* Runtime API */
943 #define SWIG_GetModule(clientdata) SWIG_Perl_GetModule()
944 #define SWIG_SetModule(clientdata, pointer) SWIG_Perl_SetModule(pointer)
947 /* Error manipulation */
949 #define SWIG_ErrorType(code) SWIG_Perl_ErrorType(code)
950 #define SWIG_Error(code, msg) sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
951 #define SWIG_fail goto fail
953 /* Perl-specific SWIG API */
955 #define SWIG_MakePtr(sv, ptr, type, flags) SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
956 #define SWIG_MakePackedObj(sv, p, s, type) SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
957 #define SWIG_SetError(str) SWIG_Error(SWIG_RuntimeError, str)
960 #define SWIG_PERL_DECL_ARGS_1(arg1) (SWIG_PERL_OBJECT_DECL arg1)
961 #define SWIG_PERL_CALL_ARGS_1(arg1) (SWIG_PERL_OBJECT_CALL arg1)
962 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_DECL arg1, arg2)
963 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2) (SWIG_PERL_OBJECT_CALL arg1, arg2)
965 /* -----------------------------------------------------------------------------
966 * pointers/data manipulation
967 * ----------------------------------------------------------------------------- */
969 /* For backward compatibility only */
970 #define SWIG_POINTER_EXCEPTION 0
972 #ifdef __cplusplus
973 extern "C" {
974 #endif
976 #define SWIG_OWNER SWIG_POINTER_OWN
977 #define SWIG_SHADOW SWIG_OWNER << 1
979 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
981 /* SWIG Perl macros */
983 /* Macro to declare an XS function */
984 #ifndef XSPROTO
985 # define XSPROTO(name) void name(pTHX_ CV* cv)
986 #endif
988 /* Macro to call an XS function */
989 #ifdef PERL_OBJECT
990 # define SWIG_CALLXS(_name) _name(cv,pPerl)
991 #else
992 # ifndef MULTIPLICITY
993 # define SWIG_CALLXS(_name) _name(cv)
994 # else
995 # define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
996 # endif
997 #endif
999 #ifdef PERL_OBJECT
1000 #define MAGIC_PPERL CPerlObj *pPerl = (CPerlObj *) this;
1002 #ifdef __cplusplus
1003 extern "C" {
1004 #endif
1005 typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
1006 #ifdef __cplusplus
1008 #endif
1010 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
1011 #define SWIGCLASS_STATIC
1013 #else /* PERL_OBJECT */
1015 #define MAGIC_PPERL
1016 #define SWIGCLASS_STATIC static SWIGUNUSED
1018 #ifndef MULTIPLICITY
1019 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
1021 #ifdef __cplusplus
1022 extern "C" {
1023 #endif
1024 typedef int (*SwigMagicFunc)(SV *, MAGIC *);
1025 #ifdef __cplusplus
1027 #endif
1029 #else /* MULTIPLICITY */
1031 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
1033 #ifdef __cplusplus
1034 extern "C" {
1035 #endif
1036 typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
1037 #ifdef __cplusplus
1039 #endif
1041 #endif /* MULTIPLICITY */
1042 #endif /* PERL_OBJECT */
1044 /* Workaround for bug in perl 5.6.x croak and earlier */
1045 #if (PERL_VERSION < 8)
1046 # ifdef PERL_OBJECT
1047 # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
1048 static void SWIG_Perl_croak_null(CPerlObj *pPerl)
1049 # else
1050 static void SWIG_croak_null()
1051 # endif
1053 SV *err=ERRSV;
1054 # if (PERL_VERSION < 6)
1055 croak("%_", err);
1056 # else
1057 if (SvOK(err) && !SvROK(err)) croak("%_", err);
1058 croak(Nullch);
1059 # endif
1061 #else
1062 # define SWIG_croak_null() croak(Nullch)
1063 #endif
1067 Define how strict is the cast between strings and integers/doubles
1068 when overloading between these types occurs.
1070 The default is making it as strict as possible by using SWIG_AddCast
1071 when needed.
1073 You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1074 disable the SWIG_AddCast, making the casting between string and
1075 numbers less strict.
1077 In the end, we try to solve the overloading between strings and
1078 numerical types in the more natural way, but if you can avoid it,
1079 well, avoid it using %rename, for example.
1081 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1082 # ifndef SWIG_PERL_STRICT_STR2NUM
1083 # define SWIG_PERL_STRICT_STR2NUM
1084 # endif
1085 #endif
1086 #ifdef SWIG_PERL_STRICT_STR2NUM
1087 /* string takes precedence */
1088 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
1089 #else
1090 /* number takes precedence */
1091 #define SWIG_Str2NumCast(x) x
1092 #endif
1096 #include <stdlib.h>
1098 SWIGRUNTIME const char *
1099 SWIG_Perl_TypeProxyName(const swig_type_info *type) {
1100 if (!type) return NULL;
1101 if (type->clientdata != NULL) {
1102 return (const char*) type->clientdata;
1104 else {
1105 return type->name;
1109 /* Identical to SWIG_TypeCheck, except for strcmp comparison */
1110 SWIGRUNTIME swig_cast_info *
1111 SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1112 if (ty) {
1113 swig_cast_info *iter = ty->cast;
1114 while (iter) {
1115 if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) ||
1116 (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) {
1117 if (iter == ty->cast)
1118 return iter;
1119 /* Move iter to the top of the linked list */
1120 iter->prev->next = iter->next;
1121 if (iter->next)
1122 iter->next->prev = iter->prev;
1123 iter->next = ty->cast;
1124 iter->prev = 0;
1125 if (ty->cast) ty->cast->prev = iter;
1126 ty->cast = iter;
1127 return iter;
1129 iter = iter->next;
1132 return 0;
1135 /* Function for getting a pointer value */
1137 SWIGRUNTIME int
1138 SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) {
1139 swig_cast_info *tc;
1140 void *voidptr = (void *)0;
1141 SV *tsv = 0;
1143 if (own)
1144 *own = 0;
1146 /* If magical, apply more magic */
1147 if (SvGMAGICAL(sv))
1148 mg_get(sv);
1150 /* Check to see if this is an object */
1151 if (sv_isobject(sv)) {
1152 IV tmp = 0;
1153 tsv = (SV*) SvRV(sv);
1154 if ((SvTYPE(tsv) == SVt_PVHV)) {
1155 MAGIC *mg;
1156 if (SvMAGICAL(tsv)) {
1157 mg = mg_find(tsv,'P');
1158 if (mg) {
1159 sv = mg->mg_obj;
1160 if (sv_isobject(sv)) {
1161 tsv = (SV*)SvRV(sv);
1162 tmp = SvIV(tsv);
1165 } else {
1166 return SWIG_ERROR;
1168 } else {
1169 tmp = SvIV(tsv);
1171 voidptr = INT2PTR(void *,tmp);
1172 } else if (! SvOK(sv)) { /* Check for undef */
1173 *(ptr) = (void *) 0;
1174 return SWIG_OK;
1175 } else if (SvTYPE(sv) == SVt_RV) { /* Check for NULL pointer */
1176 if (!SvROK(sv)) {
1177 *(ptr) = (void *) 0;
1178 return SWIG_OK;
1179 } else {
1180 return SWIG_ERROR;
1182 } else { /* Don't know what it is */
1183 return SWIG_ERROR;
1185 if (_t) {
1186 /* Now see if the types match */
1187 char *_c = HvNAME(SvSTASH(SvRV(sv)));
1188 tc = SWIG_TypeProxyCheck(_c,_t);
1189 if (!tc) {
1190 return SWIG_ERROR;
1193 int newmemory = 0;
1194 *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
1195 if (newmemory == SWIG_CAST_NEW_MEMORY) {
1196 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1197 if (own)
1198 *own = *own | SWIG_CAST_NEW_MEMORY;
1201 } else {
1202 *ptr = voidptr;
1206 * DISOWN implementation: we need a perl guru to check this one.
1208 if (tsv && (flags & SWIG_POINTER_DISOWN)) {
1210 * almost copy paste code from below SWIG_POINTER_OWN setting
1212 SV *obj = sv;
1213 HV *stash = SvSTASH(SvRV(obj));
1214 GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1215 if (isGV(gv)) {
1216 HV *hv = GvHVn(gv);
1218 * To set ownership (see below), a newSViv(1) entry is added.
1219 * Hence, to remove ownership, we delete the entry.
1221 if (hv_exists_ent(hv, obj, 0)) {
1222 hv_delete_ent(hv, obj, 0, 0);
1226 return SWIG_OK;
1229 SWIGRUNTIME int
1230 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
1231 return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0);
1234 SWIGRUNTIME void
1235 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
1236 if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) {
1237 SV *self;
1238 SV *obj=newSV(0);
1239 HV *hash=newHV();
1240 HV *stash;
1241 sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr);
1242 stash=SvSTASH(SvRV(obj));
1243 if (flags & SWIG_POINTER_OWN) {
1244 HV *hv;
1245 GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1246 if (!isGV(gv))
1247 gv_init(gv, stash, "OWNER", 5, FALSE);
1248 hv=GvHVn(gv);
1249 hv_store_ent(hv, obj, newSViv(1), 0);
1251 sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
1252 SvREFCNT_dec(obj);
1253 self=newRV_noinc((SV *)hash);
1254 sv_setsv(sv, self);
1255 SvREFCNT_dec((SV *)self);
1256 sv_bless(sv, stash);
1258 else {
1259 sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr);
1263 SWIGRUNTIMEINLINE SV *
1264 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
1265 SV *result = sv_newmortal();
1266 SWIG_MakePtr(result, ptr, t, flags);
1267 return result;
1270 SWIGRUNTIME void
1271 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
1272 char result[1024];
1273 char *r = result;
1274 if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
1275 *(r++) = '_';
1276 r = SWIG_PackData(r,ptr,sz);
1277 strcpy(r,SWIG_Perl_TypeProxyName(type));
1278 sv_setpv(sv, result);
1281 SWIGRUNTIME SV *
1282 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
1283 SV *result = sv_newmortal();
1284 SWIG_Perl_MakePackedObj(result, ptr, sz, type);
1285 return result;
1288 /* Convert a packed value value */
1289 SWIGRUNTIME int
1290 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
1291 swig_cast_info *tc;
1292 const char *c = 0;
1294 if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
1295 c = SvPV_nolen(obj);
1296 /* Pointer values must start with leading underscore */
1297 if (*c != '_') return SWIG_ERROR;
1298 c++;
1299 c = SWIG_UnpackData(c,ptr,sz);
1300 if (ty) {
1301 tc = SWIG_TypeCheck(c,ty);
1302 if (!tc) return SWIG_ERROR;
1304 return SWIG_OK;
1308 /* Macros for low-level exception handling */
1309 #define SWIG_croak(x) { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1312 typedef XSPROTO(SwigPerlWrapper);
1313 typedef SwigPerlWrapper *SwigPerlWrapperPtr;
1315 /* Structure for command table */
1316 typedef struct {
1317 const char *name;
1318 SwigPerlWrapperPtr wrapper;
1319 } swig_command_info;
1321 /* Information for constant table */
1323 #define SWIG_INT 1
1324 #define SWIG_FLOAT 2
1325 #define SWIG_STRING 3
1326 #define SWIG_POINTER 4
1327 #define SWIG_BINARY 5
1329 /* Constant information structure */
1330 typedef struct swig_constant_info {
1331 int type;
1332 const char *name;
1333 long lvalue;
1334 double dvalue;
1335 void *pvalue;
1336 swig_type_info **ptype;
1337 } swig_constant_info;
1340 /* Structure for variable table */
1341 typedef struct {
1342 const char *name;
1343 SwigMagicFunc set;
1344 SwigMagicFunc get;
1345 swig_type_info **type;
1346 } swig_variable_info;
1348 /* Magic variable code */
1349 #ifndef PERL_OBJECT
1350 #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
1351 #ifndef MULTIPLICITY
1352 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *))
1353 #else
1354 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *))
1355 #endif
1356 #else
1357 # define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1358 SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *))
1359 #endif
1361 MAGIC *mg;
1362 sv_magic(sv,sv,'U',(char *) name,strlen(name));
1363 mg = mg_find(sv,'U');
1364 mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
1365 mg->mg_virtual->svt_get = (SwigMagicFunc) get;
1366 mg->mg_virtual->svt_set = (SwigMagicFunc) set;
1367 mg->mg_virtual->svt_len = 0;
1368 mg->mg_virtual->svt_clear = 0;
1369 mg->mg_virtual->svt_free = 0;
1373 SWIGRUNTIME swig_module_info *
1374 SWIG_Perl_GetModule(void) {
1375 static void *type_pointer = (void *)0;
1376 SV *pointer;
1378 /* first check if pointer already created */
1379 if (!type_pointer) {
1380 pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
1381 if (pointer && SvOK(pointer)) {
1382 type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
1386 return (swig_module_info *) type_pointer;
1389 SWIGRUNTIME void
1390 SWIG_Perl_SetModule(swig_module_info *module) {
1391 SV *pointer;
1393 /* create a new pointer */
1394 pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
1395 sv_setiv(pointer, PTR2IV(module));
1398 #ifdef __cplusplus
1400 #endif
1402 /* Workaround perl5 global namespace pollution. Note that undefining library
1403 * functions like fopen will not solve the problem on all platforms as fopen
1404 * might be a macro on Windows but not necessarily on other operating systems. */
1405 #ifdef do_open
1406 #undef do_open
1407 #endif
1408 #ifdef do_close
1409 #undef do_close
1410 #endif
1411 #ifdef do_exec
1412 #undef do_exec
1413 #endif
1414 #ifdef scalar
1415 #undef scalar
1416 #endif
1417 #ifdef list
1418 #undef list
1419 #endif
1420 #ifdef apply
1421 #undef apply
1422 #endif
1423 #ifdef convert
1424 #undef convert
1425 #endif
1426 #ifdef Error
1427 #undef Error
1428 #endif
1429 #ifdef form
1430 #undef form
1431 #endif
1432 #ifdef vform
1433 #undef vform
1434 #endif
1435 #ifdef LABEL
1436 #undef LABEL
1437 #endif
1438 #ifdef METHOD
1439 #undef METHOD
1440 #endif
1441 #ifdef Move
1442 #undef Move
1443 #endif
1444 #ifdef yylex
1445 #undef yylex
1446 #endif
1447 #ifdef yyparse
1448 #undef yyparse
1449 #endif
1450 #ifdef yyerror
1451 #undef yyerror
1452 #endif
1453 #ifdef invert
1454 #undef invert
1455 #endif
1456 #ifdef ref
1457 #undef ref
1458 #endif
1459 #ifdef read
1460 #undef read
1461 #endif
1462 #ifdef write
1463 #undef write
1464 #endif
1465 #ifdef eof
1466 #undef eof
1467 #endif
1468 #ifdef bool
1469 #undef bool
1470 #endif
1471 #ifdef close
1472 #undef close
1473 #endif
1474 #ifdef rewind
1475 #undef rewind
1476 #endif
1477 #ifdef free
1478 #undef free
1479 #endif
1480 #ifdef malloc
1481 #undef malloc
1482 #endif
1483 #ifdef calloc
1484 #undef calloc
1485 #endif
1486 #ifdef Stat
1487 #undef Stat
1488 #endif
1489 #ifdef check
1490 #undef check
1491 #endif
1492 #ifdef seekdir
1493 #undef seekdir
1494 #endif
1495 #ifdef open
1496 #undef open
1497 #endif
1498 #ifdef readdir
1499 #undef readdir
1500 #endif
1501 #ifdef bind
1502 #undef bind
1503 #endif
1507 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1509 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1513 #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
1516 /* -------- TYPES TABLE (BEGIN) -------- */
1518 #define SWIGTYPE_p_Link swig_types[0]
1519 #define SWIGTYPE_p_Options swig_types[1]
1520 #define SWIGTYPE_p_Query swig_types[2]
1521 #define SWIGTYPE_p_Video swig_types[3]
1522 #define SWIGTYPE_p_char swig_types[4]
1523 #define SWIGTYPE_p_quviCategory swig_types[5]
1524 #define SWIGTYPE_p_quviCode swig_types[6]
1525 #define SWIGTYPE_p_quviVersion swig_types[7]
1526 #define SWIGTYPE_p_std__string swig_types[8]
1527 static swig_type_info *swig_types[10];
1528 static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
1529 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1530 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1532 /* -------- TYPES TABLE (END) -------- */
1534 #define SWIG_init boot_WWW__Quvi
1536 #define SWIG_name "WWW::Quvic::boot_WWW__Quvi"
1537 #define SWIG_prefix "WWW::Quvic::"
1539 #define SWIGVERSION 0x020001
1540 #define SWIG_VERSION SWIGVERSION
1543 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
1544 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
1547 #include <stdexcept>
1550 #ifdef __cplusplus
1551 extern "C"
1552 #endif
1553 #ifndef PERL_OBJECT
1554 #ifndef MULTIPLICITY
1555 SWIGEXPORT void SWIG_init (CV* cv);
1556 #else
1557 SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1558 #endif
1559 #else
1560 SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1561 #endif
1564 #include <string>
1567 #include "Quvi.h"
1571 char *_VERSION = VERSION;
1573 typedef enum {
1574 libquviVersion = QUVI_VERSION,
1575 libquviVersionLong = QUVI_VERSION_LONG,
1576 ModuleVersion
1577 } quviVersion;
1579 static char* version (quviVersion n=ModuleVersion) {
1580 if (n == ModuleVersion) return _VERSION;
1581 return quvi_version ((QUVIversion)n);
1585 * A manual copy of QUVIcode. If there's a better way to do this,
1586 * I'd like to know it too. This will need to be maintained manually
1587 * if there are any changes to the QUVIcode enum list in quvi.h file.
1589 * The reason we don't simply "%include <quvi/quvi.h>" and
1590 * get the constants is because that would clutter the wrapper.
1592 * We have renamed the constants to avoid any conflicts with those
1593 * defined in <quvi/quvi.h> which is included by the wrapper.
1595 typedef enum {
1596 OK = 0x00,
1597 Mem,
1598 BadHandle,
1599 InvArg,
1600 CurlInit,
1601 Last,
1602 AbortedByCallback,
1603 LuaInit,
1604 NoLuaWebsite,
1605 NoLuaUtil,
1606 PcreError= 0x40, /* QUVI_PCRE */
1607 NoSupport,
1608 CurlError, /* QUVI_CURL */
1609 IconvError, /* QUVI_ICONV */
1610 LuaError, /* QUVI_LUA */
1611 } quviCode;
1613 typedef enum {
1614 ProtoHttp = 0x1,
1615 ProtoMms = 0x2,
1616 ProtoRtsp = 0x4,
1617 ProtoRtmp = 0x8,
1618 ProtoAll = (ProtoHttp|ProtoMms|ProtoRtsp|ProtoRtmp)
1619 } quviCategory;
1623 SWIGINTERN swig_type_info*
1624 SWIG_pchar_descriptor(void)
1626 static int init = 0;
1627 static swig_type_info* info = 0;
1628 if (!init) {
1629 info = SWIG_TypeQuery("_p_char");
1630 init = 1;
1632 return info;
1636 SWIGINTERN int
1637 SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1639 if (SvMAGICAL(obj)) {
1640 SV *tmp = sv_newmortal();
1641 SvSetSV(tmp, obj);
1642 obj = tmp;
1644 if (SvPOK(obj)) {
1645 STRLEN len = 0;
1646 char *cstr = SvPV(obj, len);
1647 size_t size = len + 1;
1648 if (cptr) {
1649 if (alloc) {
1650 if (*alloc == SWIG_NEWOBJ) {
1651 *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
1652 } else {
1653 *cptr = cstr;
1654 *alloc = SWIG_OLDOBJ;
1658 if (psize) *psize = size;
1659 return SWIG_OK;
1660 } else {
1661 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1662 if (pchar_descriptor) {
1663 char* vptr = 0;
1664 if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1665 if (cptr) *cptr = vptr;
1666 if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1667 if (alloc) *alloc = SWIG_OLDOBJ;
1668 return SWIG_OK;
1672 return SWIG_TypeError;
1676 SWIGINTERNINLINE SV *
1677 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1679 SV *obj = sv_newmortal();
1680 if (carray) {
1681 sv_setpvn(obj, carray, size);
1682 } else {
1683 sv_setsv(obj, &PL_sv_undef);
1685 return obj;
1689 SWIGINTERNINLINE SV *
1690 SWIG_FromCharPtr(const char *cptr)
1692 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1696 SWIGINTERNINLINE SV *
1697 SWIG_From_long SWIG_PERL_DECL_ARGS_1(long value)
1699 SV *obj = sv_newmortal();
1700 sv_setiv(obj, (IV) value);
1701 return obj;
1705 SWIGINTERNINLINE SV *
1706 SWIG_From_int SWIG_PERL_DECL_ARGS_1(int value)
1708 return SWIG_From_long SWIG_PERL_CALL_ARGS_1(value);
1712 #include <limits.h>
1713 #if !defined(SWIG_NO_LLONG_MAX)
1714 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1715 # define LLONG_MAX __LONG_LONG_MAX__
1716 # define LLONG_MIN (-LLONG_MAX - 1LL)
1717 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1718 # endif
1719 #endif
1722 SWIGINTERN int
1723 SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1725 if (SvNIOK(obj)) {
1726 if (val) *val = SvNV(obj);
1727 return SWIG_OK;
1728 } else if (SvIOK(obj)) {
1729 if (val) *val = (double) SvIV(obj);
1730 return SWIG_AddCast(SWIG_OK);
1731 } else {
1732 const char *nptr = SvPV_nolen(obj);
1733 if (nptr) {
1734 char *endptr;
1735 double v;
1736 errno = 0;
1737 v = strtod(nptr, &endptr);
1738 if (errno == ERANGE) {
1739 errno = 0;
1740 return SWIG_OverflowError;
1741 } else {
1742 if (*endptr == '\0') {
1743 if (val) *val = v;
1744 return SWIG_Str2NumCast(SWIG_OK);
1749 return SWIG_TypeError;
1753 #include <float.h>
1756 #include <math.h>
1759 SWIGINTERNINLINE int
1760 SWIG_CanCastAsInteger(double *d, double min, double max) {
1761 double x = *d;
1762 if ((min <= x && x <= max)) {
1763 double fx = floor(x);
1764 double cx = ceil(x);
1765 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
1766 if ((errno == EDOM) || (errno == ERANGE)) {
1767 errno = 0;
1768 } else {
1769 double summ, reps, diff;
1770 if (rd < x) {
1771 diff = x - rd;
1772 } else if (rd > x) {
1773 diff = rd - x;
1774 } else {
1775 return 1;
1777 summ = rd + x;
1778 reps = diff/summ;
1779 if (reps < 8*DBL_EPSILON) {
1780 *d = rd;
1781 return 1;
1785 return 0;
1789 SWIGINTERN int
1790 SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
1792 if (SvIOK(obj)) {
1793 if (val) *val = SvIV(obj);
1794 return SWIG_OK;
1795 } else {
1796 int dispatch = 0;
1797 const char *nptr = SvPV_nolen(obj);
1798 if (nptr) {
1799 char *endptr;
1800 long v;
1801 errno = 0;
1802 v = strtol(nptr, &endptr,0);
1803 if (errno == ERANGE) {
1804 errno = 0;
1805 return SWIG_OverflowError;
1806 } else {
1807 if (*endptr == '\0') {
1808 if (val) *val = v;
1809 return SWIG_Str2NumCast(SWIG_OK);
1813 if (!dispatch) {
1814 double d;
1815 int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1816 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
1817 if (val) *val = (long)(d);
1818 return res;
1822 return SWIG_TypeError;
1826 SWIGINTERN int
1827 SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
1829 long v;
1830 int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1831 if (SWIG_IsOK(res)) {
1832 if ((v < INT_MIN || v > INT_MAX)) {
1833 return SWIG_OverflowError;
1834 } else {
1835 if (val) *val = static_cast< int >(v);
1838 return res;
1842 SWIGINTERN int
1843 SWIG_AsPtr_std_string SWIG_PERL_DECL_ARGS_2(SV * obj, std::string **val)
1845 char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
1846 if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
1847 if (buf) {
1848 if (val) *val = new std::string(buf, size - 1);
1849 if (alloc == SWIG_NEWOBJ) delete[] buf;
1850 return SWIG_NEWOBJ;
1851 } else {
1852 if (val) *val = 0;
1853 return SWIG_OLDOBJ;
1855 } else {
1856 static int init = 0;
1857 static swig_type_info* descriptor = 0;
1858 if (!init) {
1859 descriptor = SWIG_TypeQuery("std::string" " *");
1860 init = 1;
1862 if (descriptor) {
1863 std::string *vptr;
1864 int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
1865 if (SWIG_IsOK(res) && val) *val = vptr;
1866 return res;
1869 return SWIG_ERROR;
1873 SWIGINTERNINLINE SV *
1874 SWIG_From_std_string SWIG_PERL_DECL_ARGS_1(const std::string& s)
1876 if (s.size()) {
1877 return SWIG_FromCharPtrAndSize(s.data(), s.size());
1878 } else {
1879 return SWIG_FromCharPtrAndSize(s.c_str(), 0);
1884 SWIGINTERN int
1885 SWIG_AsVal_bool SWIG_PERL_DECL_ARGS_2(SV *obj, bool* val)
1887 if (obj == &PL_sv_yes) {
1888 if (val) *val = true;
1889 return SWIG_OK;
1890 } else if (obj == &PL_sv_no) {
1891 if (val) *val = false;
1892 return SWIG_OK;
1893 } else {
1894 if (val) *val = SvTRUE(obj) ? true: false;
1895 return SWIG_AddCast(SWIG_OK);
1897 return SWIG_TypeError;
1901 SWIGINTERNINLINE SV *
1902 SWIG_From_bool SWIG_PERL_DECL_ARGS_1(bool value)
1904 SV *obj = sv_newmortal();
1905 if (value) {
1906 sv_setsv(obj, &PL_sv_yes);
1907 } else {
1908 sv_setsv(obj, &PL_sv_no);
1910 return obj;
1914 SWIGINTERNINLINE SV *
1915 SWIG_From_double SWIG_PERL_DECL_ARGS_1(double value)
1917 SV *obj = sv_newmortal();
1918 sv_setnv(obj, value);
1919 return obj;
1922 #ifdef __cplusplus
1923 extern "C" {
1924 #endif
1926 #ifdef PERL_OBJECT
1927 #define MAGIC_CLASS _wrap_WWW__Quvi_var::
1928 class _wrap_WWW__Quvi_var : public CPerlObj {
1929 public:
1930 #else
1931 #define MAGIC_CLASS
1932 #endif
1933 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
1934 MAGIC_PPERL
1935 croak("Value is read-only.");
1936 return 0;
1938 SWIGCLASS_STATIC int _wrap__VERSION_set(pTHX_ SV* sv, MAGIC * SWIGUNUSEDPARM(mg)) {
1939 MAGIC_PPERL
1941 char *cptr = 0; size_t csize = 0; int alloc = SWIG_NEWOBJ;
1942 int res = SWIG_AsCharPtrAndSize(sv, &cptr, &csize, &alloc);
1943 if (!SWIG_IsOK(res)) {
1944 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""_VERSION""' of type '""char *""'");
1946 if (_VERSION) delete[] _VERSION;
1947 if (alloc == SWIG_NEWOBJ) {
1948 _VERSION = cptr;
1949 } else {
1950 _VERSION = csize ? (char *)reinterpret_cast< char* >(memcpy((new char[csize]), cptr, sizeof(char)*(csize))) : 0;
1953 fail:
1954 return 1;
1958 SWIGCLASS_STATIC int _wrap__VERSION_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) {
1959 MAGIC_PPERL
1960 sv_setsv(sv,SWIG_FromCharPtr(_VERSION)) ;
1961 return 1;
1967 #ifdef PERL_OBJECT
1969 #endif
1971 #ifdef __cplusplus
1973 #endif
1975 #ifdef __cplusplus
1976 extern "C" {
1977 #endif
1978 XS(_wrap_version__SWIG_0) {
1980 quviVersion arg1 ;
1981 int val1 ;
1982 int ecode1 = 0 ;
1983 int argvi = 0;
1984 char *result = 0 ;
1985 dXSARGS;
1987 if ((items < 1) || (items > 1)) {
1988 SWIG_croak("Usage: version(n);");
1990 ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
1991 if (!SWIG_IsOK(ecode1)) {
1992 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "version" "', argument " "1"" of type '" "quviVersion""'");
1994 arg1 = static_cast< quviVersion >(val1);
1995 result = (char *)version(arg1);
1996 ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
1998 XSRETURN(argvi);
1999 fail:
2001 SWIG_croak_null();
2006 XS(_wrap_version__SWIG_1) {
2008 int argvi = 0;
2009 char *result = 0 ;
2010 dXSARGS;
2012 if ((items < 0) || (items > 0)) {
2013 SWIG_croak("Usage: version();");
2015 result = (char *)version();
2016 ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2017 XSRETURN(argvi);
2018 fail:
2019 SWIG_croak_null();
2024 XS(_wrap_version) {
2025 dXSARGS;
2028 unsigned long _index = 0;
2029 SWIG_TypeRank _rank = 0;
2030 if (items == 0) {
2031 SWIG_TypeRank _ranki = 0;
2032 SWIG_TypeRank _rankm = 0;
2033 if (!_index || (_ranki < _rank)) {
2034 _rank = _ranki; _index = 1;
2035 if (_rank == _rankm) goto dispatch;
2038 if (items == 1) {
2039 SWIG_TypeRank _ranki = 0;
2040 SWIG_TypeRank _rankm = 0;
2041 SWIG_TypeRank _pi = 1;
2042 int _v = 0;
2045 int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
2046 _v = SWIG_CheckState(res);
2049 if (!_v) goto check_2;
2050 _ranki += _v*_pi;
2051 _rankm += _pi;
2052 _pi *= SWIG_MAXCASTRANK;
2053 if (!_index || (_ranki < _rank)) {
2054 _rank = _ranki; _index = 2;
2055 if (_rank == _rankm) goto dispatch;
2058 check_2:
2060 dispatch:
2061 switch(_index) {
2062 case 1:
2063 ++PL_markstack_ptr; SWIG_CALLXS(_wrap_version__SWIG_1); return;
2064 case 2:
2065 ++PL_markstack_ptr; SWIG_CALLXS(_wrap_version__SWIG_0); return;
2069 croak("No matching function for overloaded 'version'");
2070 XSRETURN(0);
2074 XS(_wrap_new_Options) {
2076 int argvi = 0;
2077 Options *result = 0 ;
2078 dXSARGS;
2080 if ((items < 0) || (items > 0)) {
2081 SWIG_croak("Usage: new_Options();");
2083 result = (Options *)new Options();
2084 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Options, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2085 XSRETURN(argvi);
2086 fail:
2087 SWIG_croak_null();
2092 XS(_wrap_Options_user_agent_set) {
2094 Options *arg1 = (Options *) 0 ;
2095 std::string *arg2 = 0 ;
2096 void *argp1 = 0 ;
2097 int res1 = 0 ;
2098 int res2 = SWIG_OLDOBJ ;
2099 int argvi = 0;
2100 dXSARGS;
2102 if ((items < 2) || (items > 2)) {
2103 SWIG_croak("Usage: Options_user_agent_set(self,user_agent);");
2105 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2106 if (!SWIG_IsOK(res1)) {
2107 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_user_agent_set" "', argument " "1"" of type '" "Options *""'");
2109 arg1 = reinterpret_cast< Options * >(argp1);
2111 std::string *ptr = (std::string *)0;
2112 res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
2113 if (!SWIG_IsOK(res2)) {
2114 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Options_user_agent_set" "', argument " "2"" of type '" "std::string const &""'");
2116 if (!ptr) {
2117 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Options_user_agent_set" "', argument " "2"" of type '" "std::string const &""'");
2119 arg2 = ptr;
2121 if (arg1) (arg1)->user_agent = *arg2;
2122 ST(argvi) = sv_newmortal();
2124 if (SWIG_IsNewObj(res2)) delete arg2;
2125 XSRETURN(argvi);
2126 fail:
2128 if (SWIG_IsNewObj(res2)) delete arg2;
2129 SWIG_croak_null();
2134 XS(_wrap_Options_user_agent_get) {
2136 Options *arg1 = (Options *) 0 ;
2137 void *argp1 = 0 ;
2138 int res1 = 0 ;
2139 int argvi = 0;
2140 std::string *result = 0 ;
2141 dXSARGS;
2143 if ((items < 1) || (items > 1)) {
2144 SWIG_croak("Usage: Options_user_agent_get(self);");
2146 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2147 if (!SWIG_IsOK(res1)) {
2148 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_user_agent_get" "', argument " "1"" of type '" "Options *""'");
2150 arg1 = reinterpret_cast< Options * >(argp1);
2151 result = (std::string *) & ((arg1)->user_agent);
2152 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2154 XSRETURN(argvi);
2155 fail:
2157 SWIG_croak_null();
2162 XS(_wrap_Options_http_proxy_set) {
2164 Options *arg1 = (Options *) 0 ;
2165 std::string *arg2 = 0 ;
2166 void *argp1 = 0 ;
2167 int res1 = 0 ;
2168 int res2 = SWIG_OLDOBJ ;
2169 int argvi = 0;
2170 dXSARGS;
2172 if ((items < 2) || (items > 2)) {
2173 SWIG_croak("Usage: Options_http_proxy_set(self,http_proxy);");
2175 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2176 if (!SWIG_IsOK(res1)) {
2177 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_http_proxy_set" "', argument " "1"" of type '" "Options *""'");
2179 arg1 = reinterpret_cast< Options * >(argp1);
2181 std::string *ptr = (std::string *)0;
2182 res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
2183 if (!SWIG_IsOK(res2)) {
2184 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Options_http_proxy_set" "', argument " "2"" of type '" "std::string const &""'");
2186 if (!ptr) {
2187 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Options_http_proxy_set" "', argument " "2"" of type '" "std::string const &""'");
2189 arg2 = ptr;
2191 if (arg1) (arg1)->http_proxy = *arg2;
2192 ST(argvi) = sv_newmortal();
2194 if (SWIG_IsNewObj(res2)) delete arg2;
2195 XSRETURN(argvi);
2196 fail:
2198 if (SWIG_IsNewObj(res2)) delete arg2;
2199 SWIG_croak_null();
2204 XS(_wrap_Options_http_proxy_get) {
2206 Options *arg1 = (Options *) 0 ;
2207 void *argp1 = 0 ;
2208 int res1 = 0 ;
2209 int argvi = 0;
2210 std::string *result = 0 ;
2211 dXSARGS;
2213 if ((items < 1) || (items > 1)) {
2214 SWIG_croak("Usage: Options_http_proxy_get(self);");
2216 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2217 if (!SWIG_IsOK(res1)) {
2218 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_http_proxy_get" "', argument " "1"" of type '" "Options *""'");
2220 arg1 = reinterpret_cast< Options * >(argp1);
2221 result = (std::string *) & ((arg1)->http_proxy);
2222 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2224 XSRETURN(argvi);
2225 fail:
2227 SWIG_croak_null();
2232 XS(_wrap_Options_verbose_libcurl_set) {
2234 Options *arg1 = (Options *) 0 ;
2235 bool arg2 ;
2236 void *argp1 = 0 ;
2237 int res1 = 0 ;
2238 bool val2 ;
2239 int ecode2 = 0 ;
2240 int argvi = 0;
2241 dXSARGS;
2243 if ((items < 2) || (items > 2)) {
2244 SWIG_croak("Usage: Options_verbose_libcurl_set(self,verbose_libcurl);");
2246 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2247 if (!SWIG_IsOK(res1)) {
2248 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_verbose_libcurl_set" "', argument " "1"" of type '" "Options *""'");
2250 arg1 = reinterpret_cast< Options * >(argp1);
2251 ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2252 if (!SWIG_IsOK(ecode2)) {
2253 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Options_verbose_libcurl_set" "', argument " "2"" of type '" "bool""'");
2255 arg2 = static_cast< bool >(val2);
2256 if (arg1) (arg1)->verbose_libcurl = arg2;
2257 ST(argvi) = sv_newmortal();
2260 XSRETURN(argvi);
2261 fail:
2264 SWIG_croak_null();
2269 XS(_wrap_Options_verbose_libcurl_get) {
2271 Options *arg1 = (Options *) 0 ;
2272 void *argp1 = 0 ;
2273 int res1 = 0 ;
2274 int argvi = 0;
2275 bool result;
2276 dXSARGS;
2278 if ((items < 1) || (items > 1)) {
2279 SWIG_croak("Usage: Options_verbose_libcurl_get(self);");
2281 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2282 if (!SWIG_IsOK(res1)) {
2283 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_verbose_libcurl_get" "', argument " "1"" of type '" "Options *""'");
2285 arg1 = reinterpret_cast< Options * >(argp1);
2286 result = (bool) ((arg1)->verbose_libcurl);
2287 ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
2289 XSRETURN(argvi);
2290 fail:
2292 SWIG_croak_null();
2297 XS(_wrap_Options_format_set) {
2299 Options *arg1 = (Options *) 0 ;
2300 std::string *arg2 = 0 ;
2301 void *argp1 = 0 ;
2302 int res1 = 0 ;
2303 int res2 = SWIG_OLDOBJ ;
2304 int argvi = 0;
2305 dXSARGS;
2307 if ((items < 2) || (items > 2)) {
2308 SWIG_croak("Usage: Options_format_set(self,format);");
2310 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2311 if (!SWIG_IsOK(res1)) {
2312 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_format_set" "', argument " "1"" of type '" "Options *""'");
2314 arg1 = reinterpret_cast< Options * >(argp1);
2316 std::string *ptr = (std::string *)0;
2317 res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
2318 if (!SWIG_IsOK(res2)) {
2319 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Options_format_set" "', argument " "2"" of type '" "std::string const &""'");
2321 if (!ptr) {
2322 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Options_format_set" "', argument " "2"" of type '" "std::string const &""'");
2324 arg2 = ptr;
2326 if (arg1) (arg1)->format = *arg2;
2327 ST(argvi) = sv_newmortal();
2329 if (SWIG_IsNewObj(res2)) delete arg2;
2330 XSRETURN(argvi);
2331 fail:
2333 if (SWIG_IsNewObj(res2)) delete arg2;
2334 SWIG_croak_null();
2339 XS(_wrap_Options_format_get) {
2341 Options *arg1 = (Options *) 0 ;
2342 void *argp1 = 0 ;
2343 int res1 = 0 ;
2344 int argvi = 0;
2345 std::string *result = 0 ;
2346 dXSARGS;
2348 if ((items < 1) || (items > 1)) {
2349 SWIG_croak("Usage: Options_format_get(self);");
2351 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2352 if (!SWIG_IsOK(res1)) {
2353 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_format_get" "', argument " "1"" of type '" "Options *""'");
2355 arg1 = reinterpret_cast< Options * >(argp1);
2356 result = (std::string *) & ((arg1)->format);
2357 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2359 XSRETURN(argvi);
2360 fail:
2362 SWIG_croak_null();
2367 XS(_wrap_Options_verify_set) {
2369 Options *arg1 = (Options *) 0 ;
2370 bool arg2 ;
2371 void *argp1 = 0 ;
2372 int res1 = 0 ;
2373 bool val2 ;
2374 int ecode2 = 0 ;
2375 int argvi = 0;
2376 dXSARGS;
2378 if ((items < 2) || (items > 2)) {
2379 SWIG_croak("Usage: Options_verify_set(self,verify);");
2381 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2382 if (!SWIG_IsOK(res1)) {
2383 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_verify_set" "', argument " "1"" of type '" "Options *""'");
2385 arg1 = reinterpret_cast< Options * >(argp1);
2386 ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2387 if (!SWIG_IsOK(ecode2)) {
2388 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Options_verify_set" "', argument " "2"" of type '" "bool""'");
2390 arg2 = static_cast< bool >(val2);
2391 if (arg1) (arg1)->verify = arg2;
2392 ST(argvi) = sv_newmortal();
2395 XSRETURN(argvi);
2396 fail:
2399 SWIG_croak_null();
2404 XS(_wrap_Options_verify_get) {
2406 Options *arg1 = (Options *) 0 ;
2407 void *argp1 = 0 ;
2408 int res1 = 0 ;
2409 int argvi = 0;
2410 bool result;
2411 dXSARGS;
2413 if ((items < 1) || (items > 1)) {
2414 SWIG_croak("Usage: Options_verify_get(self);");
2416 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2417 if (!SWIG_IsOK(res1)) {
2418 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_verify_get" "', argument " "1"" of type '" "Options *""'");
2420 arg1 = reinterpret_cast< Options * >(argp1);
2421 result = (bool) ((arg1)->verify);
2422 ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
2424 XSRETURN(argvi);
2425 fail:
2427 SWIG_croak_null();
2432 XS(_wrap_Options_shortened_set) {
2434 Options *arg1 = (Options *) 0 ;
2435 bool arg2 ;
2436 void *argp1 = 0 ;
2437 int res1 = 0 ;
2438 bool val2 ;
2439 int ecode2 = 0 ;
2440 int argvi = 0;
2441 dXSARGS;
2443 if ((items < 2) || (items > 2)) {
2444 SWIG_croak("Usage: Options_shortened_set(self,shortened);");
2446 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2447 if (!SWIG_IsOK(res1)) {
2448 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_shortened_set" "', argument " "1"" of type '" "Options *""'");
2450 arg1 = reinterpret_cast< Options * >(argp1);
2451 ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2452 if (!SWIG_IsOK(ecode2)) {
2453 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Options_shortened_set" "', argument " "2"" of type '" "bool""'");
2455 arg2 = static_cast< bool >(val2);
2456 if (arg1) (arg1)->shortened = arg2;
2457 ST(argvi) = sv_newmortal();
2460 XSRETURN(argvi);
2461 fail:
2464 SWIG_croak_null();
2469 XS(_wrap_Options_shortened_get) {
2471 Options *arg1 = (Options *) 0 ;
2472 void *argp1 = 0 ;
2473 int res1 = 0 ;
2474 int argvi = 0;
2475 bool result;
2476 dXSARGS;
2478 if ((items < 1) || (items > 1)) {
2479 SWIG_croak("Usage: Options_shortened_get(self);");
2481 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2482 if (!SWIG_IsOK(res1)) {
2483 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_shortened_get" "', argument " "1"" of type '" "Options *""'");
2485 arg1 = reinterpret_cast< Options * >(argp1);
2486 result = (bool) ((arg1)->shortened);
2487 ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
2489 XSRETURN(argvi);
2490 fail:
2492 SWIG_croak_null();
2497 XS(_wrap_Options_category_set) {
2499 Options *arg1 = (Options *) 0 ;
2500 long arg2 ;
2501 void *argp1 = 0 ;
2502 int res1 = 0 ;
2503 long val2 ;
2504 int ecode2 = 0 ;
2505 int argvi = 0;
2506 dXSARGS;
2508 if ((items < 2) || (items > 2)) {
2509 SWIG_croak("Usage: Options_category_set(self,category);");
2511 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2512 if (!SWIG_IsOK(res1)) {
2513 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_category_set" "', argument " "1"" of type '" "Options *""'");
2515 arg1 = reinterpret_cast< Options * >(argp1);
2516 ecode2 = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
2517 if (!SWIG_IsOK(ecode2)) {
2518 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Options_category_set" "', argument " "2"" of type '" "long""'");
2520 arg2 = static_cast< long >(val2);
2521 if (arg1) (arg1)->category = arg2;
2522 ST(argvi) = sv_newmortal();
2525 XSRETURN(argvi);
2526 fail:
2529 SWIG_croak_null();
2534 XS(_wrap_Options_category_get) {
2536 Options *arg1 = (Options *) 0 ;
2537 void *argp1 = 0 ;
2538 int res1 = 0 ;
2539 int argvi = 0;
2540 long result;
2541 dXSARGS;
2543 if ((items < 1) || (items > 1)) {
2544 SWIG_croak("Usage: Options_category_get(self);");
2546 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, 0 | 0 );
2547 if (!SWIG_IsOK(res1)) {
2548 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Options_category_get" "', argument " "1"" of type '" "Options *""'");
2550 arg1 = reinterpret_cast< Options * >(argp1);
2551 result = (long) ((arg1)->category);
2552 ST(argvi) = SWIG_From_long SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
2554 XSRETURN(argvi);
2555 fail:
2557 SWIG_croak_null();
2562 XS(_wrap_delete_Options) {
2564 Options *arg1 = (Options *) 0 ;
2565 void *argp1 = 0 ;
2566 int res1 = 0 ;
2567 int argvi = 0;
2568 dXSARGS;
2570 if ((items < 1) || (items > 1)) {
2571 SWIG_croak("Usage: delete_Options(self);");
2573 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Options, SWIG_POINTER_DISOWN | 0 );
2574 if (!SWIG_IsOK(res1)) {
2575 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Options" "', argument " "1"" of type '" "Options *""'");
2577 arg1 = reinterpret_cast< Options * >(argp1);
2578 delete arg1;
2579 ST(argvi) = sv_newmortal();
2581 XSRETURN(argvi);
2582 fail:
2584 SWIG_croak_null();
2589 XS(_wrap_new_Link) {
2591 int argvi = 0;
2592 Link *result = 0 ;
2593 dXSARGS;
2595 if ((items < 0) || (items > 0)) {
2596 SWIG_croak("Usage: new_Link();");
2598 result = (Link *)new Link();
2599 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Link, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2600 XSRETURN(argvi);
2601 fail:
2602 SWIG_croak_null();
2607 XS(_wrap_Link_content_type_get) {
2609 Link *arg1 = (Link *) 0 ;
2610 void *argp1 = 0 ;
2611 int res1 = 0 ;
2612 int argvi = 0;
2613 std::string *result = 0 ;
2614 dXSARGS;
2616 if ((items < 1) || (items > 1)) {
2617 SWIG_croak("Usage: Link_content_type_get(self);");
2619 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Link, 0 | 0 );
2620 if (!SWIG_IsOK(res1)) {
2621 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Link_content_type_get" "', argument " "1"" of type '" "Link *""'");
2623 arg1 = reinterpret_cast< Link * >(argp1);
2624 result = (std::string *) & ((arg1)->content_type);
2625 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2627 XSRETURN(argvi);
2628 fail:
2630 SWIG_croak_null();
2635 XS(_wrap_Link_file_suffix_get) {
2637 Link *arg1 = (Link *) 0 ;
2638 void *argp1 = 0 ;
2639 int res1 = 0 ;
2640 int argvi = 0;
2641 std::string *result = 0 ;
2642 dXSARGS;
2644 if ((items < 1) || (items > 1)) {
2645 SWIG_croak("Usage: Link_file_suffix_get(self);");
2647 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Link, 0 | 0 );
2648 if (!SWIG_IsOK(res1)) {
2649 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Link_file_suffix_get" "', argument " "1"" of type '" "Link *""'");
2651 arg1 = reinterpret_cast< Link * >(argp1);
2652 result = (std::string *) & ((arg1)->file_suffix);
2653 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2655 XSRETURN(argvi);
2656 fail:
2658 SWIG_croak_null();
2663 XS(_wrap_Link_length_bytes_get) {
2665 Link *arg1 = (Link *) 0 ;
2666 void *argp1 = 0 ;
2667 int res1 = 0 ;
2668 int argvi = 0;
2669 double result;
2670 dXSARGS;
2672 if ((items < 1) || (items > 1)) {
2673 SWIG_croak("Usage: Link_length_bytes_get(self);");
2675 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Link, 0 | 0 );
2676 if (!SWIG_IsOK(res1)) {
2677 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Link_length_bytes_get" "', argument " "1"" of type '" "Link *""'");
2679 arg1 = reinterpret_cast< Link * >(argp1);
2680 result = (double) ((arg1)->length_bytes);
2681 ST(argvi) = SWIG_From_double SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
2683 XSRETURN(argvi);
2684 fail:
2686 SWIG_croak_null();
2691 XS(_wrap_Link_url_get) {
2693 Link *arg1 = (Link *) 0 ;
2694 void *argp1 = 0 ;
2695 int res1 = 0 ;
2696 int argvi = 0;
2697 std::string *result = 0 ;
2698 dXSARGS;
2700 if ((items < 1) || (items > 1)) {
2701 SWIG_croak("Usage: Link_url_get(self);");
2703 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Link, 0 | 0 );
2704 if (!SWIG_IsOK(res1)) {
2705 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Link_url_get" "', argument " "1"" of type '" "Link *""'");
2707 arg1 = reinterpret_cast< Link * >(argp1);
2708 result = (std::string *) & ((arg1)->url);
2709 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2711 XSRETURN(argvi);
2712 fail:
2714 SWIG_croak_null();
2719 XS(_wrap_delete_Link) {
2721 Link *arg1 = (Link *) 0 ;
2722 void *argp1 = 0 ;
2723 int res1 = 0 ;
2724 int argvi = 0;
2725 dXSARGS;
2727 if ((items < 1) || (items > 1)) {
2728 SWIG_croak("Usage: delete_Link(self);");
2730 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Link, SWIG_POINTER_DISOWN | 0 );
2731 if (!SWIG_IsOK(res1)) {
2732 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Link" "', argument " "1"" of type '" "Link *""'");
2734 arg1 = reinterpret_cast< Link * >(argp1);
2735 delete arg1;
2736 ST(argvi) = sv_newmortal();
2738 XSRETURN(argvi);
2739 fail:
2741 SWIG_croak_null();
2746 XS(_wrap_new_Video) {
2748 int argvi = 0;
2749 Video *result = 0 ;
2750 dXSARGS;
2752 if ((items < 0) || (items > 0)) {
2753 SWIG_croak("Usage: new_Video();");
2755 result = (Video *)new Video();
2756 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Video, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2757 XSRETURN(argvi);
2758 fail:
2759 SWIG_croak_null();
2764 XS(_wrap_Video_title_get) {
2766 Video *arg1 = (Video *) 0 ;
2767 void *argp1 = 0 ;
2768 int res1 = 0 ;
2769 int argvi = 0;
2770 std::string *result = 0 ;
2771 dXSARGS;
2773 if ((items < 1) || (items > 1)) {
2774 SWIG_croak("Usage: Video_title_get(self);");
2776 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Video, 0 | 0 );
2777 if (!SWIG_IsOK(res1)) {
2778 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Video_title_get" "', argument " "1"" of type '" "Video *""'");
2780 arg1 = reinterpret_cast< Video * >(argp1);
2781 result = (std::string *) & ((arg1)->title);
2782 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2784 XSRETURN(argvi);
2785 fail:
2787 SWIG_croak_null();
2792 XS(_wrap_Video_host_get) {
2794 Video *arg1 = (Video *) 0 ;
2795 void *argp1 = 0 ;
2796 int res1 = 0 ;
2797 int argvi = 0;
2798 std::string *result = 0 ;
2799 dXSARGS;
2801 if ((items < 1) || (items > 1)) {
2802 SWIG_croak("Usage: Video_host_get(self);");
2804 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Video, 0 | 0 );
2805 if (!SWIG_IsOK(res1)) {
2806 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Video_host_get" "', argument " "1"" of type '" "Video *""'");
2808 arg1 = reinterpret_cast< Video * >(argp1);
2809 result = (std::string *) & ((arg1)->host);
2810 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2812 XSRETURN(argvi);
2813 fail:
2815 SWIG_croak_null();
2820 XS(_wrap_Video_url_get) {
2822 Video *arg1 = (Video *) 0 ;
2823 void *argp1 = 0 ;
2824 int res1 = 0 ;
2825 int argvi = 0;
2826 std::string *result = 0 ;
2827 dXSARGS;
2829 if ((items < 1) || (items > 1)) {
2830 SWIG_croak("Usage: Video_url_get(self);");
2832 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Video, 0 | 0 );
2833 if (!SWIG_IsOK(res1)) {
2834 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Video_url_get" "', argument " "1"" of type '" "Video *""'");
2836 arg1 = reinterpret_cast< Video * >(argp1);
2837 result = (std::string *) & ((arg1)->url);
2838 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2840 XSRETURN(argvi);
2841 fail:
2843 SWIG_croak_null();
2848 XS(_wrap_Video_id_get) {
2850 Video *arg1 = (Video *) 0 ;
2851 void *argp1 = 0 ;
2852 int res1 = 0 ;
2853 int argvi = 0;
2854 std::string *result = 0 ;
2855 dXSARGS;
2857 if ((items < 1) || (items > 1)) {
2858 SWIG_croak("Usage: Video_id_get(self);");
2860 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Video, 0 | 0 );
2861 if (!SWIG_IsOK(res1)) {
2862 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Video_id_get" "', argument " "1"" of type '" "Video *""'");
2864 arg1 = reinterpret_cast< Video * >(argp1);
2865 result = (std::string *) & ((arg1)->id);
2866 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
2868 XSRETURN(argvi);
2869 fail:
2871 SWIG_croak_null();
2876 XS(_wrap_Video_link_get) {
2878 Video *arg1 = (Video *) 0 ;
2879 void *argp1 = 0 ;
2880 int res1 = 0 ;
2881 int argvi = 0;
2882 Link *result = 0 ;
2883 dXSARGS;
2885 if ((items < 1) || (items > 1)) {
2886 SWIG_croak("Usage: Video_link_get(self);");
2888 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Video, 0 | 0 );
2889 if (!SWIG_IsOK(res1)) {
2890 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Video_link_get" "', argument " "1"" of type '" "Video *""'");
2892 arg1 = reinterpret_cast< Video * >(argp1);
2893 result = (Link *)& ((arg1)->link);
2894 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Link, 0 | SWIG_SHADOW); argvi++ ;
2896 XSRETURN(argvi);
2897 fail:
2899 SWIG_croak_null();
2904 XS(_wrap_Video_ok_get) {
2906 Video *arg1 = (Video *) 0 ;
2907 void *argp1 = 0 ;
2908 int res1 = 0 ;
2909 int argvi = 0;
2910 bool result;
2911 dXSARGS;
2913 if ((items < 1) || (items > 1)) {
2914 SWIG_croak("Usage: Video_ok_get(self);");
2916 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Video, 0 | 0 );
2917 if (!SWIG_IsOK(res1)) {
2918 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Video_ok_get" "', argument " "1"" of type '" "Video *""'");
2920 arg1 = reinterpret_cast< Video * >(argp1);
2921 result = (bool) ((arg1)->ok);
2922 ST(argvi) = SWIG_From_bool SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
2924 XSRETURN(argvi);
2925 fail:
2927 SWIG_croak_null();
2932 XS(_wrap_delete_Video) {
2934 Video *arg1 = (Video *) 0 ;
2935 void *argp1 = 0 ;
2936 int res1 = 0 ;
2937 int argvi = 0;
2938 dXSARGS;
2940 if ((items < 1) || (items > 1)) {
2941 SWIG_croak("Usage: delete_Video(self);");
2943 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Video, SWIG_POINTER_DISOWN | 0 );
2944 if (!SWIG_IsOK(res1)) {
2945 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Video" "', argument " "1"" of type '" "Video *""'");
2947 arg1 = reinterpret_cast< Video * >(argp1);
2948 delete arg1;
2949 ST(argvi) = sv_newmortal();
2951 XSRETURN(argvi);
2952 fail:
2954 SWIG_croak_null();
2959 XS(_wrap_new_Query) {
2961 int argvi = 0;
2962 Query *result = 0 ;
2963 dXSARGS;
2965 if ((items < 0) || (items > 0)) {
2966 SWIG_croak("Usage: new_Query();");
2971 result = (Query *)new Query();
2973 catch (const std::runtime_error& e)
2975 SWIG_exception (SWIG_RuntimeError, e.what ());
2978 ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2979 XSRETURN(argvi);
2980 fail:
2981 SWIG_croak_null();
2986 XS(_wrap_delete_Query) {
2988 Query *arg1 = (Query *) 0 ;
2989 void *argp1 = 0 ;
2990 int res1 = 0 ;
2991 int argvi = 0;
2992 dXSARGS;
2994 if ((items < 1) || (items > 1)) {
2995 SWIG_croak("Usage: delete_Query(self);");
2997 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Query, SWIG_POINTER_DISOWN | 0 );
2998 if (!SWIG_IsOK(res1)) {
2999 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Query" "', argument " "1"" of type '" "Query *""'");
3001 arg1 = reinterpret_cast< Query * >(argp1);
3005 delete arg1;
3007 catch (const std::runtime_error& e)
3009 SWIG_exception (SWIG_RuntimeError, e.what ());
3012 ST(argvi) = sv_newmortal();
3014 XSRETURN(argvi);
3015 fail:
3017 SWIG_croak_null();
3022 XS(_wrap_Query_parse) {
3024 Query *arg1 = (Query *) 0 ;
3025 std::string *arg2 = 0 ;
3026 Options *arg3 = 0 ;
3027 void *argp1 = 0 ;
3028 int res1 = 0 ;
3029 int res2 = SWIG_OLDOBJ ;
3030 void *argp3 ;
3031 int res3 = 0 ;
3032 int argvi = 0;
3033 Video result;
3034 dXSARGS;
3036 if ((items < 3) || (items > 3)) {
3037 SWIG_croak("Usage: Query_parse(self,std::string const &,Options const &);");
3039 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Query, 0 | 0 );
3040 if (!SWIG_IsOK(res1)) {
3041 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_parse" "', argument " "1"" of type '" "Query *""'");
3043 arg1 = reinterpret_cast< Query * >(argp1);
3045 std::string *ptr = (std::string *)0;
3046 res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
3047 if (!SWIG_IsOK(res2)) {
3048 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Query_parse" "', argument " "2"" of type '" "std::string const &""'");
3050 if (!ptr) {
3051 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Query_parse" "', argument " "2"" of type '" "std::string const &""'");
3053 arg2 = ptr;
3055 res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Options, 0 );
3056 if (!SWIG_IsOK(res3)) {
3057 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Query_parse" "', argument " "3"" of type '" "Options const &""'");
3059 if (!argp3) {
3060 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Query_parse" "', argument " "3"" of type '" "Options const &""'");
3062 arg3 = reinterpret_cast< Options * >(argp3);
3066 result = (arg1)->parse((std::string const &)*arg2,(Options const &)*arg3);
3068 catch (const std::runtime_error& e)
3070 SWIG_exception (SWIG_RuntimeError, e.what ());
3073 ST(argvi) = SWIG_NewPointerObj((new Video(static_cast< const Video& >(result))), SWIGTYPE_p_Video, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
3075 if (SWIG_IsNewObj(res2)) delete arg2;
3077 XSRETURN(argvi);
3078 fail:
3080 if (SWIG_IsNewObj(res2)) delete arg2;
3082 SWIG_croak_null();
3087 XS(_wrap_Query_next_website) {
3089 Query *arg1 = (Query *) 0 ;
3090 std::string *arg2 = 0 ;
3091 std::string *arg3 = 0 ;
3092 void *argp1 = 0 ;
3093 int res1 = 0 ;
3094 std::string temp2 ;
3095 int res2 = SWIG_TMPOBJ ;
3096 std::string temp3 ;
3097 int res3 = SWIG_TMPOBJ ;
3098 int argvi = 0;
3099 int result;
3100 dXSARGS;
3102 arg2 = &temp2;
3103 arg3 = &temp3;
3104 if ((items < 1) || (items > 1)) {
3105 SWIG_croak("Usage: Query_next_website(self);");
3107 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Query, 0 | 0 );
3108 if (!SWIG_IsOK(res1)) {
3109 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_next_website" "', argument " "1"" of type '" "Query *""'");
3111 arg1 = reinterpret_cast< Query * >(argp1);
3115 result = (int)(arg1)->next_website(*arg2,*arg3);
3117 catch (const std::runtime_error& e)
3119 SWIG_exception (SWIG_RuntimeError, e.what ());
3122 ST(argvi) = SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
3123 if (SWIG_IsTmpObj(res2)) {
3124 if (argvi >= items) EXTEND(sp,1); ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1((*arg2)); argvi++ ;
3125 } else {
3126 int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0) : 0;
3127 if (argvi >= items) EXTEND(sp,1); ST(argvi) = SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_std__string, new_flags); argvi++ ;
3129 if (SWIG_IsTmpObj(res3)) {
3130 if (argvi >= items) EXTEND(sp,1); ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1((*arg3)); argvi++ ;
3131 } else {
3132 int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0) : 0;
3133 if (argvi >= items) EXTEND(sp,1); ST(argvi) = SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_std__string, new_flags); argvi++ ;
3138 XSRETURN(argvi);
3139 fail:
3143 SWIG_croak_null();
3148 XS(_wrap_Query_last_error_get) {
3150 Query *arg1 = (Query *) 0 ;
3151 void *argp1 = 0 ;
3152 int res1 = 0 ;
3153 int argvi = 0;
3154 std::string *result = 0 ;
3155 dXSARGS;
3157 if ((items < 1) || (items > 1)) {
3158 SWIG_croak("Usage: Query_last_error_get(self);");
3160 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Query, 0 | 0 );
3161 if (!SWIG_IsOK(res1)) {
3162 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_last_error_get" "', argument " "1"" of type '" "Query *""'");
3164 arg1 = reinterpret_cast< Query * >(argp1);
3165 result = (std::string *) & ((arg1)->last_error);
3166 ST(argvi) = SWIG_From_std_string SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
3168 XSRETURN(argvi);
3169 fail:
3171 SWIG_croak_null();
3176 XS(_wrap_Query_quvi_code_get) {
3178 Query *arg1 = (Query *) 0 ;
3179 void *argp1 = 0 ;
3180 int res1 = 0 ;
3181 int argvi = 0;
3182 long result;
3183 dXSARGS;
3185 if ((items < 1) || (items > 1)) {
3186 SWIG_croak("Usage: Query_quvi_code_get(self);");
3188 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Query, 0 | 0 );
3189 if (!SWIG_IsOK(res1)) {
3190 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_quvi_code_get" "', argument " "1"" of type '" "Query *""'");
3192 arg1 = reinterpret_cast< Query * >(argp1);
3193 result = (long) ((arg1)->quvi_code);
3194 ST(argvi) = SWIG_From_long SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
3196 XSRETURN(argvi);
3197 fail:
3199 SWIG_croak_null();
3204 XS(_wrap_Query_resp_code_get) {
3206 Query *arg1 = (Query *) 0 ;
3207 void *argp1 = 0 ;
3208 int res1 = 0 ;
3209 int argvi = 0;
3210 long result;
3211 dXSARGS;
3213 if ((items < 1) || (items > 1)) {
3214 SWIG_croak("Usage: Query_resp_code_get(self);");
3216 res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Query, 0 | 0 );
3217 if (!SWIG_IsOK(res1)) {
3218 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_resp_code_get" "', argument " "1"" of type '" "Query *""'");
3220 arg1 = reinterpret_cast< Query * >(argp1);
3221 result = (long) ((arg1)->resp_code);
3222 ST(argvi) = SWIG_From_long SWIG_PERL_CALL_ARGS_1(static_cast< long >(result)); argvi++ ;
3224 XSRETURN(argvi);
3225 fail:
3227 SWIG_croak_null();
3233 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3235 static swig_type_info _swigt__p_Link = {"_p_Link", "Link *", 0, 0, (void*)"WWW::Quvi::Link", 0};
3236 static swig_type_info _swigt__p_Options = {"_p_Options", "Options *", 0, 0, (void*)"WWW::Quvi::Options", 0};
3237 static swig_type_info _swigt__p_Query = {"_p_Query", "Query *", 0, 0, (void*)"WWW::Quvi::Query", 0};
3238 static swig_type_info _swigt__p_Video = {"_p_Video", "Video *", 0, 0, (void*)"WWW::Quvi::Video", 0};
3239 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
3240 static swig_type_info _swigt__p_quviCategory = {"_p_quviCategory", "enum quviCategory *|quviCategory *", 0, 0, (void*)0, 0};
3241 static swig_type_info _swigt__p_quviCode = {"_p_quviCode", "enum quviCode *|quviCode *", 0, 0, (void*)0, 0};
3242 static swig_type_info _swigt__p_quviVersion = {"_p_quviVersion", "enum quviVersion *|quviVersion *", 0, 0, (void*)0, 0};
3243 static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
3245 static swig_type_info *swig_type_initial[] = {
3246 &_swigt__p_Link,
3247 &_swigt__p_Options,
3248 &_swigt__p_Query,
3249 &_swigt__p_Video,
3250 &_swigt__p_char,
3251 &_swigt__p_quviCategory,
3252 &_swigt__p_quviCode,
3253 &_swigt__p_quviVersion,
3254 &_swigt__p_std__string,
3257 static swig_cast_info _swigc__p_Link[] = { {&_swigt__p_Link, 0, 0, 0},{0, 0, 0, 0}};
3258 static swig_cast_info _swigc__p_Options[] = { {&_swigt__p_Options, 0, 0, 0},{0, 0, 0, 0}};
3259 static swig_cast_info _swigc__p_Query[] = { {&_swigt__p_Query, 0, 0, 0},{0, 0, 0, 0}};
3260 static swig_cast_info _swigc__p_Video[] = { {&_swigt__p_Video, 0, 0, 0},{0, 0, 0, 0}};
3261 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3262 static swig_cast_info _swigc__p_quviCategory[] = { {&_swigt__p_quviCategory, 0, 0, 0},{0, 0, 0, 0}};
3263 static swig_cast_info _swigc__p_quviCode[] = { {&_swigt__p_quviCode, 0, 0, 0},{0, 0, 0, 0}};
3264 static swig_cast_info _swigc__p_quviVersion[] = { {&_swigt__p_quviVersion, 0, 0, 0},{0, 0, 0, 0}};
3265 static swig_cast_info _swigc__p_std__string[] = { {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
3267 static swig_cast_info *swig_cast_initial[] = {
3268 _swigc__p_Link,
3269 _swigc__p_Options,
3270 _swigc__p_Query,
3271 _swigc__p_Video,
3272 _swigc__p_char,
3273 _swigc__p_quviCategory,
3274 _swigc__p_quviCode,
3275 _swigc__p_quviVersion,
3276 _swigc__p_std__string,
3280 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3282 static swig_constant_info swig_constants[] = {
3283 {0,0,0,0,0,0}
3285 #ifdef __cplusplus
3287 #endif
3288 static swig_variable_info swig_variables[] = {
3289 { "WWW::Quvic::_VERSION", MAGIC_CLASS _wrap__VERSION_set, MAGIC_CLASS _wrap__VERSION_get,0 },
3290 {0,0,0,0}
3292 static swig_command_info swig_commands[] = {
3293 {"WWW::Quvic::version", _wrap_version},
3294 {"WWW::Quvic::new_Options", _wrap_new_Options},
3295 {"WWW::Quvic::Options_user_agent_set", _wrap_Options_user_agent_set},
3296 {"WWW::Quvic::Options_user_agent_get", _wrap_Options_user_agent_get},
3297 {"WWW::Quvic::Options_http_proxy_set", _wrap_Options_http_proxy_set},
3298 {"WWW::Quvic::Options_http_proxy_get", _wrap_Options_http_proxy_get},
3299 {"WWW::Quvic::Options_verbose_libcurl_set", _wrap_Options_verbose_libcurl_set},
3300 {"WWW::Quvic::Options_verbose_libcurl_get", _wrap_Options_verbose_libcurl_get},
3301 {"WWW::Quvic::Options_format_set", _wrap_Options_format_set},
3302 {"WWW::Quvic::Options_format_get", _wrap_Options_format_get},
3303 {"WWW::Quvic::Options_verify_set", _wrap_Options_verify_set},
3304 {"WWW::Quvic::Options_verify_get", _wrap_Options_verify_get},
3305 {"WWW::Quvic::Options_shortened_set", _wrap_Options_shortened_set},
3306 {"WWW::Quvic::Options_shortened_get", _wrap_Options_shortened_get},
3307 {"WWW::Quvic::Options_category_set", _wrap_Options_category_set},
3308 {"WWW::Quvic::Options_category_get", _wrap_Options_category_get},
3309 {"WWW::Quvic::delete_Options", _wrap_delete_Options},
3310 {"WWW::Quvic::new_Link", _wrap_new_Link},
3311 {"WWW::Quvic::Link_content_type_get", _wrap_Link_content_type_get},
3312 {"WWW::Quvic::Link_file_suffix_get", _wrap_Link_file_suffix_get},
3313 {"WWW::Quvic::Link_length_bytes_get", _wrap_Link_length_bytes_get},
3314 {"WWW::Quvic::Link_url_get", _wrap_Link_url_get},
3315 {"WWW::Quvic::delete_Link", _wrap_delete_Link},
3316 {"WWW::Quvic::new_Video", _wrap_new_Video},
3317 {"WWW::Quvic::Video_title_get", _wrap_Video_title_get},
3318 {"WWW::Quvic::Video_host_get", _wrap_Video_host_get},
3319 {"WWW::Quvic::Video_url_get", _wrap_Video_url_get},
3320 {"WWW::Quvic::Video_id_get", _wrap_Video_id_get},
3321 {"WWW::Quvic::Video_link_get", _wrap_Video_link_get},
3322 {"WWW::Quvic::Video_ok_get", _wrap_Video_ok_get},
3323 {"WWW::Quvic::delete_Video", _wrap_delete_Video},
3324 {"WWW::Quvic::new_Query", _wrap_new_Query},
3325 {"WWW::Quvic::delete_Query", _wrap_delete_Query},
3326 {"WWW::Quvic::Query_parse", _wrap_Query_parse},
3327 {"WWW::Quvic::Query_next_website", _wrap_Query_next_website},
3328 {"WWW::Quvic::Query_last_error_get", _wrap_Query_last_error_get},
3329 {"WWW::Quvic::Query_quvi_code_get", _wrap_Query_quvi_code_get},
3330 {"WWW::Quvic::Query_resp_code_get", _wrap_Query_resp_code_get},
3331 {0,0}
3333 /* -----------------------------------------------------------------------------
3334 * Type initialization:
3335 * This problem is tough by the requirement that no dynamic
3336 * memory is used. Also, since swig_type_info structures store pointers to
3337 * swig_cast_info structures and swig_cast_info structures store pointers back
3338 * to swig_type_info structures, we need some lookup code at initialization.
3339 * The idea is that swig generates all the structures that are needed.
3340 * The runtime then collects these partially filled structures.
3341 * The SWIG_InitializeModule function takes these initial arrays out of
3342 * swig_module, and does all the lookup, filling in the swig_module.types
3343 * array with the correct data and linking the correct swig_cast_info
3344 * structures together.
3346 * The generated swig_type_info structures are assigned staticly to an initial
3347 * array. We just loop through that array, and handle each type individually.
3348 * First we lookup if this type has been already loaded, and if so, use the
3349 * loaded structure instead of the generated one. Then we have to fill in the
3350 * cast linked list. The cast data is initially stored in something like a
3351 * two-dimensional array. Each row corresponds to a type (there are the same
3352 * number of rows as there are in the swig_type_initial array). Each entry in
3353 * a column is one of the swig_cast_info structures for that type.
3354 * The cast_initial array is actually an array of arrays, because each row has
3355 * a variable number of columns. So to actually build the cast linked list,
3356 * we find the array of casts associated with the type, and loop through it
3357 * adding the casts to the list. The one last trick we need to do is making
3358 * sure the type pointer in the swig_cast_info struct is correct.
3360 * First off, we lookup the cast->type name to see if it is already loaded.
3361 * There are three cases to handle:
3362 * 1) If the cast->type has already been loaded AND the type we are adding
3363 * casting info to has not been loaded (it is in this module), THEN we
3364 * replace the cast->type pointer with the type pointer that has already
3365 * been loaded.
3366 * 2) If BOTH types (the one we are adding casting info to, and the
3367 * cast->type) are loaded, THEN the cast info has already been loaded by
3368 * the previous module so we just ignore it.
3369 * 3) Finally, if cast->type has not already been loaded, then we add that
3370 * swig_cast_info to the linked list (because the cast->type) pointer will
3371 * be correct.
3372 * ----------------------------------------------------------------------------- */
3374 #ifdef __cplusplus
3375 extern "C" {
3376 #if 0
3377 } /* c-mode */
3378 #endif
3379 #endif
3381 #if 0
3382 #define SWIGRUNTIME_DEBUG
3383 #endif
3386 SWIGRUNTIME void
3387 SWIG_InitializeModule(void *clientdata) {
3388 size_t i;
3389 swig_module_info *module_head, *iter;
3390 int found, init;
3392 clientdata = clientdata;
3394 /* check to see if the circular list has been setup, if not, set it up */
3395 if (swig_module.next==0) {
3396 /* Initialize the swig_module */
3397 swig_module.type_initial = swig_type_initial;
3398 swig_module.cast_initial = swig_cast_initial;
3399 swig_module.next = &swig_module;
3400 init = 1;
3401 } else {
3402 init = 0;
3405 /* Try and load any already created modules */
3406 module_head = SWIG_GetModule(clientdata);
3407 if (!module_head) {
3408 /* This is the first module loaded for this interpreter */
3409 /* so set the swig module into the interpreter */
3410 SWIG_SetModule(clientdata, &swig_module);
3411 module_head = &swig_module;
3412 } else {
3413 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3414 found=0;
3415 iter=module_head;
3416 do {
3417 if (iter==&swig_module) {
3418 found=1;
3419 break;
3421 iter=iter->next;
3422 } while (iter!= module_head);
3424 /* if the is found in the list, then all is done and we may leave */
3425 if (found) return;
3426 /* otherwise we must add out module into the list */
3427 swig_module.next = module_head->next;
3428 module_head->next = &swig_module;
3431 /* When multiple interpeters are used, a module could have already been initialized in
3432 a different interpreter, but not yet have a pointer in this interpreter.
3433 In this case, we do not want to continue adding types... everything should be
3434 set up already */
3435 if (init == 0) return;
3437 /* Now work on filling in swig_module.types */
3438 #ifdef SWIGRUNTIME_DEBUG
3439 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3440 #endif
3441 for (i = 0; i < swig_module.size; ++i) {
3442 swig_type_info *type = 0;
3443 swig_type_info *ret;
3444 swig_cast_info *cast;
3446 #ifdef SWIGRUNTIME_DEBUG
3447 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3448 #endif
3450 /* if there is another module already loaded */
3451 if (swig_module.next != &swig_module) {
3452 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
3454 if (type) {
3455 /* Overwrite clientdata field */
3456 #ifdef SWIGRUNTIME_DEBUG
3457 printf("SWIG_InitializeModule: found type %s\n", type->name);
3458 #endif
3459 if (swig_module.type_initial[i]->clientdata) {
3460 type->clientdata = swig_module.type_initial[i]->clientdata;
3461 #ifdef SWIGRUNTIME_DEBUG
3462 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3463 #endif
3465 } else {
3466 type = swig_module.type_initial[i];
3469 /* Insert casting types */
3470 cast = swig_module.cast_initial[i];
3471 while (cast->type) {
3472 /* Don't need to add information already in the list */
3473 ret = 0;
3474 #ifdef SWIGRUNTIME_DEBUG
3475 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3476 #endif
3477 if (swig_module.next != &swig_module) {
3478 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
3479 #ifdef SWIGRUNTIME_DEBUG
3480 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3481 #endif
3483 if (ret) {
3484 if (type == swig_module.type_initial[i]) {
3485 #ifdef SWIGRUNTIME_DEBUG
3486 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3487 #endif
3488 cast->type = ret;
3489 ret = 0;
3490 } else {
3491 /* Check for casting already in the list */
3492 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3493 #ifdef SWIGRUNTIME_DEBUG
3494 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3495 #endif
3496 if (!ocast) ret = 0;
3500 if (!ret) {
3501 #ifdef SWIGRUNTIME_DEBUG
3502 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3503 #endif
3504 if (type->cast) {
3505 type->cast->prev = cast;
3506 cast->next = type->cast;
3508 type->cast = cast;
3510 cast++;
3512 /* Set entry in modules->types array equal to the type */
3513 swig_module.types[i] = type;
3515 swig_module.types[i] = 0;
3517 #ifdef SWIGRUNTIME_DEBUG
3518 printf("**** SWIG_InitializeModule: Cast List ******\n");
3519 for (i = 0; i < swig_module.size; ++i) {
3520 int j = 0;
3521 swig_cast_info *cast = swig_module.cast_initial[i];
3522 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3523 while (cast->type) {
3524 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3525 cast++;
3526 ++j;
3528 printf("---- Total casts: %d\n",j);
3530 printf("**** SWIG_InitializeModule: Cast List ******\n");
3531 #endif
3534 /* This function will propagate the clientdata field of type to
3535 * any new swig_type_info structures that have been added into the list
3536 * of equivalent types. It is like calling
3537 * SWIG_TypeClientData(type, clientdata) a second time.
3539 SWIGRUNTIME void
3540 SWIG_PropagateClientData(void) {
3541 size_t i;
3542 swig_cast_info *equiv;
3543 static int init_run = 0;
3545 if (init_run) return;
3546 init_run = 1;
3548 for (i = 0; i < swig_module.size; i++) {
3549 if (swig_module.types[i]->clientdata) {
3550 equiv = swig_module.types[i]->cast;
3551 while (equiv) {
3552 if (!equiv->converter) {
3553 if (equiv->type && !equiv->type->clientdata)
3554 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
3556 equiv = equiv->next;
3562 #ifdef __cplusplus
3563 #if 0
3565 /* c-mode */
3566 #endif
3568 #endif
3572 #ifdef __cplusplus
3573 extern "C"
3574 #endif
3576 XS(SWIG_init) {
3577 dXSARGS;
3578 int i;
3580 SWIG_InitializeModule(0);
3582 /* Install commands */
3583 for (i = 0; swig_commands[i].name; i++) {
3584 newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
3587 /* Install variables */
3588 for (i = 0; swig_variables[i].name; i++) {
3589 SV *sv;
3590 sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
3591 if (swig_variables[i].type) {
3592 SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
3593 } else {
3594 sv_setiv(sv,(IV) 0);
3596 swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
3599 /* Install constant */
3600 for (i = 0; swig_constants[i].type; i++) {
3601 SV *sv;
3602 sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
3603 switch(swig_constants[i].type) {
3604 case SWIG_INT:
3605 sv_setiv(sv, (IV) swig_constants[i].lvalue);
3606 break;
3607 case SWIG_FLOAT:
3608 sv_setnv(sv, (double) swig_constants[i].dvalue);
3609 break;
3610 case SWIG_STRING:
3611 sv_setpv(sv, (char *) swig_constants[i].pvalue);
3612 break;
3613 case SWIG_POINTER:
3614 SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
3615 break;
3616 case SWIG_BINARY:
3617 SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
3618 break;
3619 default:
3620 break;
3622 SvREADONLY_on(sv);
3625 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3626 SV *sv = get_sv((char*) SWIG_prefix "libquviVersion", TRUE | 0x2 | GV_ADDMULTI);
3627 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(libquviVersion)));
3628 SvREADONLY_on(sv);
3629 } while(0) /*@SWIG@*/;
3630 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3631 SV *sv = get_sv((char*) SWIG_prefix "libquviVersionLong", TRUE | 0x2 | GV_ADDMULTI);
3632 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(libquviVersionLong)));
3633 SvREADONLY_on(sv);
3634 } while(0) /*@SWIG@*/;
3635 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3636 SV *sv = get_sv((char*) SWIG_prefix "ModuleVersion", TRUE | 0x2 | GV_ADDMULTI);
3637 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(ModuleVersion)));
3638 SvREADONLY_on(sv);
3639 } while(0) /*@SWIG@*/;
3640 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3641 SV *sv = get_sv((char*) SWIG_prefix "OK", TRUE | 0x2 | GV_ADDMULTI);
3642 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(OK)));
3643 SvREADONLY_on(sv);
3644 } while(0) /*@SWIG@*/;
3645 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3646 SV *sv = get_sv((char*) SWIG_prefix "Mem", TRUE | 0x2 | GV_ADDMULTI);
3647 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Mem)));
3648 SvREADONLY_on(sv);
3649 } while(0) /*@SWIG@*/;
3650 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3651 SV *sv = get_sv((char*) SWIG_prefix "BadHandle", TRUE | 0x2 | GV_ADDMULTI);
3652 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(BadHandle)));
3653 SvREADONLY_on(sv);
3654 } while(0) /*@SWIG@*/;
3655 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3656 SV *sv = get_sv((char*) SWIG_prefix "InvArg", TRUE | 0x2 | GV_ADDMULTI);
3657 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(InvArg)));
3658 SvREADONLY_on(sv);
3659 } while(0) /*@SWIG@*/;
3660 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3661 SV *sv = get_sv((char*) SWIG_prefix "CurlInit", TRUE | 0x2 | GV_ADDMULTI);
3662 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(CurlInit)));
3663 SvREADONLY_on(sv);
3664 } while(0) /*@SWIG@*/;
3665 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3666 SV *sv = get_sv((char*) SWIG_prefix "Last", TRUE | 0x2 | GV_ADDMULTI);
3667 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(Last)));
3668 SvREADONLY_on(sv);
3669 } while(0) /*@SWIG@*/;
3670 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3671 SV *sv = get_sv((char*) SWIG_prefix "AbortedByCallback", TRUE | 0x2 | GV_ADDMULTI);
3672 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(AbortedByCallback)));
3673 SvREADONLY_on(sv);
3674 } while(0) /*@SWIG@*/;
3675 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3676 SV *sv = get_sv((char*) SWIG_prefix "LuaInit", TRUE | 0x2 | GV_ADDMULTI);
3677 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(LuaInit)));
3678 SvREADONLY_on(sv);
3679 } while(0) /*@SWIG@*/;
3680 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3681 SV *sv = get_sv((char*) SWIG_prefix "NoLuaWebsite", TRUE | 0x2 | GV_ADDMULTI);
3682 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(NoLuaWebsite)));
3683 SvREADONLY_on(sv);
3684 } while(0) /*@SWIG@*/;
3685 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3686 SV *sv = get_sv((char*) SWIG_prefix "NoLuaUtil", TRUE | 0x2 | GV_ADDMULTI);
3687 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(NoLuaUtil)));
3688 SvREADONLY_on(sv);
3689 } while(0) /*@SWIG@*/;
3690 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3691 SV *sv = get_sv((char*) SWIG_prefix "PcreError", TRUE | 0x2 | GV_ADDMULTI);
3692 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(PcreError)));
3693 SvREADONLY_on(sv);
3694 } while(0) /*@SWIG@*/;
3695 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3696 SV *sv = get_sv((char*) SWIG_prefix "NoSupport", TRUE | 0x2 | GV_ADDMULTI);
3697 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(NoSupport)));
3698 SvREADONLY_on(sv);
3699 } while(0) /*@SWIG@*/;
3700 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3701 SV *sv = get_sv((char*) SWIG_prefix "CurlError", TRUE | 0x2 | GV_ADDMULTI);
3702 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(CurlError)));
3703 SvREADONLY_on(sv);
3704 } while(0) /*@SWIG@*/;
3705 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3706 SV *sv = get_sv((char*) SWIG_prefix "IconvError", TRUE | 0x2 | GV_ADDMULTI);
3707 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(IconvError)));
3708 SvREADONLY_on(sv);
3709 } while(0) /*@SWIG@*/;
3710 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3711 SV *sv = get_sv((char*) SWIG_prefix "LuaError", TRUE | 0x2 | GV_ADDMULTI);
3712 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(LuaError)));
3713 SvREADONLY_on(sv);
3714 } while(0) /*@SWIG@*/;
3715 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3716 SV *sv = get_sv((char*) SWIG_prefix "ProtoHttp", TRUE | 0x2 | GV_ADDMULTI);
3717 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(ProtoHttp)));
3718 SvREADONLY_on(sv);
3719 } while(0) /*@SWIG@*/;
3720 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3721 SV *sv = get_sv((char*) SWIG_prefix "ProtoMms", TRUE | 0x2 | GV_ADDMULTI);
3722 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(ProtoMms)));
3723 SvREADONLY_on(sv);
3724 } while(0) /*@SWIG@*/;
3725 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3726 SV *sv = get_sv((char*) SWIG_prefix "ProtoRtsp", TRUE | 0x2 | GV_ADDMULTI);
3727 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(ProtoRtsp)));
3728 SvREADONLY_on(sv);
3729 } while(0) /*@SWIG@*/;
3730 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3731 SV *sv = get_sv((char*) SWIG_prefix "ProtoRtmp", TRUE | 0x2 | GV_ADDMULTI);
3732 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(ProtoRtmp)));
3733 SvREADONLY_on(sv);
3734 } while(0) /*@SWIG@*/;
3735 /*@SWIG:/usr/share/swig/2.0.1/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3736 SV *sv = get_sv((char*) SWIG_prefix "ProtoAll", TRUE | 0x2 | GV_ADDMULTI);
3737 sv_setsv(sv, SWIG_From_int SWIG_PERL_CALL_ARGS_1(static_cast< int >(ProtoAll)));
3738 SvREADONLY_on(sv);
3739 } while(0) /*@SWIG@*/;
3740 SWIG_TypeClientData(SWIGTYPE_p_Options, (void*) "WWW::Quvi::Options");
3741 SWIG_TypeClientData(SWIGTYPE_p_Link, (void*) "WWW::Quvi::Link");
3742 SWIG_TypeClientData(SWIGTYPE_p_Video, (void*) "WWW::Quvi::Video");
3743 SWIG_TypeClientData(SWIGTYPE_p_Query, (void*) "WWW::Quvi::Query");
3744 ST(0) = &PL_sv_yes;
3745 XSRETURN(1);