1 /* zxidmd.i  -  SWIG interface file for metadata low level functions
2  * Copyright (c) 2006-2007 Symlabs (symlabs@symlabs.com), All Rights Reserved.
3  * Author: Sampo Kellomaki (sampo@iki.fi)
4  * This is confidential unpublished proprietary source code of the author.
5  * NO WARRANTY, not even implied warranties. Contains trade secrets.
6  * Distribution prohibited unless authorized in writing.
7  * Licensed under Apache License 2.0, see file COPYING.
8  * $Id: zxidmd.i,v 1.4 2007-08-10 19:19:10 sampo Exp $
9  * 31.8.2006, created --Sampo
10  */
11 %module zxidmd
12 %{
13 
14 #define USE_OPENSSL
15 #define USE_CURL
16 
17 #include "errmac.h"
18 #include "zx.h"
19 #include "zxid.h"
20 #include "saml2.h"
21 
22 #include "c/zx-const.h"
23 #include "c/zx-data.h"
24 #include "c/zx-ns.h"
25 #include "c/zx-md-data.h"
26 #include "c/zxidvers.h"
27 
28 char* instance = "zxid module";
29 char* assert_msg = "An assert happened in zxid module.";
30 int assert_nonfatal = 0;
31 int debug = 0;
32 int trace = 0;
33 
34 %}
35 
36 %rename(use_is_perl_keyword) use;
37 
38 %typemap (in) (int len, char* s) {
39   $2 = SvPV($input, $1);
40 }
41 
42 //%typemap (in) struct zx_str* {
43 //  int len;
44 //  char* s;
45 //  s = SvPV($input, len);
46 //  $1 = zx_str_dup_len_str(c/* *** where from ctx? */, len, s);
47 //}
48 
49 %typemap (out) struct zx_str* {
50   if (argvi >= items) {
51     EXTEND(sp,1);
52   }
53   $result = newSVpv($1->s, $1->len);
54   /* Do not free underlying zx_str because they are usually returned by reference. */
55   ++argvi;
56 }
57 
58 %include "c/zx-md-data.h"
59 
60 /* EOF */
61