1 /* zxidraw.i  -  SWIG interface file for SAML low level functions
2  * Copyright (c) 2006 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: zxidraw.i,v 1.4 2009-08-30 15:09:26 sampo Exp $
9  * 31.8.2006, created --Sampo
10  */
11 %module zxidraw
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/saml2-const.h"
23 #include "c/saml2-data.h"
24 #include "c/saml2-ns.h"
25 #include "c/saml2md-const.h"
26 #include "c/saml2md-data.h"
27 #include "c/saml2md-ns.h"
28 #include "c/zxidvers.h"
29 
30 char* instance = "zxid raw module";
31 char* assert_msg = "An assert happened in zxid raw module.";
32 int assert_nonfatal = 0;
33 int debug = 0;
34 int trace = 0;
35 
36 %}
37 
38 %rename(use_is_perl_keyword) use;
39 
40 %typemap (in) (int len, char* s) {
41   $2 = SvPV($input, $1);
42 }
43 
44 //%typemap (in) struct zx_str* {
45 //  int len;
46 //  char* s;
47 //  s = SvPV($input, len);
48 //  $1 = zx_str_dup_len_str(c/* *** where from ctx? */, len, s);
49 //}
50 
51 %typemap (out) struct zx_str* {
52   if (argvi >= items) {
53     EXTEND(sp,1);
54   }
55   $result = newSVpv($1->s, $1->len);
56   /* Do not free underlying zx_str because they are usually returned by reference. */
57   ++argvi;
58 }
59 
60 %include "c/saml2-const.h"
61 %include "c/saml2-data.h"
62 %include "c/saml2-ns.h"
63 
64 /* EOF */
65