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