0b4111811399539f86d26775531a670349a9d156
[debian/amanda] / perl / Amanda / Device.c
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 1.3.33
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 #define SWIGPERL
12 #define SWIG_CASTRANK_MODE
13 /* -----------------------------------------------------------------------------
14  *  This section contains generic SWIG labels for method/variable
15  *  declarations/attributes, and other compiler dependent labels.
16  * ----------------------------------------------------------------------------- */
17
18 /* template workaround for compilers that cannot correctly implement the C++ standard */
19 #ifndef SWIGTEMPLATEDISAMBIGUATOR
20 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
21 #  define SWIGTEMPLATEDISAMBIGUATOR template
22 # elif defined(__HP_aCC)
23 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
24 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
25 #  define SWIGTEMPLATEDISAMBIGUATOR template
26 # else
27 #  define SWIGTEMPLATEDISAMBIGUATOR
28 # endif
29 #endif
30
31 /* inline attribute */
32 #ifndef SWIGINLINE
33 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
34 #   define SWIGINLINE inline
35 # else
36 #   define SWIGINLINE
37 # endif
38 #endif
39
40 /* attribute recognised by some compilers to avoid 'unused' warnings */
41 #ifndef SWIGUNUSED
42 # if defined(__GNUC__)
43 #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
44 #     define SWIGUNUSED __attribute__ ((__unused__)) 
45 #   else
46 #     define SWIGUNUSED
47 #   endif
48 # elif defined(__ICC)
49 #   define SWIGUNUSED __attribute__ ((__unused__)) 
50 # else
51 #   define SWIGUNUSED 
52 # endif
53 #endif
54
55 #ifndef SWIGUNUSEDPARM
56 # ifdef __cplusplus
57 #   define SWIGUNUSEDPARM(p)
58 # else
59 #   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
60 # endif
61 #endif
62
63 /* internal SWIG method */
64 #ifndef SWIGINTERN
65 # define SWIGINTERN static SWIGUNUSED
66 #endif
67
68 /* internal inline SWIG method */
69 #ifndef SWIGINTERNINLINE
70 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
71 #endif
72
73 /* exporting methods */
74 #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
75 #  ifndef GCC_HASCLASSVISIBILITY
76 #    define GCC_HASCLASSVISIBILITY
77 #  endif
78 #endif
79
80 #ifndef SWIGEXPORT
81 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
82 #   if defined(STATIC_LINKED)
83 #     define SWIGEXPORT
84 #   else
85 #     define SWIGEXPORT __declspec(dllexport)
86 #   endif
87 # else
88 #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
89 #     define SWIGEXPORT __attribute__ ((visibility("default")))
90 #   else
91 #     define SWIGEXPORT
92 #   endif
93 # endif
94 #endif
95
96 /* calling conventions for Windows */
97 #ifndef SWIGSTDCALL
98 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
99 #   define SWIGSTDCALL __stdcall
100 # else
101 #   define SWIGSTDCALL
102 # endif 
103 #endif
104
105 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
106 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
107 # define _CRT_SECURE_NO_DEPRECATE
108 #endif
109
110 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
111 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
112 # define _SCL_SECURE_NO_DEPRECATE
113 #endif
114
115
116 /* -----------------------------------------------------------------------------
117  * swigrun.swg
118  *
119  * This file contains generic CAPI SWIG runtime support for pointer
120  * type checking.
121  * ----------------------------------------------------------------------------- */
122
123 /* This should only be incremented when either the layout of swig_type_info changes,
124    or for whatever reason, the runtime changes incompatibly */
125 #define SWIG_RUNTIME_VERSION "3"
126
127 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
128 #ifdef SWIG_TYPE_TABLE
129 # define SWIG_QUOTE_STRING(x) #x
130 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
131 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
132 #else
133 # define SWIG_TYPE_TABLE_NAME
134 #endif
135
136 /*
137   You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
138   creating a static or dynamic library from the swig runtime code.
139   In 99.9% of the cases, swig just needs to declare them as 'static'.
140   
141   But only do this if is strictly necessary, ie, if you have problems
142   with your compiler or so.
143 */
144
145 #ifndef SWIGRUNTIME
146 # define SWIGRUNTIME SWIGINTERN
147 #endif
148
149 #ifndef SWIGRUNTIMEINLINE
150 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
151 #endif
152
153 /*  Generic buffer size */
154 #ifndef SWIG_BUFFER_SIZE
155 # define SWIG_BUFFER_SIZE 1024
156 #endif
157
158 /* Flags for pointer conversions */
159 #define SWIG_POINTER_DISOWN        0x1
160
161 /* Flags for new pointer objects */
162 #define SWIG_POINTER_OWN           0x1
163
164
165 /* 
166    Flags/methods for returning states.
167    
168    The swig conversion methods, as ConvertPtr, return and integer 
169    that tells if the conversion was successful or not. And if not,
170    an error code can be returned (see swigerrors.swg for the codes).
171    
172    Use the following macros/flags to set or process the returning
173    states.
174    
175    In old swig versions, you usually write code as:
176
177      if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
178        // success code
179      } else {
180        //fail code
181      }
182
183    Now you can be more explicit as:
184
185     int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
186     if (SWIG_IsOK(res)) {
187       // success code
188     } else {
189       // fail code
190     }
191
192    that seems to be the same, but now you can also do
193
194     Type *ptr;
195     int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
196     if (SWIG_IsOK(res)) {
197       // success code
198       if (SWIG_IsNewObj(res) {
199         ...
200         delete *ptr;
201       } else {
202         ...
203       }
204     } else {
205       // fail code
206     }
207     
208    I.e., now SWIG_ConvertPtr can return new objects and you can
209    identify the case and take care of the deallocation. Of course that
210    requires also to SWIG_ConvertPtr to return new result values, as
211
212       int SWIG_ConvertPtr(obj, ptr,...) {         
213         if (<obj is ok>) {                             
214           if (<need new object>) {                     
215             *ptr = <ptr to new allocated object>; 
216             return SWIG_NEWOBJ;                
217           } else {                                     
218             *ptr = <ptr to old object>;        
219             return SWIG_OLDOBJ;                
220           }                                    
221         } else {                                       
222           return SWIG_BADOBJ;                  
223         }                                              
224       }
225
226    Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
227    more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
228    swig errors code.
229
230    Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
231    allows to return the 'cast rank', for example, if you have this
232
233        int food(double)
234        int fooi(int);
235
236    and you call
237  
238       food(1)   // cast rank '1'  (1 -> 1.0)
239       fooi(1)   // cast rank '0'
240
241    just use the SWIG_AddCast()/SWIG_CheckState()
242
243
244  */
245 #define SWIG_OK                    (0) 
246 #define SWIG_ERROR                 (-1)
247 #define SWIG_IsOK(r)               (r >= 0)
248 #define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  
249
250 /* The CastRankLimit says how many bits are used for the cast rank */
251 #define SWIG_CASTRANKLIMIT         (1 << 8)
252 /* The NewMask denotes the object was created (using new/malloc) */
253 #define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
254 /* The TmpMask is for in/out typemaps that use temporal objects */
255 #define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
256 /* Simple returning values */
257 #define SWIG_BADOBJ                (SWIG_ERROR)
258 #define SWIG_OLDOBJ                (SWIG_OK)
259 #define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
260 #define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
261 /* Check, add and del mask methods */
262 #define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
263 #define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
264 #define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
265 #define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
266 #define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
267 #define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
268
269
270 /* Cast-Rank Mode */
271 #if defined(SWIG_CASTRANK_MODE)
272 #  ifndef SWIG_TypeRank
273 #    define SWIG_TypeRank             unsigned long
274 #  endif
275 #  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
276 #    define SWIG_MAXCASTRANK          (2)
277 #  endif
278 #  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
279 #  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
280 SWIGINTERNINLINE int SWIG_AddCast(int r) { 
281   return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
282 }
283 SWIGINTERNINLINE int SWIG_CheckState(int r) { 
284   return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
285 }
286 #else /* no cast-rank mode */
287 #  define SWIG_AddCast
288 #  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
289 #endif
290
291
292
293
294 #include <string.h>
295
296 #ifdef __cplusplus
297 extern "C" {
298 #endif
299
300 typedef void *(*swig_converter_func)(void *);
301 typedef struct swig_type_info *(*swig_dycast_func)(void **);
302
303 /* Structure to store inforomation on one type */
304 typedef struct swig_type_info {
305   const char             *name;                 /* mangled name of this type */
306   const char             *str;                  /* human readable name of this type */
307   swig_dycast_func        dcast;                /* dynamic cast function down a hierarchy */
308   struct swig_cast_info  *cast;                 /* linked list of types that can cast into this type */
309   void                   *clientdata;           /* language specific type data */
310   int                    owndata;               /* flag if the structure owns the clientdata */
311 } swig_type_info;
312
313 /* Structure to store a type and conversion function used for casting */
314 typedef struct swig_cast_info {
315   swig_type_info         *type;                 /* pointer to type that is equivalent to this type */
316   swig_converter_func     converter;            /* function to cast the void pointers */
317   struct swig_cast_info  *next;                 /* pointer to next cast in linked list */
318   struct swig_cast_info  *prev;                 /* pointer to the previous cast */
319 } swig_cast_info;
320
321 /* Structure used to store module information
322  * Each module generates one structure like this, and the runtime collects
323  * all of these structures and stores them in a circularly linked list.*/
324 typedef struct swig_module_info {
325   swig_type_info         **types;               /* Array of pointers to swig_type_info structures that are in this module */
326   size_t                 size;                  /* Number of types in this module */
327   struct swig_module_info *next;                /* Pointer to next element in circularly linked list */
328   swig_type_info         **type_initial;        /* Array of initially generated type structures */
329   swig_cast_info         **cast_initial;        /* Array of initially generated casting structures */
330   void                    *clientdata;          /* Language specific module data */
331 } swig_module_info;
332
333 /* 
334   Compare two type names skipping the space characters, therefore
335   "char*" == "char *" and "Class<int>" == "Class<int >", etc.
336
337   Return 0 when the two name types are equivalent, as in
338   strncmp, but skipping ' '.
339 */
340 SWIGRUNTIME int
341 SWIG_TypeNameComp(const char *f1, const char *l1,
342                   const char *f2, const char *l2) {
343   for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
344     while ((*f1 == ' ') && (f1 != l1)) ++f1;
345     while ((*f2 == ' ') && (f2 != l2)) ++f2;
346     if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
347   }
348   return (int)((l1 - f1) - (l2 - f2));
349 }
350
351 /*
352   Check type equivalence in a name list like <name1>|<name2>|...
353   Return 0 if not equal, 1 if equal
354 */
355 SWIGRUNTIME int
356 SWIG_TypeEquiv(const char *nb, const char *tb) {
357   int equiv = 0;
358   const char* te = tb + strlen(tb);
359   const char* ne = nb;
360   while (!equiv && *ne) {
361     for (nb = ne; *ne; ++ne) {
362       if (*ne == '|') break;
363     }
364     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
365     if (*ne) ++ne;
366   }
367   return equiv;
368 }
369
370 /*
371   Check type equivalence in a name list like <name1>|<name2>|...
372   Return 0 if equal, -1 if nb < tb, 1 if nb > tb
373 */
374 SWIGRUNTIME int
375 SWIG_TypeCompare(const char *nb, const char *tb) {
376   int equiv = 0;
377   const char* te = tb + strlen(tb);
378   const char* ne = nb;
379   while (!equiv && *ne) {
380     for (nb = ne; *ne; ++ne) {
381       if (*ne == '|') break;
382     }
383     equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
384     if (*ne) ++ne;
385   }
386   return equiv;
387 }
388
389
390 /* think of this as a c++ template<> or a scheme macro */
391 #define SWIG_TypeCheck_Template(comparison, ty)         \
392   if (ty) {                                             \
393     swig_cast_info *iter = ty->cast;                    \
394     while (iter) {                                      \
395       if (comparison) {                                 \
396         if (iter == ty->cast) return iter;              \
397         /* Move iter to the top of the linked list */   \
398         iter->prev->next = iter->next;                  \
399         if (iter->next)                                 \
400           iter->next->prev = iter->prev;                \
401         iter->next = ty->cast;                          \
402         iter->prev = 0;                                 \
403         if (ty->cast) ty->cast->prev = iter;            \
404         ty->cast = iter;                                \
405         return iter;                                    \
406       }                                                 \
407       iter = iter->next;                                \
408     }                                                   \
409   }                                                     \
410   return 0
411
412 /*
413   Check the typename
414 */
415 SWIGRUNTIME swig_cast_info *
416 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
417   SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
418 }
419
420 /* Same as previous function, except strcmp is replaced with a pointer comparison */
421 SWIGRUNTIME swig_cast_info *
422 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
423   SWIG_TypeCheck_Template(iter->type == from, into);
424 }
425
426 /*
427   Cast a pointer up an inheritance hierarchy
428 */
429 SWIGRUNTIMEINLINE void *
430 SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
431   return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
432 }
433
434 /* 
435    Dynamic pointer casting. Down an inheritance hierarchy
436 */
437 SWIGRUNTIME swig_type_info *
438 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
439   swig_type_info *lastty = ty;
440   if (!ty || !ty->dcast) return ty;
441   while (ty && (ty->dcast)) {
442     ty = (*ty->dcast)(ptr);
443     if (ty) lastty = ty;
444   }
445   return lastty;
446 }
447
448 /*
449   Return the name associated with this type
450 */
451 SWIGRUNTIMEINLINE const char *
452 SWIG_TypeName(const swig_type_info *ty) {
453   return ty->name;
454 }
455
456 /*
457   Return the pretty name associated with this type,
458   that is an unmangled type name in a form presentable to the user.
459 */
460 SWIGRUNTIME const char *
461 SWIG_TypePrettyName(const swig_type_info *type) {
462   /* The "str" field contains the equivalent pretty names of the
463      type, separated by vertical-bar characters.  We choose
464      to print the last name, as it is often (?) the most
465      specific. */
466   if (!type) return NULL;
467   if (type->str != NULL) {
468     const char *last_name = type->str;
469     const char *s;
470     for (s = type->str; *s; s++)
471       if (*s == '|') last_name = s+1;
472     return last_name;
473   }
474   else
475     return type->name;
476 }
477
478 /* 
479    Set the clientdata field for a type
480 */
481 SWIGRUNTIME void
482 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
483   swig_cast_info *cast = ti->cast;
484   /* if (ti->clientdata == clientdata) return; */
485   ti->clientdata = clientdata;
486   
487   while (cast) {
488     if (!cast->converter) {
489       swig_type_info *tc = cast->type;
490       if (!tc->clientdata) {
491         SWIG_TypeClientData(tc, clientdata);
492       }
493     }    
494     cast = cast->next;
495   }
496 }
497 SWIGRUNTIME void
498 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
499   SWIG_TypeClientData(ti, clientdata);
500   ti->owndata = 1;
501 }
502   
503 /*
504   Search for a swig_type_info structure only by mangled name
505   Search is a O(log #types)
506   
507   We start searching at module start, and finish searching when start == end.  
508   Note: if start == end at the beginning of the function, we go all the way around
509   the circular list.
510 */
511 SWIGRUNTIME swig_type_info *
512 SWIG_MangledTypeQueryModule(swig_module_info *start, 
513                             swig_module_info *end, 
514                             const char *name) {
515   swig_module_info *iter = start;
516   do {
517     if (iter->size) {
518       register size_t l = 0;
519       register size_t r = iter->size - 1;
520       do {
521         /* since l+r >= 0, we can (>> 1) instead (/ 2) */
522         register size_t i = (l + r) >> 1; 
523         const char *iname = iter->types[i]->name;
524         if (iname) {
525           register int compare = strcmp(name, iname);
526           if (compare == 0) {       
527             return iter->types[i];
528           } else if (compare < 0) {
529             if (i) {
530               r = i - 1;
531             } else {
532               break;
533             }
534           } else if (compare > 0) {
535             l = i + 1;
536           }
537         } else {
538           break; /* should never happen */
539         }
540       } while (l <= r);
541     }
542     iter = iter->next;
543   } while (iter != end);
544   return 0;
545 }
546
547 /*
548   Search for a swig_type_info structure for either a mangled name or a human readable name.
549   It first searches the mangled names of the types, which is a O(log #types)
550   If a type is not found it then searches the human readable names, which is O(#types).
551   
552   We start searching at module start, and finish searching when start == end.  
553   Note: if start == end at the beginning of the function, we go all the way around
554   the circular list.
555 */
556 SWIGRUNTIME swig_type_info *
557 SWIG_TypeQueryModule(swig_module_info *start, 
558                      swig_module_info *end, 
559                      const char *name) {
560   /* STEP 1: Search the name field using binary search */
561   swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
562   if (ret) {
563     return ret;
564   } else {
565     /* STEP 2: If the type hasn't been found, do a complete search
566        of the str field (the human readable name) */
567     swig_module_info *iter = start;
568     do {
569       register size_t i = 0;
570       for (; i < iter->size; ++i) {
571         if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
572           return iter->types[i];
573       }
574       iter = iter->next;
575     } while (iter != end);
576   }
577   
578   /* neither found a match */
579   return 0;
580 }
581
582 /* 
583    Pack binary data into a string
584 */
585 SWIGRUNTIME char *
586 SWIG_PackData(char *c, void *ptr, size_t sz) {
587   static const char hex[17] = "0123456789abcdef";
588   register const unsigned char *u = (unsigned char *) ptr;
589   register const unsigned char *eu =  u + sz;
590   for (; u != eu; ++u) {
591     register unsigned char uu = *u;
592     *(c++) = hex[(uu & 0xf0) >> 4];
593     *(c++) = hex[uu & 0xf];
594   }
595   return c;
596 }
597
598 /* 
599    Unpack binary data from a string
600 */
601 SWIGRUNTIME const char *
602 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
603   register unsigned char *u = (unsigned char *) ptr;
604   register const unsigned char *eu = u + sz;
605   for (; u != eu; ++u) {
606     register char d = *(c++);
607     register unsigned char uu;
608     if ((d >= '0') && (d <= '9'))
609       uu = ((d - '0') << 4);
610     else if ((d >= 'a') && (d <= 'f'))
611       uu = ((d - ('a'-10)) << 4);
612     else 
613       return (char *) 0;
614     d = *(c++);
615     if ((d >= '0') && (d <= '9'))
616       uu |= (d - '0');
617     else if ((d >= 'a') && (d <= 'f'))
618       uu |= (d - ('a'-10));
619     else 
620       return (char *) 0;
621     *u = uu;
622   }
623   return c;
624 }
625
626 /* 
627    Pack 'void *' into a string buffer.
628 */
629 SWIGRUNTIME char *
630 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
631   char *r = buff;
632   if ((2*sizeof(void *) + 2) > bsz) return 0;
633   *(r++) = '_';
634   r = SWIG_PackData(r,&ptr,sizeof(void *));
635   if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
636   strcpy(r,name);
637   return buff;
638 }
639
640 SWIGRUNTIME const char *
641 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
642   if (*c != '_') {
643     if (strcmp(c,"NULL") == 0) {
644       *ptr = (void *) 0;
645       return name;
646     } else {
647       return 0;
648     }
649   }
650   return SWIG_UnpackData(++c,ptr,sizeof(void *));
651 }
652
653 SWIGRUNTIME char *
654 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
655   char *r = buff;
656   size_t lname = (name ? strlen(name) : 0);
657   if ((2*sz + 2 + lname) > bsz) return 0;
658   *(r++) = '_';
659   r = SWIG_PackData(r,ptr,sz);
660   if (lname) {
661     strncpy(r,name,lname+1);
662   } else {
663     *r = 0;
664   }
665   return buff;
666 }
667
668 SWIGRUNTIME const char *
669 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
670   if (*c != '_') {
671     if (strcmp(c,"NULL") == 0) {
672       memset(ptr,0,sz);
673       return name;
674     } else {
675       return 0;
676     }
677   }
678   return SWIG_UnpackData(++c,ptr,sz);
679 }
680
681 #ifdef __cplusplus
682 }
683 #endif
684
685 /*  Errors in SWIG */
686 #define  SWIG_UnknownError         -1 
687 #define  SWIG_IOError              -2 
688 #define  SWIG_RuntimeError         -3 
689 #define  SWIG_IndexError           -4 
690 #define  SWIG_TypeError            -5 
691 #define  SWIG_DivisionByZero       -6 
692 #define  SWIG_OverflowError        -7 
693 #define  SWIG_SyntaxError          -8 
694 #define  SWIG_ValueError           -9 
695 #define  SWIG_SystemError          -10
696 #define  SWIG_AttributeError       -11
697 #define  SWIG_MemoryError          -12 
698 #define  SWIG_NullReferenceError   -13
699
700
701
702 #ifdef __cplusplus
703 /* Needed on some windows machines---since MS plays funny games with the header files under C++ */
704 #include <math.h>
705 #include <stdlib.h>
706 extern "C" {
707 #endif
708 #include "EXTERN.h"
709 #include "perl.h"
710 #include "XSUB.h"
711
712 /* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */
713
714 /* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
715 #ifndef PERL_REVISION
716 #  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
717 #    define PERL_PATCHLEVEL_H_IMPLICIT
718 #    include <patchlevel.h>
719 #  endif
720 #  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
721 #    include <could_not_find_Perl_patchlevel.h>
722 #  endif
723 #  ifndef PERL_REVISION
724 #    define PERL_REVISION       (5)
725 #    define PERL_VERSION        PATCHLEVEL
726 #    define PERL_SUBVERSION     SUBVERSION
727 #  endif
728 #endif
729
730 #if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
731 #define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
732 #endif
733
734 #ifndef SvIOK_UV
735 # define SvIOK_UV(sv)       (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
736 #endif
737
738 #ifndef SvUOK
739 # define SvUOK(sv)           SvIOK_UV(sv)
740 #endif
741
742 #if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
743 #  define PL_sv_undef               sv_undef
744 #  define PL_na                     na
745 #  define PL_errgv                  errgv
746 #  define PL_sv_no                  sv_no
747 #  define PL_sv_yes                 sv_yes
748 #  define PL_markstack_ptr          markstack_ptr
749 #endif
750
751 #ifndef IVSIZE
752 #  ifdef LONGSIZE
753 #    define IVSIZE LONGSIZE
754 #  else
755 #    define IVSIZE 4 /* A bold guess, but the best we can make. */
756 #  endif
757 #endif
758
759 #ifndef INT2PTR
760 #  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
761 #    define PTRV                  UV
762 #    define INT2PTR(any,d)        (any)(d)
763 #  else
764 #    if PTRSIZE == LONGSIZE
765 #      define PTRV                unsigned long
766 #    else
767 #      define PTRV                unsigned
768 #    endif
769 #    define INT2PTR(any,d)        (any)(PTRV)(d)
770 #  endif
771
772 #  define NUM2PTR(any,d)  (any)(PTRV)(d)
773 #  define PTR2IV(p)       INT2PTR(IV,p)
774 #  define PTR2UV(p)       INT2PTR(UV,p)
775 #  define PTR2NV(p)       NUM2PTR(NV,p)
776
777 #  if PTRSIZE == LONGSIZE
778 #    define PTR2ul(p)     (unsigned long)(p)
779 #  else
780 #    define PTR2ul(p)     INT2PTR(unsigned long,p)
781 #  endif
782 #endif /* !INT2PTR */
783
784 #ifndef SvPV_nolen
785 # define SvPV_nolen(x) SvPV(x,PL_na)
786 #endif
787
788 #ifndef get_sv
789 #  define get_sv perl_get_sv
790 #endif
791
792 #ifndef ERRSV
793 #  define ERRSV get_sv("@",FALSE)
794 #endif
795
796 #ifndef pTHX_
797 #define pTHX_
798 #endif   
799
800 #include <string.h>
801 #ifdef __cplusplus
802 }
803 #endif
804
805 /* -----------------------------------------------------------------------------
806  * error manipulation
807  * ----------------------------------------------------------------------------- */
808
809 SWIGINTERN const char*
810 SWIG_Perl_ErrorType(int code) {
811   const char* type = 0;
812   switch(code) {
813   case SWIG_MemoryError:
814     type = "MemoryError";
815     break;
816   case SWIG_IOError:
817     type = "IOError";
818     break;
819   case SWIG_RuntimeError:
820     type = "RuntimeError";
821     break;
822   case SWIG_IndexError:
823     type = "IndexError";
824     break;
825   case SWIG_TypeError:
826     type = "TypeError";
827     break;
828   case SWIG_DivisionByZero:
829     type = "ZeroDivisionError";
830     break;
831   case SWIG_OverflowError:
832     type = "OverflowError";
833     break;
834   case SWIG_SyntaxError:
835     type = "SyntaxError";
836     break;
837   case SWIG_ValueError:
838     type = "ValueError";
839     break;
840   case SWIG_SystemError:
841     type = "SystemError";
842     break;
843   case SWIG_AttributeError:
844     type = "AttributeError";
845     break;
846   default:
847     type = "RuntimeError";
848   }
849   return type;
850 }
851
852
853
854
855 /* -----------------------------------------------------------------------------
856  * perlrun.swg
857  *
858  * This file contains the runtime support for Perl modules
859  * and includes code for managing global variables and pointer
860  * type checking.
861  * ----------------------------------------------------------------------------- */
862
863 #ifdef PERL_OBJECT
864 #define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
865 #define SWIG_PERL_OBJECT_CALL pPerl,
866 #else
867 #define SWIG_PERL_OBJECT_DECL
868 #define SWIG_PERL_OBJECT_CALL
869 #endif
870
871 /* Common SWIG API */
872
873 /* for raw pointers */
874 #define SWIG_ConvertPtr(obj, pp, type, flags)           SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
875 #define SWIG_NewPointerObj(p, type, flags)              SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)
876
877 /* for raw packed data */
878 #define SWIG_ConvertPacked(obj, p, s, type)             SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
879 #define SWIG_NewPackedObj(p, s, type)                   SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)
880
881 /* for class or struct pointers */
882 #define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
883 #define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)
884
885 /* for C or C++ function pointers */
886 #define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
887 #define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)
888
889 /* for C++ member pointers, ie, member methods */
890 #define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_ConvertPacked(obj, ptr, sz, ty)
891 #define SWIG_NewMemberObj(ptr, sz, type)                SWIG_NewPackedObj(ptr, sz, type)
892
893
894 /* Runtime API */
895
896 #define SWIG_GetModule(clientdata)                      SWIG_Perl_GetModule()
897 #define SWIG_SetModule(clientdata, pointer)             SWIG_Perl_SetModule(pointer)
898
899
900 /* Error manipulation */
901
902 #define SWIG_ErrorType(code)                            SWIG_Perl_ErrorType(code)               
903 #define SWIG_Error(code, msg)                           sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
904 #define SWIG_fail                                       goto fail                                                   
905
906 /* Perl-specific SWIG API */
907
908 #define SWIG_MakePtr(sv, ptr, type, flags)              SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
909 #define SWIG_MakePackedObj(sv, p, s, type)              SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
910 #define SWIG_SetError(str)                              SWIG_Error(SWIG_RuntimeError, str)
911
912
913 #define SWIG_PERL_DECL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_DECL arg1)
914 #define SWIG_PERL_CALL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_CALL arg1)
915 #define SWIG_PERL_DECL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_DECL arg1, arg2)
916 #define SWIG_PERL_CALL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_CALL arg1, arg2)
917
918 /* -----------------------------------------------------------------------------
919  * pointers/data manipulation
920  * ----------------------------------------------------------------------------- */
921
922 /* For backward compatibility only */
923 #define SWIG_POINTER_EXCEPTION  0
924
925 #ifdef __cplusplus
926 extern "C" {
927 #endif
928
929 #define SWIG_OWNER   SWIG_POINTER_OWN
930 #define SWIG_SHADOW  SWIG_OWNER << 1
931
932 #define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL
933
934 /* SWIG Perl macros */
935
936 /* Macro to declare an XS function */
937 #ifndef XSPROTO
938 #   define XSPROTO(name) void name(pTHX_ CV* cv)
939 #endif
940
941 /* Macro to call an XS function */
942 #ifdef PERL_OBJECT 
943 #  define SWIG_CALLXS(_name) _name(cv,pPerl) 
944 #else 
945 #  ifndef MULTIPLICITY 
946 #    define SWIG_CALLXS(_name) _name(cv) 
947 #  else 
948 #    define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) 
949 #  endif 
950 #endif 
951
952 #ifdef PERL_OBJECT
953 #define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;
954
955 #ifdef __cplusplus
956 extern "C" {
957 #endif
958 typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
959 #ifdef __cplusplus
960 }
961 #endif
962
963 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
964 #define SWIGCLASS_STATIC
965
966 #else /* PERL_OBJECT */
967
968 #define MAGIC_PPERL
969 #define SWIGCLASS_STATIC static SWIGUNUSED
970
971 #ifndef MULTIPLICITY
972 #define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
973
974 #ifdef __cplusplus
975 extern "C" {
976 #endif
977 typedef int (*SwigMagicFunc)(SV *, MAGIC *);
978 #ifdef __cplusplus
979 }
980 #endif
981
982 #else /* MULTIPLICITY */
983
984 #define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)
985
986 #ifdef __cplusplus
987 extern "C" {
988 #endif
989 typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
990 #ifdef __cplusplus
991 }
992 #endif
993
994 #endif /* MULTIPLICITY */
995 #endif /* PERL_OBJECT */
996
997 /* Workaround for bug in perl 5.6.x croak and earlier */
998 #if (PERL_VERSION < 8)
999 #  ifdef PERL_OBJECT
1000 #    define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
1001 static void SWIG_Perl_croak_null(CPerlObj *pPerl)
1002 #  else
1003 static void SWIG_croak_null()
1004 #  endif
1005 {
1006   SV *err=ERRSV;
1007 #  if (PERL_VERSION < 6)
1008   croak("%_", err);
1009 #  else
1010   if (SvOK(err) && !SvROK(err)) croak("%_", err);
1011   croak(Nullch);
1012 #  endif
1013 }
1014 #else
1015 #  define SWIG_croak_null() croak(Nullch)
1016 #endif
1017
1018
1019 /* 
1020    Define how strict is the cast between strings and integers/doubles
1021    when overloading between these types occurs.
1022    
1023    The default is making it as strict as possible by using SWIG_AddCast
1024    when needed.
1025    
1026    You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
1027    disable the SWIG_AddCast, making the casting between string and
1028    numbers less strict.
1029
1030    In the end, we try to solve the overloading between strings and
1031    numerical types in the more natural way, but if you can avoid it,
1032    well, avoid it using %rename, for example.
1033 */
1034 #ifndef SWIG_PERL_NO_STRICT_STR2NUM
1035 # ifndef SWIG_PERL_STRICT_STR2NUM
1036 #  define SWIG_PERL_STRICT_STR2NUM
1037 # endif
1038 #endif
1039 #ifdef SWIG_PERL_STRICT_STR2NUM
1040 /* string takes precedence */
1041 #define SWIG_Str2NumCast(x) SWIG_AddCast(x)  
1042 #else
1043 /* number takes precedence */
1044 #define SWIG_Str2NumCast(x) x
1045 #endif
1046
1047
1048
1049 #include <stdlib.h>
1050
1051 SWIGRUNTIME const char *
1052 SWIG_Perl_TypeProxyName(const swig_type_info *type) {
1053   if (!type) return NULL;
1054   if (type->clientdata != NULL) {
1055     return (const char*) type->clientdata;
1056   } 
1057   else {
1058     return type->name;
1059   }
1060 }
1061
1062 SWIGRUNTIME swig_cast_info *
1063 SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
1064   SWIG_TypeCheck_Template(( (!iter->type->clientdata && (strcmp((char*)iter->type->name, c) == 0)) 
1065                             || (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0))), ty);
1066 }
1067
1068
1069 /* Function for getting a pointer value */
1070
1071 SWIGRUNTIME int
1072 SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
1073   swig_cast_info *tc;
1074   void *voidptr = (void *)0;
1075   SV *tsv = 0;
1076   /* If magical, apply more magic */
1077   if (SvGMAGICAL(sv))
1078     mg_get(sv);
1079
1080   /* Check to see if this is an object */
1081   if (sv_isobject(sv)) {
1082     IV tmp = 0;
1083     tsv = (SV*) SvRV(sv);
1084     if ((SvTYPE(tsv) == SVt_PVHV)) {
1085       MAGIC *mg;
1086       if (SvMAGICAL(tsv)) {
1087         mg = mg_find(tsv,'P');
1088         if (mg) {
1089           sv = mg->mg_obj;
1090           if (sv_isobject(sv)) {
1091             tsv = (SV*)SvRV(sv);
1092             tmp = SvIV(tsv);
1093           }
1094         }
1095       } else {
1096         return SWIG_ERROR;
1097       }
1098     } else {
1099       tmp = SvIV(tsv);
1100     }
1101     voidptr = INT2PTR(void *,tmp);
1102   } else if (! SvOK(sv)) {            /* Check for undef */
1103     *(ptr) = (void *) 0;
1104     return SWIG_OK;
1105   } else if (SvTYPE(sv) == SVt_RV) {  /* Check for NULL pointer */
1106     if (!SvROK(sv)) {
1107       *(ptr) = (void *) 0;
1108       return SWIG_OK;
1109     } else {
1110       return SWIG_ERROR;
1111     }
1112   } else {                            /* Don't know what it is */
1113     return SWIG_ERROR;
1114   }
1115   if (_t) {
1116     /* Now see if the types match */
1117     char *_c = HvNAME(SvSTASH(SvRV(sv)));
1118     tc = SWIG_TypeProxyCheck(_c,_t);
1119     if (!tc) {
1120       return SWIG_ERROR;
1121     }
1122     *ptr = SWIG_TypeCast(tc,voidptr);
1123   } else {
1124     *ptr = voidptr;
1125   }
1126
1127   /* 
1128    *  DISOWN implementation: we need a perl guru to check this one.
1129    */
1130   if (tsv && (flags & SWIG_POINTER_DISOWN)) {
1131     /* 
1132      *  almost copy paste code from below SWIG_POINTER_OWN setting
1133      */
1134     SV *obj = sv;
1135     HV *stash = SvSTASH(SvRV(obj));
1136     GV *gv = *(GV**) hv_fetch(stash, "OWNER", 5, TRUE);
1137     if (isGV(gv)) {
1138       HV *hv = GvHVn(gv);
1139       /*
1140        * To set ownership (see below), a newSViv(1) entry is added. 
1141        * Hence, to remove ownership, we delete the entry.
1142        */
1143       if (hv_exists_ent(hv, obj, 0)) {
1144         hv_delete_ent(hv, obj, 0, 0);
1145       }
1146     }
1147   }
1148   return SWIG_OK;
1149 }
1150
1151 SWIGRUNTIME void
1152 SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
1153   if (ptr && (flags & SWIG_SHADOW)) {
1154     SV *self;
1155     SV *obj=newSV(0);
1156     HV *hash=newHV();
1157     HV *stash;
1158     sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr);
1159     stash=SvSTASH(SvRV(obj));
1160     if (flags & SWIG_POINTER_OWN) {
1161       HV *hv;
1162       GV *gv=*(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
1163       if (!isGV(gv))
1164         gv_init(gv, stash, "OWNER", 5, FALSE);
1165       hv=GvHVn(gv);
1166       hv_store_ent(hv, obj, newSViv(1), 0);
1167     }
1168     sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
1169     SvREFCNT_dec(obj);
1170     self=newRV_noinc((SV *)hash);
1171     sv_setsv(sv, self);
1172     SvREFCNT_dec((SV *)self);
1173     sv_bless(sv, stash);
1174   }
1175   else {
1176     sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr);
1177   }
1178 }
1179
1180 SWIGRUNTIMEINLINE SV *
1181 SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
1182   SV *result = sv_newmortal();
1183   SWIG_MakePtr(result, ptr, t, flags);
1184   return result;
1185 }
1186
1187 SWIGRUNTIME void
1188 SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
1189   char result[1024];
1190   char *r = result;
1191   if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
1192   *(r++) = '_';
1193   r = SWIG_PackData(r,ptr,sz);
1194   strcpy(r,SWIG_Perl_TypeProxyName(type));
1195   sv_setpv(sv, result);
1196 }
1197
1198 SWIGRUNTIME SV *
1199 SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
1200   SV *result = sv_newmortal();
1201   SWIG_Perl_MakePackedObj(result, ptr, sz, type);
1202   return result;
1203 }
1204
1205 /* Convert a packed value value */
1206 SWIGRUNTIME int
1207 SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
1208   swig_cast_info *tc;
1209   const char  *c = 0;
1210
1211   if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
1212   c = SvPV_nolen(obj);
1213   /* Pointer values must start with leading underscore */
1214   if (*c != '_') return SWIG_ERROR;
1215   c++;
1216   c = SWIG_UnpackData(c,ptr,sz);
1217   if (ty) {
1218     tc = SWIG_TypeCheck(c,ty);
1219     if (!tc) return SWIG_ERROR;
1220   }
1221   return SWIG_OK;
1222 }
1223
1224
1225 /* Macros for low-level exception handling */
1226 #define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }
1227
1228
1229 typedef XSPROTO(SwigPerlWrapper);
1230 typedef SwigPerlWrapper *SwigPerlWrapperPtr;
1231
1232 /* Structure for command table */
1233 typedef struct {
1234   const char         *name;
1235   SwigPerlWrapperPtr  wrapper;
1236 } swig_command_info;
1237
1238 /* Information for constant table */
1239
1240 #define SWIG_INT     1
1241 #define SWIG_FLOAT   2
1242 #define SWIG_STRING  3
1243 #define SWIG_POINTER 4
1244 #define SWIG_BINARY  5
1245
1246 /* Constant information structure */
1247 typedef struct swig_constant_info {
1248     int              type;
1249     const char      *name;
1250     long             lvalue;
1251     double           dvalue;
1252     void            *pvalue;
1253     swig_type_info **ptype;
1254 } swig_constant_info;
1255
1256
1257 /* Structure for variable table */
1258 typedef struct {
1259   const char   *name;
1260   SwigMagicFunc   set;
1261   SwigMagicFunc   get;
1262   swig_type_info  **type;
1263 } swig_variable_info;
1264
1265 /* Magic variable code */
1266 #ifndef PERL_OBJECT
1267 #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
1268   #ifndef MULTIPLICITY
1269      SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) 
1270   #else
1271      SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) 
1272   #endif
1273 #else
1274 #  define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
1275 SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) 
1276 #endif
1277 {
1278   MAGIC *mg;
1279   sv_magic(sv,sv,'U',(char *) name,strlen(name));
1280   mg = mg_find(sv,'U');
1281   mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
1282   mg->mg_virtual->svt_get = (SwigMagicFunc) get;
1283   mg->mg_virtual->svt_set = (SwigMagicFunc) set;
1284   mg->mg_virtual->svt_len = 0;
1285   mg->mg_virtual->svt_clear = 0;
1286   mg->mg_virtual->svt_free = 0;
1287 }
1288
1289
1290 SWIGRUNTIME swig_module_info *
1291 SWIG_Perl_GetModule(void) {
1292   static void *type_pointer = (void *)0;
1293   SV *pointer;
1294
1295   /* first check if pointer already created */
1296   if (!type_pointer) {
1297     pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE);
1298     if (pointer && SvOK(pointer)) {
1299       type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
1300     }
1301   }
1302
1303   return (swig_module_info *) type_pointer;
1304 }
1305
1306 SWIGRUNTIME void
1307 SWIG_Perl_SetModule(swig_module_info *module) {
1308   SV *pointer;
1309
1310   /* create a new pointer */
1311   pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE);
1312   sv_setiv(pointer, PTR2IV(module));
1313 }
1314
1315 #ifdef __cplusplus
1316 }
1317 #endif
1318
1319 /* Workaround perl5 global namespace pollution. Note that undefining library
1320  * functions like fopen will not solve the problem on all platforms as fopen
1321  * might be a macro on Windows but not necessarily on other operating systems. */
1322 #ifdef do_open
1323   #undef do_open
1324 #endif
1325 #ifdef do_close
1326   #undef do_close
1327 #endif
1328 #ifdef scalar
1329   #undef scalar
1330 #endif
1331 #ifdef list
1332   #undef list
1333 #endif
1334 #ifdef apply
1335   #undef apply
1336 #endif
1337 #ifdef convert
1338   #undef convert
1339 #endif
1340 #ifdef Error
1341   #undef Error
1342 #endif
1343 #ifdef form
1344   #undef form
1345 #endif
1346 #ifdef vform
1347   #undef vform
1348 #endif
1349 #ifdef LABEL
1350   #undef LABEL
1351 #endif
1352 #ifdef METHOD
1353   #undef METHOD
1354 #endif
1355 #ifdef Move
1356   #undef Move
1357 #endif
1358 #ifdef yylex
1359   #undef yylex
1360 #endif
1361 #ifdef yyparse
1362   #undef yyparse
1363 #endif
1364 #ifdef yyerror
1365   #undef yyerror
1366 #endif
1367 #ifdef invert
1368   #undef invert
1369 #endif
1370 #ifdef ref
1371   #undef ref
1372 #endif
1373 #ifdef read
1374   #undef read
1375 #endif
1376 #ifdef write
1377   #undef write
1378 #endif
1379 #ifdef eof
1380   #undef eof
1381 #endif
1382 #ifdef bool
1383   #undef bool
1384 #endif
1385 #ifdef close
1386   #undef close
1387 #endif
1388 #ifdef rewind
1389   #undef rewind
1390 #endif
1391 #ifdef free
1392   #undef free
1393 #endif
1394 #ifdef malloc
1395   #undef malloc
1396 #endif
1397 #ifdef calloc
1398   #undef calloc
1399 #endif
1400 #ifdef Stat
1401   #undef Stat
1402 #endif
1403 #ifdef check
1404   #undef check
1405 #endif
1406 #ifdef seekdir
1407   #undef seekdir
1408 #endif
1409 #ifdef open
1410   #undef open
1411 #endif
1412
1413
1414
1415 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 
1416
1417 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 
1418
1419
1420
1421   #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 
1422
1423
1424 /* -------- TYPES TABLE (BEGIN) -------- */
1425
1426 #define SWIGTYPE_p_Device swig_types[0]
1427 #define SWIGTYPE_p_DevicePropertyBase swig_types[1]
1428 #define SWIGTYPE_p_GValue swig_types[2]
1429 #define SWIGTYPE_p_a_STRMAX__char swig_types[3]
1430 #define SWIGTYPE_p_char swig_types[4]
1431 #define SWIGTYPE_p_double swig_types[5]
1432 #define SWIGTYPE_p_dumpfile_t swig_types[6]
1433 #define SWIGTYPE_p_float swig_types[7]
1434 #define SWIGTYPE_p_guint swig_types[8]
1435 #define SWIGTYPE_p_guint64 swig_types[9]
1436 #define SWIGTYPE_p_int swig_types[10]
1437 #define SWIGTYPE_p_unsigned_char swig_types[11]
1438 static swig_type_info *swig_types[13];
1439 static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
1440 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
1441 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
1442
1443 /* -------- TYPES TABLE (END) -------- */
1444
1445 #define SWIG_init    boot_Amanda__Device
1446
1447 #define SWIG_name   "Amanda::Devicec::boot_Amanda__Device"
1448 #define SWIG_prefix "Amanda::Devicec::"
1449
1450 #define SWIGVERSION 0x010333 
1451 #define SWIG_VERSION SWIGVERSION
1452
1453
1454 #define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
1455 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 
1456
1457
1458 #ifdef __cplusplus
1459 extern "C"
1460 #endif
1461 #ifndef PERL_OBJECT
1462 #ifndef MULTIPLICITY
1463 SWIGEXPORT void SWIG_init (CV* cv);
1464 #else
1465 SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
1466 #endif
1467 #else
1468 SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
1469 #endif
1470
1471
1472 #include "amglue.h"
1473
1474
1475 #include "amglue.h"
1476
1477
1478 #include "amglue.h"
1479
1480
1481 #include "device.h"
1482 #include "property.h"
1483 #include "fileheader.h"
1484
1485
1486
1487 /* Utility functions for typemaps, below */
1488
1489 static SV *
1490 set_sv_from_gvalue(GValue *value)
1491 {
1492     GType fundamental = G_TYPE_FUNDAMENTAL(G_VALUE_TYPE(value));
1493     SV *sv = NULL;
1494
1495     /* complex reference types */
1496     switch (fundamental) {
1497         case G_TYPE_LONG:
1498             sv = sv_2mortal(amglue_newSVi64(g_value_get_long(value)));
1499             break;
1500
1501         case G_TYPE_ULONG:
1502             sv = sv_2mortal(amglue_newSVu64(g_value_get_ulong(value)));
1503             break;
1504
1505         case G_TYPE_INT64:
1506             sv = sv_2mortal(amglue_newSVi64(g_value_get_int64(value)));
1507             break;
1508
1509         case G_TYPE_UINT64:
1510             sv = sv_2mortal(amglue_newSVu64(g_value_get_uint64(value)));
1511             break;
1512
1513         case G_TYPE_BOXED: {
1514             GType boxed_type = G_VALUE_TYPE(value);
1515             QualifiedSize qs;
1516             HV *hv;
1517
1518             if (boxed_type == QUALIFIED_SIZE_TYPE) {
1519                 qs = *(QualifiedSize*)(g_value_get_boxed(value));
1520                 
1521                 /* build a hash */
1522                 hv = (HV *)sv_2mortal((SV *)newHV());
1523                 hv_store(hv, "accuracy", 8, newSViv(qs.accuracy), 0);
1524                 hv_store(hv, "bytes", 5, amglue_newSVi64(qs.bytes), 0);
1525
1526                 sv = newRV((SV *)hv);
1527                 return newRV((SV *)hv);
1528             } else {
1529                 warn("Unsupported boxed property type #%d", boxed_type);
1530
1531                 sv = sv_newmortal();
1532                 sv_setsv(sv, &PL_sv_undef);
1533                 return sv;
1534             }
1535         }
1536     }
1537
1538     /* simple types that can be constructed with sv_set*v */
1539     sv = sv_newmortal();
1540     switch (fundamental) {
1541         case G_TYPE_CHAR:
1542             sv_setiv(sv, g_value_get_char(value));
1543             break;
1544
1545         case G_TYPE_UCHAR:
1546             sv_setuv(sv, g_value_get_uchar(value));
1547             break;
1548
1549         case G_TYPE_BOOLEAN:
1550             sv_setiv(sv, g_value_get_boolean(value));
1551             break;
1552
1553         case G_TYPE_INT:
1554             sv_setiv(sv, g_value_get_int(value));
1555             break;
1556
1557         case G_TYPE_UINT:
1558             sv_setuv(sv, g_value_get_uint(value));
1559             break;
1560
1561         case G_TYPE_FLOAT:
1562             sv_setnv(sv, g_value_get_float(value));
1563             break;
1564
1565         case G_TYPE_DOUBLE:
1566             sv_setnv(sv, g_value_get_double(value));
1567             break;
1568
1569         case G_TYPE_STRING:
1570             sv_setpv(sv, g_value_get_string(value));
1571             break;
1572
1573         case G_TYPE_ENUM:
1574             sv_setiv(sv, g_value_get_enum(value));
1575             break;
1576
1577         case G_TYPE_FLAGS:
1578             sv_setiv(sv, g_value_get_flags(value));
1579             break;
1580
1581         /* Unsupported */
1582         default:
1583         case G_TYPE_POINTER:
1584         case G_TYPE_INTERFACE:
1585         case G_TYPE_OBJECT:
1586         case G_TYPE_PARAM:
1587             warn("Unsupported fundamental property type #%d", fundamental);
1588             sv_setsv(sv, &PL_sv_undef);
1589             break;
1590     }
1591
1592     return sv;
1593 }
1594
1595 static gboolean
1596 set_gvalue_from_sv(SV *sv, GValue *value)
1597 {
1598     GType fundamental = G_TYPE_FUNDAMENTAL(G_VALUE_TYPE(value));
1599     switch (fundamental) {
1600         case G_TYPE_CHAR:
1601             if (!SvIOK(sv)) return FALSE;
1602             g_value_set_char(value, SvIV(sv));
1603             break;
1604
1605         case G_TYPE_UCHAR:
1606             if (!SvIOK(sv)) return FALSE;
1607             g_value_set_uchar(value, SvUV(sv));
1608             break;
1609
1610         case G_TYPE_BOOLEAN:
1611             if (!SvIOK(sv)) return FALSE;
1612             g_value_set_boolean(value, SvIV(sv));
1613             break;
1614
1615         case G_TYPE_INT:
1616             g_value_set_int(value, amglue_SvI32(sv));
1617             break;
1618
1619         case G_TYPE_UINT:
1620             g_value_set_uint(value, amglue_SvU32(sv));
1621             break;
1622
1623         case G_TYPE_LONG:
1624             g_value_set_int64(value, amglue_SvI64(sv));
1625             break;
1626
1627         case G_TYPE_ULONG:
1628             g_value_set_uint64(value, amglue_SvU64(sv));
1629             break;
1630
1631         case G_TYPE_INT64:
1632             g_value_set_int64(value, amglue_SvI64(sv));
1633             break;
1634
1635         case G_TYPE_UINT64:
1636             g_value_set_uint64(value, amglue_SvU64(sv));
1637             break;
1638
1639         case G_TYPE_FLOAT:
1640             if (!SvNOK(sv)) return FALSE;
1641             g_value_set_float(value, SvNV(sv));
1642             break;
1643
1644         case G_TYPE_DOUBLE:
1645             if (!SvNOK(sv)) return FALSE;
1646             g_value_set_double(value, SvNV(sv));
1647             break;
1648
1649         case G_TYPE_STRING:
1650             if (!SvPOK(sv)) return FALSE;
1651             g_value_set_string(value, SvPV_nolen(sv));
1652             break;
1653
1654         case G_TYPE_ENUM: 
1655             if (!SvIOK(sv)) return FALSE;
1656             g_value_set_enum(value, SvIV(sv));
1657             break;
1658
1659         case G_TYPE_FLAGS:
1660             if (!SvIOK(sv)) return FALSE;
1661             g_value_set_flags(value, SvIV(sv));
1662             break;
1663
1664         /* Unsupported */
1665         default:
1666         case G_TYPE_POINTER:
1667         case G_TYPE_INTERFACE:
1668         case G_TYPE_BOXED: /* note: *getting* boxed values is supported */
1669         case G_TYPE_OBJECT:
1670         case G_TYPE_PARAM:
1671             return FALSE;
1672     }
1673
1674     return TRUE;
1675 }
1676
1677
1678
1679 SWIGINTERNINLINE SV *
1680 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
1681 {
1682   SV *obj = sv_newmortal();
1683   if (carray) {
1684     sv_setpvn(obj, carray, size);
1685   } else {
1686     sv_setsv(obj, &PL_sv_undef);
1687   }
1688   return obj;
1689 }
1690
1691
1692 SWIGINTERNINLINE SV * 
1693 SWIG_FromCharPtr(const char *cptr)
1694
1695   return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
1696 }
1697
1698
1699 SWIGINTERN swig_type_info*
1700 SWIG_pchar_descriptor(void)
1701 {
1702   static int init = 0;
1703   static swig_type_info* info = 0;
1704   if (!init) {
1705     info = SWIG_TypeQuery("_p_char");
1706     init = 1;
1707   }
1708   return info;
1709 }
1710
1711
1712 SWIGINTERN int
1713 SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
1714 {
1715   if (SvPOK(obj)) {
1716     STRLEN len = 0;
1717     char *cstr = SvPV(obj, len); 
1718     size_t size = len + 1;
1719     if (cptr)  {
1720       if (alloc) {
1721         if (*alloc == SWIG_NEWOBJ) {
1722           *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
1723         } else {
1724           *cptr = cstr;
1725           *alloc = SWIG_OLDOBJ;
1726         }
1727       }
1728     }
1729     if (psize) *psize = size;
1730     return SWIG_OK;
1731   } else {
1732     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
1733     if (pchar_descriptor) {
1734       char* vptr = 0; 
1735       if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
1736         if (cptr) *cptr = vptr;
1737         if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
1738         if (alloc) *alloc = SWIG_OLDOBJ;
1739         return SWIG_OK;
1740       }
1741     }
1742   }
1743   return SWIG_TypeError;
1744 }
1745
1746
1747
1748
1749 SWIGINTERN Device *new_Device(char *device_name){
1750             return device_open(device_name);
1751         }
1752 SWIGINTERN void delete_Device(Device *self){
1753             g_object_unref(self);
1754         }
1755 SWIGINTERN ReadLabelStatusFlags Device_read_label(Device *self){
1756             return device_read_label(self);
1757         }
1758
1759 #include <limits.h>
1760 #if !defined(SWIG_NO_LLONG_MAX)
1761 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1762 #   define LLONG_MAX __LONG_LONG_MAX__
1763 #   define LLONG_MIN (-LLONG_MAX - 1LL)
1764 #   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1765 # endif
1766 #endif
1767
1768
1769 SWIGINTERN int
1770 SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
1771 {
1772   if (SvNIOK(obj)) {
1773     if (val) *val = SvNV(obj);
1774     return SWIG_OK;
1775   } else if (SvIOK(obj)) {
1776     if (val) *val = (double) SvIV(obj);
1777     return SWIG_AddCast(SWIG_OK);
1778   } else {
1779     const char *nptr = SvPV_nolen(obj);
1780     if (nptr) {
1781       char *endptr;
1782       double v = strtod(nptr, &endptr);
1783       if (errno == ERANGE) {
1784         errno = 0;
1785         return SWIG_OverflowError;
1786       } else {
1787         if (*endptr == '\0') {
1788           if (val) *val = v;
1789           return SWIG_Str2NumCast(SWIG_OK);
1790         }
1791       }
1792     }
1793   }
1794   return SWIG_TypeError;
1795 }
1796
1797
1798 #include <float.h>
1799
1800
1801 #include <math.h>
1802
1803
1804 SWIGINTERNINLINE int
1805 SWIG_CanCastAsInteger(double *d, double min, double max) {
1806   double x = *d;
1807   if ((min <= x && x <= max)) {
1808    double fx = floor(x);
1809    double cx = ceil(x);
1810    double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
1811    if ((errno == EDOM) || (errno == ERANGE)) {
1812      errno = 0;
1813    } else {
1814      double summ, reps, diff;
1815      if (rd < x) {
1816        diff = x - rd;
1817      } else if (rd > x) {
1818        diff = rd - x;
1819      } else {
1820        return 1;
1821      }
1822      summ = rd + x;
1823      reps = diff/summ;
1824      if (reps < 8*DBL_EPSILON) {
1825        *d = rd;
1826        return 1;
1827      }
1828    }
1829   }
1830   return 0;
1831 }
1832
1833
1834 SWIGINTERN int
1835 SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
1836 {
1837   if (SvIOK(obj)) {
1838     if (val) *val = SvIV(obj);
1839     return SWIG_OK;
1840   } else {
1841     int dispatch = 0;
1842     const char *nptr = SvPV_nolen(obj);
1843     if (nptr) {
1844       char *endptr;
1845       long v;
1846       errno = 0;
1847       v = strtol(nptr, &endptr,0);
1848       if (errno == ERANGE) {
1849         errno = 0;
1850         return SWIG_OverflowError;
1851       } else {
1852         if (*endptr == '\0') {
1853           if (val) *val = v;
1854           return SWIG_Str2NumCast(SWIG_OK);
1855         }
1856       }
1857     }
1858     if (!dispatch) {
1859       double d;
1860       int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
1861       if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
1862         if (val) *val = (long)(d);
1863         return res;
1864       }
1865     }
1866   }
1867   return SWIG_TypeError;
1868 }
1869
1870
1871 SWIGINTERN int
1872 SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
1873 {
1874   long v;
1875   int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
1876   if (SWIG_IsOK(res)) {
1877     if ((v < INT_MIN || v > INT_MAX)) {
1878       return SWIG_OverflowError;
1879     } else {
1880       if (val) *val = (int)(v);
1881     }
1882   }  
1883   return res;
1884 }
1885
1886 SWIGINTERN gboolean Device_start(Device *self,DeviceAccessMode mode,char *label,char *timestamp){
1887             return device_start(self, mode, label, timestamp);
1888         }
1889 SWIGINTERN gboolean Device_finish(Device *self){
1890             return device_finish(self);
1891         }
1892 SWIGINTERN gboolean Device_start_file(Device *self,dumpfile_t const *jobInfo){
1893             return device_start_file(self, jobInfo);
1894         }
1895 SWIGINTERN guint Device_write_min_size(Device *self){
1896             return device_write_min_size(self);
1897         }
1898 SWIGINTERN guint Device_write_max_size(Device *self){
1899             return device_write_max_size(self);
1900         }
1901 SWIGINTERN guint Device_read_max_size(Device *self){
1902             return device_read_max_size(self);
1903         }
1904 SWIGINTERN gboolean Device_write_block(Device *self,guint size,gpointer data,gboolean short_block){
1905             return device_write_block(self, size, data, short_block);
1906         }
1907 SWIGINTERN gboolean Device_write_from_fd(Device *self,int fd){
1908             return device_write_from_fd(self, fd);
1909         }
1910 SWIGINTERN gboolean Device_finish_file(Device *self){
1911             return device_finish_file(self);
1912         }
1913 SWIGINTERN dumpfile_t *Device_seek_file(Device *self,guint file){
1914             return device_seek_file(self, file);
1915         }
1916 SWIGINTERN gboolean Device_seek_block(Device *self,guint64 block){
1917             return device_seek_block(self, block);
1918         }
1919 SWIGINTERN int Device_read_block(Device *self,gpointer buffer,int *size){
1920             return device_read_block(self, buffer, size);
1921         }
1922 SWIGINTERN gboolean Device_read_to_fd(Device *self,int fd){
1923             return device_read_to_fd(self, fd);
1924         }
1925 SWIGINTERN DeviceProperty const *Device_property_list(Device *self){
1926             return device_property_get_list(self);
1927         }
1928 SWIGINTERN void Device_property_get(Device *self,DevicePropertyBase *pbase,GValue *out_val,gboolean *val_found){
1929             *val_found = device_property_get(self, pbase->ID, out_val);
1930         }
1931 SWIGINTERN gboolean Device_property_set(Device *self,DevicePropertyBase *pbase,SV *sv){
1932             GValue gval;
1933             memset(&gval, 0, sizeof(gval));
1934             g_value_init(&gval, pbase->type);
1935             if (!set_gvalue_from_sv(sv, &gval))
1936                 goto fail;
1937
1938             if (!device_property_set(self, pbase->ID, &gval))
1939                 goto fail;
1940
1941             g_value_unset(&gval);
1942             return TRUE;
1943         fail:
1944             g_value_unset(&gval);
1945             return FALSE;
1946         }
1947 SWIGINTERN gboolean Device_recycle_file(Device *self,guint filenum){
1948             return device_recycle_file(self, filenum);
1949         }
1950 SWIGINTERN void Device_set_startup_properties_from_config(Device *self){
1951             device_set_startup_properties_from_config(self);
1952         }
1953
1954 SWIGINTERNINLINE SV *
1955 SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
1956 {    
1957   SV *obj = sv_newmortal();
1958   sv_setiv(obj, (IV) value);
1959   return obj;
1960 }
1961
1962
1963 SWIGINTERNINLINE SV *
1964 SWIG_From_int  SWIG_PERL_DECL_ARGS_1(int value)
1965 {    
1966   return SWIG_From_long  SWIG_PERL_CALL_ARGS_1(value);
1967 }
1968
1969 #ifdef __cplusplus
1970 extern "C" {
1971 #endif
1972
1973 #ifdef PERL_OBJECT
1974 #define MAGIC_CLASS _wrap_Amanda::Device_var::
1975 class _wrap_Amanda::Device_var : public CPerlObj {
1976 public:
1977 #else
1978 #define MAGIC_CLASS
1979 #endif
1980 SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
1981     MAGIC_PPERL
1982     croak("Value is read-only.");
1983     return 0;
1984 }
1985
1986
1987 #ifdef PERL_OBJECT
1988 };
1989 #endif
1990
1991 #ifdef __cplusplus
1992 }
1993 #endif
1994
1995 #ifdef __cplusplus
1996 extern "C" {
1997 #endif
1998 XS(_wrap_Device_file_get) {
1999   {
2000     Device *arg1 = (Device *) 0 ;
2001     int result;
2002     void *argp1 = 0 ;
2003     int res1 = 0 ;
2004     int argvi = 0;
2005     dXSARGS;
2006     
2007     if ((items < 1) || (items > 1)) {
2008       SWIG_croak("Usage: Device_file_get(self);");
2009     }
2010     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2011     if (!SWIG_IsOK(res1)) {
2012       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_file_get" "', argument " "1"" of type '" "Device *""'"); 
2013     }
2014     arg1 = (Device *)(argp1);
2015     result = (int) ((arg1)->file);
2016     {
2017       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2018       argvi++;
2019     }
2020     
2021     XSRETURN(argvi);
2022   fail:
2023     
2024     SWIG_croak_null();
2025   }
2026 }
2027
2028
2029 XS(_wrap_Device_block_get) {
2030   {
2031     Device *arg1 = (Device *) 0 ;
2032     guint64 result;
2033     void *argp1 = 0 ;
2034     int res1 = 0 ;
2035     int argvi = 0;
2036     dXSARGS;
2037     
2038     if ((items < 1) || (items > 1)) {
2039       SWIG_croak("Usage: Device_block_get(self);");
2040     }
2041     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2042     if (!SWIG_IsOK(res1)) {
2043       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_block_get" "', argument " "1"" of type '" "Device *""'"); 
2044     }
2045     arg1 = (Device *)(argp1);
2046     result =  ((arg1)->block);
2047     {
2048       ST(argvi) = sv_2mortal(amglue_newSVu64(result));
2049       argvi++;
2050     }
2051     
2052     XSRETURN(argvi);
2053   fail:
2054     
2055     SWIG_croak_null();
2056   }
2057 }
2058
2059
2060 XS(_wrap_Device_in_file_get) {
2061   {
2062     Device *arg1 = (Device *) 0 ;
2063     gboolean result;
2064     void *argp1 = 0 ;
2065     int res1 = 0 ;
2066     int argvi = 0;
2067     dXSARGS;
2068     
2069     if ((items < 1) || (items > 1)) {
2070       SWIG_croak("Usage: Device_in_file_get(self);");
2071     }
2072     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2073     if (!SWIG_IsOK(res1)) {
2074       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_in_file_get" "', argument " "1"" of type '" "Device *""'"); 
2075     }
2076     arg1 = (Device *)(argp1);
2077     result = (gboolean) ((arg1)->in_file);
2078     {
2079       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2080       argvi++;
2081     }
2082     
2083     XSRETURN(argvi);
2084   fail:
2085     
2086     SWIG_croak_null();
2087   }
2088 }
2089
2090
2091 XS(_wrap_Device_device_name_get) {
2092   {
2093     Device *arg1 = (Device *) 0 ;
2094     char *result = 0 ;
2095     void *argp1 = 0 ;
2096     int res1 = 0 ;
2097     int argvi = 0;
2098     dXSARGS;
2099     
2100     if ((items < 1) || (items > 1)) {
2101       SWIG_croak("Usage: Device_device_name_get(self);");
2102     }
2103     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2104     if (!SWIG_IsOK(res1)) {
2105       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_device_name_get" "', argument " "1"" of type '" "Device *""'"); 
2106     }
2107     arg1 = (Device *)(argp1);
2108     result = (char *) ((arg1)->device_name);
2109     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2110     
2111     XSRETURN(argvi);
2112   fail:
2113     
2114     SWIG_croak_null();
2115   }
2116 }
2117
2118
2119 XS(_wrap_Device_access_mode_get) {
2120   {
2121     Device *arg1 = (Device *) 0 ;
2122     DeviceAccessMode result;
2123     void *argp1 = 0 ;
2124     int res1 = 0 ;
2125     int argvi = 0;
2126     dXSARGS;
2127     
2128     if ((items < 1) || (items > 1)) {
2129       SWIG_croak("Usage: Device_access_mode_get(self);");
2130     }
2131     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2132     if (!SWIG_IsOK(res1)) {
2133       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_access_mode_get" "', argument " "1"" of type '" "Device *""'"); 
2134     }
2135     arg1 = (Device *)(argp1);
2136     result = (DeviceAccessMode) ((arg1)->access_mode);
2137     {
2138       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2139       argvi++;
2140     }
2141     
2142     XSRETURN(argvi);
2143   fail:
2144     
2145     SWIG_croak_null();
2146   }
2147 }
2148
2149
2150 XS(_wrap_Device_is_eof_get) {
2151   {
2152     Device *arg1 = (Device *) 0 ;
2153     gboolean result;
2154     void *argp1 = 0 ;
2155     int res1 = 0 ;
2156     int argvi = 0;
2157     dXSARGS;
2158     
2159     if ((items < 1) || (items > 1)) {
2160       SWIG_croak("Usage: Device_is_eof_get(self);");
2161     }
2162     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2163     if (!SWIG_IsOK(res1)) {
2164       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_is_eof_get" "', argument " "1"" of type '" "Device *""'"); 
2165     }
2166     arg1 = (Device *)(argp1);
2167     result = (gboolean) ((arg1)->is_eof);
2168     {
2169       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2170       argvi++;
2171     }
2172     
2173     XSRETURN(argvi);
2174   fail:
2175     
2176     SWIG_croak_null();
2177   }
2178 }
2179
2180
2181 XS(_wrap_Device_volume_label_get) {
2182   {
2183     Device *arg1 = (Device *) 0 ;
2184     char *result = 0 ;
2185     void *argp1 = 0 ;
2186     int res1 = 0 ;
2187     int argvi = 0;
2188     dXSARGS;
2189     
2190     if ((items < 1) || (items > 1)) {
2191       SWIG_croak("Usage: Device_volume_label_get(self);");
2192     }
2193     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2194     if (!SWIG_IsOK(res1)) {
2195       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_volume_label_get" "', argument " "1"" of type '" "Device *""'"); 
2196     }
2197     arg1 = (Device *)(argp1);
2198     result = (char *) ((arg1)->volume_label);
2199     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2200     
2201     XSRETURN(argvi);
2202   fail:
2203     
2204     SWIG_croak_null();
2205   }
2206 }
2207
2208
2209 XS(_wrap_Device_volume_time_get) {
2210   {
2211     Device *arg1 = (Device *) 0 ;
2212     char *result = 0 ;
2213     void *argp1 = 0 ;
2214     int res1 = 0 ;
2215     int argvi = 0;
2216     dXSARGS;
2217     
2218     if ((items < 1) || (items > 1)) {
2219       SWIG_croak("Usage: Device_volume_time_get(self);");
2220     }
2221     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2222     if (!SWIG_IsOK(res1)) {
2223       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_volume_time_get" "', argument " "1"" of type '" "Device *""'"); 
2224     }
2225     arg1 = (Device *)(argp1);
2226     result = (char *) ((arg1)->volume_time);
2227     ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
2228     
2229     XSRETURN(argvi);
2230   fail:
2231     
2232     SWIG_croak_null();
2233   }
2234 }
2235
2236
2237 XS(_wrap_new_Device) {
2238   {
2239     char *arg1 = (char *) 0 ;
2240     Device *result = 0 ;
2241     int res1 ;
2242     char *buf1 = 0 ;
2243     int alloc1 = 0 ;
2244     int argvi = 0;
2245     dXSARGS;
2246     
2247     if ((items < 1) || (items > 1)) {
2248       SWIG_croak("Usage: new_Device(device_name);");
2249     }
2250     res1 = SWIG_AsCharPtrAndSize(ST(0), &buf1, NULL, &alloc1);
2251     if (!SWIG_IsOK(res1)) {
2252       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Device" "', argument " "1"" of type '" "char *""'");
2253     }
2254     arg1 = (char *)(buf1);
2255     result = (Device *)new_Device(arg1);
2256     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Device, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
2257     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2258     XSRETURN(argvi);
2259   fail:
2260     if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2261     SWIG_croak_null();
2262   }
2263 }
2264
2265
2266 XS(_wrap_delete_Device) {
2267   {
2268     Device *arg1 = (Device *) 0 ;
2269     void *argp1 = 0 ;
2270     int res1 = 0 ;
2271     int argvi = 0;
2272     dXSARGS;
2273     
2274     if ((items < 1) || (items > 1)) {
2275       SWIG_croak("Usage: delete_Device(self);");
2276     }
2277     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, SWIG_POINTER_DISOWN |  0 );
2278     if (!SWIG_IsOK(res1)) {
2279       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Device" "', argument " "1"" of type '" "Device *""'"); 
2280     }
2281     arg1 = (Device *)(argp1);
2282     delete_Device(arg1);
2283     
2284     
2285     
2286     XSRETURN(argvi);
2287   fail:
2288     
2289     SWIG_croak_null();
2290   }
2291 }
2292
2293
2294 XS(_wrap_Device_read_label) {
2295   {
2296     Device *arg1 = (Device *) 0 ;
2297     ReadLabelStatusFlags result;
2298     void *argp1 = 0 ;
2299     int res1 = 0 ;
2300     int argvi = 0;
2301     dXSARGS;
2302     
2303     if ((items < 1) || (items > 1)) {
2304       SWIG_croak("Usage: Device_read_label(self);");
2305     }
2306     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2307     if (!SWIG_IsOK(res1)) {
2308       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_read_label" "', argument " "1"" of type '" "Device *""'"); 
2309     }
2310     arg1 = (Device *)(argp1);
2311     result = (ReadLabelStatusFlags)Device_read_label(arg1);
2312     {
2313       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2314       argvi++;
2315     }
2316     
2317     XSRETURN(argvi);
2318   fail:
2319     
2320     SWIG_croak_null();
2321   }
2322 }
2323
2324
2325 XS(_wrap_Device_start) {
2326   {
2327     Device *arg1 = (Device *) 0 ;
2328     DeviceAccessMode arg2 ;
2329     char *arg3 = (char *) 0 ;
2330     char *arg4 = (char *) 0 ;
2331     gboolean result;
2332     void *argp1 = 0 ;
2333     int res1 = 0 ;
2334     int res3 ;
2335     char *buf3 = 0 ;
2336     int alloc3 = 0 ;
2337     int res4 ;
2338     char *buf4 = 0 ;
2339     int alloc4 = 0 ;
2340     int argvi = 0;
2341     dXSARGS;
2342     
2343     if ((items < 4) || (items > 4)) {
2344       SWIG_croak("Usage: Device_start(self,mode,label,timestamp);");
2345     }
2346     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2347     if (!SWIG_IsOK(res1)) {
2348       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_start" "', argument " "1"" of type '" "Device *""'"); 
2349     }
2350     arg1 = (Device *)(argp1);
2351     {
2352       if (sizeof(signed int) == 1) {
2353         arg2 = amglue_SvI8(ST(1));
2354       } else if (sizeof(signed int) == 2) {
2355         arg2 = amglue_SvI16(ST(1));
2356       } else if (sizeof(signed int) == 4) {
2357         arg2 = amglue_SvI32(ST(1));
2358       } else if (sizeof(signed int) == 8) {
2359         arg2 = amglue_SvI64(ST(1));
2360       } else {
2361         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
2362       }
2363     }
2364     res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
2365     if (!SWIG_IsOK(res3)) {
2366       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Device_start" "', argument " "3"" of type '" "char *""'");
2367     }
2368     arg3 = (char *)(buf3);
2369     res4 = SWIG_AsCharPtrAndSize(ST(3), &buf4, NULL, &alloc4);
2370     if (!SWIG_IsOK(res4)) {
2371       SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Device_start" "', argument " "4"" of type '" "char *""'");
2372     }
2373     arg4 = (char *)(buf4);
2374     result = (gboolean)Device_start(arg1,arg2,arg3,arg4);
2375     {
2376       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2377       argvi++;
2378     }
2379     
2380     
2381     if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2382     if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2383     XSRETURN(argvi);
2384   fail:
2385     
2386     
2387     if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
2388     if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
2389     SWIG_croak_null();
2390   }
2391 }
2392
2393
2394 XS(_wrap_Device_finish) {
2395   {
2396     Device *arg1 = (Device *) 0 ;
2397     gboolean result;
2398     void *argp1 = 0 ;
2399     int res1 = 0 ;
2400     int argvi = 0;
2401     dXSARGS;
2402     
2403     if ((items < 1) || (items > 1)) {
2404       SWIG_croak("Usage: Device_finish(self);");
2405     }
2406     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2407     if (!SWIG_IsOK(res1)) {
2408       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_finish" "', argument " "1"" of type '" "Device *""'"); 
2409     }
2410     arg1 = (Device *)(argp1);
2411     result = (gboolean)Device_finish(arg1);
2412     {
2413       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2414       argvi++;
2415     }
2416     
2417     XSRETURN(argvi);
2418   fail:
2419     
2420     SWIG_croak_null();
2421   }
2422 }
2423
2424
2425 XS(_wrap_Device_start_file) {
2426   {
2427     Device *arg1 = (Device *) 0 ;
2428     dumpfile_t *arg2 = (dumpfile_t *) 0 ;
2429     gboolean result;
2430     void *argp1 = 0 ;
2431     int res1 = 0 ;
2432     void *argp2 = 0 ;
2433     int res2 = 0 ;
2434     int argvi = 0;
2435     dXSARGS;
2436     
2437     if ((items < 2) || (items > 2)) {
2438       SWIG_croak("Usage: Device_start_file(self,jobInfo);");
2439     }
2440     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2441     if (!SWIG_IsOK(res1)) {
2442       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_start_file" "', argument " "1"" of type '" "Device *""'"); 
2443     }
2444     arg1 = (Device *)(argp1);
2445     res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_dumpfile_t, 0 |  0 );
2446     if (!SWIG_IsOK(res2)) {
2447       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Device_start_file" "', argument " "2"" of type '" "dumpfile_t const *""'"); 
2448     }
2449     arg2 = (dumpfile_t *)(argp2);
2450     result = (gboolean)Device_start_file(arg1,(dumpfile_t const *)arg2);
2451     {
2452       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2453       argvi++;
2454     }
2455     
2456     
2457     XSRETURN(argvi);
2458   fail:
2459     
2460     
2461     SWIG_croak_null();
2462   }
2463 }
2464
2465
2466 XS(_wrap_Device_write_min_size) {
2467   {
2468     Device *arg1 = (Device *) 0 ;
2469     guint result;
2470     void *argp1 = 0 ;
2471     int res1 = 0 ;
2472     int argvi = 0;
2473     dXSARGS;
2474     
2475     if ((items < 1) || (items > 1)) {
2476       SWIG_croak("Usage: Device_write_min_size(self);");
2477     }
2478     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2479     if (!SWIG_IsOK(res1)) {
2480       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_write_min_size" "', argument " "1"" of type '" "Device *""'"); 
2481     }
2482     arg1 = (Device *)(argp1);
2483     result = Device_write_min_size(arg1);
2484     {
2485       ST(argvi) = sv_2mortal(amglue_newSVu64(result));
2486       argvi++;
2487     }
2488     
2489     XSRETURN(argvi);
2490   fail:
2491     
2492     SWIG_croak_null();
2493   }
2494 }
2495
2496
2497 XS(_wrap_Device_write_max_size) {
2498   {
2499     Device *arg1 = (Device *) 0 ;
2500     guint result;
2501     void *argp1 = 0 ;
2502     int res1 = 0 ;
2503     int argvi = 0;
2504     dXSARGS;
2505     
2506     if ((items < 1) || (items > 1)) {
2507       SWIG_croak("Usage: Device_write_max_size(self);");
2508     }
2509     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2510     if (!SWIG_IsOK(res1)) {
2511       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_write_max_size" "', argument " "1"" of type '" "Device *""'"); 
2512     }
2513     arg1 = (Device *)(argp1);
2514     result = Device_write_max_size(arg1);
2515     {
2516       ST(argvi) = sv_2mortal(amglue_newSVu64(result));
2517       argvi++;
2518     }
2519     
2520     XSRETURN(argvi);
2521   fail:
2522     
2523     SWIG_croak_null();
2524   }
2525 }
2526
2527
2528 XS(_wrap_Device_read_max_size) {
2529   {
2530     Device *arg1 = (Device *) 0 ;
2531     guint result;
2532     void *argp1 = 0 ;
2533     int res1 = 0 ;
2534     int argvi = 0;
2535     dXSARGS;
2536     
2537     if ((items < 1) || (items > 1)) {
2538       SWIG_croak("Usage: Device_read_max_size(self);");
2539     }
2540     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2541     if (!SWIG_IsOK(res1)) {
2542       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_read_max_size" "', argument " "1"" of type '" "Device *""'"); 
2543     }
2544     arg1 = (Device *)(argp1);
2545     result = Device_read_max_size(arg1);
2546     {
2547       ST(argvi) = sv_2mortal(amglue_newSVu64(result));
2548       argvi++;
2549     }
2550     
2551     XSRETURN(argvi);
2552   fail:
2553     
2554     SWIG_croak_null();
2555   }
2556 }
2557
2558
2559 XS(_wrap_Device_write_block) {
2560   {
2561     Device *arg1 = (Device *) 0 ;
2562     guint arg2 ;
2563     gpointer arg3 = (gpointer) 0 ;
2564     gboolean arg4 ;
2565     gboolean result;
2566     void *argp1 = 0 ;
2567     int res1 = 0 ;
2568     int res3 ;
2569     int argvi = 0;
2570     dXSARGS;
2571     
2572     if ((items < 4) || (items > 4)) {
2573       SWIG_croak("Usage: Device_write_block(self,size,data,short_block);");
2574     }
2575     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2576     if (!SWIG_IsOK(res1)) {
2577       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_write_block" "', argument " "1"" of type '" "Device *""'"); 
2578     }
2579     arg1 = (Device *)(argp1);
2580     {
2581       if (sizeof(guint) == 1) {
2582         arg2 = amglue_SvU8(ST(1));
2583       } else if (sizeof(guint) == 2) {
2584         arg2 = amglue_SvU16(ST(1));
2585       } else if (sizeof(guint) == 4) {
2586         arg2 = amglue_SvU32(ST(1));
2587       } else if (sizeof(guint) == 8) {
2588         arg2 = amglue_SvU64(ST(1));
2589       } else {
2590         croak("Unexpected guint >64 bits?"); /* should be optimized out unless sizeof(guint) > 8 */
2591       }
2592     }
2593     res3 = SWIG_ConvertPtr(ST(2),SWIG_as_voidptrptr(&arg3), 0, 0);
2594     if (!SWIG_IsOK(res3)) {
2595       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Device_write_block" "', argument " "3"" of type '" "gpointer""'"); 
2596     }
2597     {
2598       if (sizeof(signed int) == 1) {
2599         arg4 = amglue_SvI8(ST(3));
2600       } else if (sizeof(signed int) == 2) {
2601         arg4 = amglue_SvI16(ST(3));
2602       } else if (sizeof(signed int) == 4) {
2603         arg4 = amglue_SvI32(ST(3));
2604       } else if (sizeof(signed int) == 8) {
2605         arg4 = amglue_SvI64(ST(3));
2606       } else {
2607         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
2608       }
2609     }
2610     result = (gboolean)Device_write_block(arg1,arg2,arg3,arg4);
2611     {
2612       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2613       argvi++;
2614     }
2615     
2616     
2617     
2618     XSRETURN(argvi);
2619   fail:
2620     
2621     
2622     
2623     SWIG_croak_null();
2624   }
2625 }
2626
2627
2628 XS(_wrap_Device_write_from_fd) {
2629   {
2630     Device *arg1 = (Device *) 0 ;
2631     int arg2 ;
2632     gboolean result;
2633     void *argp1 = 0 ;
2634     int res1 = 0 ;
2635     int argvi = 0;
2636     dXSARGS;
2637     
2638     if ((items < 2) || (items > 2)) {
2639       SWIG_croak("Usage: Device_write_from_fd(self,fd);");
2640     }
2641     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2642     if (!SWIG_IsOK(res1)) {
2643       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_write_from_fd" "', argument " "1"" of type '" "Device *""'"); 
2644     }
2645     arg1 = (Device *)(argp1);
2646     {
2647       if (sizeof(signed int) == 1) {
2648         arg2 = amglue_SvI8(ST(1));
2649       } else if (sizeof(signed int) == 2) {
2650         arg2 = amglue_SvI16(ST(1));
2651       } else if (sizeof(signed int) == 4) {
2652         arg2 = amglue_SvI32(ST(1));
2653       } else if (sizeof(signed int) == 8) {
2654         arg2 = amglue_SvI64(ST(1));
2655       } else {
2656         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
2657       }
2658     }
2659     result = (gboolean)Device_write_from_fd(arg1,arg2);
2660     {
2661       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2662       argvi++;
2663     }
2664     
2665     
2666     XSRETURN(argvi);
2667   fail:
2668     
2669     
2670     SWIG_croak_null();
2671   }
2672 }
2673
2674
2675 XS(_wrap_Device_finish_file) {
2676   {
2677     Device *arg1 = (Device *) 0 ;
2678     gboolean result;
2679     void *argp1 = 0 ;
2680     int res1 = 0 ;
2681     int argvi = 0;
2682     dXSARGS;
2683     
2684     if ((items < 1) || (items > 1)) {
2685       SWIG_croak("Usage: Device_finish_file(self);");
2686     }
2687     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2688     if (!SWIG_IsOK(res1)) {
2689       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_finish_file" "', argument " "1"" of type '" "Device *""'"); 
2690     }
2691     arg1 = (Device *)(argp1);
2692     result = (gboolean)Device_finish_file(arg1);
2693     {
2694       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2695       argvi++;
2696     }
2697     
2698     XSRETURN(argvi);
2699   fail:
2700     
2701     SWIG_croak_null();
2702   }
2703 }
2704
2705
2706 XS(_wrap_Device_seek_file) {
2707   {
2708     Device *arg1 = (Device *) 0 ;
2709     guint arg2 ;
2710     dumpfile_t *result = 0 ;
2711     void *argp1 = 0 ;
2712     int res1 = 0 ;
2713     int argvi = 0;
2714     dXSARGS;
2715     
2716     if ((items < 2) || (items > 2)) {
2717       SWIG_croak("Usage: Device_seek_file(self,file);");
2718     }
2719     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2720     if (!SWIG_IsOK(res1)) {
2721       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_seek_file" "', argument " "1"" of type '" "Device *""'"); 
2722     }
2723     arg1 = (Device *)(argp1);
2724     {
2725       if (sizeof(guint) == 1) {
2726         arg2 = amglue_SvU8(ST(1));
2727       } else if (sizeof(guint) == 2) {
2728         arg2 = amglue_SvU16(ST(1));
2729       } else if (sizeof(guint) == 4) {
2730         arg2 = amglue_SvU32(ST(1));
2731       } else if (sizeof(guint) == 8) {
2732         arg2 = amglue_SvU64(ST(1));
2733       } else {
2734         croak("Unexpected guint >64 bits?"); /* should be optimized out unless sizeof(guint) > 8 */
2735       }
2736     }
2737     result = (dumpfile_t *)Device_seek_file(arg1,arg2);
2738     ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_dumpfile_t, 0 | SWIG_SHADOW); argvi++ ;
2739     
2740     XSRETURN(argvi);
2741   fail:
2742     
2743     SWIG_croak_null();
2744   }
2745 }
2746
2747
2748 XS(_wrap_Device_seek_block) {
2749   {
2750     Device *arg1 = (Device *) 0 ;
2751     guint64 arg2 ;
2752     gboolean result;
2753     void *argp1 = 0 ;
2754     int res1 = 0 ;
2755     int argvi = 0;
2756     dXSARGS;
2757     
2758     if ((items < 2) || (items > 2)) {
2759       SWIG_croak("Usage: Device_seek_block(self,block);");
2760     }
2761     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2762     if (!SWIG_IsOK(res1)) {
2763       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_seek_block" "', argument " "1"" of type '" "Device *""'"); 
2764     }
2765     arg1 = (Device *)(argp1);
2766     {
2767       arg2 = amglue_SvU64(ST(1));
2768     }
2769     result = (gboolean)Device_seek_block(arg1,arg2);
2770     {
2771       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2772       argvi++;
2773     }
2774     
2775     XSRETURN(argvi);
2776   fail:
2777     
2778     SWIG_croak_null();
2779   }
2780 }
2781
2782
2783 XS(_wrap_Device_read_block) {
2784   {
2785     Device *arg1 = (Device *) 0 ;
2786     gpointer arg2 = (gpointer) 0 ;
2787     int *arg3 = (int *) 0 ;
2788     int result;
2789     void *argp1 = 0 ;
2790     int res1 = 0 ;
2791     int res2 ;
2792     void *argp3 = 0 ;
2793     int res3 = 0 ;
2794     int argvi = 0;
2795     dXSARGS;
2796     
2797     if ((items < 3) || (items > 3)) {
2798       SWIG_croak("Usage: Device_read_block(self,buffer,size);");
2799     }
2800     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2801     if (!SWIG_IsOK(res1)) {
2802       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_read_block" "', argument " "1"" of type '" "Device *""'"); 
2803     }
2804     arg1 = (Device *)(argp1);
2805     res2 = SWIG_ConvertPtr(ST(1),SWIG_as_voidptrptr(&arg2), 0, 0);
2806     if (!SWIG_IsOK(res2)) {
2807       SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Device_read_block" "', argument " "2"" of type '" "gpointer""'"); 
2808     }
2809     res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_int, 0 |  0 );
2810     if (!SWIG_IsOK(res3)) {
2811       SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Device_read_block" "', argument " "3"" of type '" "int *""'"); 
2812     }
2813     arg3 = (int *)(argp3);
2814     result = (int)Device_read_block(arg1,arg2,arg3);
2815     {
2816       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2817       argvi++;
2818     }
2819     
2820     
2821     
2822     XSRETURN(argvi);
2823   fail:
2824     
2825     
2826     
2827     SWIG_croak_null();
2828   }
2829 }
2830
2831
2832 XS(_wrap_Device_read_to_fd) {
2833   {
2834     Device *arg1 = (Device *) 0 ;
2835     int arg2 ;
2836     gboolean result;
2837     void *argp1 = 0 ;
2838     int res1 = 0 ;
2839     int argvi = 0;
2840     dXSARGS;
2841     
2842     if ((items < 2) || (items > 2)) {
2843       SWIG_croak("Usage: Device_read_to_fd(self,fd);");
2844     }
2845     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2846     if (!SWIG_IsOK(res1)) {
2847       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_read_to_fd" "', argument " "1"" of type '" "Device *""'"); 
2848     }
2849     arg1 = (Device *)(argp1);
2850     {
2851       if (sizeof(signed int) == 1) {
2852         arg2 = amglue_SvI8(ST(1));
2853       } else if (sizeof(signed int) == 2) {
2854         arg2 = amglue_SvI16(ST(1));
2855       } else if (sizeof(signed int) == 4) {
2856         arg2 = amglue_SvI32(ST(1));
2857       } else if (sizeof(signed int) == 8) {
2858         arg2 = amglue_SvI64(ST(1));
2859       } else {
2860         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
2861       }
2862     }
2863     result = (gboolean)Device_read_to_fd(arg1,arg2);
2864     {
2865       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
2866       argvi++;
2867     }
2868     
2869     
2870     XSRETURN(argvi);
2871   fail:
2872     
2873     
2874     SWIG_croak_null();
2875   }
2876 }
2877
2878
2879 XS(_wrap_Device_property_list) {
2880   {
2881     Device *arg1 = (Device *) 0 ;
2882     DeviceProperty *result = 0 ;
2883     void *argp1 = 0 ;
2884     int res1 = 0 ;
2885     int argvi = 0;
2886     dXSARGS;
2887     
2888     if ((items < 1) || (items > 1)) {
2889       SWIG_croak("Usage: Device_property_list(self);");
2890     }
2891     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2892     if (!SWIG_IsOK(res1)) {
2893       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_property_list" "', argument " "1"" of type '" "Device *""'"); 
2894     }
2895     arg1 = (Device *)(argp1);
2896     result = (DeviceProperty *)Device_property_list(arg1);
2897     {
2898       int i = 0;
2899       int len = 0;
2900       
2901       /* Count the DeviceProperties */
2902       while (result[len].base) len++;
2903       EXTEND(SP, len); /* make room for return values */
2904       
2905       /* Note that we set ST(argvi) several times. the nature of
2906              * SWIG's wrapping is such that incrementing argvi points
2907              * ST(argvi) to the next location in perl's argument stack.
2908                    */
2909       
2910       for (i = 0; i < len ; i++) {
2911         ST(argvi) = sv_newmortal(); 
2912         sv_setpv(ST(argvi), result[i].base->name); 
2913         argvi++;
2914       }; 
2915     }
2916     
2917     XSRETURN(argvi);
2918   fail:
2919     
2920     SWIG_croak_null();
2921   }
2922 }
2923
2924
2925 XS(_wrap_Device_property_get) {
2926   {
2927     Device *arg1 = (Device *) 0 ;
2928     DevicePropertyBase *arg2 = (DevicePropertyBase *) 0 ;
2929     GValue *arg3 = (GValue *) 0 ;
2930     gboolean *arg4 = (gboolean *) 0 ;
2931     void *argp1 = 0 ;
2932     int res1 = 0 ;
2933     GValue val3 ;
2934     gboolean found3 ;
2935     int argvi = 0;
2936     dXSARGS;
2937     
2938     {
2939       memset(&val3, 0, sizeof(val3));
2940       arg3 = &val3;
2941       arg4 = &found3;
2942     }
2943     if ((items < 2) || (items > 2)) {
2944       SWIG_croak("Usage: Device_property_get(self,pbase,val_found);");
2945     }
2946     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
2947     if (!SWIG_IsOK(res1)) {
2948       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_property_get" "', argument " "1"" of type '" "Device *""'"); 
2949     }
2950     arg1 = (Device *)(argp1);
2951     {
2952       char *pname = NULL;
2953       
2954       if (SvPOK(ST(1)))
2955       pname = SvPV_nolen(ST(1));
2956       
2957       if (pname) arg2 = (DevicePropertyBase *)device_property_get_by_name(pname);
2958       if (!pname || !arg2) {
2959         SWIG_exception_fail(SWIG_ValueError, "Invalid property name");
2960       }
2961     }
2962     Device_property_get(arg1,arg2,arg3,arg4);
2963     
2964     {
2965       /* if the result is valid */
2966       if (*arg4) {
2967         /* move data from arg3 to ST(argvi), somehow */
2968         ST(argvi) = set_sv_from_gvalue(arg3);
2969         
2970         /* free any memory for the GValue */
2971         g_value_unset(arg3);
2972       } else {
2973         /* silently return 'undef', the sentinel for "undefined" */
2974         ST(argvi) = sv_newmortal();
2975         sv_setsv(ST(argvi), &PL_sv_undef);
2976       }
2977       argvi++;
2978     }
2979     
2980     
2981     XSRETURN(argvi);
2982   fail:
2983     
2984     
2985     SWIG_croak_null();
2986   }
2987 }
2988
2989
2990 XS(_wrap_Device_property_set) {
2991   {
2992     Device *arg1 = (Device *) 0 ;
2993     DevicePropertyBase *arg2 = (DevicePropertyBase *) 0 ;
2994     SV *arg3 = (SV *) 0 ;
2995     gboolean result;
2996     void *argp1 = 0 ;
2997     int res1 = 0 ;
2998     int argvi = 0;
2999     dXSARGS;
3000     
3001     if ((items < 3) || (items > 3)) {
3002       SWIG_croak("Usage: Device_property_set(self,pbase,sv);");
3003     }
3004     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
3005     if (!SWIG_IsOK(res1)) {
3006       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_property_set" "', argument " "1"" of type '" "Device *""'"); 
3007     }
3008     arg1 = (Device *)(argp1);
3009     {
3010       char *pname = NULL;
3011       
3012       if (SvPOK(ST(1)))
3013       pname = SvPV_nolen(ST(1));
3014       
3015       if (pname) arg2 = (DevicePropertyBase *)device_property_get_by_name(pname);
3016       if (!pname || !arg2) {
3017         SWIG_exception_fail(SWIG_ValueError, "Invalid property name");
3018       }
3019     }
3020     arg3 = ST(2);
3021     result = (gboolean)Device_property_set(arg1,arg2,arg3);
3022     {
3023       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
3024       argvi++;
3025     }
3026     
3027     
3028     
3029     XSRETURN(argvi);
3030   fail:
3031     
3032     
3033     
3034     SWIG_croak_null();
3035   }
3036 }
3037
3038
3039 XS(_wrap_Device_recycle_file) {
3040   {
3041     Device *arg1 = (Device *) 0 ;
3042     guint arg2 ;
3043     gboolean result;
3044     void *argp1 = 0 ;
3045     int res1 = 0 ;
3046     int argvi = 0;
3047     dXSARGS;
3048     
3049     if ((items < 2) || (items > 2)) {
3050       SWIG_croak("Usage: Device_recycle_file(self,filenum);");
3051     }
3052     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
3053     if (!SWIG_IsOK(res1)) {
3054       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_recycle_file" "', argument " "1"" of type '" "Device *""'"); 
3055     }
3056     arg1 = (Device *)(argp1);
3057     {
3058       if (sizeof(guint) == 1) {
3059         arg2 = amglue_SvU8(ST(1));
3060       } else if (sizeof(guint) == 2) {
3061         arg2 = amglue_SvU16(ST(1));
3062       } else if (sizeof(guint) == 4) {
3063         arg2 = amglue_SvU32(ST(1));
3064       } else if (sizeof(guint) == 8) {
3065         arg2 = amglue_SvU64(ST(1));
3066       } else {
3067         croak("Unexpected guint >64 bits?"); /* should be optimized out unless sizeof(guint) > 8 */
3068       }
3069     }
3070     result = (gboolean)Device_recycle_file(arg1,arg2);
3071     {
3072       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
3073       argvi++;
3074     }
3075     
3076     XSRETURN(argvi);
3077   fail:
3078     
3079     SWIG_croak_null();
3080   }
3081 }
3082
3083
3084 XS(_wrap_Device_set_startup_properties_from_config) {
3085   {
3086     Device *arg1 = (Device *) 0 ;
3087     void *argp1 = 0 ;
3088     int res1 = 0 ;
3089     int argvi = 0;
3090     dXSARGS;
3091     
3092     if ((items < 1) || (items > 1)) {
3093       SWIG_croak("Usage: Device_set_startup_properties_from_config(self);");
3094     }
3095     res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Device, 0 |  0 );
3096     if (!SWIG_IsOK(res1)) {
3097       SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Device_set_startup_properties_from_config" "', argument " "1"" of type '" "Device *""'"); 
3098     }
3099     arg1 = (Device *)(argp1);
3100     Device_set_startup_properties_from_config(arg1);
3101     
3102     
3103     XSRETURN(argvi);
3104   fail:
3105     
3106     SWIG_croak_null();
3107   }
3108 }
3109
3110
3111 XS(_wrap_IS_WRITABLE_ACCESS_MODE) {
3112   {
3113     DeviceAccessMode arg1 ;
3114     gboolean result;
3115     int argvi = 0;
3116     dXSARGS;
3117     
3118     if ((items < 1) || (items > 1)) {
3119       SWIG_croak("Usage: IS_WRITABLE_ACCESS_MODE(mode);");
3120     }
3121     {
3122       if (sizeof(signed int) == 1) {
3123         arg1 = amglue_SvI8(ST(0));
3124       } else if (sizeof(signed int) == 2) {
3125         arg1 = amglue_SvI16(ST(0));
3126       } else if (sizeof(signed int) == 4) {
3127         arg1 = amglue_SvI32(ST(0));
3128       } else if (sizeof(signed int) == 8) {
3129         arg1 = amglue_SvI64(ST(0));
3130       } else {
3131         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
3132       }
3133     }
3134     result = (gboolean)IS_WRITABLE_ACCESS_MODE(arg1);
3135     {
3136       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
3137       argvi++;
3138     }
3139     
3140     XSRETURN(argvi);
3141   fail:
3142     
3143     SWIG_croak_null();
3144   }
3145 }
3146
3147
3148 XS(_wrap_feature_support_flags_is_valid) {
3149   {
3150     FeatureSupportFlags arg1 ;
3151     gboolean result;
3152     int argvi = 0;
3153     dXSARGS;
3154     
3155     if ((items < 1) || (items > 1)) {
3156       SWIG_croak("Usage: feature_support_flags_is_valid(FeatureSupportFlags);");
3157     }
3158     {
3159       if (sizeof(signed int) == 1) {
3160         arg1 = amglue_SvI8(ST(0));
3161       } else if (sizeof(signed int) == 2) {
3162         arg1 = amglue_SvI16(ST(0));
3163       } else if (sizeof(signed int) == 4) {
3164         arg1 = amglue_SvI32(ST(0));
3165       } else if (sizeof(signed int) == 8) {
3166         arg1 = amglue_SvI64(ST(0));
3167       } else {
3168         g_critical("Unexpected signed int >64 bits?"); /* should be optimized out unless sizeof(signed int) > 8 */
3169       }
3170     }
3171     result = (gboolean)feature_support_flags_is_valid(arg1);
3172     {
3173       ST(argvi) = sv_2mortal(amglue_newSVi64(result));
3174       argvi++;
3175     }
3176     
3177     XSRETURN(argvi);
3178   fail:
3179     
3180     SWIG_croak_null();
3181   }
3182 }
3183
3184
3185
3186 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
3187
3188 static swig_type_info _swigt__p_Device = {"_p_Device", "struct Device *|Device *", 0, 0, (void*)"Amanda::Device::Device", 0};
3189 static swig_type_info _swigt__p_DevicePropertyBase = {"_p_DevicePropertyBase", "DevicePropertyBase *", 0, 0, (void*)0, 0};
3190 static swig_type_info _swigt__p_GValue = {"_p_GValue", "GValue *", 0, 0, (void*)0, 0};
3191 static swig_type_info _swigt__p_a_STRMAX__char = {"_p_a_STRMAX__char", "char (*)[STRMAX]|string_t *", 0, 0, (void*)0, 0};
3192 static swig_type_info _swigt__p_char = {"_p_char", "gchar *|char *", 0, 0, (void*)0, 0};
3193 static swig_type_info _swigt__p_double = {"_p_double", "double *|gdouble *", 0, 0, (void*)0, 0};
3194 static swig_type_info _swigt__p_dumpfile_t = {"_p_dumpfile_t", "dumpfile_t *", 0, 0, (void*)"Amanda::Types::dumpfile_t", 0};
3195 static swig_type_info _swigt__p_float = {"_p_float", "float *|gfloat *", 0, 0, (void*)0, 0};
3196 static swig_type_info _swigt__p_guint = {"_p_guint", "guint *", 0, 0, (void*)0, 0};
3197 static swig_type_info _swigt__p_guint64 = {"_p_guint64", "guint64 *", 0, 0, (void*)0, 0};
3198 static swig_type_info _swigt__p_int = {"_p_int", "int *|ConcurrencyParadigm *|filetype_t *|SizeAccuracy *|StreamingRequirement *|gboolean *|DeviceAccessMode *|MediaAccessMode *|FeatureSupportFlags *|ReadLabelStatusFlags *|PropertyPhaseFlags *|PropertyAccessFlags *", 0, 0, (void*)0, 0};
3199 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "guchar *|unsigned char *", 0, 0, (void*)0, 0};
3200
3201 static swig_type_info *swig_type_initial[] = {
3202   &_swigt__p_Device,
3203   &_swigt__p_DevicePropertyBase,
3204   &_swigt__p_GValue,
3205   &_swigt__p_a_STRMAX__char,
3206   &_swigt__p_char,
3207   &_swigt__p_double,
3208   &_swigt__p_dumpfile_t,
3209   &_swigt__p_float,
3210   &_swigt__p_guint,
3211   &_swigt__p_guint64,
3212   &_swigt__p_int,
3213   &_swigt__p_unsigned_char,
3214 };
3215
3216 static swig_cast_info _swigc__p_Device[] = {  {&_swigt__p_Device, 0, 0, 0},{0, 0, 0, 0}};
3217 static swig_cast_info _swigc__p_DevicePropertyBase[] = {  {&_swigt__p_DevicePropertyBase, 0, 0, 0},{0, 0, 0, 0}};
3218 static swig_cast_info _swigc__p_GValue[] = {  {&_swigt__p_GValue, 0, 0, 0},{0, 0, 0, 0}};
3219 static swig_cast_info _swigc__p_a_STRMAX__char[] = {  {&_swigt__p_a_STRMAX__char, 0, 0, 0},{0, 0, 0, 0}};
3220 static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
3221 static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
3222 static swig_cast_info _swigc__p_dumpfile_t[] = {  {&_swigt__p_dumpfile_t, 0, 0, 0},{0, 0, 0, 0}};
3223 static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
3224 static swig_cast_info _swigc__p_guint[] = {  {&_swigt__p_guint, 0, 0, 0},{0, 0, 0, 0}};
3225 static swig_cast_info _swigc__p_guint64[] = {  {&_swigt__p_guint64, 0, 0, 0},{0, 0, 0, 0}};
3226 static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
3227 static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
3228
3229 static swig_cast_info *swig_cast_initial[] = {
3230   _swigc__p_Device,
3231   _swigc__p_DevicePropertyBase,
3232   _swigc__p_GValue,
3233   _swigc__p_a_STRMAX__char,
3234   _swigc__p_char,
3235   _swigc__p_double,
3236   _swigc__p_dumpfile_t,
3237   _swigc__p_float,
3238   _swigc__p_guint,
3239   _swigc__p_guint64,
3240   _swigc__p_int,
3241   _swigc__p_unsigned_char,
3242 };
3243
3244
3245 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
3246
3247 static swig_constant_info swig_constants[] = {
3248 {0,0,0,0,0,0}
3249 };
3250 #ifdef __cplusplus
3251 }
3252 #endif
3253 static swig_variable_info swig_variables[] = {
3254 {0,0,0,0}
3255 };
3256 static swig_command_info swig_commands[] = {
3257 {"Amanda::Devicec::Device_file_get", _wrap_Device_file_get},
3258 {"Amanda::Devicec::Device_block_get", _wrap_Device_block_get},
3259 {"Amanda::Devicec::Device_in_file_get", _wrap_Device_in_file_get},
3260 {"Amanda::Devicec::Device_device_name_get", _wrap_Device_device_name_get},
3261 {"Amanda::Devicec::Device_access_mode_get", _wrap_Device_access_mode_get},
3262 {"Amanda::Devicec::Device_is_eof_get", _wrap_Device_is_eof_get},
3263 {"Amanda::Devicec::Device_volume_label_get", _wrap_Device_volume_label_get},
3264 {"Amanda::Devicec::Device_volume_time_get", _wrap_Device_volume_time_get},
3265 {"Amanda::Devicec::new_Device", _wrap_new_Device},
3266 {"Amanda::Devicec::delete_Device", _wrap_delete_Device},
3267 {"Amanda::Devicec::Device_read_label", _wrap_Device_read_label},
3268 {"Amanda::Devicec::Device_start", _wrap_Device_start},
3269 {"Amanda::Devicec::Device_finish", _wrap_Device_finish},
3270 {"Amanda::Devicec::Device_start_file", _wrap_Device_start_file},
3271 {"Amanda::Devicec::Device_write_min_size", _wrap_Device_write_min_size},
3272 {"Amanda::Devicec::Device_write_max_size", _wrap_Device_write_max_size},
3273 {"Amanda::Devicec::Device_read_max_size", _wrap_Device_read_max_size},
3274 {"Amanda::Devicec::Device_write_block", _wrap_Device_write_block},
3275 {"Amanda::Devicec::Device_write_from_fd", _wrap_Device_write_from_fd},
3276 {"Amanda::Devicec::Device_finish_file", _wrap_Device_finish_file},
3277 {"Amanda::Devicec::Device_seek_file", _wrap_Device_seek_file},
3278 {"Amanda::Devicec::Device_seek_block", _wrap_Device_seek_block},
3279 {"Amanda::Devicec::Device_read_block", _wrap_Device_read_block},
3280 {"Amanda::Devicec::Device_read_to_fd", _wrap_Device_read_to_fd},
3281 {"Amanda::Devicec::Device_property_list", _wrap_Device_property_list},
3282 {"Amanda::Devicec::Device_property_get", _wrap_Device_property_get},
3283 {"Amanda::Devicec::Device_property_set", _wrap_Device_property_set},
3284 {"Amanda::Devicec::Device_recycle_file", _wrap_Device_recycle_file},
3285 {"Amanda::Devicec::Device_set_startup_properties_from_config", _wrap_Device_set_startup_properties_from_config},
3286 {"Amanda::Devicec::IS_WRITABLE_ACCESS_MODE", _wrap_IS_WRITABLE_ACCESS_MODE},
3287 {"Amanda::Devicec::feature_support_flags_is_valid", _wrap_feature_support_flags_is_valid},
3288 {0,0}
3289 };
3290 /* -----------------------------------------------------------------------------
3291  * Type initialization:
3292  * This problem is tough by the requirement that no dynamic 
3293  * memory is used. Also, since swig_type_info structures store pointers to 
3294  * swig_cast_info structures and swig_cast_info structures store pointers back
3295  * to swig_type_info structures, we need some lookup code at initialization. 
3296  * The idea is that swig generates all the structures that are needed. 
3297  * The runtime then collects these partially filled structures. 
3298  * The SWIG_InitializeModule function takes these initial arrays out of 
3299  * swig_module, and does all the lookup, filling in the swig_module.types
3300  * array with the correct data and linking the correct swig_cast_info
3301  * structures together.
3302  *
3303  * The generated swig_type_info structures are assigned staticly to an initial 
3304  * array. We just loop through that array, and handle each type individually.
3305  * First we lookup if this type has been already loaded, and if so, use the
3306  * loaded structure instead of the generated one. Then we have to fill in the
3307  * cast linked list. The cast data is initially stored in something like a
3308  * two-dimensional array. Each row corresponds to a type (there are the same
3309  * number of rows as there are in the swig_type_initial array). Each entry in
3310  * a column is one of the swig_cast_info structures for that type.
3311  * The cast_initial array is actually an array of arrays, because each row has
3312  * a variable number of columns. So to actually build the cast linked list,
3313  * we find the array of casts associated with the type, and loop through it 
3314  * adding the casts to the list. The one last trick we need to do is making
3315  * sure the type pointer in the swig_cast_info struct is correct.
3316  *
3317  * First off, we lookup the cast->type name to see if it is already loaded. 
3318  * There are three cases to handle:
3319  *  1) If the cast->type has already been loaded AND the type we are adding
3320  *     casting info to has not been loaded (it is in this module), THEN we
3321  *     replace the cast->type pointer with the type pointer that has already
3322  *     been loaded.
3323  *  2) If BOTH types (the one we are adding casting info to, and the 
3324  *     cast->type) are loaded, THEN the cast info has already been loaded by
3325  *     the previous module so we just ignore it.
3326  *  3) Finally, if cast->type has not already been loaded, then we add that
3327  *     swig_cast_info to the linked list (because the cast->type) pointer will
3328  *     be correct.
3329  * ----------------------------------------------------------------------------- */
3330
3331 #ifdef __cplusplus
3332 extern "C" {
3333 #if 0
3334 } /* c-mode */
3335 #endif
3336 #endif
3337
3338 #if 0
3339 #define SWIGRUNTIME_DEBUG
3340 #endif
3341
3342
3343 SWIGRUNTIME void
3344 SWIG_InitializeModule(void *clientdata) {
3345   size_t i;
3346   swig_module_info *module_head, *iter;
3347   int found;
3348   
3349   clientdata = clientdata;
3350   
3351   /* check to see if the circular list has been setup, if not, set it up */
3352   if (swig_module.next==0) {
3353     /* Initialize the swig_module */
3354     swig_module.type_initial = swig_type_initial;
3355     swig_module.cast_initial = swig_cast_initial;
3356     swig_module.next = &swig_module;
3357   }
3358   
3359   /* Try and load any already created modules */
3360   module_head = SWIG_GetModule(clientdata);
3361   if (!module_head) {
3362     /* This is the first module loaded for this interpreter */
3363     /* so set the swig module into the interpreter */
3364     SWIG_SetModule(clientdata, &swig_module);
3365     module_head = &swig_module;
3366   } else {
3367     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
3368     found=0;
3369     iter=module_head;
3370     do {
3371       if (iter==&swig_module) {
3372         found=1;
3373         break;
3374       }
3375       iter=iter->next;
3376     } while (iter!= module_head);
3377     
3378     /* if the is found in the list, then all is done and we may leave */
3379     if (found) return;
3380     /* otherwise we must add out module into the list */
3381     swig_module.next = module_head->next;
3382     module_head->next = &swig_module;
3383   }
3384   
3385   /* Now work on filling in swig_module.types */
3386 #ifdef SWIGRUNTIME_DEBUG
3387   printf("SWIG_InitializeModule: size %d\n", swig_module.size);
3388 #endif
3389   for (i = 0; i < swig_module.size; ++i) {
3390     swig_type_info *type = 0;
3391     swig_type_info *ret;
3392     swig_cast_info *cast;
3393     
3394 #ifdef SWIGRUNTIME_DEBUG
3395     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3396 #endif
3397     
3398     /* if there is another module already loaded */
3399     if (swig_module.next != &swig_module) {
3400       type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
3401     }
3402     if (type) {
3403       /* Overwrite clientdata field */
3404 #ifdef SWIGRUNTIME_DEBUG
3405       printf("SWIG_InitializeModule: found type %s\n", type->name);
3406 #endif
3407       if (swig_module.type_initial[i]->clientdata) {
3408         type->clientdata = swig_module.type_initial[i]->clientdata;
3409 #ifdef SWIGRUNTIME_DEBUG
3410         printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
3411 #endif
3412       }
3413     } else {
3414       type = swig_module.type_initial[i];
3415     }
3416     
3417     /* Insert casting types */
3418     cast = swig_module.cast_initial[i];
3419     while (cast->type) {
3420       /* Don't need to add information already in the list */
3421       ret = 0;
3422 #ifdef SWIGRUNTIME_DEBUG
3423       printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
3424 #endif
3425       if (swig_module.next != &swig_module) {
3426         ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
3427 #ifdef SWIGRUNTIME_DEBUG
3428         if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
3429 #endif
3430       }
3431       if (ret) {
3432         if (type == swig_module.type_initial[i]) {
3433 #ifdef SWIGRUNTIME_DEBUG
3434           printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
3435 #endif
3436           cast->type = ret;
3437           ret = 0;
3438         } else {
3439           /* Check for casting already in the list */
3440           swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
3441 #ifdef SWIGRUNTIME_DEBUG
3442           if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
3443 #endif
3444           if (!ocast) ret = 0;
3445         }
3446       }
3447       
3448       if (!ret) {
3449 #ifdef SWIGRUNTIME_DEBUG
3450         printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
3451 #endif
3452         if (type->cast) {
3453           type->cast->prev = cast;
3454           cast->next = type->cast;
3455         }
3456         type->cast = cast;
3457       }
3458       cast++;
3459     }
3460     /* Set entry in modules->types array equal to the type */
3461     swig_module.types[i] = type;
3462   }
3463   swig_module.types[i] = 0;
3464   
3465 #ifdef SWIGRUNTIME_DEBUG
3466   printf("**** SWIG_InitializeModule: Cast List ******\n");
3467   for (i = 0; i < swig_module.size; ++i) {
3468     int j = 0;
3469     swig_cast_info *cast = swig_module.cast_initial[i];
3470     printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
3471     while (cast->type) {
3472       printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
3473       cast++;
3474       ++j;
3475     }
3476     printf("---- Total casts: %d\n",j);
3477   }
3478   printf("**** SWIG_InitializeModule: Cast List ******\n");
3479 #endif
3480 }
3481
3482 /* This function will propagate the clientdata field of type to
3483 * any new swig_type_info structures that have been added into the list
3484 * of equivalent types.  It is like calling
3485 * SWIG_TypeClientData(type, clientdata) a second time.
3486 */
3487 SWIGRUNTIME void
3488 SWIG_PropagateClientData(void) {
3489   size_t i;
3490   swig_cast_info *equiv;
3491   static int init_run = 0;
3492   
3493   if (init_run) return;
3494   init_run = 1;
3495   
3496   for (i = 0; i < swig_module.size; i++) {
3497     if (swig_module.types[i]->clientdata) {
3498       equiv = swig_module.types[i]->cast;
3499       while (equiv) {
3500         if (!equiv->converter) {
3501           if (equiv->type && !equiv->type->clientdata)
3502           SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
3503         }
3504         equiv = equiv->next;
3505       }
3506     }
3507   }
3508 }
3509
3510 #ifdef __cplusplus
3511 #if 0
3512 {
3513   /* c-mode */
3514 #endif
3515 }
3516 #endif
3517
3518
3519
3520 #ifdef __cplusplus
3521 extern "C"
3522 #endif
3523
3524 XS(SWIG_init) {
3525   dXSARGS;
3526   int i;
3527   
3528   SWIG_InitializeModule(0);
3529   
3530   /* Install commands */
3531   for (i = 0; swig_commands[i].name; i++) {
3532     newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
3533   }
3534   
3535   /* Install variables */
3536   for (i = 0; swig_variables[i].name; i++) {
3537     SV *sv;
3538     sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2);
3539     if (swig_variables[i].type) {
3540       SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
3541     } else {
3542       sv_setiv(sv,(IV) 0);
3543     }
3544     swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); 
3545   }
3546   
3547   /* Install constant */
3548   for (i = 0; swig_constants[i].type; i++) {
3549     SV *sv;
3550     sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2);
3551     switch(swig_constants[i].type) {
3552     case SWIG_INT:
3553       sv_setiv(sv, (IV) swig_constants[i].lvalue);
3554       break;
3555     case SWIG_FLOAT:
3556       sv_setnv(sv, (double) swig_constants[i].dvalue);
3557       break;
3558     case SWIG_STRING:
3559       sv_setpv(sv, (char *) swig_constants[i].pvalue);
3560       break;
3561     case SWIG_POINTER:
3562       SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
3563       break;
3564     case SWIG_BINARY:
3565       SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
3566       break;
3567     default:
3568       break;
3569     }
3570     SvREADONLY_on(sv);
3571   }
3572   
3573   
3574   /* Initialize the Device API on load */
3575   device_api_init();
3576   
3577   SWIG_TypeClientData(SWIGTYPE_p_Device, (void*) "Amanda::Device::Device");
3578   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3579     SV *sv = get_sv((char*) SWIG_prefix "ACCESS_NULL", TRUE | 0x2);
3580     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(ACCESS_NULL)));
3581     SvREADONLY_on(sv);
3582   } while(0) /*@SWIG@*/;
3583   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3584     SV *sv = get_sv((char*) SWIG_prefix "ACCESS_READ", TRUE | 0x2);
3585     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(ACCESS_READ)));
3586     SvREADONLY_on(sv);
3587   } while(0) /*@SWIG@*/;
3588   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3589     SV *sv = get_sv((char*) SWIG_prefix "ACCESS_WRITE", TRUE | 0x2);
3590     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(ACCESS_WRITE)));
3591     SvREADONLY_on(sv);
3592   } while(0) /*@SWIG@*/;
3593   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3594     SV *sv = get_sv((char*) SWIG_prefix "ACCESS_APPEND", TRUE | 0x2);
3595     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(ACCESS_APPEND)));
3596     SvREADONLY_on(sv);
3597   } while(0) /*@SWIG@*/;
3598   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3599     SV *sv = get_sv((char*) SWIG_prefix "READ_LABEL_STATUS_SUCCESS", TRUE | 0x2);
3600     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(READ_LABEL_STATUS_SUCCESS)));
3601     SvREADONLY_on(sv);
3602   } while(0) /*@SWIG@*/;
3603   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3604     SV *sv = get_sv((char*) SWIG_prefix "READ_LABEL_STATUS_DEVICE_MISSING", TRUE | 0x2);
3605     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(READ_LABEL_STATUS_DEVICE_MISSING)));
3606     SvREADONLY_on(sv);
3607   } while(0) /*@SWIG@*/;
3608   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3609     SV *sv = get_sv((char*) SWIG_prefix "READ_LABEL_STATUS_DEVICE_ERROR", TRUE | 0x2);
3610     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(READ_LABEL_STATUS_DEVICE_ERROR)));
3611     SvREADONLY_on(sv);
3612   } while(0) /*@SWIG@*/;
3613   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3614     SV *sv = get_sv((char*) SWIG_prefix "READ_LABEL_STATUS_VOLUME_MISSING", TRUE | 0x2);
3615     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(READ_LABEL_STATUS_VOLUME_MISSING)));
3616     SvREADONLY_on(sv);
3617   } while(0) /*@SWIG@*/;
3618   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3619     SV *sv = get_sv((char*) SWIG_prefix "READ_LABEL_STATUS_VOLUME_UNLABELED", TRUE | 0x2);
3620     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(READ_LABEL_STATUS_VOLUME_UNLABELED)));
3621     SvREADONLY_on(sv);
3622   } while(0) /*@SWIG@*/;
3623   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3624     SV *sv = get_sv((char*) SWIG_prefix "READ_LABEL_STATUS_VOLUME_ERROR", TRUE | 0x2);
3625     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(READ_LABEL_STATUS_VOLUME_ERROR)));
3626     SvREADONLY_on(sv);
3627   } while(0) /*@SWIG@*/;
3628   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3629     SV *sv = get_sv((char*) SWIG_prefix "READ_LABEL_STATUS_FLAGS_MAX", TRUE | 0x2);
3630     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(READ_LABEL_STATUS_FLAGS_MAX)));
3631     SvREADONLY_on(sv);
3632   } while(0) /*@SWIG@*/;
3633   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3634     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_PHASE_BEFORE_START", TRUE | 0x2);
3635     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_PHASE_BEFORE_START)));
3636     SvREADONLY_on(sv);
3637   } while(0) /*@SWIG@*/;
3638   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3639     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_PHASE_BETWEEN_FILE_WRITE", TRUE | 0x2);
3640     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_PHASE_BETWEEN_FILE_WRITE)));
3641     SvREADONLY_on(sv);
3642   } while(0) /*@SWIG@*/;
3643   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3644     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_PHASE_INSIDE_FILE_WRITE", TRUE | 0x2);
3645     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_PHASE_INSIDE_FILE_WRITE)));
3646     SvREADONLY_on(sv);
3647   } while(0) /*@SWIG@*/;
3648   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3649     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_PHASE_BETWEEN_FILE_READ", TRUE | 0x2);
3650     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_PHASE_BETWEEN_FILE_READ)));
3651     SvREADONLY_on(sv);
3652   } while(0) /*@SWIG@*/;
3653   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3654     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_PHASE_INSIDE_FILE_READ", TRUE | 0x2);
3655     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_PHASE_INSIDE_FILE_READ)));
3656     SvREADONLY_on(sv);
3657   } while(0) /*@SWIG@*/;
3658   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3659     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_PHASE_MAX", TRUE | 0x2);
3660     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_PHASE_MAX)));
3661     SvREADONLY_on(sv);
3662   } while(0) /*@SWIG@*/;
3663   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3664     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_PHASE_MASK", TRUE | 0x2);
3665     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_PHASE_MASK)));
3666     SvREADONLY_on(sv);
3667   } while(0) /*@SWIG@*/;
3668   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3669     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_PHASE_SHIFT", TRUE | 0x2);
3670     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_PHASE_SHIFT)));
3671     SvREADONLY_on(sv);
3672   } while(0) /*@SWIG@*/;
3673   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3674     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_GET_BEFORE_START", TRUE | 0x2);
3675     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_GET_BEFORE_START)));
3676     SvREADONLY_on(sv);
3677   } while(0) /*@SWIG@*/;
3678   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3679     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_GET_BETWEEN_FILE_WRITE", TRUE | 0x2);
3680     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_GET_BETWEEN_FILE_WRITE)));
3681     SvREADONLY_on(sv);
3682   } while(0) /*@SWIG@*/;
3683   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3684     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_GET_INSIDE_FILE_WRITE", TRUE | 0x2);
3685     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_GET_INSIDE_FILE_WRITE)));
3686     SvREADONLY_on(sv);
3687   } while(0) /*@SWIG@*/;
3688   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3689     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_GET_BETWEEN_FILE_READ", TRUE | 0x2);
3690     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_GET_BETWEEN_FILE_READ)));
3691     SvREADONLY_on(sv);
3692   } while(0) /*@SWIG@*/;
3693   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3694     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_GET_INSIDE_FILE_READ", TRUE | 0x2);
3695     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_GET_INSIDE_FILE_READ)));
3696     SvREADONLY_on(sv);
3697   } while(0) /*@SWIG@*/;
3698   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3699     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_SET_BEFORE_START", TRUE | 0x2);
3700     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_SET_BEFORE_START)));
3701     SvREADONLY_on(sv);
3702   } while(0) /*@SWIG@*/;
3703   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3704     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_SET_BETWEEN_FILE_WRITE", TRUE | 0x2);
3705     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_SET_BETWEEN_FILE_WRITE)));
3706     SvREADONLY_on(sv);
3707   } while(0) /*@SWIG@*/;
3708   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3709     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_SET_INSIDE_FILE_WRITE", TRUE | 0x2);
3710     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_SET_INSIDE_FILE_WRITE)));
3711     SvREADONLY_on(sv);
3712   } while(0) /*@SWIG@*/;
3713   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3714     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_SET_BETWEEN_FILE_READ", TRUE | 0x2);
3715     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_SET_BETWEEN_FILE_READ)));
3716     SvREADONLY_on(sv);
3717   } while(0) /*@SWIG@*/;
3718   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3719     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_SET_INSIDE_FILE_READ", TRUE | 0x2);
3720     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_SET_INSIDE_FILE_READ)));
3721     SvREADONLY_on(sv);
3722   } while(0) /*@SWIG@*/;
3723   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3724     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_GET_MASK", TRUE | 0x2);
3725     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_GET_MASK)));
3726     SvREADONLY_on(sv);
3727   } while(0) /*@SWIG@*/;
3728   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3729     SV *sv = get_sv((char*) SWIG_prefix "PROPERTY_ACCESS_SET_MASK", TRUE | 0x2);
3730     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(PROPERTY_ACCESS_SET_MASK)));
3731     SvREADONLY_on(sv);
3732   } while(0) /*@SWIG@*/;
3733   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3734     SV *sv = get_sv((char*) SWIG_prefix "CONCURRENCY_PARADIGM_EXCLUSIVE", TRUE | 0x2);
3735     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(CONCURRENCY_PARADIGM_EXCLUSIVE)));
3736     SvREADONLY_on(sv);
3737   } while(0) /*@SWIG@*/;
3738   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3739     SV *sv = get_sv((char*) SWIG_prefix "CONCURRENCY_PARADIGM_SHARED_READ", TRUE | 0x2);
3740     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(CONCURRENCY_PARADIGM_SHARED_READ)));
3741     SvREADONLY_on(sv);
3742   } while(0) /*@SWIG@*/;
3743   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3744     SV *sv = get_sv((char*) SWIG_prefix "CONCURRENCY_PARADIGM_RANDOM_ACCESS", TRUE | 0x2);
3745     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(CONCURRENCY_PARADIGM_RANDOM_ACCESS)));
3746     SvREADONLY_on(sv);
3747   } while(0) /*@SWIG@*/;
3748   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3749     SV *sv = get_sv((char*) SWIG_prefix "STREAMING_REQUIREMENT_NONE", TRUE | 0x2);
3750     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(STREAMING_REQUIREMENT_NONE)));
3751     SvREADONLY_on(sv);
3752   } while(0) /*@SWIG@*/;
3753   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3754     SV *sv = get_sv((char*) SWIG_prefix "STREAMING_REQUIREMENT_DESIRED", TRUE | 0x2);
3755     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(STREAMING_REQUIREMENT_DESIRED)));
3756     SvREADONLY_on(sv);
3757   } while(0) /*@SWIG@*/;
3758   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3759     SV *sv = get_sv((char*) SWIG_prefix "STREAMING_REQUIREMENT_REQUIRED", TRUE | 0x2);
3760     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(STREAMING_REQUIREMENT_REQUIRED)));
3761     SvREADONLY_on(sv);
3762   } while(0) /*@SWIG@*/;
3763   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3764     SV *sv = get_sv((char*) SWIG_prefix "MEDIA_ACCESS_MODE_READ_ONLY", TRUE | 0x2);
3765     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(MEDIA_ACCESS_MODE_READ_ONLY)));
3766     SvREADONLY_on(sv);
3767   } while(0) /*@SWIG@*/;
3768   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3769     SV *sv = get_sv((char*) SWIG_prefix "MEDIA_ACCESS_MODE_WORM", TRUE | 0x2);
3770     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(MEDIA_ACCESS_MODE_WORM)));
3771     SvREADONLY_on(sv);
3772   } while(0) /*@SWIG@*/;
3773   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3774     SV *sv = get_sv((char*) SWIG_prefix "MEDIA_ACCESS_MODE_READ_WRITE", TRUE | 0x2);
3775     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(MEDIA_ACCESS_MODE_READ_WRITE)));
3776     SvREADONLY_on(sv);
3777   } while(0) /*@SWIG@*/;
3778   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3779     SV *sv = get_sv((char*) SWIG_prefix "MEDIA_ACCESS_MODE_WRITE_ONLY", TRUE | 0x2);
3780     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(MEDIA_ACCESS_MODE_WRITE_ONLY)));
3781     SvREADONLY_on(sv);
3782   } while(0) /*@SWIG@*/;
3783   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3784     SV *sv = get_sv((char*) SWIG_prefix "SIZE_ACCURACY_UNKNOWN", TRUE | 0x2);
3785     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(SIZE_ACCURACY_UNKNOWN)));
3786     SvREADONLY_on(sv);
3787   } while(0) /*@SWIG@*/;
3788   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3789     SV *sv = get_sv((char*) SWIG_prefix "SIZE_ACCURACY_ESTIMATE", TRUE | 0x2);
3790     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(SIZE_ACCURACY_ESTIMATE)));
3791     SvREADONLY_on(sv);
3792   } while(0) /*@SWIG@*/;
3793   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3794     SV *sv = get_sv((char*) SWIG_prefix "SIZE_ACCURACY_REAL", TRUE | 0x2);
3795     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(SIZE_ACCURACY_REAL)));
3796     SvREADONLY_on(sv);
3797   } while(0) /*@SWIG@*/;
3798   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3799     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_STATUS_ENABLED", TRUE | 0x2);
3800     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_STATUS_ENABLED)));
3801     SvREADONLY_on(sv);
3802   } while(0) /*@SWIG@*/;
3803   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3804     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_STATUS_DISABLED", TRUE | 0x2);
3805     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_STATUS_DISABLED)));
3806     SvREADONLY_on(sv);
3807   } while(0) /*@SWIG@*/;
3808   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3809     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SURETY_BAD", TRUE | 0x2);
3810     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SURETY_BAD)));
3811     SvREADONLY_on(sv);
3812   } while(0) /*@SWIG@*/;
3813   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3814     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SURETY_GOOD", TRUE | 0x2);
3815     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SURETY_GOOD)));
3816     SvREADONLY_on(sv);
3817   } while(0) /*@SWIG@*/;
3818   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3819     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SOURCE_DEFAULT", TRUE | 0x2);
3820     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SOURCE_DEFAULT)));
3821     SvREADONLY_on(sv);
3822   } while(0) /*@SWIG@*/;
3823   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3824     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SOURCE_DETECTED", TRUE | 0x2);
3825     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SOURCE_DETECTED)));
3826     SvREADONLY_on(sv);
3827   } while(0) /*@SWIG@*/;
3828   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3829     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SOURCE_USER", TRUE | 0x2);
3830     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SOURCE_USER)));
3831     SvREADONLY_on(sv);
3832   } while(0) /*@SWIG@*/;
3833   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3834     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SUPPORT_FLAGS_MAX", TRUE | 0x2);
3835     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SUPPORT_FLAGS_MAX)));
3836     SvREADONLY_on(sv);
3837   } while(0) /*@SWIG@*/;
3838   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3839     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SUPPORT_FLAGS_MASK", TRUE | 0x2);
3840     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SUPPORT_FLAGS_MASK)));
3841     SvREADONLY_on(sv);
3842   } while(0) /*@SWIG@*/;
3843   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3844     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SUPPORT_FLAGS_STATUS_MASK", TRUE | 0x2);
3845     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SUPPORT_FLAGS_STATUS_MASK)));
3846     SvREADONLY_on(sv);
3847   } while(0) /*@SWIG@*/;
3848   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3849     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SUPPORT_FLAGS_SURETY_MASK", TRUE | 0x2);
3850     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SUPPORT_FLAGS_SURETY_MASK)));
3851     SvREADONLY_on(sv);
3852   } while(0) /*@SWIG@*/;
3853   /*@SWIG:/usr/share/swig/1.3.33/perl5/perltypemaps.swg,64,%set_constant@*/ do {
3854     SV *sv = get_sv((char*) SWIG_prefix "FEATURE_SUPPORT_FLAGS_SOURCE_MASK", TRUE | 0x2);
3855     sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1((int)(FEATURE_SUPPORT_FLAGS_SOURCE_MASK)));
3856     SvREADONLY_on(sv);
3857   } while(0) /*@SWIG@*/;
3858   ST(0) = &PL_sv_yes;
3859   XSRETURN(1);
3860 }
3861