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