1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 3.0.7
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  * ----------------------------------------------------------------------------- */
10 
11 #include "../config/config.h"
12 
13 
14 #define SWIGPERL
15 #define SWIG_CASTRANK_MODE
16 
17 /* -----------------------------------------------------------------------------
18  *  This section contains generic SWIG labels for method/variable
19  *  declarations/attributes, and other compiler dependent labels.
20  * ----------------------------------------------------------------------------- */
21 
22 /* template workaround for compilers that cannot correctly implement the C++ standard */
23 #ifndef SWIGTEMPLATEDISAMBIGUATOR
24 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
25 #  define SWIGTEMPLATEDISAMBIGUATOR template
26 # elif defined(__HP_aCC)
27 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
28 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
29 #  define SWIGTEMPLATEDISAMBIGUATOR template
30 # else
31 #  define SWIGTEMPLATEDISAMBIGUATOR
32 # endif
33 #endif
34 
35 /* inline attribute */
36 #ifndef SWIGINLINE
37 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
38 #   define SWIGINLINE inline
39 # else
40 #   define SWIGINLINE
41 # endif
42 #endif
43 
44 /* attribute recognised by some compilers to avoid 'unused' warnings */
45 #ifndef SWIGUNUSED
46 # if defined(__GNUC__)
47 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
48 #     define SWIGUNUSED __attribute__ ((__unused__))
49 #   else
50 #     define SWIGUNUSED
51 #   endif
52 # elif defined(__ICC)
53 #   define SWIGUNUSED __attribute__ ((__unused__))
54 # else
55 #   define SWIGUNUSED
56 # endif
57 #endif
58 
59 #ifndef SWIG_MSC_UNSUPPRESS_4505
60 # if defined(_MSC_VER)
61 #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
62 # endif
63 #endif
64 
65 #ifndef SWIGUNUSEDPARM
66 # ifdef __cplusplus
67 #   define SWIGUNUSEDPARM(p)
68 # else
69 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
70 # endif
71 #endif
72 
73 /* internal SWIG method */
74 #ifndef SWIGINTERN
75 # define SWIGINTERN static SWIGUNUSED
76 #endif
77 
78 /* internal inline SWIG method */
79 #ifndef SWIGINTERNINLINE
80 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
81 #endif
82 
83 /* exporting methods */
84 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
85 #  ifndef GCC_HASCLASSVISIBILITY
86 #    define GCC_HASCLASSVISIBILITY
87 #  endif
88 #endif
89 
90 #ifndef SWIGEXPORT
91 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
92 #   if defined(STATIC_LINKED)
93 #     define SWIGEXPORT
94 #   else
95 #     define SWIGEXPORT __declspec(dllexport)
96 #   endif
97 # else
98 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
99 #     define SWIGEXPORT __attribute__ ((visibility("default")))
100 #   else
101 #     define SWIGEXPORT
102 #   endif
103 # endif
104 #endif
105 
106 /* calling conventions for Windows */
107 #ifndef SWIGSTDCALL
108 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
109 #   define SWIGSTDCALL __stdcall
110 # else
111 #   define SWIGSTDCALL
112 # endif
113 #endif
114 
115 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
116 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
117 # define _CRT_SECURE_NO_DEPRECATE
118 #endif
119 
120 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
121 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
122 # define _SCL_SECURE_NO_DEPRECATE
123 #endif
124 
125 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
126 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
127 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
128 #endif
129 
130 /* Intel's compiler complains if a variable which was never initialised is
131  * cast to void, which is a common idiom which we use to indicate that we
132  * are aware a variable isn't used.  So we just silence that warning.
133  * See: https://github.com/swig/swig/issues/192 for more discussion.
134  */
135 #ifdef __INTEL_COMPILER
136 # pragma warning disable 592
137 #endif
138 
139 /* -----------------------------------------------------------------------------
140  * swigrun.swg
141  *
142  * This file contains generic C API SWIG runtime support for pointer
143  * type checking.
144  * ----------------------------------------------------------------------------- */
145 
146 /* This should only be incremented when either the layout of swig_type_info changes,
147    or for whatever reason, the runtime changes incompatibly */
148 #define SWIG_RUNTIME_VERSION "4"
149 
150 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
151 #ifdef SWIG_TYPE_TABLE
152 # define SWIG_QUOTE_STRING(x) #x
153 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
154 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
155 #else
156 # define SWIG_TYPE_TABLE_NAME
157 #endif
158 
159 /*
160   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
161   creating a static or dynamic library from the SWIG runtime code.
162   In 99.9% of the cases, SWIG just needs to declare them as 'static'.
163 
164   But only do this if strictly necessary, ie, if you have problems
165   with your compiler or suchlike.
166 */
167 
168 #ifndef SWIGRUNTIME
169 # define SWIGRUNTIME SWIGINTERN
170 #endif
171 
172 #ifndef SWIGRUNTIMEINLINE
173 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
174 #endif
175 
176 /*  Generic buffer size */
177 #ifndef SWIG_BUFFER_SIZE
178 # define SWIG_BUFFER_SIZE 1024
179 #endif
180 
181 /* Flags for pointer conversions */
182 #define SWIG_POINTER_DISOWN        0x1
183 #define SWIG_CAST_NEW_MEMORY       0x2
184 
185 /* Flags for new pointer objects */
186 #define SWIG_POINTER_OWN           0x1
187 
188 
189 /*
190    Flags/methods for returning states.
191 
192    The SWIG conversion methods, as ConvertPtr, return an integer
193    that tells if the conversion was successful or not. And if not,
194    an error code can be returned (see swigerrors.swg for the codes).
195 
196    Use the following macros/flags to set or process the returning
197    states.
198 
199    In old versions of SWIG, code such as the following was usually written:
200 
201      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
202        // success code
203      } else {
204        //fail code
205      }
206 
207    Now you can be more explicit:
208 
209     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
210     if (SWIG_IsOK(res)) {
211       // success code
212     } else {
213       // fail code
214     }
215 
216    which is the same really, but now you can also do
217 
218     Type *ptr;
219     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
220     if (SWIG_IsOK(res)) {
221       // success code
222       if (SWIG_IsNewObj(res) {
223         ...
224 	delete *ptr;
225       } else {
226         ...
227       }
228     } else {
229       // fail code
230     }
231 
232    I.e., now SWIG_ConvertPtr can return new objects and you can
233    identify the case and take care of the deallocation. Of course that
234    also requires SWIG_ConvertPtr to return new result values, such as
235 
236       int SWIG_ConvertPtr(obj, ptr,...) {
237         if (<obj is ok>) {
238           if (<need new object>) {
239             *ptr = <ptr to new allocated object>;
240             return SWIG_NEWOBJ;
241           } else {
242             *ptr = <ptr to old object>;
243             return SWIG_OLDOBJ;
244           }
245         } else {
246           return SWIG_BADOBJ;
247         }
248       }
249 
250    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
251    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
252    SWIG errors code.
253 
254    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
255    allows to return the 'cast rank', for example, if you have this
256 
257        int food(double)
258        int fooi(int);
259 
260    and you call
261 
262       food(1)   // cast rank '1'  (1 -> 1.0)
263       fooi(1)   // cast rank '0'
264 
265    just use the SWIG_AddCast()/SWIG_CheckState()
266 */
267 
268 #define SWIG_OK                    (0)
269 #define SWIG_ERROR                 (-1)
270 #define SWIG_IsOK(r)               (r >= 0)
271 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)
272 
273 /* The CastRankLimit says how many bits are used for the cast rank */
274 #define SWIG_CASTRANKLIMIT         (1 << 8)
275 /* The NewMask denotes the object was created (using new/malloc) */
276 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
277 /* The TmpMask is for in/out typemaps that use temporal objects */
278 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
279 /* Simple returning values */
280 #define SWIG_BADOBJ                (SWIG_ERROR)
281 #define SWIG_OLDOBJ                (SWIG_OK)
282 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
283 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
284 /* Check, add and del mask methods */
285 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
286 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
287 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
288 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
289 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
290 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
291 
292 /* Cast-Rank Mode */
293 #if defined(SWIG_CASTRANK_MODE)
294 #  ifndef SWIG_TypeRank
295 #    define SWIG_TypeRank             unsigned long
296 #  endif
297 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
298 #    define SWIG_MAXCASTRANK          (2)
299 #  endif
300 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
301 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIG_AddCast(int r)302 SWIGINTERNINLINE int SWIG_AddCast(int r) {
303   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
304 }
SWIG_CheckState(int r)305 SWIGINTERNINLINE int SWIG_CheckState(int r) {
306   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
307 }
308 #else /* no cast-rank mode */
309 #  define SWIG_AddCast(r) (r)
310 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
311 #endif
312 
313 
314 #include <string.h>
315 
316 #ifdef __cplusplus
317 extern "C" {
318 #endif
319 
320 typedef void *(*swig_converter_func)(void *, int *);
321 typedef struct swig_type_info *(*swig_dycast_func)(void **);
322 
323 /* Structure to store information on one type */
324 typedef struct swig_type_info {
325   const char             *name;			/* mangled name of this type */
326   const char             *str;			/* human readable name of this type */
327   swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
328   struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
329   void                   *clientdata;		/* language specific type data */
330   int                    owndata;		/* flag if the structure owns the clientdata */
331 } swig_type_info;
332 
333 /* Structure to store a type and conversion function used for casting */
334 typedef struct swig_cast_info {
335   swig_type_info         *type;			/* pointer to type that is equivalent to this type */
336   swig_converter_func     converter;		/* function to cast the void pointers */
337   struct swig_cast_info  *next;			/* pointer to next cast in linked list */
338   struct swig_cast_info  *prev;			/* pointer to the previous cast */
339 } swig_cast_info;
340 
341 /* Structure used to store module information
342  * Each module generates one structure like this, and the runtime collects
343  * all of these structures and stores them in a circularly linked list.*/
344 typedef struct swig_module_info {
345   swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
346   size_t                 size;		        /* Number of types in this module */
347   struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
348   swig_type_info         **type_initial;	/* Array of initially generated type structures */
349   swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
350   void                    *clientdata;		/* Language specific module data */
351 } swig_module_info;
352 
353 /*
354   Compare two type names skipping the space characters, therefore
355   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
356 
357   Return 0 when the two name types are equivalent, as in
358   strncmp, but skipping ' '.
359 */
360 SWIGRUNTIME int
SWIG_TypeNameComp(const char * f1,const char * l1,const char * f2,const char * l2)361 SWIG_TypeNameComp(const char *f1, const char *l1,
362 		  const char *f2, const char *l2) {
363   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
364     while ((*f1 == ' ') && (f1 != l1)) ++f1;
365     while ((*f2 == ' ') && (f2 != l2)) ++f2;
366     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
367   }
368   return (int)((l1 - f1) - (l2 - f2));
369 }
370 
371 /*
372   Check type equivalence in a name list like <name1>|<name2>|...
373   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
374 */
375 SWIGRUNTIME int
SWIG_TypeCmp(const char * nb,const char * tb)376 SWIG_TypeCmp(const char *nb, const char *tb) {
377   int equiv = 1;
378   const char* te = tb + strlen(tb);
379   const char* ne = nb;
380   while (equiv != 0 && *ne) {
381     for (nb = ne; *ne; ++ne) {
382       if (*ne == '|') break;
383     }
384     equiv = SWIG_TypeNameComp(nb, ne, tb, te);
385     if (*ne) ++ne;
386   }
387   return equiv;
388 }
389 
390 /*
391   Check type equivalence in a name list like <name1>|<name2>|...
392   Return 0 if not equal, 1 if equal
393 */
394 SWIGRUNTIME int
SWIG_TypeEquiv(const char * nb,const char * tb)395 SWIG_TypeEquiv(const char *nb, const char *tb) {
396   return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
397 }
398 
399 /*
400   Check the typename
401 */
402 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char * c,swig_type_info * ty)403 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
404   if (ty) {
405     swig_cast_info *iter = ty->cast;
406     while (iter) {
407       if (strcmp(iter->type->name, c) == 0) {
408         if (iter == ty->cast)
409           return iter;
410         /* Move iter to the top of the linked list */
411         iter->prev->next = iter->next;
412         if (iter->next)
413           iter->next->prev = iter->prev;
414         iter->next = ty->cast;
415         iter->prev = 0;
416         if (ty->cast) ty->cast->prev = iter;
417         ty->cast = iter;
418         return iter;
419       }
420       iter = iter->next;
421     }
422   }
423   return 0;
424 }
425 
426 /*
427   Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
428 */
429 SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info * from,swig_type_info * ty)430 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
431   if (ty) {
432     swig_cast_info *iter = ty->cast;
433     while (iter) {
434       if (iter->type == from) {
435         if (iter == ty->cast)
436           return iter;
437         /* Move iter to the top of the linked list */
438         iter->prev->next = iter->next;
439         if (iter->next)
440           iter->next->prev = iter->prev;
441         iter->next = ty->cast;
442         iter->prev = 0;
443         if (ty->cast) ty->cast->prev = iter;
444         ty->cast = iter;
445         return iter;
446       }
447       iter = iter->next;
448     }
449   }
450   return 0;
451 }
452 
453 /*
454   Cast a pointer up an inheritance hierarchy
455 */
456 SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info * ty,void * ptr,int * newmemory)457 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
458   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
459 }
460 
461 /*
462    Dynamic pointer casting. Down an inheritance hierarchy
463 */
464 SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info * ty,void ** ptr)465 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
466   swig_type_info *lastty = ty;
467   if (!ty || !ty->dcast) return ty;
468   while (ty && (ty->dcast)) {
469     ty = (*ty->dcast)(ptr);
470     if (ty) lastty = ty;
471   }
472   return lastty;
473 }
474 
475 /*
476   Return the name associated with this type
477 */
478 SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info * ty)479 SWIG_TypeName(const swig_type_info *ty) {
480   return ty->name;
481 }
482 
483 /*
484   Return the pretty name associated with this type,
485   that is an unmangled type name in a form presentable to the user.
486 */
487 SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info * type)488 SWIG_TypePrettyName(const swig_type_info *type) {
489   /* The "str" field contains the equivalent pretty names of the
490      type, separated by vertical-bar characters.  We choose
491      to print the last name, as it is often (?) the most
492      specific. */
493   if (!type) return NULL;
494   if (type->str != NULL) {
495     const char *last_name = type->str;
496     const char *s;
497     for (s = type->str; *s; s++)
498       if (*s == '|') last_name = s+1;
499     return last_name;
500   }
501   else
502     return type->name;
503 }
504 
505 /*
506    Set the clientdata field for a type
507 */
508 SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info * ti,void * clientdata)509 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
510   swig_cast_info *cast = ti->cast;
511   /* if (ti->clientdata == clientdata) return; */
512   ti->clientdata = clientdata;
513 
514   while (cast) {
515     if (!cast->converter) {
516       swig_type_info *tc = cast->type;
517       if (!tc->clientdata) {
518 	SWIG_TypeClientData(tc, clientdata);
519       }
520     }
521     cast = cast->next;
522   }
523 }
524 SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info * ti,void * clientdata)525 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
526   SWIG_TypeClientData(ti, clientdata);
527   ti->owndata = 1;
528 }
529 
530 /*
531   Search for a swig_type_info structure only by mangled name
532   Search is a O(log #types)
533 
534   We start searching at module start, and finish searching when start == end.
535   Note: if start == end at the beginning of the function, we go all the way around
536   the circular list.
537 */
538 SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)539 SWIG_MangledTypeQueryModule(swig_module_info *start,
540                             swig_module_info *end,
541 		            const char *name) {
542   swig_module_info *iter = start;
543   do {
544     if (iter->size) {
545       size_t l = 0;
546       size_t r = iter->size - 1;
547       do {
548 	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
549 	size_t i = (l + r) >> 1;
550 	const char *iname = iter->types[i]->name;
551 	if (iname) {
552 	  int compare = strcmp(name, iname);
553 	  if (compare == 0) {
554 	    return iter->types[i];
555 	  } else if (compare < 0) {
556 	    if (i) {
557 	      r = i - 1;
558 	    } else {
559 	      break;
560 	    }
561 	  } else if (compare > 0) {
562 	    l = i + 1;
563 	  }
564 	} else {
565 	  break; /* should never happen */
566 	}
567       } while (l <= r);
568     }
569     iter = iter->next;
570   } while (iter != end);
571   return 0;
572 }
573 
574 /*
575   Search for a swig_type_info structure for either a mangled name or a human readable name.
576   It first searches the mangled names of the types, which is a O(log #types)
577   If a type is not found it then searches the human readable names, which is O(#types).
578 
579   We start searching at module start, and finish searching when start == end.
580   Note: if start == end at the beginning of the function, we go all the way around
581   the circular list.
582 */
583 SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info * start,swig_module_info * end,const char * name)584 SWIG_TypeQueryModule(swig_module_info *start,
585                      swig_module_info *end,
586 		     const char *name) {
587   /* STEP 1: Search the name field using binary search */
588   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
589   if (ret) {
590     return ret;
591   } else {
592     /* STEP 2: If the type hasn't been found, do a complete search
593        of the str field (the human readable name) */
594     swig_module_info *iter = start;
595     do {
596       size_t i = 0;
597       for (; i < iter->size; ++i) {
598 	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
599 	  return iter->types[i];
600       }
601       iter = iter->next;
602     } while (iter != end);
603   }
604 
605   /* neither found a match */
606   return 0;
607 }
608 
609 /*
610    Pack binary data into a string
611 */
612 SWIGRUNTIME char *
SWIG_PackData(char * c,void * ptr,size_t sz)613 SWIG_PackData(char *c, void *ptr, size_t sz) {
614   static const char hex[17] = "0123456789abcdef";
615   const unsigned char *u = (unsigned char *) ptr;
616   const unsigned char *eu =  u + sz;
617   for (; u != eu; ++u) {
618     unsigned char uu = *u;
619     *(c++) = hex[(uu & 0xf0) >> 4];
620     *(c++) = hex[uu & 0xf];
621   }
622   return c;
623 }
624 
625 /*
626    Unpack binary data from a string
627 */
628 SWIGRUNTIME const char *
SWIG_UnpackData(const char * c,void * ptr,size_t sz)629 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
630   unsigned char *u = (unsigned char *) ptr;
631   const unsigned char *eu = u + sz;
632   for (; u != eu; ++u) {
633     char d = *(c++);
634     unsigned char uu;
635     if ((d >= '0') && (d <= '9'))
636       uu = ((d - '0') << 4);
637     else if ((d >= 'a') && (d <= 'f'))
638       uu = ((d - ('a'-10)) << 4);
639     else
640       return (char *) 0;
641     d = *(c++);
642     if ((d >= '0') && (d <= '9'))
643       uu |= (d - '0');
644     else if ((d >= 'a') && (d <= 'f'))
645       uu |= (d - ('a'-10));
646     else
647       return (char *) 0;
648     *u = uu;
649   }
650   return c;
651 }
652 
653 /*
654    Pack 'void *' into a string buffer.
655 */
656 SWIGRUNTIME char *
SWIG_PackVoidPtr(char * buff,void * ptr,const char * name,size_t bsz)657 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
658   char *r = buff;
659   if ((2*sizeof(void *) + 2) > bsz) return 0;
660   *(r++) = '_';
661   r = SWIG_PackData(r,&ptr,sizeof(void *));
662   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
663   strcpy(r,name);
664   return buff;
665 }
666 
667 SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char * c,void ** ptr,const char * name)668 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
669   if (*c != '_') {
670     if (strcmp(c,"NULL") == 0) {
671       *ptr = (void *) 0;
672       return name;
673     } else {
674       return 0;
675     }
676   }
677   return SWIG_UnpackData(++c,ptr,sizeof(void *));
678 }
679 
680 SWIGRUNTIME char *
SWIG_PackDataName(char * buff,void * ptr,size_t sz,const char * name,size_t bsz)681 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
682   char *r = buff;
683   size_t lname = (name ? strlen(name) : 0);
684   if ((2*sz + 2 + lname) > bsz) return 0;
685   *(r++) = '_';
686   r = SWIG_PackData(r,ptr,sz);
687   if (lname) {
688     strncpy(r,name,lname+1);
689   } else {
690     *r = 0;
691   }
692   return buff;
693 }
694 
695 SWIGRUNTIME const char *
SWIG_UnpackDataName(const char * c,void * ptr,size_t sz,const char * name)696 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
697   if (*c != '_') {
698     if (strcmp(c,"NULL") == 0) {
699       memset(ptr,0,sz);
700       return name;
701     } else {
702       return 0;
703     }
704   }
705   return SWIG_UnpackData(++c,ptr,sz);
706 }
707 
708 #ifdef __cplusplus
709 }
710 #endif
711 
712 /*  Errors in SWIG */
713 #define  SWIG_UnknownError    	   -1
714 #define  SWIG_IOError        	   -2
715 #define  SWIG_RuntimeError   	   -3
716 #define  SWIG_IndexError     	   -4
717 #define  SWIG_TypeError      	   -5
718 #define  SWIG_DivisionByZero 	   -6
719 #define  SWIG_OverflowError  	   -7
720 #define  SWIG_SyntaxError    	   -8
721 #define  SWIG_ValueError     	   -9
722 #define  SWIG_SystemError    	   -10
723 #define  SWIG_AttributeError 	   -11
724 #define  SWIG_MemoryError    	   -12
725 #define  SWIG_NullReferenceError   -13
726 
727 
728 
729 #ifdef __cplusplus
730 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
731 #include <math.h>
732 #include <stdlib.h>
733 extern "C" {
734 #endif
735 #include "EXTERN.h"
736 #include "perl.h"
737 #include "XSUB.h"
738 
739 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
740 
741 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
742 #ifndef PERL_REVISION
743 #  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
744 #    define PERL_PATCHLEVEL_H_IMPLICIT
745 #    include <patchlevel.h>
746 #  endif
747 #  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
748 #    include <could_not_find_Perl_patchlevel.h>
749 #  endif
750 #  ifndef PERL_REVISION
751 #    define PERL_REVISION       (5)
752 #    define PERL_VERSION        PATCHLEVEL
753 #    define PERL_SUBVERSION     SUBVERSION
754 #  endif
755 #endif
756 
757 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
758 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
759 #endif
760 
761 #ifndef SvIOK_UV
762 # define SvIOK_UV(sv)       (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
763 #endif
764 
765 #ifndef SvUOK
766 # define SvUOK(sv)           SvIOK_UV(sv)
767 #endif
768 
769 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
770 #  define PL_sv_undef               sv_undef
771 #  define PL_na	                    na
772 #  define PL_errgv                  errgv
773 #  define PL_sv_no                  sv_no
774 #  define PL_sv_yes                 sv_yes
775 #  define PL_markstack_ptr          markstack_ptr
776 #endif
777 
778 #ifndef IVSIZE
779 #  ifdef LONGSIZE
780 #    define IVSIZE LONGSIZE
781 #  else
782 #    define IVSIZE 4 /* A bold guess, but the best we can make. */
783 #  endif
784 #endif
785 
786 #ifndef INT2PTR
787 #  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
788 #    define PTRV                  UV
789 #    define INT2PTR(any,d)        (any)(d)
790 #  else
791 #    if PTRSIZE == LONGSIZE
792 #      define PTRV                unsigned long
793 #    else
794 #      define PTRV                unsigned
795 #    endif
796 #    define INT2PTR(any,d)        (any)(PTRV)(d)
797 #  endif
798 
799 #  define NUM2PTR(any,d)  (any)(PTRV)(d)
800 #  define PTR2IV(p)       INT2PTR(IV,p)
801 #  define PTR2UV(p)       INT2PTR(UV,p)
802 #  define PTR2NV(p)       NUM2PTR(NV,p)
803 
804 #  if PTRSIZE == LONGSIZE
805 #    define PTR2ul(p)     (unsigned long)(p)
806 #  else
807 #    define PTR2ul(p)     INT2PTR(unsigned long,p)
808 #  endif
809 #endif /* !INT2PTR */
810 
811 #ifndef SvPV_nolen
812 # define SvPV_nolen(x) SvPV(x,PL_na)
813 #endif
814 
815 #ifndef get_sv
816 #  define get_sv perl_get_sv
817 #endif
818 
819 #ifndef ERRSV
820 #  define ERRSV get_sv("@",FALSE)
821 #endif
822 
823 #ifndef pTHX_
824 #define pTHX_
825 #endif
826 
827 #include <string.h>
828 #ifdef __cplusplus
829 }
830 #endif
831 
832 /* -----------------------------------------------------------------------------
833  * error manipulation
834  * ----------------------------------------------------------------------------- */
835 
836 SWIGINTERN const char*
SWIG_Perl_ErrorType(int code)837 SWIG_Perl_ErrorType(int code) {
838   switch(code) {
839   case SWIG_MemoryError:
840     return "MemoryError";
841   case SWIG_IOError:
842     return "IOError";
843   case SWIG_RuntimeError:
844     return "RuntimeError";
845   case SWIG_IndexError:
846     return "IndexError";
847   case SWIG_TypeError:
848     return "TypeError";
849   case SWIG_DivisionByZero:
850     return "ZeroDivisionError";
851   case SWIG_OverflowError:
852     return "OverflowError";
853   case SWIG_SyntaxError:
854     return "SyntaxError";
855   case SWIG_ValueError:
856     return "ValueError";
857   case SWIG_SystemError:
858     return "SystemError";
859   case SWIG_AttributeError:
860     return "AttributeError";
861   default:
862     return "RuntimeError";
863   }
864 }
865 
866 
867 /* -----------------------------------------------------------------------------
868  * perlrun.swg
869  *
870  * This file contains the runtime support for Perl modules
871  * and includes code for managing global variables and pointer
872  * type checking.
873  * ----------------------------------------------------------------------------- */
874 
875 #ifdef PERL_OBJECT
876 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
877 #define SWIG_PERL_OBJECT_CALL pPerl,
878 #else
879 #define SWIG_PERL_OBJECT_DECL
880 #define SWIG_PERL_OBJECT_CALL
881 #endif
882 
883 /* Common SWIG API */
884 
885 /* for raw pointers */
886 #define SWIG_ConvertPtr(obj, pp, type, flags)           SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
887 #define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
888 #define SWIG_NewPointerObj(p, type, flags)              SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
889 #define swig_owntype                                    int
890 
891 /* for raw packed data */
892 #define SWIG_ConvertPacked(obj, p, s, type)             SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
893 #define SWIG_NewPackedObj(p, s, type)	                SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
894 
895 /* for class or struct pointers */
896 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
897 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
898 
899 /* for C or C++ function pointers */
900 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
901 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
902 
903 /* for C++ member pointers, ie, member methods */
904 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_ConvertPacked(obj, ptr, sz, ty)
905 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_NewPackedObj(ptr, sz, type)
906 
907 
908 /* Runtime API */
909 
910 #define SWIG_GetModule(clientdata)                      SWIG_Perl_GetModule(clientdata)
911 #define SWIG_SetModule(clientdata, pointer)             SWIG_Perl_SetModule(pointer)
912 
913 
914 /* Error manipulation */
915 
916 #define SWIG_ErrorType(code)                            SWIG_Perl_ErrorType(code)
917 #define SWIG_Error(code, msg)            		sv_setpvf(get_sv("@", GV_ADD), "%s %s", SWIG_ErrorType(code), msg)
918 #define SWIG_fail                        		goto fail
919 
920 /* Perl-specific SWIG API */
921 
922 #define SWIG_MakePtr(sv, ptr, type, flags)              SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
923 #define SWIG_MakePackedObj(sv, p, s, type)	        SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
924 #define SWIG_SetError(str)                              SWIG_Error(SWIG_RuntimeError, str)
925 
926 
927 #define SWIG_PERL_DECL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_DECL arg1)
928 #define SWIG_PERL_CALL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_CALL arg1)
929 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_DECL arg1, arg2)
930 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_CALL arg1, arg2)
931 
932 /* -----------------------------------------------------------------------------
933  * pointers/data manipulation
934  * ----------------------------------------------------------------------------- */
935 
936 /* For backward compatibility only */
937 #define SWIG_POINTER_EXCEPTION  0
938 
939 #ifdef __cplusplus
940 extern "C" {
941 #endif
942 
943 #define SWIG_OWNER   SWIG_POINTER_OWN
944 #define SWIG_SHADOW  SWIG_OWNER << 1
945 
946 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
947 
948 /* SWIG Perl macros */
949 
950 /* Macro to declare an XS function */
951 #ifndef XSPROTO
952 #   define XSPROTO(name) void name(pTHX_ CV* cv)
953 #endif
954 
955 /* Macro to call an XS function */
956 #ifdef PERL_OBJECT
957 #  define SWIG_CALLXS(_name) _name(cv,pPerl)
958 #else
959 #  ifndef MULTIPLICITY
960 #    define SWIG_CALLXS(_name) _name(cv)
961 #  else
962 #    define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
963 #  endif
964 #endif
965 
966 #ifdef PERL_OBJECT
967 #define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;
968 
969 #ifdef __cplusplus
970 extern "C" {
971 #endif
972 typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
973 #ifdef __cplusplus
974 }
975 #endif
976 
977 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
978 #define SWIGCLASS_STATIC
979 
980 #else /* PERL_OBJECT */
981 
982 #define MAGIC_PPERL
983 #define SWIGCLASS_STATIC static SWIGUNUSED
984 
985 #ifndef MULTIPLICITY
986 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
987 
988 #ifdef __cplusplus
989 extern "C" {
990 #endif
991 typedef int (*SwigMagicFunc)(SV *, MAGIC *);
992 #ifdef __cplusplus
993 }
994 #endif
995 
996 #else /* MULTIPLICITY */
997 
998 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
999 
1000 #ifdef __cplusplus
1001 extern "C" {
1002 #endif
1003 typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
1004 #ifdef __cplusplus
1005 }
1006 #endif
1007 
1008 #endif /* MULTIPLICITY */
1009 #endif /* PERL_OBJECT */
1010 
1011 #  ifdef PERL_OBJECT
1012 #    define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
SWIG_Perl_croak_null(CPerlObj * pPerl)1013 static void SWIG_Perl_croak_null(CPerlObj *pPerl)
1014 #  else
1015 static void SWIG_croak_null()
1016 #  endif
1017 {
1018   SV *err = get_sv("@", GV_ADD);
1019 #  if (PERL_VERSION < 6)
1020   croak("%_", err);
1021 #  else
1022   if (sv_isobject(err))
1023     croak(0);
1024   else
1025     croak("%s", SvPV_nolen(err));
1026 #  endif
1027 }
1028 
1029 
1030 /*
1031    Define how strict is the cast between strings and integers/doubles
1032    when overloading between these types occurs.
1033 
1034    The default is making it as strict as possible by using SWIG_AddCast
1035    when needed.
1036 
1037    You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1038    disable the SWIG_AddCast, making the casting between string and
1039    numbers less strict.
1040 
1041    In the end, we try to solve the overloading between strings and
1042    numerical types in the more natural way, but if you can avoid it,
1043    well, avoid it using %rename, for example.
1044 */
1045 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1046 # ifndef SWIG_PERL_STRICT_STR2NUM
1047 #  define SWIG_PERL_STRICT_STR2NUM
1048 # endif
1049 #endif
1050 #ifdef SWIG_PERL_STRICT_STR2NUM
1051 /* string takes precedence */
1052 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)
1053 #else
1054 /* number takes precedence */
1055 #define SWIG_Str2NumCast(x) x
1056 #endif
1057 
1058 
1059 
1060 #include <stdlib.h>
1061 
1062 SWIGRUNTIME const char *
SWIG_Perl_TypeProxyName(const swig_type_info * type)1063 SWIG_Perl_TypeProxyName(const swig_type_info *type) {
1064   if (!type) return NULL;
1065   if (type->clientdata != NULL) {
1066     return (const char*) type->clientdata;
1067   }
1068   else {
1069     return type->name;
1070   }
1071 }
1072 
1073 /* Identical to SWIG_TypeCheck, except for strcmp comparison */
1074 SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char * c,swig_type_info * ty)1075 SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1076   if (ty) {
1077     swig_cast_info *iter = ty->cast;
1078     while (iter) {
1079       if (strcmp(SWIG_Perl_TypeProxyName(iter->type), c) == 0) {
1080         if (iter == ty->cast)
1081           return iter;
1082         /* Move iter to the top of the linked list */
1083         iter->prev->next = iter->next;
1084         if (iter->next)
1085           iter->next->prev = iter->prev;
1086         iter->next = ty->cast;
1087         iter->prev = 0;
1088         if (ty->cast) ty->cast->prev = iter;
1089         ty->cast = iter;
1090         return iter;
1091       }
1092       iter = iter->next;
1093     }
1094   }
1095   return 0;
1096 }
1097 
1098 /* Function for getting a pointer value */
1099 
1100 SWIGRUNTIME int
SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV * sv,void ** ptr,swig_type_info * _t,int flags,int * own)1101 SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) {
1102   swig_cast_info *tc;
1103   void *voidptr = (void *)0;
1104   SV *tsv = 0;
1105 
1106   if (own)
1107     *own = 0;
1108 
1109   /* If magical, apply more magic */
1110   if (SvGMAGICAL(sv))
1111     mg_get(sv);
1112 
1113   /* Check to see if this is an object */
1114   if (sv_isobject(sv)) {
1115     IV tmp = 0;
1116     tsv = (SV*) SvRV(sv);
1117     if ((SvTYPE(tsv) == SVt_PVHV)) {
1118       MAGIC *mg;
1119       if (SvMAGICAL(tsv)) {
1120         mg = mg_find(tsv,'P');
1121         if (mg) {
1122           sv = mg->mg_obj;
1123           if (sv_isobject(sv)) {
1124 	    tsv = (SV*)SvRV(sv);
1125             tmp = SvIV(tsv);
1126           }
1127         }
1128       } else {
1129         return SWIG_ERROR;
1130       }
1131     } else {
1132       tmp = SvIV(tsv);
1133     }
1134     voidptr = INT2PTR(void *,tmp);
1135   } else if (! SvOK(sv)) {            /* Check for undef */
1136     *(ptr) = (void *) 0;
1137     return SWIG_OK;
1138   } else if (SvTYPE(sv) == SVt_RV) {  /* Check for NULL pointer */
1139     if (!SvROK(sv)) {
1140       /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value.  */
1141       if (SvIOK(sv)) {
1142         return SWIG_ERROR;
1143       } else {
1144         /* NULL pointer (reference to undef). */
1145         *(ptr) = (void *) 0;
1146         return SWIG_OK;
1147       }
1148     } else {
1149       return SWIG_ERROR;
1150     }
1151   } else {                            /* Don't know what it is */
1152     return SWIG_ERROR;
1153   }
1154   if (_t) {
1155     /* Now see if the types match */
1156     char *_c = HvNAME(SvSTASH(SvRV(sv)));
1157     tc = SWIG_TypeProxyCheck(_c,_t);
1158 #ifdef SWIG_DIRECTORS
1159     if (!tc && !sv_derived_from(sv,SWIG_Perl_TypeProxyName(_t))) {
1160 #else
1161     if (!tc) {
1162 #endif
1163       return SWIG_ERROR;
1164     }
1165     {
1166       int newmemory = 0;
1167       *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
1168       if (newmemory == SWIG_CAST_NEW_MEMORY) {
1169         assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
1170         if (own)
1171           *own = *own | SWIG_CAST_NEW_MEMORY;
1172       }
1173     }
1174   } else {
1175     *ptr = voidptr;
1176   }
1177 
1178   /*
1179    *  DISOWN implementation: we need a perl guru to check this one.
1180    */
1181   if (tsv && (flags & SWIG_POINTER_DISOWN)) {
1182     /*
1183      *  almost copy paste code from below SWIG_POINTER_OWN setting
1184      */
1185     SV *obj = sv;
1186     HV *stash = SvSTASH(SvRV(obj));
1187     GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1188     if (isGV(gv)) {
1189       HV *hv = GvHVn(gv);
1190       /*
1191        * To set ownership (see below), a newSViv(1) entry is added.
1192        * Hence, to remove ownership, we delete the entry.
1193        */
1194       if (hv_exists_ent(hv, obj, 0)) {
1195 	hv_delete_ent(hv, obj, 0, 0);
1196       }
1197     }
1198   }
1199   return SWIG_OK;
1200 }
1201 
1202 SWIGRUNTIME int
1203 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
1204   return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0);
1205 }
1206 
1207 SWIGRUNTIME void
1208 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
1209   if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) {
1210     SV *self;
1211     SV *obj=newSV(0);
1212     HV *hash=newHV();
1213     HV *stash;
1214     sv_setref_pv(obj, SWIG_Perl_TypeProxyName(t), ptr);
1215     stash=SvSTASH(SvRV(obj));
1216     if (flags & SWIG_POINTER_OWN) {
1217       HV *hv;
1218       GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1219       if (!isGV(gv))
1220         gv_init(gv, stash, "OWNER", 5, FALSE);
1221       hv=GvHVn(gv);
1222       hv_store_ent(hv, obj, newSViv(1), 0);
1223     }
1224     sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
1225     SvREFCNT_dec(obj);
1226     self=newRV_noinc((SV *)hash);
1227     sv_setsv(sv, self);
1228     SvREFCNT_dec((SV *)self);
1229     sv_bless(sv, stash);
1230   }
1231   else {
1232     sv_setref_pv(sv, SWIG_Perl_TypeProxyName(t), ptr);
1233   }
1234 }
1235 
1236 SWIGRUNTIMEINLINE SV *
1237 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
1238   SV *result = sv_newmortal();
1239   SWIG_MakePtr(result, ptr, t, flags);
1240   return result;
1241 }
1242 
1243 SWIGRUNTIME void
1244 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
1245   char result[1024];
1246   char *r = result;
1247   if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
1248   *(r++) = '_';
1249   r = SWIG_PackData(r,ptr,sz);
1250   strcpy(r,SWIG_Perl_TypeProxyName(type));
1251   sv_setpv(sv, result);
1252 }
1253 
1254 SWIGRUNTIME SV *
1255 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
1256   SV *result = sv_newmortal();
1257   SWIG_Perl_MakePackedObj(result, ptr, sz, type);
1258   return result;
1259 }
1260 
1261 /* Convert a packed value value */
1262 SWIGRUNTIME int
1263 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
1264   swig_cast_info *tc;
1265   const char  *c = 0;
1266 
1267   if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
1268   c = SvPV_nolen(obj);
1269   /* Pointer values must start with leading underscore */
1270   if (*c != '_') return SWIG_ERROR;
1271   c++;
1272   c = SWIG_UnpackData(c,ptr,sz);
1273   if (ty) {
1274     tc = SWIG_TypeCheck(c,ty);
1275     if (!tc) return SWIG_ERROR;
1276   }
1277   return SWIG_OK;
1278 }
1279 
1280 
1281 /* Macros for low-level exception handling */
1282 #define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1283 
1284 
1285 typedef XSPROTO(SwigPerlWrapper);
1286 typedef SwigPerlWrapper *SwigPerlWrapperPtr;
1287 
1288 /* Structure for command table */
1289 typedef struct {
1290   const char         *name;
1291   SwigPerlWrapperPtr  wrapper;
1292 } swig_command_info;
1293 
1294 /* Information for constant table */
1295 
1296 #define SWIG_INT     1
1297 #define SWIG_FLOAT   2
1298 #define SWIG_STRING  3
1299 #define SWIG_POINTER 4
1300 #define SWIG_BINARY  5
1301 
1302 /* Constant information structure */
1303 typedef struct swig_constant_info {
1304     int              type;
1305     const char      *name;
1306     long             lvalue;
1307     double           dvalue;
1308     void            *pvalue;
1309     swig_type_info **ptype;
1310 } swig_constant_info;
1311 
1312 
1313 /* Structure for variable table */
1314 typedef struct {
1315   const char   *name;
1316   SwigMagicFunc   set;
1317   SwigMagicFunc   get;
1318   swig_type_info  **type;
1319 } swig_variable_info;
1320 
1321 /* Magic variable code */
1322 #ifndef PERL_OBJECT
1323 # ifdef __cplusplus
1324 #  define swig_create_magic(s,a,b,c) _swig_create_magic(s,const_cast<char*>(a),b,c)
1325 # else
1326 #  define swig_create_magic(s,a,b,c) _swig_create_magic(s,(char*)(a),b,c)
1327 # endif
1328 # ifndef MULTIPLICITY
1329 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *))
1330 # else
1331 SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *))
1332 # endif
1333 #else
1334 #  define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1335 SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *))
1336 #endif
1337 {
1338   MAGIC *mg;
1339   sv_magic(sv,sv,'U',name,strlen(name));
1340   mg = mg_find(sv,'U');
1341   mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
1342   mg->mg_virtual->svt_get = (SwigMagicFunc) get;
1343   mg->mg_virtual->svt_set = (SwigMagicFunc) set;
1344   mg->mg_virtual->svt_len = 0;
1345   mg->mg_virtual->svt_clear = 0;
1346   mg->mg_virtual->svt_free = 0;
1347 }
1348 
1349 
1350 SWIGRUNTIME swig_module_info *
1351 SWIG_Perl_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
1352   static void *type_pointer = (void *)0;
1353   SV *pointer;
1354 
1355   /* first check if pointer already created */
1356   if (!type_pointer) {
1357     pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
1358     if (pointer && SvOK(pointer)) {
1359       type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
1360     }
1361   }
1362 
1363   return (swig_module_info *) type_pointer;
1364 }
1365 
1366 SWIGRUNTIME void
1367 SWIG_Perl_SetModule(swig_module_info *module) {
1368   SV *pointer;
1369 
1370   /* create a new pointer */
1371   pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
1372   sv_setiv(pointer, PTR2IV(module));
1373 }
1374 
1375 #ifdef __cplusplus
1376 }
1377 #endif
1378 
1379 /* Workaround perl5 global namespace pollution. Note that undefining library
1380  * functions like fopen will not solve the problem on all platforms as fopen
1381  * might be a macro on Windows but not necessarily on other operating systems. */
1382 #ifdef do_open
1383   #undef do_open
1384 #endif
1385 #ifdef do_close
1386   #undef do_close
1387 #endif
1388 #ifdef do_exec
1389   #undef do_exec
1390 #endif
1391 #ifdef scalar
1392   #undef scalar
1393 #endif
1394 #ifdef list
1395   #undef list
1396 #endif
1397 #ifdef apply
1398   #undef apply
1399 #endif
1400 #ifdef convert
1401   #undef convert
1402 #endif
1403 #ifdef Error
1404   #undef Error
1405 #endif
1406 #ifdef form
1407   #undef form
1408 #endif
1409 #ifdef vform
1410   #undef vform
1411 #endif
1412 #ifdef LABEL
1413   #undef LABEL
1414 #endif
1415 #ifdef METHOD
1416   #undef METHOD
1417 #endif
1418 #ifdef Move
1419   #undef Move
1420 #endif
1421 #ifdef yylex
1422   #undef yylex
1423 #endif
1424 #ifdef yyparse
1425   #undef yyparse
1426 #endif
1427 #ifdef yyerror
1428   #undef yyerror
1429 #endif
1430 #ifdef invert
1431   #undef invert
1432 #endif
1433 #ifdef ref
1434   #undef ref
1435 #endif
1436 #ifdef read
1437   #undef read
1438 #endif
1439 #ifdef write
1440   #undef write
1441 #endif
1442 #ifdef eof
1443   #undef eof
1444 #endif
1445 #ifdef close
1446   #undef close
1447 #endif
1448 #ifdef rewind
1449   #undef rewind
1450 #endif
1451 #ifdef free
1452   #undef free
1453 #endif
1454 #ifdef malloc
1455   #undef malloc
1456 #endif
1457 #ifdef calloc
1458   #undef calloc
1459 #endif
1460 #ifdef Stat
1461   #undef Stat
1462 #endif
1463 #ifdef check
1464   #undef check
1465 #endif
1466 #ifdef seekdir
1467   #undef seekdir
1468 #endif
1469 #ifdef open
1470   #undef open
1471 #endif
1472 #ifdef readdir
1473   #undef readdir
1474 #endif
1475 #ifdef bind
1476   #undef bind
1477 #endif
1478 #ifdef access
1479   #undef access
1480 #endif
1481 #ifdef stat
1482   #undef stat
1483 #endif
1484 #ifdef seed
1485   #undef seed
1486 #endif
1487 
1488 #ifdef bool
1489   /* Leave if macro is from C99 stdbool.h */
1490   #ifndef __bool_true_false_are_defined
1491 
1492   #endif
1493 #endif
1494 
1495 
1496 
1497 
1498 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1499 
1500 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1501 
1502 
1503 
1504   #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
1505 
1506 
1507 /* -------- TYPES TABLE (BEGIN) -------- */
1508 
1509 #define SWIGTYPE_p_NDMPConnection swig_types[0]
1510 #define SWIGTYPE_p_char swig_types[1]
1511 #define SWIGTYPE_p_double swig_types[2]
1512 #define SWIGTYPE_p_float swig_types[3]
1513 #define SWIGTYPE_p_gint swig_types[4]
1514 #define SWIGTYPE_p_gsize swig_types[5]
1515 #define SWIGTYPE_p_guint swig_types[6]
1516 #define SWIGTYPE_p_guint32 swig_types[7]
1517 #define SWIGTYPE_p_guint64 swig_types[8]
1518 #define SWIGTYPE_p_guint8 swig_types[9]
1519 #define SWIGTYPE_p_int swig_types[10]
1520 #define SWIGTYPE_p_ndmp_enum swig_types[11]
1521 #define SWIGTYPE_p_unsigned_char swig_types[12]
1522 static swig_type_info *swig_types[14];
1523 static swig_module_info swig_module = {swig_types, 13, 0, 0, 0, 0};
1524 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1525 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1526 
1527 /* -------- TYPES TABLE (END) -------- */
1528 
1529 #define SWIG_init    boot_Amanda__NDMP
1530 
1531 #define SWIG_name   "Amanda::NDMPc::boot_Amanda__NDMP"
1532 #define SWIG_prefix "Amanda::NDMPc::"
1533 
1534 #define SWIGVERSION 0x030007
1535 #define SWIG_VERSION SWIGVERSION
1536 
1537 
1538 #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1539 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1540 
1541 
1542 #ifdef __cplusplus
1543 extern "C"
1544 #endif
1545 #ifndef PERL_OBJECT
1546 #ifndef MULTIPLICITY
1547 SWIGEXPORT void SWIG_init (CV* cv);
1548 #else
1549 SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1550 #endif
1551 #else
1552 SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1553 #endif
1554 
1555 
1556 #include "amglue.h"
1557 
1558 
1559 #include "amglue.h"
1560 
1561 
1562 #include "amglue.h"
1563 
1564 
1565 #include "ndmpconnobj.h"
1566 #include "glib-util.h"
1567 
1568 
1569 typedef guint ndmp_enum;
1570 
1571 
1572 SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)1573 SWIG_pchar_descriptor(void)
1574 {
1575   static int init = 0;
1576   static swig_type_info* info = 0;
1577   if (!init) {
1578     info = SWIG_TypeQuery("_p_char");
1579     init = 1;
1580   }
1581   return info;
1582 }
1583 
1584 
1585 SWIGINTERN int
SWIG_AsCharPtrAndSize(SV * obj,char ** cptr,size_t * psize,int * alloc)1586 SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1587 {
1588   if (SvMAGICAL(obj)) {
1589      SV *tmp = sv_newmortal();
1590      SvSetSV(tmp, obj);
1591      obj = tmp;
1592   }
1593   if (SvPOK(obj)) {
1594     STRLEN len = 0;
1595     char *cstr = SvPV(obj, len);
1596     size_t size = len + 1;
1597     if (cptr)  {
1598       if (alloc) {
1599 	if (*alloc == SWIG_NEWOBJ) {
1600 	  *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1601 	} else {
1602 	  *cptr = cstr;
1603 	  *alloc = SWIG_OLDOBJ;
1604 	}
1605       }
1606     }
1607     if (psize) *psize = size;
1608     return SWIG_OK;
1609   } else {
1610     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1611     if (pchar_descriptor) {
1612       char* vptr = 0;
1613       if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1614 	if (cptr) *cptr = vptr;
1615 	if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1616 	if (alloc) *alloc = SWIG_OLDOBJ;
1617 	return SWIG_OK;
1618       }
1619     }
1620   }
1621   return SWIG_TypeError;
1622 }
1623 
1624 
1625 
1626 
new_NDMPConnection(gchar * hostname,gint port,gchar * username,gchar * password,gchar * auth)1627 SWIGINTERN NDMPConnection *new_NDMPConnection(gchar *hostname,gint port,gchar *username,gchar *password,gchar *auth){
1628 	    return ndmp_connection_new(
1629 		    hostname, port, username, password, auth);
1630 	}
delete_NDMPConnection(NDMPConnection * self)1631 SWIGINTERN void delete_NDMPConnection(NDMPConnection *self){
1632 	    g_object_unref(self);
1633 	}
NDMPConnection_err_code(NDMPConnection * self)1634 SWIGINTERN int NDMPConnection_err_code(NDMPConnection *self){
1635 	    return ndmp_connection_err_code(self);
1636 	}
NDMPConnection_err_msg(NDMPConnection * self)1637 SWIGINTERN gchar *NDMPConnection_err_msg(NDMPConnection *self){
1638 	    return ndmp_connection_err_msg(self);
1639 	}
1640 
1641 SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char * carray,size_t size)1642 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1643 {
1644   SV *obj = sv_newmortal();
1645   if (carray) {
1646     sv_setpvn(obj, carray, size);
1647   } else {
1648     sv_setsv(obj, &PL_sv_undef);
1649   }
1650   return obj;
1651 }
1652 
1653 
1654 SWIGINTERNINLINE SV *
SWIG_FromCharPtr(const char * cptr)1655 SWIG_FromCharPtr(const char *cptr)
1656 {
1657   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1658 }
1659 
1660 
1661 #include <limits.h>
1662 #if !defined(SWIG_NO_LLONG_MAX)
1663 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1664 #   define LLONG_MAX __LONG_LONG_MAX__
1665 #   define LLONG_MIN (-LLONG_MAX - 1LL)
1666 #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1667 # endif
1668 #endif
1669 
1670 
1671 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,double * val)1672 SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1673 {
1674   if (SvNIOK(obj)) {
1675     if (val) *val = SvNV(obj);
1676     return SWIG_OK;
1677   } else if (SvIOK(obj)) {
1678     if (val) *val = (double) SvIV(obj);
1679     return SWIG_AddCast(SWIG_OK);
1680   } else {
1681     const char *nptr = SvPV_nolen(obj);
1682     if (nptr) {
1683       char *endptr;
1684       double v;
1685       errno = 0;
1686       v = strtod(nptr, &endptr);
1687       if (errno == ERANGE) {
1688 	errno = 0;
1689 	return SWIG_OverflowError;
1690       } else {
1691 	if (*endptr == '\0') {
1692 	  if (val) *val = v;
1693 	  return SWIG_Str2NumCast(SWIG_OK);
1694 	}
1695       }
1696     }
1697   }
1698   return SWIG_TypeError;
1699 }
1700 
1701 
1702 #include <float.h>
1703 
1704 
1705 #include <math.h>
1706 
1707 
1708 SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double * d,double min,double max)1709 SWIG_CanCastAsInteger(double *d, double min, double max) {
1710   double x = *d;
1711   if ((min <= x && x <= max)) {
1712    double fx = floor(x);
1713    double cx = ceil(x);
1714    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
1715    if ((errno == EDOM) || (errno == ERANGE)) {
1716      errno = 0;
1717    } else {
1718      double summ, reps, diff;
1719      if (rd < x) {
1720        diff = x - rd;
1721      } else if (rd > x) {
1722        diff = rd - x;
1723      } else {
1724        return 1;
1725      }
1726      summ = rd + x;
1727      reps = diff/summ;
1728      if (reps < 8*DBL_EPSILON) {
1729        *d = rd;
1730        return 1;
1731      }
1732    }
1733   }
1734   return 0;
1735 }
1736 
1737 
1738 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,long * val)1739 SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
1740 {
1741   if (SvUOK(obj)) {
1742     UV v = SvUV(obj);
1743     if (v <= LONG_MAX) {
1744       if (val) *val = v;
1745       return SWIG_OK;
1746     }
1747     return SWIG_OverflowError;
1748   } else if (SvIOK(obj)) {
1749     IV v = SvIV(obj);
1750     if (v >= LONG_MIN && v <= LONG_MAX) {
1751       if(val) *val = v;
1752       return SWIG_OK;
1753     }
1754     return SWIG_OverflowError;
1755   } else {
1756     int dispatch = 0;
1757     const char *nptr = SvPV_nolen(obj);
1758     if (nptr) {
1759       char *endptr;
1760       long v;
1761       errno = 0;
1762       v = strtol(nptr, &endptr,0);
1763       if (errno == ERANGE) {
1764 	errno = 0;
1765 	return SWIG_OverflowError;
1766       } else {
1767 	if (*endptr == '\0') {
1768 	  if (val) *val = v;
1769 	  return SWIG_Str2NumCast(SWIG_OK);
1770 	}
1771       }
1772     }
1773     if (!dispatch) {
1774       double d;
1775       int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1776       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
1777 	if (val) *val = (long)(d);
1778 	return res;
1779       }
1780     }
1781   }
1782   return SWIG_TypeError;
1783 }
1784 
1785 
1786 SWIGINTERN int
SWIG_PERL_DECL_ARGS_2(SV * obj,int * val)1787 SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
1788 {
1789   long v;
1790   int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1791   if (SWIG_IsOK(res)) {
1792     if ((v < INT_MIN || v > INT_MAX)) {
1793       return SWIG_OverflowError;
1794     } else {
1795       if (val) *val = (int)(v);
1796     }
1797   }
1798   return res;
1799 }
1800 
NDMPConnection_set_verbose(NDMPConnection * self,gboolean verbose)1801 SWIGINTERN void NDMPConnection_set_verbose(NDMPConnection *self,gboolean verbose){
1802 	    ndmp_connection_set_verbose(self, verbose);
1803 	}
NDMPConnection_scsi_open(NDMPConnection * self,gchar * device)1804 SWIGINTERN gboolean NDMPConnection_scsi_open(NDMPConnection *self,gchar *device){
1805 	    return ndmp_connection_scsi_open(
1806 		    self,
1807 		    device);
1808 	}
NDMPConnection_scsi_close(NDMPConnection * self)1809 SWIGINTERN gboolean NDMPConnection_scsi_close(NDMPConnection *self){
1810 	    return ndmp_connection_scsi_close(self);
1811 	}
NDMPConnection_scsi_execute_cdb_C(NDMPConnection * self,ndmp_enum flags,guint32 timeout,gpointer cdb,gsize cdb_len,gpointer dataout,gsize dataout_len,gsize * actual_dataout_len,gpointer datain,gsize datain_max_len,gsize * actual_datain_len,guint8 * status,gpointer ext_sense,gsize ext_sense_max_len,gsize * actual_ext_sense_len)1812 SWIGINTERN gboolean NDMPConnection_scsi_execute_cdb_C(NDMPConnection *self,ndmp_enum flags,guint32 timeout,gpointer cdb,gsize cdb_len,gpointer dataout,gsize dataout_len,gsize *actual_dataout_len,gpointer datain,gsize datain_max_len,gsize *actual_datain_len,guint8 *status,gpointer ext_sense,gsize ext_sense_max_len,gsize *actual_ext_sense_len){
1813 	    return ndmp_connection_scsi_execute_cdb(
1814 		    self,
1815 		    flags,
1816 		    timeout,
1817 		    cdb,
1818 		    cdb_len,
1819 		    dataout,
1820 		    dataout_len,
1821 		    actual_dataout_len,
1822 		    datain,
1823 		    datain_max_len,
1824 		    actual_datain_len,
1825 		    status,
1826 		    ext_sense,
1827 		    ext_sense_max_len,
1828 		    actual_ext_sense_len
1829 		    );
1830 	}
NDMPConnection_tape_open(NDMPConnection * self,gchar * device,ndmp_enum mode)1831 SWIGINTERN gboolean NDMPConnection_tape_open(NDMPConnection *self,gchar *device,ndmp_enum mode){
1832 	    return ndmp_connection_tape_open(
1833 		    self,
1834 		    device,
1835 		    mode);
1836 	}
NDMPConnection_tape_close(NDMPConnection * self)1837 SWIGINTERN gboolean NDMPConnection_tape_close(NDMPConnection *self){
1838 	    return ndmp_connection_tape_close(self);
1839 	}
NDMPConnection_tape_mtio(NDMPConnection * self,ndmp_enum tape_op,gint count,guint * resid)1840 SWIGINTERN gboolean NDMPConnection_tape_mtio(NDMPConnection *self,ndmp_enum tape_op,gint count,guint *resid){
1841 	    return ndmp_connection_tape_mtio(
1842 		    self,
1843 		    tape_op,
1844 		    count,
1845 		    resid);
1846 	}
NDMPConnection_tape_write(NDMPConnection * self,gpointer buf,guint64 len,guint64 * count)1847 SWIGINTERN gboolean NDMPConnection_tape_write(NDMPConnection *self,gpointer buf,guint64 len,guint64 *count){
1848 	    return ndmp_connection_tape_write(
1849 		    self,
1850 		    buf,
1851 		    len,
1852 		    count);
1853 	}
NDMPConnection_tape_read(NDMPConnection * self,gpointer buf,guint64 count,guint64 * out_count)1854 SWIGINTERN gboolean NDMPConnection_tape_read(NDMPConnection *self,gpointer buf,guint64 count,guint64 *out_count){
1855 	    return ndmp_connection_tape_read(
1856 		    self,
1857 		    buf,
1858 		    count,
1859 		    out_count);
1860 	}
NDMPConnection_tape_get_state(NDMPConnection * self,guint64 * blocksize,guint64 * file_num,guint64 * blockno)1861 SWIGINTERN gboolean NDMPConnection_tape_get_state(NDMPConnection *self,guint64 *blocksize,guint64 *file_num,guint64 *blockno){
1862 	    return ndmp_connection_tape_get_state(
1863 		    self,
1864 		    blocksize,
1865 		    file_num,
1866 		    blockno);
1867 	}
1868 
1869 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(long value)1870 SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
1871 {
1872   SV *sv;
1873   if (value >= IV_MIN && value <= IV_MAX)
1874     sv = newSViv(value);
1875   else
1876     sv = newSVpvf("%ld", value);
1877   return sv_2mortal(sv);
1878 }
1879 
1880 
1881 SWIGINTERNINLINE SV *
SWIG_PERL_DECL_ARGS_1(int value)1882 SWIG_From_int  SWIG_PERL_DECL_ARGS_1(int value)
1883 {
1884   return SWIG_From_long  SWIG_PERL_CALL_ARGS_1(value);
1885 }
1886 
1887 #ifdef __cplusplus
1888 extern "C" {
1889 #endif
1890 
1891 #ifdef PERL_OBJECT
1892 #define MAGIC_CLASS _wrap_Amanda__NDMP_var::
1893 class _wrap_Amanda__NDMP_var : public CPerlObj {
1894 public:
1895 #else
1896 #define MAGIC_CLASS
1897 #endif
swig_magic_readonly(pTHX_ SV * SWIGUNUSEDPARM (sv),MAGIC * SWIGUNUSEDPARM (mg))1898 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
1899     MAGIC_PPERL
1900     croak("Value is read-only.");
1901     return 0;
1902 }
1903 
1904 
1905 #ifdef PERL_OBJECT
1906 };
1907 #endif
1908 
1909 #ifdef __cplusplus
1910 }
1911 #endif
1912 
1913 #ifdef __cplusplus
1914 extern "C" {
1915 #endif
XS(_wrap_new_NDMPConnection)1916 XS(_wrap_new_NDMPConnection) {
1917   {
1918     gchar *arg1 = (gchar *) 0 ;
1919     gint arg2 ;
1920     gchar *arg3 = (gchar *) 0 ;
1921     gchar *arg4 = (gchar *) 0 ;
1922     gchar *arg5 = (gchar *) 0 ;
1923     int res1 ;
1924     char *buf1 = 0 ;
1925     int alloc1 = 0 ;
1926     int res3 ;
1927     char *buf3 = 0 ;
1928     int alloc3 = 0 ;
1929     int res4 ;
1930     char *buf4 = 0 ;
1931     int alloc4 = 0 ;
1932     int res5 ;
1933     char *buf5 = 0 ;
1934     int alloc5 = 0 ;
1935     int argvi = 0;
1936     NDMPConnection *result = 0 ;
1937     dXSARGS;
1938 
1939     if ((items < 5) || (items > 5)) {
1940       SWIG_croak("Usage: new_NDMPConnection(hostname,port,username,password,auth);");
1941     }
1942     res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
1943     if (!SWIG_IsOK(res1)) {
1944       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NDMPConnection" "', argument " "1"" of type '" "gchar *""'");
1945     }
1946     arg1 = (gchar *)(buf1);
1947     {
1948       if (sizeof(gint) == 1) {
1949         arg2 = amglue_SvI8(ST(1));
1950       } else if (sizeof(gint) == 2) {
1951         arg2 = amglue_SvI16(ST(1));
1952       } else if (sizeof(gint) == 4) {
1953         arg2 = amglue_SvI32(ST(1));
1954       } else if (sizeof(gint) == 8) {
1955         arg2 = amglue_SvI64(ST(1));
1956       } else {
1957         g_critical("Unexpected gint >64 bits?"); /* should be optimized out unless sizeof(gint) > 8 */
1958       }
1959     }
1960     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
1961     if (!SWIG_IsOK(res3)) {
1962       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NDMPConnection" "', argument " "3"" of type '" "gchar *""'");
1963     }
1964     arg3 = (gchar *)(buf3);
1965     res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
1966     if (!SWIG_IsOK(res4)) {
1967       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_NDMPConnection" "', argument " "4"" of type '" "gchar *""'");
1968     }
1969     arg4 = (gchar *)(buf4);
1970     res5 = SWIG_AsCharPtrAndSize(ST(4), &buf5, NULL, &alloc5);
1971     if (!SWIG_IsOK(res5)) {
1972       SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_NDMPConnection" "', argument " "5"" of type '" "gchar *""'");
1973     }
1974     arg5 = (gchar *)(buf5);
1975     result = (NDMPConnection *)new_NDMPConnection(arg1,arg2,arg3,arg4,arg5);
1976     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_NDMPConnection, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
1977     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
1978     if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
1979     if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
1980     if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
1981     XSRETURN(argvi);
1982   fail:
1983     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
1984     if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
1985     if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
1986     if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
1987     SWIG_croak_null();
1988   }
1989 }
1990 
1991 
XS(_wrap_delete_NDMPConnection)1992 XS(_wrap_delete_NDMPConnection) {
1993   {
1994     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
1995     void *argp1 = 0 ;
1996     int res1 = 0 ;
1997     int argvi = 0;
1998     dXSARGS;
1999 
2000     if ((items < 1) || (items > 1)) {
2001       SWIG_croak("Usage: delete_NDMPConnection(self);");
2002     }
2003     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, SWIG_POINTER_DISOWN |  0 );
2004     if (!SWIG_IsOK(res1)) {
2005       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NDMPConnection" "', argument " "1"" of type '" "NDMPConnection *""'");
2006     }
2007     arg1 = (NDMPConnection *)(argp1);
2008     delete_NDMPConnection(arg1);
2009     ST(argvi) = sv_newmortal();
2010 
2011     XSRETURN(argvi);
2012   fail:
2013 
2014     SWIG_croak_null();
2015   }
2016 }
2017 
2018 
XS(_wrap_NDMPConnection_err_code)2019 XS(_wrap_NDMPConnection_err_code) {
2020   {
2021     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2022     void *argp1 = 0 ;
2023     int res1 = 0 ;
2024     int argvi = 0;
2025     int result;
2026     dXSARGS;
2027 
2028     if ((items < 1) || (items > 1)) {
2029       SWIG_croak("Usage: NDMPConnection_err_code(self);");
2030     }
2031     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2032     if (!SWIG_IsOK(res1)) {
2033       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_err_code" "', argument " "1"" of type '" "NDMPConnection *""'");
2034     }
2035     arg1 = (NDMPConnection *)(argp1);
2036     result = (int)NDMPConnection_err_code(arg1);
2037     {
2038       SV *for_stack;
2039       SP += argvi; PUTBACK;
2040       for_stack = sv_2mortal(amglue_newSVi64(result));
2041       SPAGAIN; SP -= argvi;
2042       ST(argvi) = for_stack;
2043       argvi++;
2044     }
2045 
2046     XSRETURN(argvi);
2047   fail:
2048 
2049     SWIG_croak_null();
2050   }
2051 }
2052 
2053 
XS(_wrap_NDMPConnection_err_msg)2054 XS(_wrap_NDMPConnection_err_msg) {
2055   {
2056     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2057     void *argp1 = 0 ;
2058     int res1 = 0 ;
2059     int argvi = 0;
2060     gchar *result = 0 ;
2061     dXSARGS;
2062 
2063     if ((items < 1) || (items > 1)) {
2064       SWIG_croak("Usage: NDMPConnection_err_msg(self);");
2065     }
2066     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2067     if (!SWIG_IsOK(res1)) {
2068       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_err_msg" "', argument " "1"" of type '" "NDMPConnection *""'");
2069     }
2070     arg1 = (NDMPConnection *)(argp1);
2071     result = (gchar *)NDMPConnection_err_msg(arg1);
2072     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2073 
2074     free((char*)result);
2075     XSRETURN(argvi);
2076   fail:
2077 
2078     SWIG_croak_null();
2079   }
2080 }
2081 
2082 
XS(_wrap_NDMPConnection_set_verbose)2083 XS(_wrap_NDMPConnection_set_verbose) {
2084   {
2085     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2086     gboolean arg2 ;
2087     void *argp1 = 0 ;
2088     int res1 = 0 ;
2089     int argvi = 0;
2090     dXSARGS;
2091 
2092     if ((items < 2) || (items > 2)) {
2093       SWIG_croak("Usage: NDMPConnection_set_verbose(self,verbose);");
2094     }
2095     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2096     if (!SWIG_IsOK(res1)) {
2097       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_set_verbose" "', argument " "1"" of type '" "NDMPConnection *""'");
2098     }
2099     arg1 = (NDMPConnection *)(argp1);
2100     {
2101       arg2 = SvTRUE(ST(1));
2102     }
2103     NDMPConnection_set_verbose(arg1,arg2);
2104     ST(argvi) = sv_newmortal();
2105 
2106 
2107     XSRETURN(argvi);
2108   fail:
2109 
2110 
2111     SWIG_croak_null();
2112   }
2113 }
2114 
2115 
XS(_wrap_NDMPConnection_scsi_open)2116 XS(_wrap_NDMPConnection_scsi_open) {
2117   {
2118     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2119     gchar *arg2 = (gchar *) 0 ;
2120     void *argp1 = 0 ;
2121     int res1 = 0 ;
2122     int res2 ;
2123     char *buf2 = 0 ;
2124     int alloc2 = 0 ;
2125     int argvi = 0;
2126     gboolean result;
2127     dXSARGS;
2128 
2129     if ((items < 2) || (items > 2)) {
2130       SWIG_croak("Usage: NDMPConnection_scsi_open(self,device);");
2131     }
2132     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2133     if (!SWIG_IsOK(res1)) {
2134       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_scsi_open" "', argument " "1"" of type '" "NDMPConnection *""'");
2135     }
2136     arg1 = (NDMPConnection *)(argp1);
2137     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2138     if (!SWIG_IsOK(res2)) {
2139       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NDMPConnection_scsi_open" "', argument " "2"" of type '" "gchar *""'");
2140     }
2141     arg2 = (gchar *)(buf2);
2142     result = (gboolean)NDMPConnection_scsi_open(arg1,arg2);
2143     {
2144       if (result)
2145       ST(argvi) = &PL_sv_yes;
2146       else
2147       ST(argvi) = &PL_sv_no;
2148       argvi++;
2149     }
2150 
2151     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2152     XSRETURN(argvi);
2153   fail:
2154 
2155     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2156     SWIG_croak_null();
2157   }
2158 }
2159 
2160 
XS(_wrap_NDMPConnection_scsi_close)2161 XS(_wrap_NDMPConnection_scsi_close) {
2162   {
2163     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2164     void *argp1 = 0 ;
2165     int res1 = 0 ;
2166     int argvi = 0;
2167     gboolean result;
2168     dXSARGS;
2169 
2170     if ((items < 1) || (items > 1)) {
2171       SWIG_croak("Usage: NDMPConnection_scsi_close(self);");
2172     }
2173     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2174     if (!SWIG_IsOK(res1)) {
2175       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_scsi_close" "', argument " "1"" of type '" "NDMPConnection *""'");
2176     }
2177     arg1 = (NDMPConnection *)(argp1);
2178     result = (gboolean)NDMPConnection_scsi_close(arg1);
2179     {
2180       if (result)
2181       ST(argvi) = &PL_sv_yes;
2182       else
2183       ST(argvi) = &PL_sv_no;
2184       argvi++;
2185     }
2186 
2187     XSRETURN(argvi);
2188   fail:
2189 
2190     SWIG_croak_null();
2191   }
2192 }
2193 
2194 
XS(_wrap_NDMPConnection_scsi_execute_cdb_C)2195 XS(_wrap_NDMPConnection_scsi_execute_cdb_C) {
2196   {
2197     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2198     ndmp_enum arg2 ;
2199     guint32 arg3 ;
2200     gpointer arg4 = (gpointer) 0 ;
2201     gsize arg5 ;
2202     gpointer arg6 = (gpointer) 0 ;
2203     gsize arg7 ;
2204     gsize *arg8 = (gsize *) 0 ;
2205     gpointer arg9 = (gpointer) 0 ;
2206     gsize arg10 ;
2207     gsize *arg11 = (gsize *) 0 ;
2208     guint8 *arg12 = (guint8 *) 0 ;
2209     gpointer arg13 = (gpointer) 0 ;
2210     gsize arg14 ;
2211     gsize *arg15 = (gsize *) 0 ;
2212     void *argp1 = 0 ;
2213     int res1 = 0 ;
2214     gsize dataout_len6 ;
2215     gpointer datain_buf9 ;
2216     gsize actual_datain_len9 ;
2217     guint8 temp12 ;
2218     guint8 ext_sense_buf13[128] ;
2219     gsize actual_ext_sense_len13 ;
2220     int argvi = 0;
2221     SV * _saved[2] ;
2222     gboolean result;
2223     dXSARGS;
2224 
2225     arg12 = &temp12;
2226     {
2227       arg13 = ext_sense_buf13;
2228       arg14 = sizeof(ext_sense_buf13); /* always allocate 128 bytes for sense */
2229       actual_ext_sense_len13 = 0;
2230       arg15 = &actual_ext_sense_len13;
2231     }
2232     if ((items < 6) || (items > 6)) {
2233       SWIG_croak("Usage: NDMPConnection_scsi_execute_cdb_C(self,flags,timeout,cdb,cdb_len,dataout,dataout_len,actual_dataout_len,datain,datain_max_len,actual_datain_len,ext_sense_max_len,actual_ext_sense_len);");
2234     }
2235     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2236     if (!SWIG_IsOK(res1)) {
2237       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_scsi_execute_cdb_C" "', argument " "1"" of type '" "NDMPConnection *""'");
2238     }
2239     arg1 = (NDMPConnection *)(argp1);
2240     arg2 = SvIV(ST(1));
2241     {
2242       arg3 = amglue_SvU32(ST(2));
2243     }
2244     {
2245       /* cdb */
2246       int alloc = SWIG_OLDOBJ;
2247       SWIG_AsCharPtrAndSize(ST(3), (char **)&arg4, &arg5, &alloc);
2248       if (arg5) arg5--; /* strip trailing NUL byte */
2249     }
2250     {
2251       /* dataout */
2252 
2253       /* handle the actual input here */
2254       int alloc = SWIG_OLDOBJ;
2255       SWIG_AsCharPtrAndSize(ST(4), (char **)&arg6, &arg7, &alloc);
2256       if (arg7) arg7--; /* strip trailing NUL byte */
2257       /* set up for argout typemap, below */
2258       dataout_len6 = 0;
2259       arg8 = &dataout_len6;
2260     }
2261     {
2262       /* datain */
2263       gsize max_size = amglue_SvU64(ST(5));
2264       arg10 = max_size;
2265       if (max_size) {
2266         arg9 = g_malloc(max_size);
2267       } else {
2268         arg9 = NULL;
2269       }
2270       actual_datain_len9 = 0;
2271       arg11 = &actual_datain_len9;
2272     }
2273     _saved[0] = ST(4);
2274     _saved[1] = ST(5);
2275     result = (gboolean)NDMPConnection_scsi_execute_cdb_C(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
2276     {
2277       if (result)
2278       ST(argvi) = &PL_sv_yes;
2279       else
2280       ST(argvi) = &PL_sv_no;
2281       argvi++;
2282     }
2283     {
2284       if (argvi >= items) {
2285         EXTEND(sp,1);
2286       }
2287 
2288       SP += argvi; PUTBACK;
2289       ST(argvi) = sv_2mortal(amglue_newSVu64(*arg8));
2290       SP -= argvi; argvi++;
2291     }
2292     {
2293       if (argvi >= items) {
2294         EXTEND(sp,1);
2295       }
2296 
2297       /* convert the value, even if it's NULL */
2298       ST(argvi) = SWIG_FromCharPtrAndSize(arg9, *arg11);
2299       argvi++;
2300       if (arg9) g_free(arg9);
2301     }
2302     {
2303       if (argvi >= items) {
2304         EXTEND(sp,1);
2305       }
2306 
2307       ST(argvi) = sv_newmortal();
2308       sv_setuv(ST(argvi), (UV)(*arg12));
2309       argvi++;
2310     }
2311     {
2312       if (argvi >= items) {
2313         EXTEND(sp,1);
2314       }
2315 
2316       ST(argvi) = SWIG_FromCharPtrAndSize(arg13, *arg15);
2317       argvi++;
2318     }
2319 
2320 
2321     XSRETURN(argvi);
2322   fail:
2323 
2324 
2325     SWIG_croak_null();
2326   }
2327 }
2328 
2329 
XS(_wrap_NDMPConnection_tape_open)2330 XS(_wrap_NDMPConnection_tape_open) {
2331   {
2332     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2333     gchar *arg2 = (gchar *) 0 ;
2334     ndmp_enum arg3 ;
2335     void *argp1 = 0 ;
2336     int res1 = 0 ;
2337     int res2 ;
2338     char *buf2 = 0 ;
2339     int alloc2 = 0 ;
2340     int argvi = 0;
2341     gboolean result;
2342     dXSARGS;
2343 
2344     if ((items < 3) || (items > 3)) {
2345       SWIG_croak("Usage: NDMPConnection_tape_open(self,device,mode);");
2346     }
2347     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2348     if (!SWIG_IsOK(res1)) {
2349       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_tape_open" "', argument " "1"" of type '" "NDMPConnection *""'");
2350     }
2351     arg1 = (NDMPConnection *)(argp1);
2352     res2 = SWIG_AsCharPtrAndSize(ST(1), &buf2, NULL, &alloc2);
2353     if (!SWIG_IsOK(res2)) {
2354       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NDMPConnection_tape_open" "', argument " "2"" of type '" "gchar *""'");
2355     }
2356     arg2 = (gchar *)(buf2);
2357     arg3 = SvIV(ST(2));
2358     result = (gboolean)NDMPConnection_tape_open(arg1,arg2,arg3);
2359     {
2360       if (result)
2361       ST(argvi) = &PL_sv_yes;
2362       else
2363       ST(argvi) = &PL_sv_no;
2364       argvi++;
2365     }
2366 
2367     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2368     XSRETURN(argvi);
2369   fail:
2370 
2371     if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2372     SWIG_croak_null();
2373   }
2374 }
2375 
2376 
XS(_wrap_NDMPConnection_tape_close)2377 XS(_wrap_NDMPConnection_tape_close) {
2378   {
2379     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2380     void *argp1 = 0 ;
2381     int res1 = 0 ;
2382     int argvi = 0;
2383     gboolean result;
2384     dXSARGS;
2385 
2386     if ((items < 1) || (items > 1)) {
2387       SWIG_croak("Usage: NDMPConnection_tape_close(self);");
2388     }
2389     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2390     if (!SWIG_IsOK(res1)) {
2391       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_tape_close" "', argument " "1"" of type '" "NDMPConnection *""'");
2392     }
2393     arg1 = (NDMPConnection *)(argp1);
2394     result = (gboolean)NDMPConnection_tape_close(arg1);
2395     {
2396       if (result)
2397       ST(argvi) = &PL_sv_yes;
2398       else
2399       ST(argvi) = &PL_sv_no;
2400       argvi++;
2401     }
2402 
2403     XSRETURN(argvi);
2404   fail:
2405 
2406     SWIG_croak_null();
2407   }
2408 }
2409 
2410 
XS(_wrap_NDMPConnection_tape_mtio)2411 XS(_wrap_NDMPConnection_tape_mtio) {
2412   {
2413     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2414     ndmp_enum arg2 ;
2415     gint arg3 ;
2416     guint *arg4 = (guint *) 0 ;
2417     void *argp1 = 0 ;
2418     int res1 = 0 ;
2419     guint temp4 ;
2420     int argvi = 0;
2421     gboolean result;
2422     dXSARGS;
2423 
2424     arg4 = &temp4; temp4 = 0;
2425     if ((items < 3) || (items > 3)) {
2426       SWIG_croak("Usage: NDMPConnection_tape_mtio(self,tape_op,count);");
2427     }
2428     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2429     if (!SWIG_IsOK(res1)) {
2430       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_tape_mtio" "', argument " "1"" of type '" "NDMPConnection *""'");
2431     }
2432     arg1 = (NDMPConnection *)(argp1);
2433     arg2 = SvIV(ST(1));
2434     {
2435       if (sizeof(gint) == 1) {
2436         arg3 = amglue_SvI8(ST(2));
2437       } else if (sizeof(gint) == 2) {
2438         arg3 = amglue_SvI16(ST(2));
2439       } else if (sizeof(gint) == 4) {
2440         arg3 = amglue_SvI32(ST(2));
2441       } else if (sizeof(gint) == 8) {
2442         arg3 = amglue_SvI64(ST(2));
2443       } else {
2444         g_critical("Unexpected gint >64 bits?"); /* should be optimized out unless sizeof(gint) > 8 */
2445       }
2446     }
2447     result = (gboolean)NDMPConnection_tape_mtio(arg1,arg2,arg3,arg4);
2448     {
2449       if (result)
2450       ST(argvi) = &PL_sv_yes;
2451       else
2452       ST(argvi) = &PL_sv_no;
2453       argvi++;
2454     }
2455     {
2456       if (argvi >= items) {
2457         EXTEND(sp,1);
2458       }
2459 
2460       SP += argvi; PUTBACK;
2461       ST(argvi) = sv_2mortal(amglue_newSVu64(*arg4));
2462       SP -= argvi; argvi++;
2463     }
2464 
2465 
2466     XSRETURN(argvi);
2467   fail:
2468 
2469 
2470     SWIG_croak_null();
2471   }
2472 }
2473 
2474 
XS(_wrap_NDMPConnection_tape_write)2475 XS(_wrap_NDMPConnection_tape_write) {
2476   {
2477     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2478     gpointer arg2 = (gpointer) 0 ;
2479     guint64 arg3 ;
2480     guint64 *arg4 = (guint64 *) 0 ;
2481     void *argp1 = 0 ;
2482     int res1 = 0 ;
2483     guint64 temp4 ;
2484     int argvi = 0;
2485     gboolean result;
2486     dXSARGS;
2487 
2488     arg4 = &temp4; temp4 = 0;
2489     if ((items < 2) || (items > 2)) {
2490       SWIG_croak("Usage: NDMPConnection_tape_write(self,buf,len);");
2491     }
2492     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2493     if (!SWIG_IsOK(res1)) {
2494       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_tape_write" "', argument " "1"" of type '" "NDMPConnection *""'");
2495     }
2496     arg1 = (NDMPConnection *)(argp1);
2497     {
2498       int alloc = SWIG_OLDOBJ;
2499       size_t len_tmp; /* use a temporary with the right type */
2500       SWIG_AsCharPtrAndSize(ST(1), (char **)&arg2, &len_tmp, &alloc);
2501       if (len_tmp) len_tmp--; /* strip trailing NUL byte */
2502       arg3 = len_tmp;
2503     }
2504     result = (gboolean)NDMPConnection_tape_write(arg1,arg2,arg3,arg4);
2505     {
2506       if (result)
2507       ST(argvi) = &PL_sv_yes;
2508       else
2509       ST(argvi) = &PL_sv_no;
2510       argvi++;
2511     }
2512     {
2513       if (argvi >= items) {
2514         EXTEND(sp,1);
2515       }
2516 
2517       SP += argvi; PUTBACK;
2518       ST(argvi) = sv_2mortal(amglue_newSVu64(*arg4));
2519       SP -= argvi; argvi++;
2520     }
2521 
2522 
2523     XSRETURN(argvi);
2524   fail:
2525 
2526 
2527     SWIG_croak_null();
2528   }
2529 }
2530 
2531 
XS(_wrap_NDMPConnection_tape_read)2532 XS(_wrap_NDMPConnection_tape_read) {
2533   {
2534     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2535     gpointer arg2 = (gpointer) 0 ;
2536     guint64 arg3 ;
2537     guint64 *arg4 = (guint64 *) 0 ;
2538     void *argp1 = 0 ;
2539     int res1 = 0 ;
2540     guint64 out_count2 ;
2541     int argvi = 0;
2542     SV * _saved[1] ;
2543     gboolean result;
2544     dXSARGS;
2545 
2546     if ((items < 2) || (items > 2)) {
2547       SWIG_croak("Usage: NDMPConnection_tape_read(self,buf,count,out_count);");
2548     }
2549     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2550     if (!SWIG_IsOK(res1)) {
2551       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_tape_read" "', argument " "1"" of type '" "NDMPConnection *""'");
2552     }
2553     arg1 = (NDMPConnection *)(argp1);
2554     {
2555       arg3 = amglue_SvU64(ST(1));
2556       arg2 = arg3?g_malloc(arg3):NULL;
2557       out_count2 = 0;
2558       arg4 = &out_count2;
2559     }
2560     _saved[0] = ST(1);
2561     result = (gboolean)NDMPConnection_tape_read(arg1,arg2,arg3,arg4);
2562     {
2563       if (result)
2564       ST(argvi) = &PL_sv_yes;
2565       else
2566       ST(argvi) = &PL_sv_no;
2567       argvi++;
2568     }
2569     {
2570       if (argvi >= items) {
2571         EXTEND(sp,1);
2572       }
2573 
2574       /* convert the value, even if it's NULL */
2575       ST(argvi) = SWIG_FromCharPtrAndSize(arg2, *arg4);
2576       argvi++;
2577       if (arg2) g_free(arg2);
2578     }
2579 
2580     XSRETURN(argvi);
2581   fail:
2582 
2583     SWIG_croak_null();
2584   }
2585 }
2586 
2587 
XS(_wrap_NDMPConnection_tape_get_state)2588 XS(_wrap_NDMPConnection_tape_get_state) {
2589   {
2590     NDMPConnection *arg1 = (NDMPConnection *) 0 ;
2591     guint64 *arg2 = (guint64 *) 0 ;
2592     guint64 *arg3 = (guint64 *) 0 ;
2593     guint64 *arg4 = (guint64 *) 0 ;
2594     void *argp1 = 0 ;
2595     int res1 = 0 ;
2596     guint64 temp2 ;
2597     guint64 temp3 ;
2598     guint64 temp4 ;
2599     int argvi = 0;
2600     gboolean result;
2601     dXSARGS;
2602 
2603     arg2 = &temp2; temp2 = 0;
2604     arg3 = &temp3; temp3 = 0;
2605     arg4 = &temp4; temp4 = 0;
2606     if ((items < 1) || (items > 1)) {
2607       SWIG_croak("Usage: NDMPConnection_tape_get_state(self);");
2608     }
2609     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_NDMPConnection, 0 |  0 );
2610     if (!SWIG_IsOK(res1)) {
2611       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NDMPConnection_tape_get_state" "', argument " "1"" of type '" "NDMPConnection *""'");
2612     }
2613     arg1 = (NDMPConnection *)(argp1);
2614     result = (gboolean)NDMPConnection_tape_get_state(arg1,arg2,arg3,arg4);
2615     {
2616       if (result)
2617       ST(argvi) = &PL_sv_yes;
2618       else
2619       ST(argvi) = &PL_sv_no;
2620       argvi++;
2621     }
2622     {
2623       if (argvi >= items) {
2624         EXTEND(sp,1);
2625       }
2626 
2627       SP += argvi; PUTBACK;
2628       ST(argvi) = sv_2mortal(amglue_newSVu64(*arg2));
2629       SP -= argvi; argvi++;
2630     }
2631     {
2632       if (argvi >= items) {
2633         EXTEND(sp,1);
2634       }
2635 
2636       SP += argvi; PUTBACK;
2637       ST(argvi) = sv_2mortal(amglue_newSVu64(*arg3));
2638       SP -= argvi; argvi++;
2639     }
2640     {
2641       if (argvi >= items) {
2642         EXTEND(sp,1);
2643       }
2644 
2645       SP += argvi; PUTBACK;
2646       ST(argvi) = sv_2mortal(amglue_newSVu64(*arg4));
2647       SP -= argvi; argvi++;
2648     }
2649 
2650 
2651 
2652 
2653     XSRETURN(argvi);
2654   fail:
2655 
2656 
2657 
2658 
2659     SWIG_croak_null();
2660   }
2661 }
2662 
2663 
2664 
2665 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
2666 
2667 static swig_type_info _swigt__p_NDMPConnection = {"_p_NDMPConnection", "NDMPConnection *", 0, 0, (void*)"Amanda::NDMP::NDMPConnection", 0};
2668 static swig_type_info _swigt__p_char = {"_p_char", "gchar *|char *", 0, 0, (void*)0, 0};
2669 static swig_type_info _swigt__p_double = {"_p_double", "double *|gdouble *", 0, 0, (void*)0, 0};
2670 static swig_type_info _swigt__p_float = {"_p_float", "float *|gfloat *", 0, 0, (void*)0, 0};
2671 static swig_type_info _swigt__p_gint = {"_p_gint", "gint *", 0, 0, (void*)0, 0};
2672 static swig_type_info _swigt__p_gsize = {"_p_gsize", "gsize *", 0, 0, (void*)0, 0};
2673 static swig_type_info _swigt__p_guint = {"_p_guint", "guint *", 0, 0, (void*)0, 0};
2674 static swig_type_info _swigt__p_guint32 = {"_p_guint32", "guint32 *", 0, 0, (void*)0, 0};
2675 static swig_type_info _swigt__p_guint64 = {"_p_guint64", "guint64 *", 0, 0, (void*)0, 0};
2676 static swig_type_info _swigt__p_guint8 = {"_p_guint8", "guint8 *", 0, 0, (void*)0, 0};
2677 static swig_type_info _swigt__p_int = {"_p_int", "addr_type *|int *|tape_open_mode *|mover_mode *|data_halt_reason *|mover_halt_reason *|mover_pause_reason *|tape_mtio_op *|gboolean *|scsi_data_dir *|mover_state *", 0, 0, (void*)0, 0};
2678 static swig_type_info _swigt__p_ndmp_enum = {"_p_ndmp_enum", "ndmp_enum *", 0, 0, (void*)0, 0};
2679 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "guchar *|unsigned char *", 0, 0, (void*)0, 0};
2680 
2681 static swig_type_info *swig_type_initial[] = {
2682   &_swigt__p_NDMPConnection,
2683   &_swigt__p_char,
2684   &_swigt__p_double,
2685   &_swigt__p_float,
2686   &_swigt__p_gint,
2687   &_swigt__p_gsize,
2688   &_swigt__p_guint,
2689   &_swigt__p_guint32,
2690   &_swigt__p_guint64,
2691   &_swigt__p_guint8,
2692   &_swigt__p_int,
2693   &_swigt__p_ndmp_enum,
2694   &_swigt__p_unsigned_char,
2695 };
2696 
2697 static swig_cast_info _swigc__p_NDMPConnection[] = {  {&_swigt__p_NDMPConnection, 0, 0, 0},{0, 0, 0, 0}};
2698 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
2699 static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
2700 static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
2701 static swig_cast_info _swigc__p_gint[] = {  {&_swigt__p_gint, 0, 0, 0},{0, 0, 0, 0}};
2702 static swig_cast_info _swigc__p_gsize[] = {  {&_swigt__p_gsize, 0, 0, 0},{0, 0, 0, 0}};
2703 static swig_cast_info _swigc__p_guint[] = {  {&_swigt__p_guint, 0, 0, 0},{0, 0, 0, 0}};
2704 static swig_cast_info _swigc__p_guint32[] = {  {&_swigt__p_guint32, 0, 0, 0},{0, 0, 0, 0}};
2705 static swig_cast_info _swigc__p_guint64[] = {  {&_swigt__p_guint64, 0, 0, 0},{0, 0, 0, 0}};
2706 static swig_cast_info _swigc__p_guint8[] = {  {&_swigt__p_guint8, 0, 0, 0},{0, 0, 0, 0}};
2707 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
2708 static swig_cast_info _swigc__p_ndmp_enum[] = {  {&_swigt__p_ndmp_enum, 0, 0, 0},{0, 0, 0, 0}};
2709 static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
2710 
2711 static swig_cast_info *swig_cast_initial[] = {
2712   _swigc__p_NDMPConnection,
2713   _swigc__p_char,
2714   _swigc__p_double,
2715   _swigc__p_float,
2716   _swigc__p_gint,
2717   _swigc__p_gsize,
2718   _swigc__p_guint,
2719   _swigc__p_guint32,
2720   _swigc__p_guint64,
2721   _swigc__p_guint8,
2722   _swigc__p_int,
2723   _swigc__p_ndmp_enum,
2724   _swigc__p_unsigned_char,
2725 };
2726 
2727 
2728 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
2729 
2730 static swig_constant_info swig_constants[] = {
2731 {0,0,0,0,0,0}
2732 };
2733 #ifdef __cplusplus
2734 }
2735 #endif
2736 static swig_variable_info swig_variables[] = {
2737 {0,0,0,0}
2738 };
2739 static swig_command_info swig_commands[] = {
2740 {"Amanda::NDMPc::new_NDMPConnection", _wrap_new_NDMPConnection},
2741 {"Amanda::NDMPc::delete_NDMPConnection", _wrap_delete_NDMPConnection},
2742 {"Amanda::NDMPc::NDMPConnection_err_code", _wrap_NDMPConnection_err_code},
2743 {"Amanda::NDMPc::NDMPConnection_err_msg", _wrap_NDMPConnection_err_msg},
2744 {"Amanda::NDMPc::NDMPConnection_set_verbose", _wrap_NDMPConnection_set_verbose},
2745 {"Amanda::NDMPc::NDMPConnection_scsi_open", _wrap_NDMPConnection_scsi_open},
2746 {"Amanda::NDMPc::NDMPConnection_scsi_close", _wrap_NDMPConnection_scsi_close},
2747 {"Amanda::NDMPc::NDMPConnection_scsi_execute_cdb_C", _wrap_NDMPConnection_scsi_execute_cdb_C},
2748 {"Amanda::NDMPc::NDMPConnection_tape_open", _wrap_NDMPConnection_tape_open},
2749 {"Amanda::NDMPc::NDMPConnection_tape_close", _wrap_NDMPConnection_tape_close},
2750 {"Amanda::NDMPc::NDMPConnection_tape_mtio", _wrap_NDMPConnection_tape_mtio},
2751 {"Amanda::NDMPc::NDMPConnection_tape_write", _wrap_NDMPConnection_tape_write},
2752 {"Amanda::NDMPc::NDMPConnection_tape_read", _wrap_NDMPConnection_tape_read},
2753 {"Amanda::NDMPc::NDMPConnection_tape_get_state", _wrap_NDMPConnection_tape_get_state},
2754 {0,0}
2755 };
2756 /* -----------------------------------------------------------------------------
2757  * Type initialization:
2758  * This problem is tough by the requirement that no dynamic
2759  * memory is used. Also, since swig_type_info structures store pointers to
2760  * swig_cast_info structures and swig_cast_info structures store pointers back
2761  * to swig_type_info structures, we need some lookup code at initialization.
2762  * The idea is that swig generates all the structures that are needed.
2763  * The runtime then collects these partially filled structures.
2764  * The SWIG_InitializeModule function takes these initial arrays out of
2765  * swig_module, and does all the lookup, filling in the swig_module.types
2766  * array with the correct data and linking the correct swig_cast_info
2767  * structures together.
2768  *
2769  * The generated swig_type_info structures are assigned statically to an initial
2770  * array. We just loop through that array, and handle each type individually.
2771  * First we lookup if this type has been already loaded, and if so, use the
2772  * loaded structure instead of the generated one. Then we have to fill in the
2773  * cast linked list. The cast data is initially stored in something like a
2774  * two-dimensional array. Each row corresponds to a type (there are the same
2775  * number of rows as there are in the swig_type_initial array). Each entry in
2776  * a column is one of the swig_cast_info structures for that type.
2777  * The cast_initial array is actually an array of arrays, because each row has
2778  * a variable number of columns. So to actually build the cast linked list,
2779  * we find the array of casts associated with the type, and loop through it
2780  * adding the casts to the list. The one last trick we need to do is making
2781  * sure the type pointer in the swig_cast_info struct is correct.
2782  *
2783  * First off, we lookup the cast->type name to see if it is already loaded.
2784  * There are three cases to handle:
2785  *  1) If the cast->type has already been loaded AND the type we are adding
2786  *     casting info to has not been loaded (it is in this module), THEN we
2787  *     replace the cast->type pointer with the type pointer that has already
2788  *     been loaded.
2789  *  2) If BOTH types (the one we are adding casting info to, and the
2790  *     cast->type) are loaded, THEN the cast info has already been loaded by
2791  *     the previous module so we just ignore it.
2792  *  3) Finally, if cast->type has not already been loaded, then we add that
2793  *     swig_cast_info to the linked list (because the cast->type) pointer will
2794  *     be correct.
2795  * ----------------------------------------------------------------------------- */
2796 
2797 #ifdef __cplusplus
2798 extern "C" {
2799 #if 0
2800 } /* c-mode */
2801 #endif
2802 #endif
2803 
2804 #if 0
2805 #define SWIGRUNTIME_DEBUG
2806 #endif
2807 
2808 
2809 SWIGRUNTIME void
SWIG_InitializeModule(void * clientdata)2810 SWIG_InitializeModule(void *clientdata) {
2811   size_t i;
2812   swig_module_info *module_head, *iter;
2813   int init;
2814 
2815   /* check to see if the circular list has been setup, if not, set it up */
2816   if (swig_module.next==0) {
2817     /* Initialize the swig_module */
2818     swig_module.type_initial = swig_type_initial;
2819     swig_module.cast_initial = swig_cast_initial;
2820     swig_module.next = &swig_module;
2821     init = 1;
2822   } else {
2823     init = 0;
2824   }
2825 
2826   /* Try and load any already created modules */
2827   module_head = SWIG_GetModule(clientdata);
2828   if (!module_head) {
2829     /* This is the first module loaded for this interpreter */
2830     /* so set the swig module into the interpreter */
2831     SWIG_SetModule(clientdata, &swig_module);
2832   } else {
2833     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
2834     iter=module_head;
2835     do {
2836       if (iter==&swig_module) {
2837         /* Our module is already in the list, so there's nothing more to do. */
2838         return;
2839       }
2840       iter=iter->next;
2841     } while (iter!= module_head);
2842 
2843     /* otherwise we must add our module into the list */
2844     swig_module.next = module_head->next;
2845     module_head->next = &swig_module;
2846   }
2847 
2848   /* When multiple interpreters are used, a module could have already been initialized in
2849        a different interpreter, but not yet have a pointer in this interpreter.
2850        In this case, we do not want to continue adding types... everything should be
2851        set up already */
2852   if (init == 0) return;
2853 
2854   /* Now work on filling in swig_module.types */
2855 #ifdef SWIGRUNTIME_DEBUG
2856   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
2857 #endif
2858   for (i = 0; i < swig_module.size; ++i) {
2859     swig_type_info *type = 0;
2860     swig_type_info *ret;
2861     swig_cast_info *cast;
2862 
2863 #ifdef SWIGRUNTIME_DEBUG
2864     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
2865 #endif
2866 
2867     /* if there is another module already loaded */
2868     if (swig_module.next != &swig_module) {
2869       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
2870     }
2871     if (type) {
2872       /* Overwrite clientdata field */
2873 #ifdef SWIGRUNTIME_DEBUG
2874       printf("SWIG_InitializeModule: found type %s\n", type->name);
2875 #endif
2876       if (swig_module.type_initial[i]->clientdata) {
2877         type->clientdata = swig_module.type_initial[i]->clientdata;
2878 #ifdef SWIGRUNTIME_DEBUG
2879         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
2880 #endif
2881       }
2882     } else {
2883       type = swig_module.type_initial[i];
2884     }
2885 
2886     /* Insert casting types */
2887     cast = swig_module.cast_initial[i];
2888     while (cast->type) {
2889       /* Don't need to add information already in the list */
2890       ret = 0;
2891 #ifdef SWIGRUNTIME_DEBUG
2892       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
2893 #endif
2894       if (swig_module.next != &swig_module) {
2895         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
2896 #ifdef SWIGRUNTIME_DEBUG
2897         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
2898 #endif
2899       }
2900       if (ret) {
2901         if (type == swig_module.type_initial[i]) {
2902 #ifdef SWIGRUNTIME_DEBUG
2903           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
2904 #endif
2905           cast->type = ret;
2906           ret = 0;
2907         } else {
2908           /* Check for casting already in the list */
2909           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
2910 #ifdef SWIGRUNTIME_DEBUG
2911           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
2912 #endif
2913           if (!ocast) ret = 0;
2914         }
2915       }
2916 
2917       if (!ret) {
2918 #ifdef SWIGRUNTIME_DEBUG
2919         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
2920 #endif
2921         if (type->cast) {
2922           type->cast->prev = cast;
2923           cast->next = type->cast;
2924         }
2925         type->cast = cast;
2926       }
2927       cast++;
2928     }
2929     /* Set entry in modules->types array equal to the type */
2930     swig_module.types[i] = type;
2931   }
2932   swig_module.types[i] = 0;
2933 
2934 #ifdef SWIGRUNTIME_DEBUG
2935   printf("**** SWIG_InitializeModule: Cast List ******\n");
2936   for (i = 0; i < swig_module.size; ++i) {
2937     int j = 0;
2938     swig_cast_info *cast = swig_module.cast_initial[i];
2939     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
2940     while (cast->type) {
2941       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
2942       cast++;
2943       ++j;
2944     }
2945     printf("---- Total casts: %d\n",j);
2946   }
2947   printf("**** SWIG_InitializeModule: Cast List ******\n");
2948 #endif
2949 }
2950 
2951 /* This function will propagate the clientdata field of type to
2952 * any new swig_type_info structures that have been added into the list
2953 * of equivalent types.  It is like calling
2954 * SWIG_TypeClientData(type, clientdata) a second time.
2955 */
2956 SWIGRUNTIME void
SWIG_PropagateClientData(void)2957 SWIG_PropagateClientData(void) {
2958   size_t i;
2959   swig_cast_info *equiv;
2960   static int init_run = 0;
2961 
2962   if (init_run) return;
2963   init_run = 1;
2964 
2965   for (i = 0; i < swig_module.size; i++) {
2966     if (swig_module.types[i]->clientdata) {
2967       equiv = swig_module.types[i]->cast;
2968       while (equiv) {
2969         if (!equiv->converter) {
2970           if (equiv->type && !equiv->type->clientdata)
2971           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
2972         }
2973         equiv = equiv->next;
2974       }
2975     }
2976   }
2977 }
2978 
2979 #ifdef __cplusplus
2980 #if 0
2981 {
2982   /* c-mode */
2983 #endif
2984 }
2985 #endif
2986 
2987 
2988 
2989 #if defined(__cplusplus) && ! defined(XSPROTO)
2990 extern "C"
2991 #endif
2992 
XS(SWIG_init)2993 XS(SWIG_init) {
2994   dXSARGS;
2995   int i;
2996 
2997   SWIG_InitializeModule(0);
2998 
2999   /* Install commands */
3000   for (i = 0; swig_commands[i].name; i++) {
3001     /* Casts only needed for Perl < 5.10. */
3002 #ifdef __cplusplus
3003     newXS(const_cast<char*>(swig_commands[i].name), swig_commands[i].wrapper, const_cast<char*>(__FILE__));
3004 #else
3005     newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__);
3006 #endif
3007   }
3008 
3009   /* Install variables */
3010   for (i = 0; swig_variables[i].name; i++) {
3011     SV *sv;
3012     sv = get_sv(swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
3013     if (swig_variables[i].type) {
3014       SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
3015     } else {
3016       sv_setiv(sv,(IV) 0);
3017     }
3018     swig_create_magic(sv, swig_variables[i].name, swig_variables[i].set, swig_variables[i].get);
3019   }
3020 
3021   /* Install constant */
3022   for (i = 0; swig_constants[i].type; i++) {
3023     SV *sv;
3024     sv = get_sv(swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
3025     switch(swig_constants[i].type) {
3026     case SWIG_INT:
3027       sv_setiv(sv, (IV) swig_constants[i].lvalue);
3028       break;
3029     case SWIG_FLOAT:
3030       sv_setnv(sv, (double) swig_constants[i].dvalue);
3031       break;
3032     case SWIG_STRING:
3033       sv_setpv(sv, (const char *) swig_constants[i].pvalue);
3034       break;
3035     case SWIG_POINTER:
3036       SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
3037       break;
3038     case SWIG_BINARY:
3039       SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
3040       break;
3041     default:
3042       break;
3043     }
3044     SvREADONLY_on(sv);
3045   }
3046 
3047 
3048   glib_init();
3049 
3050   SWIG_TypeClientData(SWIGTYPE_p_NDMPConnection, (void*) "Amanda::NDMP::NDMPConnection");
3051   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3052     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_SCSI_DATA_DIR_NONE", TRUE | 0x2 | GV_ADDMULTI);
3053     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_SCSI_DATA_DIR_NONE)));
3054     SvREADONLY_on(sv);
3055   } while(0) /*@SWIG@*/;
3056   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3057     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_SCSI_DATA_DIR_IN", TRUE | 0x2 | GV_ADDMULTI);
3058     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_SCSI_DATA_DIR_IN)));
3059     SvREADONLY_on(sv);
3060   } while(0) /*@SWIG@*/;
3061   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3062     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_SCSI_DATA_DIR_OUT", TRUE | 0x2 | GV_ADDMULTI);
3063     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_SCSI_DATA_DIR_OUT)));
3064     SvREADONLY_on(sv);
3065   } while(0) /*@SWIG@*/;
3066   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3067     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_TAPE_READ_MODE", TRUE | 0x2 | GV_ADDMULTI);
3068     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_TAPE_READ_MODE)));
3069     SvREADONLY_on(sv);
3070   } while(0) /*@SWIG@*/;
3071   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3072     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_TAPE_RDWR_MODE", TRUE | 0x2 | GV_ADDMULTI);
3073     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_TAPE_RDWR_MODE)));
3074     SvREADONLY_on(sv);
3075   } while(0) /*@SWIG@*/;
3076   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3077     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_TAPE_RAW_MODE", TRUE | 0x2 | GV_ADDMULTI);
3078     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_TAPE_RAW_MODE)));
3079     SvREADONLY_on(sv);
3080   } while(0) /*@SWIG@*/;
3081   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3082     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MTIO_FSF", TRUE | 0x2 | GV_ADDMULTI);
3083     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MTIO_FSF)));
3084     SvREADONLY_on(sv);
3085   } while(0) /*@SWIG@*/;
3086   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3087     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MTIO_BSF", TRUE | 0x2 | GV_ADDMULTI);
3088     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MTIO_BSF)));
3089     SvREADONLY_on(sv);
3090   } while(0) /*@SWIG@*/;
3091   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3092     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MTIO_FSR", TRUE | 0x2 | GV_ADDMULTI);
3093     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MTIO_FSR)));
3094     SvREADONLY_on(sv);
3095   } while(0) /*@SWIG@*/;
3096   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3097     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MTIO_BSR", TRUE | 0x2 | GV_ADDMULTI);
3098     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MTIO_BSR)));
3099     SvREADONLY_on(sv);
3100   } while(0) /*@SWIG@*/;
3101   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3102     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MTIO_REW", TRUE | 0x2 | GV_ADDMULTI);
3103     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MTIO_REW)));
3104     SvREADONLY_on(sv);
3105   } while(0) /*@SWIG@*/;
3106   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3107     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MTIO_EOF", TRUE | 0x2 | GV_ADDMULTI);
3108     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MTIO_EOF)));
3109     SvREADONLY_on(sv);
3110   } while(0) /*@SWIG@*/;
3111   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3112     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MTIO_OFF", TRUE | 0x2 | GV_ADDMULTI);
3113     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MTIO_OFF)));
3114     SvREADONLY_on(sv);
3115   } while(0) /*@SWIG@*/;
3116   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3117     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_MODE_READ", TRUE | 0x2 | GV_ADDMULTI);
3118     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_MODE_READ)));
3119     SvREADONLY_on(sv);
3120   } while(0) /*@SWIG@*/;
3121   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3122     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_MODE_WRITE", TRUE | 0x2 | GV_ADDMULTI);
3123     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_MODE_WRITE)));
3124     SvREADONLY_on(sv);
3125   } while(0) /*@SWIG@*/;
3126   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3127     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_ADDR_LOCAL", TRUE | 0x2 | GV_ADDMULTI);
3128     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_ADDR_LOCAL)));
3129     SvREADONLY_on(sv);
3130   } while(0) /*@SWIG@*/;
3131   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3132     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_ADDR_TCP", TRUE | 0x2 | GV_ADDMULTI);
3133     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_ADDR_TCP)));
3134     SvREADONLY_on(sv);
3135   } while(0) /*@SWIG@*/;
3136   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3137     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_ADDR_AS_CONNECTED", TRUE | 0x2 | GV_ADDMULTI);
3138     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_ADDR_AS_CONNECTED)));
3139     SvREADONLY_on(sv);
3140   } while(0) /*@SWIG@*/;
3141   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3142     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_STATE_IDLE", TRUE | 0x2 | GV_ADDMULTI);
3143     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_STATE_IDLE)));
3144     SvREADONLY_on(sv);
3145   } while(0) /*@SWIG@*/;
3146   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3147     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_STATE_LISTEN", TRUE | 0x2 | GV_ADDMULTI);
3148     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_STATE_LISTEN)));
3149     SvREADONLY_on(sv);
3150   } while(0) /*@SWIG@*/;
3151   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3152     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_STATE_ACTIVE", TRUE | 0x2 | GV_ADDMULTI);
3153     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_STATE_ACTIVE)));
3154     SvREADONLY_on(sv);
3155   } while(0) /*@SWIG@*/;
3156   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3157     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_STATE_PAUSED", TRUE | 0x2 | GV_ADDMULTI);
3158     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_STATE_PAUSED)));
3159     SvREADONLY_on(sv);
3160   } while(0) /*@SWIG@*/;
3161   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3162     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_STATE_HALTED", TRUE | 0x2 | GV_ADDMULTI);
3163     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_STATE_HALTED)));
3164     SvREADONLY_on(sv);
3165   } while(0) /*@SWIG@*/;
3166   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3167     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_STATE_STANDBY", TRUE | 0x2 | GV_ADDMULTI);
3168     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_STATE_STANDBY)));
3169     SvREADONLY_on(sv);
3170   } while(0) /*@SWIG@*/;
3171   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3172     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_DATA_HALT_NA", TRUE | 0x2 | GV_ADDMULTI);
3173     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_DATA_HALT_NA)));
3174     SvREADONLY_on(sv);
3175   } while(0) /*@SWIG@*/;
3176   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3177     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_DATA_HALT_SUCCESSFUL", TRUE | 0x2 | GV_ADDMULTI);
3178     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_DATA_HALT_SUCCESSFUL)));
3179     SvREADONLY_on(sv);
3180   } while(0) /*@SWIG@*/;
3181   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3182     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_DATA_HALT_ABORTED", TRUE | 0x2 | GV_ADDMULTI);
3183     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_DATA_HALT_ABORTED)));
3184     SvREADONLY_on(sv);
3185   } while(0) /*@SWIG@*/;
3186   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3187     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_DATA_HALT_INTERNAL_ERROR", TRUE | 0x2 | GV_ADDMULTI);
3188     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_DATA_HALT_INTERNAL_ERROR)));
3189     SvREADONLY_on(sv);
3190   } while(0) /*@SWIG@*/;
3191   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3192     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_DATA_HALT_CONNECT_ERROR", TRUE | 0x2 | GV_ADDMULTI);
3193     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_DATA_HALT_CONNECT_ERROR)));
3194     SvREADONLY_on(sv);
3195   } while(0) /*@SWIG@*/;
3196   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3197     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_HALT_NA", TRUE | 0x2 | GV_ADDMULTI);
3198     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_HALT_NA)));
3199     SvREADONLY_on(sv);
3200   } while(0) /*@SWIG@*/;
3201   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3202     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_HALT_CONNECT_CLOSED", TRUE | 0x2 | GV_ADDMULTI);
3203     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_HALT_CONNECT_CLOSED)));
3204     SvREADONLY_on(sv);
3205   } while(0) /*@SWIG@*/;
3206   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3207     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_HALT_ABORTED", TRUE | 0x2 | GV_ADDMULTI);
3208     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_HALT_ABORTED)));
3209     SvREADONLY_on(sv);
3210   } while(0) /*@SWIG@*/;
3211   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3212     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_HALT_INTERNAL_ERROR", TRUE | 0x2 | GV_ADDMULTI);
3213     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_HALT_INTERNAL_ERROR)));
3214     SvREADONLY_on(sv);
3215   } while(0) /*@SWIG@*/;
3216   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3217     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_HALT_CONNECT_ERROR", TRUE | 0x2 | GV_ADDMULTI);
3218     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_HALT_CONNECT_ERROR)));
3219     SvREADONLY_on(sv);
3220   } while(0) /*@SWIG@*/;
3221   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3222     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_PAUSE_NA", TRUE | 0x2 | GV_ADDMULTI);
3223     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_PAUSE_NA)));
3224     SvREADONLY_on(sv);
3225   } while(0) /*@SWIG@*/;
3226   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3227     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_PAUSE_EOM", TRUE | 0x2 | GV_ADDMULTI);
3228     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_PAUSE_EOM)));
3229     SvREADONLY_on(sv);
3230   } while(0) /*@SWIG@*/;
3231   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3232     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_PAUSE_EOF", TRUE | 0x2 | GV_ADDMULTI);
3233     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_PAUSE_EOF)));
3234     SvREADONLY_on(sv);
3235   } while(0) /*@SWIG@*/;
3236   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3237     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_PAUSE_SEEK", TRUE | 0x2 | GV_ADDMULTI);
3238     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_PAUSE_SEEK)));
3239     SvREADONLY_on(sv);
3240   } while(0) /*@SWIG@*/;
3241   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3242     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_PAUSE_MEDIA_ERROR", TRUE | 0x2 | GV_ADDMULTI);
3243     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_PAUSE_MEDIA_ERROR)));
3244     SvREADONLY_on(sv);
3245   } while(0) /*@SWIG@*/;
3246   /*@SWIG:/usr/share/swig/3.0.7/perl5/perltypemaps.swg,65,%set_constant@*/ do {
3247     SV *sv = get_sv((char*) SWIG_prefix "NDMP9_MOVER_PAUSE_EOW", TRUE | 0x2 | GV_ADDMULTI);
3248     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(NDMP9_MOVER_PAUSE_EOW)));
3249     SvREADONLY_on(sv);
3250   } while(0) /*@SWIG@*/;
3251   ST(0) = &PL_sv_yes;
3252   XSRETURN(1);
3253 }
3254 
3255