1 /* zxid.i  -  SWIG interface file
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: zxid.i,v 1.9 2009-08-30 15:09:26 sampo Exp $
9  * 31.8.2006, created --Sampo
10  */
11 %module "Net::SAML"
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/zxidvers.h"
26 
27 //#include <stdbool.h>  *** how to solve problems with bool on perl 5.20?
28 
29 %}
30 
31 %typemap (in) (int len, char* s) {
32   $2 = SvPV($input, $1);
33 }
34 
35 //%typemap (in) struct zx_str* {
36 //  int len;
37 //  char* s;
38 //  s = SvPV($input, len);
39 //  $1 = zx_str_dup_len_str(c/* *** where from ctx? */, len, s);
40 //}
41 
42 %typemap (out) struct zx_str* {
43   if (argvi >= items) {
44     EXTEND(sp,1);
45   }
46   $result = $1?newSVpv($1->s, $1->len):&PL_sv_undef;  /* newSV(0) */
47   /* Do not free underlying zx_str because they are usually returned by reference. */
48   ++argvi;
49 }
50 
51 %include "zx.h"
52 %include "zxid.h"
53 %include "saml2.h"
54 
55 /* EOF */
56