summaryrefslogtreecommitdiffstats
path: root/swig
diff options
context:
space:
mode:
authorChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-13 15:55:23 +0000
committerChristophe Nowicki <cnowicki@easter-eggs.com>2004-09-13 15:55:23 +0000
commita58eaf592509012ff6fc8a92887d74f899a89a55 (patch)
tree3e0e6a6fc0c33686219a88833f6b5e87d5dd5dc5 /swig
parent8976ed87f59de26aa31ce8bc471d49614bfbe008 (diff)
downloadlasso-a58eaf592509012ff6fc8a92887d74f899a89a55.tar.gz
lasso-a58eaf592509012ff6fc8a92887d74f899a89a55.tar.xz
lasso-a58eaf592509012ff6fc8a92887d74f899a89a55.zip
bind property providerIDs for LassoIdentity
added typemap, convert GPtrArray to PHP indexed string array
Diffstat (limited to 'swig')
-rw-r--r--swig/Lasso.i38
1 files changed, 38 insertions, 0 deletions
diff --git a/swig/Lasso.i b/swig/Lasso.i
index 5f12e070..7357824f 100644
--- a/swig/Lasso.i
+++ b/swig/Lasso.i
@@ -549,6 +549,31 @@ int get_exception_type(int errorCode) {
%exception;
%enddef
+/***********************************************************************
+ ***********************************************************************
+ * TypeMaps *
+ ***********************************************************************
+ ***********************************************************************/
+
+#ifdef SWIGPHP4
+/* GPtrArray -> PHP Indexed Array used by Identity->providerIDs */
+%typemap(out) GPtrArray* {
+ int i;
+ zval *new_element;
+
+ zend_printf("ici");
+ array_init($result);
+
+ for (i = 0; i < $1->len; i++)
+ {
+ MAKE_STD_ZVAL(new_element);
+ ZVAL_STRING(new_element, (char *) g_ptr_array_index($1, i), 1);
+ zend_hash_next_index_insert(HASH_OF($result), &new_element, sizeof(new_element), NULL);
+ zend_printf("ici");
+ }
+}
+#endif
+
/***********************************************************************
***********************************************************************
@@ -912,6 +937,9 @@ typedef struct {
%immutable isDirty;
gboolean isDirty;
+ %immutable providerIDs;
+ GPtrArray* providerIDs;
+
/* Constructor, Destructor & Static Methods */
LassoIdentity();
@@ -938,6 +966,13 @@ gboolean LassoIdentity_isDirty_get(LassoIdentity *self) {
return self->is_dirty;
}
+/* providerIDs */
+#define LassoIdentity_get_providerIDs LassoIdentity_providerIDs_get
+GPtrArray* LassoIdentity_providerIDs_get(LassoIdentity *self) {
+ return self->providerIDs;
+}
+
+
/* Constructors, destructors & static methods implementations */
#define new_LassoIdentity lasso_identity_new
@@ -2031,3 +2066,6 @@ gint LassoLecp_setSessionFromDump(LassoLecp *self, gchar *dump) {
#define LassoLecp_processAuthnResponseEnvelopeMsg lasso_lecp_process_authn_response_envelope_msg
%}
+
+
+