diff options
author | Damien Laniel <dlaniel@entrouvert.com> | 2008-01-14 11:20:16 +0000 |
---|---|---|
committer | Damien Laniel <dlaniel@entrouvert.com> | 2008-01-14 11:20:16 +0000 |
commit | 53a2b18539d70a49a94b36616b16cf05a06d273c (patch) | |
tree | 475b4fd363a0c1cab0f2e5b4124a703bf653452b /swig | |
parent | ee439f13f2c0ef127f7d27922b6d21952bf92070 (diff) | |
download | lasso-53a2b18539d70a49a94b36616b16cf05a06d273c.tar.gz lasso-53a2b18539d70a49a94b36616b16cf05a06d273c.tar.xz lasso-53a2b18539d70a49a94b36616b16cf05a06d273c.zip |
added swig binding for Saml2AttributeValue + tests
Diffstat (limited to 'swig')
-rw-r--r-- | swig/saml-2.0/Makefile.am | 1 | ||||
-rw-r--r-- | swig/saml-2.0/inheritance.h | 1 | ||||
-rw-r--r-- | swig/saml-2.0/main.h | 2 | ||||
-rw-r--r-- | swig/saml-2.0/saml2_attribute.i | 15 | ||||
-rw-r--r-- | swig/saml-2.0/saml2_attribute_value.i | 67 |
5 files changed, 86 insertions, 0 deletions
diff --git a/swig/saml-2.0/Makefile.am b/swig/saml-2.0/Makefile.am index f530a05f..42378f89 100644 --- a/swig/saml-2.0/Makefile.am +++ b/swig/saml-2.0/Makefile.am @@ -8,6 +8,7 @@ EXTRA_DIST = \ saml2_assertion.i \ saml2_attribute.i \ saml2_attribute_statement.i \ + saml2_attribute_value.i \ saml2_audience_restriction.i \ saml2_authn_context.i \ saml2_authn_statement.i \ diff --git a/swig/saml-2.0/inheritance.h b/swig/saml-2.0/inheritance.h index d691a709..ca38eadc 100644 --- a/swig/saml-2.0/inheritance.h +++ b/swig/saml-2.0/inheritance.h @@ -38,6 +38,7 @@ SET_NODE_INFO(Saml2AudienceRestriction, Saml2ConditionAbstract) SET_NODE_INFO(Samlp2LogoutRequest, Samlp2RequestAbstract) SET_NODE_INFO(Samlp2AuthnQuery, Samlp2SubjectQueryAbstract) SET_NODE_INFO(Saml2Attribute, Node) +SET_NODE_INFO(Saml2AttributeValue, Node) SET_NODE_INFO(Samlp2Terminate, Node) SET_NODE_INFO(Samlp2StatusDetail, Node) SET_NODE_INFO(Saml2AuthzDecisionStatement, Saml2StatementAbstract) diff --git a/swig/saml-2.0/main.h b/swig/saml-2.0/main.h index 3e52ec38..fe80feda 100644 --- a/swig/saml-2.0/main.h +++ b/swig/saml-2.0/main.h @@ -21,6 +21,7 @@ #include <lasso/xml/saml-2.0/saml2_statement_abstract.h> #include <lasso/xml/saml-2.0/saml2_authn_statement.h> #include <lasso/xml/saml-2.0/saml2_attribute_statement.h> +#include <lasso/xml/saml-2.0/saml2_attribute_value.h> #include <lasso/xml/saml-2.0/samlp2_idp_entry.h> #include <lasso/xml/saml-2.0/samlp2_extensions.h> #include <lasso/xml/saml-2.0/saml2_action.h> @@ -70,6 +71,7 @@ %include saml2_statement_abstract.i %include saml2_authn_statement.i %include saml2_attribute_statement.i +%include saml2_attribute_value.i %include samlp2_idp_entry.i %include samlp2_extensions.i %include saml2_action.i diff --git a/swig/saml-2.0/saml2_attribute.i b/swig/saml-2.0/saml2_attribute.i index 0b3c8268..8a1037b2 100644 --- a/swig/saml-2.0/saml2_attribute.i +++ b/swig/saml-2.0/saml2_attribute.i @@ -30,17 +30,26 @@ typedef struct { %rename(name) Name; #endif char *Name; + #ifndef SWIG_PHP_RENAMES %rename(nameFormat) NameFormat; #endif char *NameFormat; + #ifndef SWIG_PHP_RENAMES %rename(friendlyName) FriendlyName; #endif char *FriendlyName; + } LassoSaml2Attribute; %extend LassoSaml2Attribute { + /* Attribute */ +#ifndef SWIG_PHP_RENAMES + %rename(attributeValue) AttributeValue; +#endif + %newobject AttributeValue_get; + LassoNodeList *AttributeValue; /* Constructor, Destructor & Static Methods */ LassoSaml2Attribute(); @@ -53,6 +62,12 @@ typedef struct { %{ +/* Attributes */ + +#define LassoSaml2Attribute_get_AttributeValue(self) get_node_list((self)->AttributeValue) +#define LassoSaml2Attribute_AttributeValue_get(self) get_node_list((self)->AttributeValue) +#define LassoSaml2Attribute_set_AttributeValue(self,value) set_node_list(&(self)->AttributeValue, (value)) +#define LassoSaml2Attribute_AttributeValue_set(self,value) set_node_list(&(self)->AttributeValue, (value)) /* Constructors, destructors & static methods implementations */ diff --git a/swig/saml-2.0/saml2_attribute_value.i b/swig/saml-2.0/saml2_attribute_value.i new file mode 100644 index 00000000..acbcd096 --- /dev/null +++ b/swig/saml-2.0/saml2_attribute_value.i @@ -0,0 +1,67 @@ +/* $Id: saml2_attribute_value.i 3378 2007-08-13 10:43:37Z dlaniel $ + * + * Lasso - A free implementation of the Liberty Alliance specifications. + * + * Copyright (C) 2004-2007 Entr'ouvert + * http://lasso.entrouvert.org + * + * Authors: See AUTHORS file in top-level directory. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef SWIG_PHP_RENAMES +%rename(Saml2AttributeValue) LassoSaml2AttributeValue; +#endif +typedef struct { +} LassoSaml2AttributeValue; +%extend LassoSaml2AttributeValue { + + /* Attribute */ +#ifdef SWIG_PHP_RENAMES + %rename(Any) any; +#endif + %newobject any_get; + LassoNodeList *any; + + /* Constructor, Destructor & Static Methods */ + LassoSaml2AttributeValue(); + ~LassoSaml2AttributeValue(); + + /* Method inherited from LassoNode */ + %newobject dump; + char* dump(); +} + +%{ + +/* Attributes */ + +#define LassoSaml2AttributeValue_get_any(self) get_node_list((self)->any) +#define LassoSaml2AttributeValue_any_get(self) get_node_list((self)->any) +#define LassoSaml2AttributeValue_set_any(self,value) set_node_list(&(self)->any, (value)) +#define LassoSaml2AttributeValue_any_set(self,value) set_node_list(&(self)->any, (value)) + +/* Constructors, destructors & static methods implementations */ + +#define new_LassoSaml2AttributeValue lasso_saml2_attribute_value_new +#define delete_LassoSaml2AttributeValue(self) lasso_node_destroy(LASSO_NODE(self)) + +/* Implementations of methods inherited from LassoNode */ + +#define LassoSaml2AttributeValue_dump(self) lasso_node_dump(LASSO_NODE(self)) + +%} + |