diff options
| author | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-20 00:37:48 +0000 |
|---|---|---|
| committer | Emmanuel Raviart <eraviart@entrouvert.com> | 2004-08-20 00:37:48 +0000 |
| commit | 7db97fec73acebdff3c606f99c2ee7c8a5ae6d57 (patch) | |
| tree | 70187f4ff5d73db9dc02024bfaf9c19b6caac1cf /python | |
| parent | c4344d4b1b3d77f2ef7594c217c298661a27dd5e (diff) | |
| download | lasso-7db97fec73acebdff3c606f99c2ee7c8a5ae6d57.tar.gz lasso-7db97fec73acebdff3c606f99c2ee7c8a5ae6d57.tar.xz lasso-7db97fec73acebdff3c606f99c2ee7c8a5ae6d57.zip | |
Removed old Python binding.
Diffstat (limited to 'python')
86 files changed, 0 insertions, 6890 deletions
diff --git a/python/environs/.cvsignore b/python/environs/.cvsignore deleted file mode 100644 index 051d1bd5..00000000 --- a/python/environs/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -.deps diff --git a/python/environs/Makefile.am b/python/environs/Makefile.am deleted file mode 100644 index 9b5cf85e..00000000 --- a/python/environs/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -INCLUDES = \ - -DPACKAGE=\"@PACKAGE@\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lasso \ - $(LASSO_DEFINES) \ - $(LASSO_CFLAGS) \ - $(PY_CFLAGS) \ - $(NULL) - - -ENVSOURCES = py_federation_termination.c py_lecp.c py_login.c py_logout.c py_profile.c py_register_name_identifier.c py_server.c py_session.c py_identity.c - -noinst_LTLIBRARIES = libenvirons.la -libenvirons_la_SOURCES = $(ENVSOURCES) - -EXTRA_DIST = $(ENVSOURCES) py_federation_termination.h py_lecp.h py_login.h py_logout.h py_profile.h py_register_name_identifier.h py_server.h py_session.h py_identity.h - diff --git a/python/environs/py_federation_termination.c b/python/environs/py_federation_termination.c deleted file mode 100644 index b4b1ac33..00000000 --- a/python/environs/py_federation_termination.c +++ /dev/null @@ -1,180 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_federation_termination.h" - - -PyObject *LassoFederationTermination_wrap(LassoFederationTermination *federation_termination) { - PyObject *ret; - - if (federation_termination == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) federation_termination, - (char *) "LassoFederationTermination *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *federation_termination_getattr(PyObject *self, PyObject *args) { - PyObject *federation_termination_obj; - LassoFederationTermination *federation_termination; - const char *attr; - - if (CheckArgs(args, "OS:federation_termination_get_attr")) { - if (!PyArg_ParseTuple(args, "Os:federation_termination_get_attr", &federation_termination_obj, &attr)) - return NULL; - } - else return NULL; - - federation_termination = LassoFederationTermination_get(federation_termination_obj); - - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssss]", "identity", "msg_url", "msg_body", - "msg_relayState", - "nameIdentifier"); - - if (!strcmp(attr, "identity")) - return (LassoIdentity_wrap(LASSO_PROFILE(federation_termination)->identity)); - if (!strcmp(attr, "msg_url")) - return (charPtrConst_wrap(LASSO_PROFILE(federation_termination)->msg_url)); - if (!strcmp(attr, "msg_body")) - return (charPtrConst_wrap(LASSO_PROFILE(federation_termination)->msg_body)); - if (!strcmp(attr, "msg_relayState")) - return (charPtrConst_wrap(LASSO_PROFILE(federation_termination)->msg_relayState)); - if (!strcmp(attr, "nameIdentifier")) - return (charPtrConst_wrap(LASSO_PROFILE(federation_termination)->nameIdentifier)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *federation_termination_new(PyObject *self, PyObject *args) { - LassoFederationTermination *federation_termination; - PyObject *server_obj; - gint provider_type; - - if (CheckArgs(args, "OI:federation_termination_new")) { - if(!PyArg_ParseTuple(args, (char *) "Oi:federation_termination_new", - &server_obj, &provider_type)) - return NULL; - } - else return NULL; - - federation_termination = lasso_federation_termination_new(LassoServer_get(server_obj), - provider_type); - - return (LassoFederationTermination_wrap(federation_termination)); -} - -PyObject *federation_termination_build_notification_msg(PyObject *self, PyObject *args) { - PyObject *federation_termination_obj; - gint codeError; - - if (CheckArgs(args, "O:federation_termination_build_notification_msg")) { - if(!PyArg_ParseTuple(args, (char *) "O:federation_termination_build_notification_msg", - &federation_termination_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_federation_termination_build_notification_msg(LassoFederationTermination_get(federation_termination_obj)); - - return(int_wrap(codeError)); -} - -PyObject *federation_termination_destroy(PyObject *self, PyObject *args){ - PyObject *federation_termination_obj; - - if (CheckArgs(args, "O:federation_termination_destroy")) { - if(!PyArg_ParseTuple(args, (char *) "O:federation_termination_destroy", - &federation_termination_obj)) - return NULL; - } - else return NULL; - - lasso_federation_termination_destroy(LassoFederationTermination_get(federation_termination_obj)); - - Py_INCREF(Py_None); - return(Py_None); -} - -PyObject *federation_termination_init_notification(PyObject *self, PyObject *args) { - PyObject *federation_termination_obj; - gchar *remote_providerID; - gint codeError; - - if (CheckArgs(args, "Os:federation_termination_init_notification")) { - if(!PyArg_ParseTuple(args, (char *) "Oz:federation_termination_init_notification", - &federation_termination_obj, &remote_providerID)) - return NULL; - } - else return NULL; - - codeError = lasso_federation_termination_init_notification(LassoFederationTermination_get(federation_termination_obj), - remote_providerID); - - return(int_wrap(codeError)); -} - -PyObject *federation_termination_process_notification_msg(PyObject *self, PyObject *args){ - PyObject *notification_obj; - gchar *notification_msg; - gint notification_method; - gint codeError; - - if (CheckArgs(args, "OSI:federation_termination_process_notification_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Osi:federation_termination_process_notification_msg", - ¬ification_obj, ¬ification_msg, ¬ification_method)) - return NULL; - } - else return NULL; - - codeError = lasso_federation_termination_process_notification_msg(LassoFederationTermination_get(notification_obj), - notification_msg, notification_method); - - return(int_wrap(codeError)); -} - -PyObject *federation_termination_validate_notification(PyObject *self, PyObject *args) { - PyObject *federation_termination_obj; - gint codeError; - - if (CheckArgs(args, "O:federation_termination_validate_notification")) { - if(!PyArg_ParseTuple(args, (char *) "O:federation_termination_validate_notification", - &federation_termination_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_federation_termination_validate_notification(LassoFederationTermination_get(federation_termination_obj)); - - return(int_wrap(codeError)); -} - diff --git a/python/environs/py_federation_termination.h b/python/environs/py_federation_termination.h deleted file mode 100644 index 97567859..00000000 --- a/python/environs/py_federation_termination.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_FEDERATION_TERMINATION_H__ -#define __PYLASSO_PY_FEDERATION_TERMINATION_H__ - -#include <lasso/environs/federation_termination.h> - -#include "py_server.h" -#include "py_identity.h" - -typedef struct { - PyObject_HEAD - LassoFederationTermination *obj; -} LassoFederationTermination_object; - -#define LassoFederationTermination_get(v) (((v) == Py_None) ? NULL : (((LassoFederationTermination_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoFederationTermination_wrap(LassoFederationTermination *federation_termination); - -PyObject *federation_termination_getattr(PyObject *self, PyObject *args); - -PyObject *federation_termination_new(PyObject *self, PyObject *args); - -PyObject *federation_termination_build_notification_msg(PyObject *self, PyObject *args); -PyObject *federation_termination_destroy(PyObject *self, PyObject *args); -PyObject *federation_termination_init_notification(PyObject *self, PyObject *args); -PyObject *federation_termination_process_notification_msg(PyObject *self, PyObject *args); -PyObject *federation_termination_validate_notification(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_FEDERATION_TERMINATION_H__ */ diff --git a/python/environs/py_identity.c b/python/environs/py_identity.c deleted file mode 100644 index a7c466b2..00000000 --- a/python/environs/py_identity.c +++ /dev/null @@ -1,78 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_identity.h" -#include "../xml/py_xml.h" - - -PyObject *LassoIdentity_wrap(LassoIdentity *identity) { - PyObject *ret; - - if (identity == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) identity, - (char *) "LassoIdentity *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *identity_new(PyObject *self, PyObject *args) { - return (LassoIdentity_wrap(lasso_identity_new())); -} - -PyObject *identity_new_from_dump(PyObject *self, PyObject *args) { - LassoIdentity *identity; - gchar *dump; - - if (CheckArgs(args, "S:identity_new_from_dump")) { - if(!PyArg_ParseTuple(args, (char *) "s:identity_new_from_dump", &dump)) - return NULL; - } - else return NULL; - - identity = lasso_identity_new_from_dump(dump); - - return (LassoIdentity_wrap(identity)); -} - -PyObject *identity_dump(PyObject *self, PyObject *args) { - PyObject *identity_obj; - gchar *dump; - - if (CheckArgs(args, "O:identity_dump")) { - if(!PyArg_ParseTuple(args, (char *) "O:identity_dump", &identity_obj)) - return NULL; - } - else return NULL; - - dump = lasso_identity_dump(LassoIdentity_get(identity_obj)); - - return (charPtr_wrap(dump)); -} diff --git a/python/environs/py_identity.h b/python/environs/py_identity.h deleted file mode 100644 index ea8c75dc..00000000 --- a/python/environs/py_identity.h +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_IDENTITY_H__ -#define __PYLASSO_PY_IDENTITY_H__ - -#include <lasso/environs/identity.h> - -typedef struct { - PyObject_HEAD - LassoIdentity *obj; -} LassoIdentity_object; - -#define LassoIdentity_get(v) (((v) == Py_None) ? NULL : (((LassoIdentity_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoIdentity_wrap(LassoIdentity *identity); - -PyObject *identity_new(PyObject *self, PyObject *args); -PyObject *identity_new_from_dump(PyObject *self, PyObject *args); -PyObject *identity_dump(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_IDENTITY_H__ */ diff --git a/python/environs/py_lecp.c b/python/environs/py_lecp.c deleted file mode 100644 index 9a521116..00000000 --- a/python/environs/py_lecp.c +++ /dev/null @@ -1,258 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" -#include "../xml/py_xml.h" - -#include "py_lecp.h" -#include "py_server.h" - -#include "../protocols/py_authn_request.h" -#include "../protocols/py_authn_response.h" - -PyObject *LassoLecp_wrap(LassoLecp *lecp) { - PyObject *ret; - - if (lecp == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) lecp, - (char *) "LassoLecp *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lecp_getattr(PyObject *self, PyObject *args) { - PyObject *lecp_obj; - LassoLecp *lecp; - const char *attr; - - if (CheckArgs(args, "OS:lecp_get_attr")) { - if (!PyArg_ParseTuple(args, "Os:lecp_get_attr", &lecp_obj, &attr)) - return NULL; - } - else return NULL; - - lecp = LassoLecp_get(lecp_obj); - - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssssss]", "assertionConsumerServiceURL", "msg_body", "msg_url", - "request", "request_type", "response", "response_type"); - if (!strcmp(attr, "assertionConsumerServiceURL")) - return (charPtrConst_wrap(lecp->assertionConsumerServiceURL)); - if (!strcmp(attr, "msg_body")) - return (charPtrConst_wrap(LASSO_PROFILE(lecp)->msg_body)); - if (!strcmp(attr, "msg_url")) - return (charPtrConst_wrap(LASSO_PROFILE(lecp)->msg_url)); - if (!strcmp(attr, "request")) - return (LassoNode_wrap(LASSO_PROFILE(lecp)->request)); - if (!strcmp(attr, "request_type")) - return (int_wrap(LASSO_PROFILE(lecp)->request_type)); - if (!strcmp(attr, "response")) - return (LassoNode_wrap(LASSO_PROFILE(lecp)->response)); - if (!strcmp(attr, "response_type")) - return (int_wrap(LASSO_PROFILE(lecp)->response_type)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lecp_new(PyObject *self, PyObject *args) { - LassoLecp *lecp; - PyObject *server_obj; - - if (CheckArgs(args, "o:lecp_new")) { - if(!PyArg_ParseTuple(args, (char *) "|O:lecp_new", &server_obj)) - return NULL; - } - else return NULL; - - lecp = lasso_lecp_new(LassoServer_get(server_obj)); - - return (LassoLecp_wrap(lecp)); -} - -PyObject *lecp_build_authn_request_envelope_msg(PyObject *self, PyObject *args){ - PyObject *lecp_obj; - gint codeError = 0; - - if (CheckArgs(args, "O:lecp_build_authn_request_envelope_msg")) { - if(!PyArg_ParseTuple(args, (char *) "O:lecp_build_authn_request_envelope_msg", - &lecp_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_lecp_build_authn_request_envelope_msg(LassoLecp_get(lecp_obj)); - - return(int_wrap(codeError)); -} - -PyObject *lecp_build_authn_response_envelope_msg(PyObject *self, PyObject *args){ - PyObject *lecp_obj; - gint authentication_result; - const gchar *authenticationMethod; - const gchar *reauthenticateOnOrAfter; - gint codeError = 0; - - if (CheckArgs(args, "OISS:lecp_build_authn_response_envelope_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Oiss:lecp_build_authn_response_envelope_msg", - &lecp_obj, &authentication_result, &authenticationMethod, - &reauthenticateOnOrAfter)) - return NULL; - } - else return NULL; - - codeError = lasso_lecp_build_authn_response_envelope_msg(LassoLecp_get(lecp_obj), - authentication_result, - authenticationMethod, - reauthenticateOnOrAfter); - - return(int_wrap(codeError)); -} - -PyObject *lecp_build_authn_request_msg(PyObject *self, PyObject *args){ - PyObject *lecp_obj; - gchar *remote_providerID; - gint codeError = 0; - - if (CheckArgs(args, "OS:lecp_build_authn_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lecp_build_authn_request_msg", - &lecp_obj, &remote_providerID)) - return NULL; - } - else return NULL; - - codeError = lasso_lecp_build_authn_request_msg(LassoLecp_get(lecp_obj), - remote_providerID); - - return(int_wrap(codeError)); -} - -PyObject *lecp_build_authn_response_msg(PyObject *self, PyObject *args){ - PyObject *lecp_obj; - gint codeError = 0; - - if (CheckArgs(args, "O:lecp_build_authn_response_msg")) { - if(!PyArg_ParseTuple(args, (char *) "O:lecp_build_authn_response_msg", - &lecp_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_lecp_build_authn_response_msg(LassoLecp_get(lecp_obj)); - - return(int_wrap(codeError)); -} - -PyObject *lecp_destroy(PyObject *self, PyObject *args){ - PyObject *lecp_obj; - - if (CheckArgs(args, "O:lecp_destroy")) { - if(!PyArg_ParseTuple(args, (char *) "O:lecp_destroy", - &lecp_obj)) - return NULL; - } - else return NULL; - - lasso_lecp_destroy(LassoLecp_get(lecp_obj)); - - Py_INCREF(Py_None); - return(Py_None); -} - -PyObject *lecp_init_authn_request(PyObject *self, PyObject *args) { - PyObject *lecp_obj; - gint ret; - - if (CheckArgs(args, "O:lecp_init_authn_request")) { - if(!PyArg_ParseTuple(args, (char *) "O:lecp_init_authn_request", - &lecp_obj)) - return NULL; - } - else return NULL; - - ret = lasso_lecp_init_authn_request(LassoLecp_get(lecp_obj)); - - return (int_wrap(ret)); -} - -PyObject *lecp_init_from_authn_request_msg(PyObject *self, PyObject *args) { - PyObject *lecp_obj; - gchar *authn_request_msg; - lassoHttpMethod authn_request_method; - gint ret; - - if (CheckArgs(args, "OSI:lecp_init_from_authn_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Osi:lecp_init_from_authn_request_msg", - &lecp_obj, &authn_request_msg, &authn_request_method)) - return NULL; - } - else return NULL; - - ret = lasso_lecp_init_from_authn_request_msg(LassoLecp_get(lecp_obj), - authn_request_msg, - authn_request_method); - - return (int_wrap(ret)); -} - -PyObject *lecp_process_authn_request_envelope_msg(PyObject *self, PyObject *args) { - PyObject *lecp_obj; - gchar *remote_providerID; - gint ret; - - if (CheckArgs(args, "OS:lecp_process_authn_request_envelope_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lecp_process_authn_request_envelope_msg", - &lecp_obj, &remote_providerID)) - return NULL; - } - else return NULL; - - ret = lasso_lecp_process_authn_request_envelope_msg(LassoLecp_get(lecp_obj), - remote_providerID); - - return (int_wrap(ret)); -} - -PyObject *lecp_process_authn_response_envelope_msg(PyObject *self, PyObject *args) { - PyObject *lecp_obj; - gchar *remote_providerID; - gint ret; - - if (CheckArgs(args, "OS:lecp_process_authn_response_envelope_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lecp_process_authn_response_envelope_msg", - &lecp_obj, &remote_providerID)) - return NULL; - } - else return NULL; - - ret = lasso_lecp_process_authn_response_envelope_msg(LassoLecp_get(lecp_obj), - remote_providerID); - - return (int_wrap(ret)); -} diff --git a/python/environs/py_lecp.h b/python/environs/py_lecp.h deleted file mode 100644 index a24f1ea0..00000000 --- a/python/environs/py_lecp.h +++ /dev/null @@ -1,52 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LECP_H__ -#define __PYLASSO_PY_LECP_H__ - -#include <lasso/environs/lecp.h> - -typedef struct { - PyObject_HEAD - LassoLecp *obj; -} LassoLecp_object; - -#define LassoLecp_get(v) (((v) == Py_None) ? NULL : (((LassoLecp_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLecp_wrap(LassoLecp *lecp); - -PyObject *lecp_getattr(PyObject *self, PyObject *args); -PyObject *lecp_new(PyObject *self, PyObject *args); - -PyObject *lecp_build_authn_request_envelope_msg(PyObject *self, PyObject *args); -PyObject *lecp_build_authn_request_msg(PyObject *self, PyObject *args); -PyObject *lecp_build_authn_response_msg(PyObject *self, PyObject *args); -PyObject *lecp_build_authn_response_envelope_msg(PyObject *self, PyObject *args); -PyObject *lecp_destroy(PyObject *self, PyObject *args); -PyObject *lecp_init_authn_request(PyObject *self, PyObject *args); -PyObject *lecp_init_from_authn_request_msg(PyObject *self, PyObject *args); -PyObject *lecp_process_authn_request_envelope_msg(PyObject *self, PyObject *args); -PyObject *lecp_process_authn_response_envelope_msg(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LECP_H__ */ diff --git a/python/environs/py_login.c b/python/environs/py_login.c deleted file mode 100644 index 5e4bee0c..00000000 --- a/python/environs/py_login.c +++ /dev/null @@ -1,368 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" -#include "../xml/py_xml.h" - -#include "py_login.h" - -PyObject *LassoLogin_wrap(LassoLogin *login) { - PyObject *ret; - - if (login == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) login, - (char *) "LassoLogin *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *login_getattr(PyObject *self, PyObject *args) { - PyObject *login_obj; - LassoLogin *login; - const char *attr; - - if (CheckArgs(args, "OS:login_get_attr")) { - if (!PyArg_ParseTuple(args, "Os:login_get_attr", &login_obj, &attr)) - return NULL; - } - else return NULL; - - login = LassoLogin_get(login_obj); - - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssssssss]", "request", "response", - "request_type", "response_type", "nameIdentifier", - "provider_type", - "msg_url", "msg_body", "msg_relayState", "response_dump", - "protocolProfile", "assertionArtifact"); - if (!strcmp(attr, "request")) - return (LassoNode_wrap(LASSO_PROFILE(login)->request)); - if (!strcmp(attr, "response")) - return (LassoNode_wrap(LASSO_PROFILE(login)->response)); - if (!strcmp(attr, "request_type")) - return (int_wrap(LASSO_PROFILE(login)->request_type)); - if (!strcmp(attr, "response_type")) - return (int_wrap(LASSO_PROFILE(login)->response_type)); - if (!strcmp(attr, "nameIdentifier")) - return (charPtrConst_wrap(LASSO_PROFILE(login)->nameIdentifier)); - if (!strcmp(attr, "provider_type")) - return (int_wrap(LASSO_PROFILE(login)->provider_type)); - if (!strcmp(attr, "msg_url")) - return (charPtrConst_wrap(LASSO_PROFILE(login)->msg_url)); - if (!strcmp(attr, "msg_body")) - return (charPtrConst_wrap(LASSO_PROFILE(login)->msg_body)); - if (!strcmp(attr, "msg_relayState")) - return (charPtrConst_wrap(LASSO_PROFILE(login)->msg_relayState)); - if (!strcmp(attr, "response_dump")) - return (charPtrConst_wrap(login->response_dump)); - if (!strcmp(attr, "protocolProfile")) - return (int_wrap(login->protocolProfile)); - if (!strcmp(attr, "assertionArtifact")) - return (charPtrConst_wrap(login->assertionArtifact)); - - Py_INCREF(Py_None); - return (Py_None); -} - -/******************************************************************************/ - -PyObject *login_new(PyObject *self, PyObject *args) { - PyObject *server_obj; - LassoLogin *login; - - if (CheckArgs(args, "O:login_new")) { - if(!PyArg_ParseTuple(args, (char *) "O:login_new", &server_obj)) - return NULL; - } - else return NULL; - - login = lasso_login_new(LassoServer_get(server_obj)); - - return (LassoLogin_wrap(login)); -} - -PyObject *login_new_from_dump(PyObject *self, PyObject *args) { - PyObject *server_obj; - LassoLogin *login; - LassoServer *server; - gchar *dump; - - if (CheckArgs(args, "OS:login_new_from_dump")) { - if(!PyArg_ParseTuple(args, (char *) "Os:login_new_from_dump", &server_obj, - &dump)) - return NULL; - } - else return NULL; - - server = LassoServer_get(server_obj); - login = lasso_login_new_from_dump(server, dump); - - return (LassoLogin_wrap(login)); -} - -PyObject *login_build_artifact_msg(PyObject *self, PyObject *args) { - PyObject *login_obj; - gint authentication_result; - const gchar *authenticationMethod; - const gchar *reauthenticateOnOrAfter; - lassoHttpMethod method; - gint ret; - - if (CheckArgs(args, "OISSI:login_build_artifact_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Oissi:login_build_artifact_msg", - &login_obj, &authentication_result, - &authenticationMethod, &reauthenticateOnOrAfter, - &method)) - return NULL; - } - else return NULL; - - ret = lasso_login_build_artifact_msg(LassoLogin_get(login_obj), - authentication_result, - authenticationMethod, - reauthenticateOnOrAfter, - method); - - return (int_wrap(ret)); -} - -PyObject *login_build_authn_request_msg(PyObject *self, PyObject *args) { - PyObject *login_obj; - gchar *remote_providerID; - gint ret; - - if (CheckArgs(args, "OS:login_build_authn_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Os:login_build_authn_request_msg", - &login_obj, &remote_providerID)) - return NULL; - } - else return NULL; - - ret = lasso_login_build_authn_request_msg(LassoLogin_get(login_obj), - remote_providerID); - - return (int_wrap(ret)); -} - -PyObject *login_build_authn_response_msg(PyObject *self, PyObject *args) { - PyObject *login_obj; - gint authentication_result; - const gchar *authenticationMethod; - const gchar *reauthenticateOnOrAfter; - gint ret; - - if (CheckArgs(args, "OISS:login_build_artifact_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Oiss:login_build_artifact_msg", - &login_obj, &authentication_result, - &authenticationMethod, &reauthenticateOnOrAfter)) - return NULL; - } - else return NULL; - - ret = lasso_login_build_authn_response_msg(LassoLogin_get(login_obj), - authentication_result, - authenticationMethod, - reauthenticateOnOrAfter); - - return (int_wrap(ret)); -} - -PyObject *login_build_request_msg(PyObject *self, PyObject *args) { - PyObject *login_obj; - gint ret; - - if (CheckArgs(args, "O:login_build_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "O:login_build_request_msg", - &login_obj)) - return NULL; - } - else return NULL; - - ret = lasso_login_build_request_msg(LassoLogin_get(login_obj)); - - return (int_wrap(ret)); -} - -PyObject *login_accept_sso(PyObject *self, PyObject *args) { - PyObject *login_obj; - gint ret; - - if (CheckArgs(args, "O:login_accept_sso")) { - if(!PyArg_ParseTuple(args, (char *) "O:login_accept_sso", - &login_obj)) - return NULL; - } - else return NULL; - - ret = lasso_login_accept_sso(LassoLogin_get(login_obj)); - - return (int_wrap(ret)); -} - -PyObject *login_dump(PyObject *self, PyObject *args) { - PyObject *login_obj; - gchar *ret; - - if (CheckArgs(args, "O:login_dump")) { - if(!PyArg_ParseTuple(args, (char *) "O:login_dump", - &login_obj)) - return NULL; - } - else return NULL; - - ret = lasso_login_dump(LassoLogin_get(login_obj)); - - return (charPtr_wrap(ret)); -} - -PyObject *login_init_authn_request(PyObject *self, PyObject *args) { - PyObject *login_obj; - gint ret; - - if (CheckArgs(args, "O:login_init_authn_request")) { - if(!PyArg_ParseTuple(args, (char *) "O:login_init_authn_request", - &login_obj)) - return NULL; - } - else return NULL; - - ret = lasso_login_init_authn_request(LassoLogin_get(login_obj)); - - return (int_wrap(ret)); -} - -PyObject *login_init_from_authn_request_msg(PyObject *self, PyObject *args) { - PyObject *login_obj; - gchar *authn_request_msg; - lassoHttpMethod authn_request_method; - gint ret; - - if (CheckArgs(args, "OSI:login_init_from_authn_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Osi:login_init_from_authn_request_msg", - &login_obj, &authn_request_msg, &authn_request_method)) - return NULL; - } - else return NULL; - - ret = lasso_login_init_from_authn_request_msg(LassoLogin_get(login_obj), - authn_request_msg, - authn_request_method); - - return (int_wrap(ret)); -} - -PyObject *login_init_request(PyObject *self, PyObject *args) { - PyObject *login_obj; - gchar *response_msg; - lassoHttpMethod response_method; - gint ret; - - if (CheckArgs(args, "OSI:login_init_request")) { - if(!PyArg_ParseTuple(args, (char *) "Osi:login_init_request", - &login_obj, &response_msg, &response_method)) - return NULL; - } - else return NULL; - - ret = lasso_login_init_request(LassoLogin_get(login_obj), - response_msg, - response_method); - - return (int_wrap(ret)); -} - -PyObject *login_must_authenticate(PyObject *self, PyObject *args) { - PyObject *login_obj; - gboolean ret; - - if (CheckArgs(args, "O:login_must_authenticate")) { - if(!PyArg_ParseTuple(args, (char *) "O:login_must_authenticate", - &login_obj)) - return NULL; - } - else return NULL; - - ret = lasso_login_must_authenticate(LassoLogin_get(login_obj)); - - return (int_wrap(ret)); -} - -PyObject *login_process_authn_response_msg(PyObject *self, PyObject *args) { - PyObject *login_obj; - gchar *authn_response_msg; - gboolean ret; - - if (CheckArgs(args, "OS:login_process_authn_response_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Os:login_process_authn_response_msg", - &login_obj, &authn_response_msg)) - return NULL; - } - else return NULL; - - ret = lasso_login_process_authn_response_msg(LassoLogin_get(login_obj), - authn_response_msg); - - return (int_wrap(ret)); -} - -PyObject *login_process_request_msg(PyObject *self, PyObject *args) { - PyObject *login_obj; - gchar *request_msg; - gboolean ret; - - if (CheckArgs(args, "OS:login_process_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Os:login_process_request_msg", - &login_obj, &request_msg)) - return NULL; - } - else return NULL; - - ret = lasso_login_process_request_msg(LassoLogin_get(login_obj), - request_msg); - - return (int_wrap(ret)); -} - -PyObject *login_process_response_msg(PyObject *self, PyObject *args) { - PyObject *login_obj; - gchar *response_msg; - gboolean ret; - - if (CheckArgs(args, "OS:login_process_response_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Os:login_process_response_msg", - &login_obj, &response_msg)) - return NULL; - } - else return NULL; - - ret = lasso_login_process_response_msg(LassoLogin_get(login_obj), - response_msg); - - return (int_wrap(ret)); -} diff --git a/python/environs/py_login.h b/python/environs/py_login.h deleted file mode 100644 index 650ed7cc..00000000 --- a/python/environs/py_login.h +++ /dev/null @@ -1,60 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LOGIN_H__ -#define __PYLASSO_PY_LOGIN_H__ - -#include <lasso/environs/login.h> - -#include "py_server.h" -#include "py_identity.h" -#include "py_session.h" - -typedef struct { - PyObject_HEAD - LassoLogin *obj; -} LassoLogin_object; - -#define LassoLogin_get(v) (((v) == Py_None) ? NULL : (((LassoLogin_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLogin_wrap(LassoLogin *login); - -PyObject *login_getattr(PyObject *self, PyObject *args); -PyObject *login_new(PyObject *self, PyObject *args); -PyObject *login_new_from_dump(PyObject *self, PyObject *args); -PyObject *login_accept_sso(PyObject *self, PyObject *args); -PyObject *login_build_artifact_msg(PyObject *self, PyObject *args); -PyObject *login_build_authn_request_msg(PyObject *self, PyObject *args); -PyObject *login_build_authn_response_msg(PyObject *self, PyObject *args); -PyObject *login_build_request_msg(PyObject *self, PyObject *args); -PyObject *login_dump(PyObject *self, PyObject *args); -PyObject *login_init_authn_request(PyObject *self, PyObject *args); -PyObject *login_init_from_authn_request_msg(PyObject *self, PyObject *args); -PyObject *login_init_request(PyObject *self, PyObject *args); -PyObject *login_must_authenticate(PyObject *self, PyObject *args); -PyObject *login_process_authn_response_msg(PyObject *self, PyObject *args); -PyObject *login_process_request_msg(PyObject *self, PyObject *args); -PyObject *login_process_response_msg(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LOGIN_H__ */ diff --git a/python/environs/py_logout.c b/python/environs/py_logout.c deleted file mode 100644 index 66b41c14..00000000 --- a/python/environs/py_logout.c +++ /dev/null @@ -1,227 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "../xml/py_xml.h" - -#include "py_logout.h" - -PyObject *LassoLogout_wrap(LassoLogout *logout) { - PyObject *ret; - - if (logout == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) logout, - (char *) "LassoLogout *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *logout_getattr(PyObject *self, PyObject *args) { - PyObject *logout_obj; - LassoLogout *logout; - const char *attr; - - if (CheckArgs(args, "OS:logout_get_attr")) { - if (!PyArg_ParseTuple(args, "Os:logout_get_attr", &logout_obj, &attr)) - return NULL; - } - else return NULL; - - logout = LassoLogout_get(logout_obj); - - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssss]", "request", "response", "nameIdentifier", - "msg_url", "msg_body", "msg_relayState"); - if (!strcmp(attr, "request")) - return (LassoNode_wrap(LASSO_PROFILE(logout)->request)); - if (!strcmp(attr, "response")) - return (LassoNode_wrap(LASSO_PROFILE(logout)->response)); - if (!strcmp(attr, "nameIdentifier")) - return (charPtrConst_wrap(LASSO_PROFILE(logout)->nameIdentifier)); - if (!strcmp(attr, "msg_url")) - return (charPtrConst_wrap(LASSO_PROFILE(logout)->msg_url)); - if (!strcmp(attr, "msg_body")) - return (charPtrConst_wrap(LASSO_PROFILE(logout)->msg_body)); - if (!strcmp(attr, "msg_relayState")) - return (charPtrConst_wrap(LASSO_PROFILE(logout)->msg_relayState)); - - Py_INCREF(Py_None); - return (Py_None); -} - - -PyObject *logout_new(PyObject *self, PyObject *args) { - gint provider_type; - PyObject *server_obj; - LassoLogout *logout; - - if (CheckArgs(args, "OI:logout_new")) { - if(!PyArg_ParseTuple(args, (char *) "Oi:logout_new", - &server_obj, &provider_type)) - return NULL; - } - else return NULL; - - logout = lasso_logout_new(LassoServer_get(server_obj), provider_type); - - return (LassoLogout_wrap(logout)); -} - -PyObject *logout_build_request_msg(PyObject *self, PyObject *args) { - PyObject *logout_obj; - gint codeError; - - if (CheckArgs(args, "O:logout_build_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "O:logout_build_request_msg", - &logout_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_logout_build_request_msg(LassoLogout_get(logout_obj)); - - return(int_wrap(codeError)); -} - -PyObject *logout_build_response_msg(PyObject *self, PyObject *args) { - PyObject *logout_obj; - gint codeError; - - if (CheckArgs(args, "O:logout_build_response_msg")) { - if(!PyArg_ParseTuple(args, (char *) "O:logout_build_response_msg", - &logout_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_logout_build_response_msg(LassoLogout_get(logout_obj)); - - return(int_wrap(codeError)); -} - -PyObject *logout_destroy(PyObject *self, PyObject *args){ - PyObject *logout_obj; - - if (CheckArgs(args, "O:logout_destroy")) { - if(!PyArg_ParseTuple(args, (char *) "O:logout_destroy", - &logout_obj)) - return NULL; - } - else return NULL; - - lasso_logout_destroy(LassoLogout_get(logout_obj)); - - Py_INCREF(Py_None); - return(Py_None); -} - -PyObject *logout_get_next_providerID(PyObject *self, PyObject *args) { - PyObject *logout_obj; - gchar *remote_providerID; - - if (CheckArgs(args, "O:logout_get_next_providerID")) { - if(!PyArg_ParseTuple(args, (char *) "O:logout_get_next_providerID", &logout_obj)) - return NULL; - } - else return NULL; - - remote_providerID = lasso_logout_get_next_providerID(LassoLogout_get(logout_obj)); - - return (charPtr_wrap(remote_providerID)); -} - -PyObject *logout_init_request(PyObject *self, PyObject *args) { - PyObject *logout_obj; - gchar *remote_providerID; - gint codeError; - - if (CheckArgs(args, "Os:logout_init_request")) { - if(!PyArg_ParseTuple(args, (char *) "Oz:logout_init_request", - &logout_obj, &remote_providerID)) - return NULL; - } - else return NULL; - - codeError = lasso_logout_init_request(LassoLogout_get(logout_obj), remote_providerID); - - return(int_wrap(codeError)); -} - -PyObject *logout_process_request_msg(PyObject *self, PyObject *args){ - PyObject *logout_obj; - gchar *request_msg; - gint request_method; - gint codeError; - - if (CheckArgs(args, "OSI:logout_process_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Osi:logout_process_request_msg", - &logout_obj, &request_msg, &request_method)) - return NULL; - } - else return NULL; - - codeError = lasso_logout_process_request_msg(LassoLogout_get(logout_obj), request_msg, request_method); - - return(int_wrap(codeError)); -} - -PyObject *logout_validate_request(PyObject *self, PyObject *args) { - PyObject *logout_obj; - gint codeError; - - if (CheckArgs(args, "O:logout_validate_request")) { - if(!PyArg_ParseTuple(args, (char *) "O:logout_validate_request", - &logout_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_logout_validate_request(LassoLogout_get(logout_obj)); - - return(int_wrap(codeError)); -} - -PyObject *logout_process_response_msg(PyObject *self, PyObject *args) { - PyObject *logout_obj; - gchar *response_msg; - gint response_method; - gint codeError; - - if (CheckArgs(args, "OSI:logout_process_response_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Osi:logout_process_response_msg", - &logout_obj, &response_msg, &response_method)) - return NULL; - } - else return NULL; - - codeError = lasso_logout_process_response_msg(LassoLogout_get(logout_obj), response_msg, response_method); - - return(int_wrap(codeError)); -} diff --git a/python/environs/py_logout.h b/python/environs/py_logout.h deleted file mode 100644 index 5f8501f1..00000000 --- a/python/environs/py_logout.h +++ /dev/null @@ -1,54 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LOGOUT_H__ -#define __PYLASSO_PY_LOGOUT_H__ - -#include <lasso/environs/logout.h> - -#include "py_server.h" -#include "py_identity.h" - -typedef struct { - PyObject_HEAD - LassoLogout *obj; -} LassoLogout_object; - -#define LassoLogout_get(v) (((v) == Py_None) ? NULL : (((LassoLogout_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLogout_wrap(LassoLogout *logout); - -PyObject *logout_getattr(PyObject *self, PyObject *args); - -PyObject *logout_build_request_msg(PyObject *self, PyObject *args); -PyObject *logout_build_response_msg(PyObject *self, PyObject *args); -PyObject *logout_destroy(PyObject *self, PyObject *args); -PyObject *logout_get_next_providerID(PyObject *self, PyObject *args); -PyObject *logout_init_request(PyObject *self, PyObject *args); -PyObject *logout_process_request_msg(PyObject *self, PyObject *args); -PyObject *logout_new(PyObject *self, PyObject *args); -PyObject *logout_validate_request(PyObject *self, PyObject *args); -PyObject *logout_process_response_msg(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LOGOUT_H__ */ diff --git a/python/environs/py_profile.c b/python/environs/py_profile.c deleted file mode 100644 index 3e0bbe98..00000000 --- a/python/environs/py_profile.c +++ /dev/null @@ -1,221 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.labs.libre-entreprise.org - * - * Authors: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" -#include "py_profile.h" -#include "py_identity.h" -#include "py_session.h" -#include "py_server.h" - -PyObject *LassoProfile_wrap(LassoProfile *ctx) { - PyObject *ret; - - if (ctx == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) ctx, - (char *) "LassoProfile *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *profile_get_request_type_from_soap_msg(PyObject *self, PyObject *args) { - gchar *soap_buffer; - gint type; - - if (CheckArgs(args, "S:profile_get_request_type_from_soap_msg")) { - if(!PyArg_ParseTuple(args, (char *) "s:profile_get_request_type_from_soap_msg", - &soap_buffer)) - return NULL; - } - else return NULL; - - type = lasso_profile_get_request_type_from_soap_msg(soap_buffer); - - return(int_wrap(type)); -} - -/******************************************************************************/ - -PyObject *profile_new(PyObject *self, PyObject *args) { - PyObject *server_obj, *identity_obj, *session_obj; - LassoProfile *ctx; - LassoIdentity *identity = NULL; - LassoSession *session = NULL; - - if (CheckArgs(args, "Ooo:profile_new")) { - if(!PyArg_ParseTuple(args, (char *) "O|OO:profile_new", - &server_obj, &identity_obj, &session_obj)) - return NULL; - } - else return NULL; - - if (identity_obj != Py_None) { - identity = LassoIdentity_get(identity_obj); - } - if (session_obj != Py_None) { - session = LassoSession_get(session_obj); - } - ctx = lasso_profile_new(LassoServer_get(server_obj), - identity, session); - - return (LassoProfile_wrap(ctx)); -} - -PyObject *profile_get_identity(PyObject *self, PyObject *args) { - PyObject *ctx_obj; - LassoIdentity *identity; - - if (CheckArgs(args, "O:profile_get_identity")) { - if(!PyArg_ParseTuple(args, (char *) "O:profile_get_identity", - &ctx_obj)) - return NULL; - } - else return NULL; - - identity = lasso_profile_get_identity(LassoProfile_get(ctx_obj)); - - return(LassoIdentity_wrap(identity)); -} - -PyObject *profile_get_session(PyObject *self, PyObject *args) { - PyObject *ctx_obj; - LassoSession *session; - - if (CheckArgs(args, "O:profile_get_session")) { - if(!PyArg_ParseTuple(args, (char *) "O:profile_get_session", - &ctx_obj)) - return NULL; - } - else return NULL; - - session = lasso_profile_get_session(LassoProfile_get(ctx_obj)); - - return(LassoSession_wrap(session)); -} - -PyObject *profile_is_identity_dirty(PyObject *self, PyObject *args) { - PyObject *ctx_obj; - int ret; - - if (CheckArgs(args, "O:profile_is_identity_dirty")) { - if(!PyArg_ParseTuple(args, (char *) "O:profile_is_identity_dirty", - &ctx_obj)) - return NULL; - } - else return NULL; - - ret = lasso_profile_is_identity_dirty(LassoProfile_get(ctx_obj)); - - return(int_wrap(ret)); -} - -PyObject *profile_is_session_dirty(PyObject *self, PyObject *args) { - PyObject *ctx_obj; - int ret; - - if (CheckArgs(args, "O:profile_is_session_dirty")) { - if(!PyArg_ParseTuple(args, (char *) "O:profile_is_session_dirty", - &ctx_obj)) - return NULL; - } - else return NULL; - - ret = lasso_profile_is_session_dirty(LassoProfile_get(ctx_obj)); - - return(int_wrap(ret)); -} - -PyObject *profile_set_identity(PyObject *self, PyObject *args) { - PyObject *ctx_obj, *identity_obj; - gint ret; - - if (CheckArgs(args, "OO:profile_set_identity")) { - if(!PyArg_ParseTuple(args, (char *) "OO:profile_set_identity", - &ctx_obj, &identity_obj)) - return NULL; - } - else return NULL; - - ret = lasso_profile_set_identity(LassoProfile_get(ctx_obj), - LassoIdentity_get(identity_obj)); - - return(int_wrap(ret)); -} - -PyObject *profile_set_identity_from_dump(PyObject *self, PyObject *args) { - PyObject *ctx_obj; - gchar *dump; - gint ret; - - if (CheckArgs(args, "OS:profile_set_identity_from_dump")) { - if(!PyArg_ParseTuple(args, (char *) "Os:profile_set_identity_from_dump", - &ctx_obj, &dump)) - return NULL; - } - else return NULL; - - ret = lasso_profile_set_identity_from_dump(LassoProfile_get(ctx_obj), - dump); - - return(int_wrap(ret)); -} - -PyObject *profile_set_session(PyObject *self, PyObject *args) { - PyObject *ctx_obj, *session_obj; - gint ret; - - if (CheckArgs(args, "OO:profile_set_session")) { - if(!PyArg_ParseTuple(args, (char *) "OO:profile_set_session", - &ctx_obj, &session_obj)) - return NULL; - } - else return NULL; - - ret = lasso_profile_set_session(LassoProfile_get(ctx_obj), - LassoSession_get(session_obj)); - - return(int_wrap(ret)); -} - -PyObject *profile_set_session_from_dump(PyObject *self, PyObject *args) { - PyObject *ctx_obj; - gchar *dump; - gint ret; - - if (CheckArgs(args, "OS:profile_set_session_from_dump")) { - if(!PyArg_ParseTuple(args, (char *) "Os:profile_set_session_from_dump", - &ctx_obj, &dump)) - return NULL; - } - else return NULL; - - ret = lasso_profile_set_session_from_dump(LassoProfile_get(ctx_obj), - dump); - - return(int_wrap(ret)); -} diff --git a/python/environs/py_profile.h b/python/environs/py_profile.h deleted file mode 100644 index 98f7e767..00000000 --- a/python/environs/py_profile.h +++ /dev/null @@ -1,53 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.labs.libre-entreprise.org - * - * Authors: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_PROFILE_H__ -#define __PYLASSO_PY_PROFILE_H__ - -#include <lasso/environs/profile.h> - -typedef struct { - PyObject_HEAD - LassoProfile *obj; -} LassoProfile_object; - -#define LassoProfile_get(v) (((v) == Py_None) ? NULL : (((LassoProfile_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoProfile_wrap(LassoProfile *ctx); - -PyObject *profile_get_request_type_from_soap_msg(PyObject *self, PyObject *args); - -PyObject *profile_new(PyObject *self, PyObject *args); -PyObject *profile_get_identity(PyObject *self, PyObject *args); -PyObject *profile_get_session(PyObject *self, PyObject *args); -PyObject *profile_is_identity_dirty(PyObject *self, PyObject *args); -PyObject *profile_is_session_dirty(PyObject *self, PyObject *args); -PyObject *profile_set_identity(PyObject *self, PyObject *args); -PyObject *profile_set_identity_from_dump(PyObject *self, PyObject *args); -PyObject *profile_set_session(PyObject *self, PyObject *args); -PyObject *profile_set_session_from_dump(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_PROFILE_H__ */ - - diff --git a/python/environs/py_register_name_identifier.c b/python/environs/py_register_name_identifier.c deleted file mode 100644 index 298c95f4..00000000 --- a/python/environs/py_register_name_identifier.c +++ /dev/null @@ -1,195 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_register_name_identifier.h" - -PyObject *LassoRegisterNameIdentifier_wrap(LassoRegisterNameIdentifier *register_name_identifier) { - PyObject *ret; - - if (register_name_identifier == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) register_name_identifier, - (char *) "LassoRegisterNameIdentifier *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *register_name_identifier_getattr(PyObject *self, PyObject *args) { - PyObject *register_name_identifier_obj; - LassoRegisterNameIdentifier *register_name_identifier; - const char *attr; - - if (CheckArgs(args, "OS:register_name_identifier_get_attr")) { - if (!PyArg_ParseTuple(args, "Os:register_name_identifier_get_attr", ®ister_name_identifier_obj, &attr)) - return NULL; - } - else return NULL; - - register_name_identifier = LassoRegisterNameIdentifier_get(register_name_identifier_obj); - - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssss]", "identity", "msg_url", "msg_body", - "msg_relayState"); - if (!strcmp(attr, "identity")) - return (LassoIdentity_wrap(LASSO_PROFILE(register_name_identifier)->identity)); - if (!strcmp(attr, "msg_url")) - return (charPtrConst_wrap(LASSO_PROFILE(register_name_identifier)->msg_url)); - if (!strcmp(attr, "msg_body")) - return (charPtrConst_wrap(LASSO_PROFILE(register_name_identifier)->msg_body)); - if (!strcmp(attr, "msg_relayState")) - return (charPtrConst_wrap(LASSO_PROFILE(register_name_identifier)->msg_relayState)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *register_name_identifier_new(PyObject *self, PyObject *args) { - PyObject *server_obj; - LassoRegisterNameIdentifier *register_name_identifier; - gint provider_type; - - if (CheckArgs(args, "OI:register_name_identifier_new")) { - if(!PyArg_ParseTuple(args, (char *) "Oi:register_name_identifier_new", - &server_obj, &provider_type)) - return NULL; - } - else return NULL; - - register_name_identifier = lasso_register_name_identifier_new(LassoServer_get(server_obj), - provider_type); - - return (LassoRegisterNameIdentifier_wrap(register_name_identifier)); -} - - -PyObject *register_name_identifier_build_request_msg(PyObject *self, PyObject *args) { - PyObject *register_name_identifier_obj; - gint codeError; - - if (CheckArgs(args, "O:register_name_identifier_build_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "O:register_name_identifier_build_request_msg", - ®ister_name_identifier_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_register_name_identifier_build_request_msg(LassoRegisterNameIdentifier_get(register_name_identifier_obj)); - - return(int_wrap(codeError)); -} - -PyObject *register_name_identifier_build_response_msg(PyObject *self, PyObject *args) { - PyObject *register_name_identifier_obj; - gint codeError; - - if (CheckArgs(args, "O:register_name_identifier_build_response_msg")) { - if(!PyArg_ParseTuple(args, (char *) "O:register_name_identifier_build_response_msg", - ®ister_name_identifier_obj)) - return NULL; - } - else return NULL; - - codeError = lasso_register_name_identifier_build_response_msg(LassoRegisterNameIdentifier_get(register_name_identifier_obj)); - - return(int_wrap(codeError)); -} - -PyObject *register_name_identifier_destroy(PyObject *self, PyObject *args){ - PyObject *register_name_identifier_obj; - - if (CheckArgs(args, "O:register_name_identifier_destroy")) { - if(!PyArg_ParseTuple(args, (char *) "O:register_name_identifier_destroy", - ®ister_name_identifier_obj)) - return NULL; - } - else return NULL; - - lasso_register_name_identifier_destroy(LassoRegisterNameIdentifier_get(register_name_identifier_obj)); - - Py_INCREF(Py_None); - return(Py_None); -} - -PyObject *register_name_identifier_init_request(PyObject *self, PyObject *args) { - PyObject *register_name_identifier_obj; - gchar *remote_providerID; - gint codeError; - - if (CheckArgs(args, "OS:register_name_identifier_init_request")) { - if(!PyArg_ParseTuple(args, (char *) "Os:register_name_identifier_init_request", - ®ister_name_identifier_obj, &remote_providerID)) - return NULL; - } - else return NULL; - - codeError = lasso_register_name_identifier_init_request(LassoRegisterNameIdentifier_get(register_name_identifier_obj), - remote_providerID); - - return(int_wrap(codeError)); -} - -PyObject *register_name_identifier_process_request_msg(PyObject *self, PyObject *args) { - PyObject *register_name_identifier_obj; - gchar *request_msg; - gint request_method; - gint codeError; - - if (CheckArgs(args, "OS:register_name_identifier_process_request_msg")) { - if(!PyArg_ParseTuple(args, (char *) "OS:register_name_identifier_process_request_msg", - ®ister_name_identifier_obj, &request_msg, &request_method)) - return NULL; - } - else return NULL; - - codeError = lasso_register_name_identifier_process_request_msg(LassoRegisterNameIdentifier_get(register_name_identifier_obj), - request_msg, - request_method); - - return(int_wrap(codeError)); -} - -PyObject *register_name_identifier_process_response_msg(PyObject *self, PyObject *args) { - PyObject *register_name_identifier_obj; - gchar *response_msg; - gint response_method; - gint codeError; - - if (CheckArgs(args, "OSI:register_name_identifier_process_response_msg")) { - if(!PyArg_ParseTuple(args, (char *) "Osi:register_name_identifier_process_response_msg", - ®ister_name_identifier_obj, &response_msg, &response_method)) - return NULL; - } - else return NULL; - - codeError = lasso_register_name_identifier_process_response_msg(LassoRegisterNameIdentifier_get(register_name_identifier_obj), - response_msg, response_method); - - return(int_wrap(codeError)); -} diff --git a/python/environs/py_register_name_identifier.h b/python/environs/py_register_name_identifier.h deleted file mode 100644 index ff250675..00000000 --- a/python/environs/py_register_name_identifier.h +++ /dev/null @@ -1,53 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_H__ -#define __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_H__ - -#include <lasso/environs/register_name_identifier.h> - -#include "py_server.h" -#include "py_identity.h" - -typedef struct { - PyObject_HEAD - LassoRegisterNameIdentifier *obj; -} LassoRegisterNameIdentifier_object; - -#define LassoRegisterNameIdentifier_get(v) (((v) == Py_None) ? NULL : (((LassoRegisterNameIdentifier_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoRegisterNameIdentifier_wrap(LassoRegisterNameIdentifier *register_name_identifier); - -PyObject *register_name_identifier_getattr(PyObject *self, PyObject *args); - -PyObject *register_name_identifier_build_request_msg(PyObject *self, PyObject *args); -PyObject *register_name_identifier_build_response_msg(PyObject *self, PyObject *args); -PyObject *register_name_identifier_destroy(PyObject *self, PyObject *args); -PyObject *register_name_identifier_init_request(PyObject *self, PyObject *args); -PyObject *register_name_identifier_new(PyObject *self, PyObject *args); -PyObject *register_name_identifier_process_request_msg(PyObject *self, PyObject *args); -PyObject *register_name_identifier_process_response_msg(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_H__ */ diff --git a/python/environs/py_server.c b/python/environs/py_server.c deleted file mode 100644 index a5128d5b..00000000 --- a/python/environs/py_server.c +++ /dev/null @@ -1,132 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_server.h" - -PyObject *LassoServer_wrap(LassoServer *server) { - PyObject *ret; - - if (server == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) server, - (char *) "LassoServer *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *server_new(PyObject *self, PyObject *args) { - LassoServer *server; - gchar *metadata; - gchar *public_key = NULL; - gchar *private_key = NULL; - gchar *certificate = NULL; - guint signature_method = 0; - - if (CheckArgs(args, "ssssi:server_new")) { - if(!PyArg_ParseTuple(args, (char *) "zzzz|i:server_new", - &metadata, &public_key, &private_key, &certificate, - &signature_method)) - return NULL; - } - else return NULL; - - server = lasso_server_new(metadata, public_key, private_key, - certificate, signature_method); - - return (LassoServer_wrap(LASSO_SERVER(server))); -} - -PyObject *server_new_from_dump(PyObject *self, PyObject *args) { - LassoServer *server; - gchar *dump; - - if (CheckArgs(args, "S:server_new_from_dump")) { - if(!PyArg_ParseTuple(args, (char *) "s:server_new_from_dump", - &dump)) - return NULL; - } - else return NULL; - - server = lasso_server_new_from_dump(dump); - - return (LassoServer_wrap(LASSO_SERVER(server))); -} - -PyObject *server_add_provider(PyObject *self, PyObject *args) { - PyObject *server_obj; - gchar *metadata; - gchar *public_key = NULL; - gchar *ca_certificate = NULL; - gint ret; - - if (CheckArgs(args, "OSss:server_add_provider")) { - if(!PyArg_ParseTuple(args, (char *) "Oszz:server_add_provider", - &server_obj, &metadata, &public_key, &ca_certificate)) - return NULL; - } - else return NULL; - - ret = lasso_server_add_provider(LassoServer_get(server_obj), - metadata, public_key, ca_certificate); - - return (int_wrap(ret)); -} - -PyObject *server_destroy(PyObject *self, PyObject *args) { - PyObject *server_obj; - - if (CheckArgs(args, "O:server_destroy")) { - if(!PyArg_ParseTuple(args, (char *) "O:server_destroy", - &server_obj)) - return NULL; - } - else return NULL; - - lasso_server_destroy(LassoServer_get(server_obj)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *server_dump(PyObject *self, PyObject *args) { - PyObject *server_obj; - gchar *ret; - - if (CheckArgs(args, "O:server_dump")) { - if(!PyArg_ParseTuple(args, (char *) "O:server_dump", - &server_obj)) - return NULL; - } - else return NULL; - - ret = lasso_server_dump(LassoServer_get(server_obj)); - - return (charPtrConst_wrap(ret)); -} diff --git a/python/environs/py_server.h b/python/environs/py_server.h deleted file mode 100644 index 5a04a85d..00000000 --- a/python/environs/py_server.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_SERVER_H__ -#define __PYLASSO_PY_SERVER_H__ - -#include <lasso/environs/server.h> - -typedef struct { - PyObject_HEAD - LassoServer *obj; -} LassoServer_object; - -#define LassoServer_get(v) (((v) == Py_None) ? NULL : (((LassoServer_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoServer_wrap(LassoServer *server); - -PyObject *server_new(PyObject *self, PyObject *args); -PyObject *server_new_from_dump(PyObject *self, PyObject *args); -PyObject *server_add_provider(PyObject *self, PyObject *args); -PyObject *server_destroy(PyObject *self, PyObject *args); -PyObject *server_dump(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_SERVER_H__ */ diff --git a/python/environs/py_session.c b/python/environs/py_session.c deleted file mode 100644 index 1a7040db..00000000 --- a/python/environs/py_session.c +++ /dev/null @@ -1,210 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_session.h" -#include "../xml/py_xml.h" - -PyObject *LassoSession_wrap(LassoSession *session) { - PyObject *ret; - - if (session == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) session, - (char *) "LassoSession *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *session_getattr(PyObject *self, PyObject *args) { - PyObject *session_obj; - LassoSession *session; - const char *attr; - - if (CheckArgs(args, "OS:session_get_attr")) { - if (!PyArg_ParseTuple(args, "Os:session_get_attr", &session_obj, &attr)) - return NULL; - } - else return NULL; - - session = LassoSession_get(session_obj); - - if (!strcmp(attr, "__members__")) { - return Py_BuildValue("[ss]", "providerIDs", "is_dirty"); - } - if (!strcmp(attr, "providerIDs")) { - return (GPtrArray_wrap(session->providerIDs)); - } - if (!strcmp(attr, "is_dirty")) { - return (int_wrap(session->is_dirty)); - } - - Py_INCREF(Py_None); - return (Py_None); -} - -/******************************************************************************/ - -PyObject *session_new(PyObject *self, PyObject *args) { - return (LassoSession_wrap(lasso_session_new())); -} - -PyObject *session_new_from_dump(PyObject *self, PyObject *args) { - LassoSession *session; - gchar *dump; - - if (CheckArgs(args, "S:session_new_from_dump")) { - if(!PyArg_ParseTuple(args, (char *) "s:session_new_from_dump", &dump)) - return NULL; - } - else return NULL; - - session = lasso_session_new_from_dump(dump); - - return (LassoSession_wrap(session)); -} - -PyObject *session_add_assertion(PyObject *self, PyObject *args){ - PyObject *session_obj, *assertion_obj; - gchar *remote_providerID; - - if (CheckArgs(args, "OSO:session_add_assertion")) { - if(!PyArg_ParseTuple(args, (char *) "OsO:session_add_assertion", &session_obj, - &remote_providerID, &assertion_obj)) - return NULL; - } - else return NULL; - - lasso_session_add_assertion(LassoSession_get(session_obj), remote_providerID, - LassoNode_get(assertion_obj)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *session_destroy(PyObject *self, PyObject *args) { - PyObject *session_obj; - - if (CheckArgs(args, "O:session_destroy")) { - if(!PyArg_ParseTuple(args, (char *) "O:session_destroy", - &session_obj)) - return NULL; - } - else return NULL; - - lasso_session_destroy(LassoSession_get(session_obj)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *session_dump(PyObject *self, PyObject *args) { - PyObject *session_obj; - gchar *dump; - - if (CheckArgs(args, "O:session_dump")) { - if(!PyArg_ParseTuple(args, (char *) "O:session_dump", &session_obj)) - return NULL; - } - else return NULL; - - dump = lasso_session_dump(LassoSession_get(session_obj)); - - return (charPtr_wrap(dump)); -} - -PyObject *session_get_assertion(PyObject *self, PyObject *args) { - PyObject *session_obj; - LassoNode *assertion_node; - gchar *remote_providerID; - - if (CheckArgs(args, "OS:session_get_assertion")) { - if(!PyArg_ParseTuple(args, (char *) "Os:session_get_assertion", &session_obj, - &remote_providerID)) - return NULL; - } - else return NULL; - - assertion_node = lasso_session_get_assertion(LassoSession_get(session_obj), - remote_providerID); - - return (LassoNode_wrap(assertion_node)); -} - -PyObject *session_get_authentication_method(PyObject *self, PyObject *args) { - PyObject *session_obj; - gchar *remote_providerID; - gchar *authentication_method; - - if (CheckArgs(args, "Os:session_get_authentication_method")) { - if(!PyArg_ParseTuple(args, (char *) "Oz:session_get_authentication_method", - &session_obj, &remote_providerID)) - return NULL; - } - else return NULL; - - authentication_method = lasso_session_get_authentication_method(LassoSession_get(session_obj), - remote_providerID); - - return (charPtr_wrap(authentication_method)); -} - -PyObject *session_get_next_assertion_remote_providerID(PyObject *self, PyObject *args) { - PyObject *session_obj; - gchar *remote_providerID; - - if (CheckArgs(args, "O:session_get_next_assertion_remote_providerID")) { - if(!PyArg_ParseTuple(args, (char *) "O:session_get_next_assertion_remote_providerID", - &session_obj)) - return NULL; - } - else return NULL; - - remote_providerID = lasso_session_get_next_assertion_remote_providerID(LassoSession_get(session_obj)); - - return (charPtr_wrap(remote_providerID)); -} - -PyObject *session_remove_assertion(PyObject *self, PyObject *args) { - PyObject *session_obj; - gchar *remote_providerID; - int code; - - if (CheckArgs(args, "OS:session_remove_assertion")) { - if(!PyArg_ParseTuple(args, (char *) "Os:session_remove_assertion", &session_obj, - &remote_providerID)) - return NULL; - } - else return NULL; - - code = lasso_session_remove_assertion(LassoSession_get(session_obj), - remote_providerID); - - return (int_wrap(code)); -} diff --git a/python/environs/py_session.h b/python/environs/py_session.h deleted file mode 100644 index d383840a..00000000 --- a/python/environs/py_session.h +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_SESSION_H__ -#define __PYLASSO_PY_SESSION_H__ - -#include <lasso/environs/session.h> - -typedef struct { - PyObject_HEAD - LassoSession *obj; -} LassoSession_object; - -#define LassoSession_get(v) (((v) == Py_None) ? NULL : (((LassoSession_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoSession_wrap(LassoSession *session); - -PyObject *session_getattr(PyObject *self, PyObject *args); -PyObject *session_new(PyObject *self, PyObject *args); -PyObject *session_new_from_dump(PyObject *self, PyObject *args); -PyObject *session_add_assertion(PyObject *self, PyObject *args); -PyObject *session_destroy(PyObject *self, PyObject *args); -PyObject *session_dump(PyObject *self, PyObject *args); -PyObject *session_get_assertion(PyObject *self, PyObject *args); -PyObject *session_get_authentication_method(PyObject *self, PyObject *args); -PyObject *session_get_next_assertion_remote_providerID(PyObject *self, PyObject *args); -PyObject *session_remove_assertion(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_SESSION_H__ */ diff --git a/python/generator_lasso_strings.py b/python/generator_lasso_strings.py deleted file mode 100755 index 5cc430a6..00000000 --- a/python/generator_lasso_strings.py +++ /dev/null @@ -1,87 +0,0 @@ -#! /usr/bin/env python -# -# $Id$ -# -# PyLasso - Python bindings for Lasso library -# Automatic generation of lasso_strings.py with lasso/xml/strings.c -# -# Copyright (C) 2004 Entr'ouvert -# http://lasso.entrouvert.org -# -# Author: Valery Febvre <vfebvre@easter-eggs.com> -# -# 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 - -import re, sys, string - -MATCH_BLANK = re.compile(r'^\s*\n$') -MATCH_COMMENT = re.compile(r'^[ /]+(?P<text>.*)\n$') -MATCH_CONST = re.compile(r'^const\s+xmlChar\s+(?P<name>\w+)\[\]\s*=\s+(?P<value>.*)\n$') - -header = """# $%s$ -# -# PyLasso - Python bindings for Lasso library -# -# Copyright (C) 2004 Entr'ouvert -# http://lasso.entrouvert.org -# -# Author: Valery Febvre <vfebvre@easter-eggs.com> -# -# 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 -# -""" % "Id" - -#file_in = sys.argv[1] -file_in = "../lasso/xml/strings.c" -file_out = "./lasso_strings.py" - -fd_in = open(file_in, "r") -fd_out = open(file_out, "w+") -fd_out.write(header) - -line = fd_in.readline() -while line: - match = MATCH_CONST.search(line) - if match: - name = match.group('name')[5:] - name = string.lower(name[0]) + name[1:] - value = match.group('value')[:-1] - fd_out.write("%s = %s\n" % (name, value)) - else: - match = MATCH_COMMENT.search(line) - if match: - fd_out.write("# %s\n" % match.group('text')) - else: - match = MATCH_BLANK.search(line) - if match: - fd_out.write("\n") - else: - print "Unknown format, this line is ignored: %s" % line - line = fd_in.readline() - -fd_in.close() -fd_out.close() diff --git a/python/lasso_strings.py b/python/lasso_strings.py deleted file mode 100644 index 2f38b405..00000000 --- a/python/lasso_strings.py +++ /dev/null @@ -1,172 +0,0 @@ -# $Id$ -# -# PyLasso - Python bindings for Lasso library -# -# Copyright (C) 2004 Entr'ouvert -# http://lasso.entrouvert.org -# -# Author: Valery Febvre <vfebvre@easter-eggs.com> -# -# 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 -# -# * $Id$ -# * -# * Lasso - A free implementation of the Liberty Alliance specifications. -# * -# * Copyright (C) 2004 Entr'ouvert -# * http://lasso.entrouvert.org -# * -# * Author: Valery Febvre <vfebvre@easter-eggs.com> -# * -# * 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 -# */ - - -# *****************************************************************************/ -# * Lasso */ -# *****************************************************************************/ - -# * prefix & href */ -lassoHRef = "http://www.entrouvert.org/namespaces/lasso/0.0" -lassoPrefix = "lasso" - -# *****************************************************************************/ -# * Liberty Alliance */ -# *****************************************************************************/ - -# * prefix & href */ -libHRef = "urn:liberty:iff:2003-08" -libPrefix = "lib" - -# * Versioning */ -libMajorVersion = "1" -libMinorVersion = "2" - -# * NameIDPolicyType */ -libNameIDPolicyTypeNone = "none" -libNameIDPolicyTypeOneTime = "onetime" -libNameIDPolicyTypeFederated = "federated" -libNameIDPolicyTypeAny = "any" - -# * AuthnContextComparison */ -libAuthnContextComparisonExact = "exact" -libAuthnContextComparisonMinimum = "minimum" -libAuthnContextComparisonBetter = "better" - -# * StatusCodes */ -libStatusCodeFederationDoesNotExist = "lib:FederationDoesNotExist" -libStatusCodeInvalidAssertionConsumerServiceIndex = "lib:InvalidAssertionConsumerServiceIndex" -libStatusCodeInvalidSignature = "lib:InvalidSignature" -libStatusCodeNoAuthnContext = "lib:NoAuthnContext" -libStatusCodeNoAvailableIDP = "lib:NoAvailableIDP" -libStatusCodeNoPassive = "lib:NoPassive" -libStatusCodeNoSupportedIDP = "lib:NoSupportedIDP" -libStatusCodeProxyCountExceeded = "lib:ProxyCountExceeded" -libStatusCodeUnknownPrincipal = "lib:UnknownPrincipal" -libStatusCodeUnsignedAuthnRequest = "lib:UnsignedAuthnRequest" - -# * ProtocolProfile */ -libProtocolProfileSSOGet = "http://projectliberty.org/profiles/sso-get" -libProtocolProfileSSOPost = "http://projectliberty.org/profiles/sso-post" -libProtocolProfileBrwsArt = "http://projectliberty.org/profiles/brws-art" -libProtocolProfileBrwsPost = "http://projectliberty.org/profiles/brws-post" -libProtocolProfileFedTermIdpHttp = "http://projectliberty.org/profiles/fedterm-idp-http" -libProtocolProfileFedTermIdpSoap = "http://projectliberty.org/profiles/fedterm-idp-soap" -libProtocolProfileFedTermSpHttp = "http://projectliberty.org/profiles/fedterm-sp-http" -libProtocolProfileFedTermSpSoap = "http://projectliberty.org/profiles/fedterm-sp-soap" -libProtocolProfileRniIdpHttp = "http://projectliberty.org/profiles/rni-idp-http" -libProtocolProfileRniIdpSoap = "http://projectliberty.org/profiles/rni-idp-soap" -libProtocolProfileRniSpHttp = "http://projectliberty.org/profiles/rni-sp-http" -libProtocolProfileRniSpSoap = "http://projectliberty.org/profiles/rni-sp-soap" -libProtocolProfileSloSpHttp = "http://projectliberty.org/profiles/slo-sp-http" -libProtocolProfileSloSpSoap = "http://projectliberty.org/profiles/slo-sp-soap" -libProtocolProfileSloIdpHttp = "http://projectliberty.org/profiles/slo-idp-http" -libProtocolProfileSloIdpSoap = "http://projectliberty.org/profiles/slo-idp-soap" - -# * NameIdentifier formats */ -libNameIdentifierFormatFederated = "urn:liberty:iff:nameid:federated" -libNameIdentifierFormatOneTime = "urn:liberty:iff:nameid:one-time" -libNameIdentifierFormatEncrypted = "urn:liberty:iff:nameid:encrypted" -libNameIdentifierFormatEntityID = "urn:liberty:iff:nameid:entityID" - -# * Consent */ -libConsentObtained = "urn:liberty:consent:obtained" -libConsentUnavailable = "urn:liberty:consent:unavailable" -libConsentInapplicable = "urn:liberty:consent:inapplicable" - -# *****************************************************************************/ -# * METADATA */ -# *****************************************************************************/ - -# * prefix & href */ -metadataHRef = "urn:liberty:metadata:2003-08" -metadataPrefix = "md" - -# *****************************************************************************/ -# * SAML */ -# *****************************************************************************/ - -# * prefix & href */ -samlAssertionHRef = "urn:oasis:names:tc:SAML:1.0:assertion" -samlAssertionPrefix = "saml" -samlProtocolHRef = "urn:oasis:names:tc:SAML:1.0:protocol" -samlProtocolPrefix = "samlp" - -# * Versioning */ -samlMajorVersion = "1" -samlMinorVersion = "1" - -# * StatusCodes */ -samlStatusCodeRequestDenied = "Samlp:RequestDenied" -samlStatusCodeSuccess = "Samlp:Success" - -# * AuthenticationMethods */ -samlAuthenticationMethodPassword = "urn:oasis:names:tc:SAML:1.0:am:password" -samlAuthenticationMethodKerberos = "urn:ietf:rfc:1510" -samlAuthenticationMethodSecureRemotePassword = "urn:ietf:rfc:2945" -samlAuthenticationMethodHardwareToken = "urn:oasis:names:tc:SAML:1.0:am:HardwareToken" -samlAuthenticationMethodSmartcardPki = "urn:ietf:rfc:2246" -samlAuthenticationMethodSoftwarePki = "urn:oasis:names:tc:SAML:1.0:am:X509-PKI" -samlAuthenticationMethodPgp = "urn:oasis:names:tc:SAML:1.0:am:PGP" -samlAuthenticationMethodSPki = "urn:oasis:names:tc:SAML:1.0:am:SPKI" -samlAuthenticationMethodXkms = "urn:oasis:names:tc:SAML:1.0:am:XKMS" -samlAuthenticationMethodXmlDSig = "urn:ietf:rfc:3075" -samlAuthenticationMethodUnspecified = "urn:oasis:names:tc:SAML:1.0:am:unspecified" - -# * ConfirmationMethods */ -samlConfirmationMethodArtifact01 = "urn:oasis:names:tc:SAML:1.0:cm:artifact-01" -samlConfirmationMethodBearer = "urn:oasis:names:tc:SAML:1.0:cm:bearer" -samlConfirmationMethodHolderOfKey = "urn:oasis:names:tc:SAML:1.0:cm:holder-of-key" -samlConfirmationMethodSenderVouches = "urn:oasis:names:tc:SAML:1.0:cm:sender-vouches" - -# *****************************************************************************/ -# * SOAP */ -# *****************************************************************************/ - -# * prefix & href */ -soapEnvHRef = "http://schemas.xmlsoap.org/soap/envelope/" -soapEnvPrefix = "soap-env" diff --git a/python/lassomod.c b/python/lassomod.c deleted file mode 100644 index f8804ef3..00000000 --- a/python/lassomod.c +++ /dev/null @@ -1,316 +0,0 @@ -/* $Id$ - * - * PyLasso - Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "lassomod.h" - -#include "py_lasso.h" - -#include "xml/py_xml.h" -#include "xml/py_lib_authentication_statement.h" -#include "xml/py_lib_authn_request.h" -#include "xml/py_lib_authn_response.h" -#include "xml/py_lib_federation_termination_notification.h" -#include "xml/py_lib_logout_request.h" -#include "xml/py_lib_logout_response.h" -#include "xml/py_lib_name_identifier_mapping_request.h" -#include "xml/py_lib_name_identifier_mapping_response.h" -#include "xml/py_lib_register_name_identifier_request.h" -#include "xml/py_saml_assertion.h" -#include "xml/py_saml_authentication_statement.h" -#include "xml/py_saml_name_identifier.h" -#include "xml/py_samlp_response.h" - -#include "protocols/py_authn_request.h" -#include "protocols/py_authn_response.h" -#include "protocols/py_federation_termination_notification.h" -#include "protocols/py_logout_request.h" -#include "protocols/py_logout_response.h" -#include "protocols/py_name_identifier_mapping_request.h" -#include "protocols/py_name_identifier_mapping_response.h" -#include "protocols/py_register_name_identifier_request.h" -#include "protocols/py_register_name_identifier_response.h" - -#include "protocols/elements/py_assertion.h" -#include "protocols/elements/py_authentication_statement.h" - -#include "environs/py_federation_termination.h" -#include "environs/py_identity.h" -#include "environs/py_lecp.h" -#include "environs/py_login.h" -#include "environs/py_logout.h" -#include "environs/py_profile.h" -#include "environs/py_register_name_identifier.h" -#include "environs/py_server.h" -#include "environs/py_session.h" - -static PyMethodDef lasso_methods[] = { - /* py_lasso.h */ - {"init", init, METH_VARARGS}, - {"shutdown", shutdown2, METH_VARARGS}, - {"check_version_exact", check_version_exact, METH_VARARGS}, - {"check_version", check_version, METH_VARARGS}, - {"check_version_ext", check_version_ext, METH_VARARGS}, - - /* xml */ - /* py_xml.h */ - {"node_destroy", node_destroy, METH_VARARGS}, - {"node_dump", node_dump, METH_VARARGS}, - {"node_export", node_export, METH_VARARGS}, - {"node_export_to_base64", node_export_to_base64, METH_VARARGS}, - {"node_export_to_query", node_export_to_query, METH_VARARGS}, - {"node_export_to_soap", node_export_to_soap, METH_VARARGS}, - {"node_get_attr_value", node_get_attr_value, METH_VARARGS}, - {"node_get_child", node_get_child, METH_VARARGS}, - {"node_get_content", node_get_content, METH_VARARGS}, - {"node_verify_signature", node_verify_signature, METH_VARARGS}, - - /* py_lib_authentication_statement.h */ - {"lib_authentication_statement_new", lib_authentication_statement_new, METH_VARARGS}, - {"lib_authentication_statement_set_sessionIndex", lib_authentication_statement_set_sessionIndex, METH_VARARGS}, - - /* py_lib_authn_request.h */ - {"lib_authn_request_new", lib_authn_request_new, METH_VARARGS}, - {"lib_authn_request_set_consent", lib_authn_request_set_consent, METH_VARARGS}, - {"lib_authn_request_set_forceAuthn", lib_authn_request_set_forceAuthn, METH_VARARGS}, - {"lib_authn_request_set_isPassive", lib_authn_request_set_isPassive, METH_VARARGS}, - {"lib_authn_request_set_nameIDPolicy", lib_authn_request_set_nameIDPolicy, METH_VARARGS}, - {"lib_authn_request_set_protocolProfile", lib_authn_request_set_protocolProfile, METH_VARARGS}, - {"lib_authn_request_set_relayState", lib_authn_request_set_relayState, METH_VARARGS}, - - /* py_lib_authn_response.h */ -/* {"lib_authn_response_new", lib_authn_response_new, METH_VARARGS}, */ -/* {"lib_authn_response_add_assertion", lib_authn_response_add_assertion, METH_VARARGS}, */ - - /* py_lib_federation_termination_notification.h */ - {"lib_federation_termination_notification_new", lib_federation_termination_notification_new, METH_VARARGS}, - {"lib_federation_termination_notification_set_consent", lib_federation_termination_notification_set_consent, METH_VARARGS}, - - /* py_lib_logout_request.h */ - {"lib_logout_request_new", lib_logout_request_new, METH_VARARGS}, - {"lib_logout_request_set_consent", lib_logout_request_set_consent, METH_VARARGS}, - {"lib_logout_request_set_nameIdentifier", lib_logout_request_set_nameIdentifier, METH_VARARGS}, - {"lib_logout_request_set_providerID", lib_logout_request_set_providerID, METH_VARARGS}, - {"lib_logout_request_set_relayState", lib_logout_request_set_relayState, METH_VARARGS}, - {"lib_logout_request_set_sessionIndex", lib_logout_request_set_sessionIndex, METH_VARARGS}, - - {"lib_logout_response_new", lib_logout_response_new, METH_VARARGS}, - - /* py_lib_name_identifier_mapping_request.h */ - {"lib_name_identifier_mapping_request_new", lib_name_identifier_mapping_request_new, METH_VARARGS}, - {"lib_name_identifier_mapping_request_set_consent", lib_name_identifier_mapping_request_set_consent, METH_VARARGS}, - - /* py_lib_name_identifier_mapping_response.h */ - {"lib_name_identifier_mapping_response_new", lib_name_identifier_mapping_response_new, METH_VARARGS}, - - /* py_lib_register_name_identifier_request.h */ - {"lib_register_name_identifier_request_new", lib_register_name_identifier_request_new, METH_VARARGS}, - {"lib_register_name_identifier_request_set_relayState", lib_register_name_identifier_request_set_relayState, METH_VARARGS}, - - /* py_saml_assertion.h */ - {"saml_assertion_new", saml_assertion_new, METH_VARARGS}, - {"saml_assertion_add_authenticationStatement", saml_assertion_add_authenticationStatement, METH_VARARGS}, - {"saml_assertion_set_signature", saml_assertion_set_signature, METH_VARARGS}, - - /* py_saml_authentication_statement.h */ - {"saml_authentication_statement_new", saml_authentication_statement_new, METH_VARARGS}, - - /* py_saml_name_identifier.h */ - {"saml_name_identifier_new", saml_name_identifier_new, METH_VARARGS}, - {"saml_name_identifier_set_format", saml_name_identifier_set_format, METH_VARARGS}, - {"saml_name_identifier_set_nameQualifier", saml_name_identifier_set_nameQualifier, METH_VARARGS}, - - /* py_samlp_response.h */ - {"samlp_response_new", samlp_response_new, METH_VARARGS}, - {"samlp_response_add_assertion", samlp_response_add_assertion, METH_VARARGS}, - - /* protocols */ - /* py_authn_request.h */ - {"authn_request_new", authn_request_new, METH_VARARGS}, - {"authn_request_set_requestAuthnContext", authn_request_set_requestAuthnContext, METH_VARARGS}, - {"authn_request_set_scoping", authn_request_set_scoping, METH_VARARGS}, - {"authn_request_get_protocolProfile", authn_request_get_protocolProfile, METH_VARARGS}, - - /* py_authn_response.h */ - {"authn_response_new_from_export", authn_response_new_from_export, METH_VARARGS}, - - /* py_federation_termination_notification.h */ - {"federation_termination_notification_new", federation_termination_notification_new, METH_VARARGS}, - {"federation_termination_notification_new_from_export", federation_termination_notification_new_from_export, METH_VARARGS}, - - /* py_logout_request.h */ - {"logout_request_new", logout_request_new, METH_VARARGS}, - {"logout_request_new_from_export", logout_request_new_from_export, METH_VARARGS}, - - /* py_logout_response.h */ - {"logout_response_new_from_request_export", logout_response_new_from_request_export, METH_VARARGS}, - {"logout_response_new_from_export", logout_response_new_from_export, METH_VARARGS}, - - /* py_name_identifier_mapping_request.h */ - {"name_identifier_mapping_request_new", name_identifier_mapping_request_new, METH_VARARGS}, -/* {"name_identifier_mapping_request_new_from_export", name_identifier_mapping_request_new_from_export, METH_VARARGS}, */ - - /* py_name_identifier_mapping_response.h */ -/* {"name_identifier_mapping_response_new_from_request_export", name_identifier_mapping_response_new_from_request_export, METH_VARARGS}, */ -/* {"name_identifier_mapping_response_new_from_export", name_identifier_mapping_response_new_from_export, METH_VARARGS}, */ - - /* py_register_name_identifier_request.h */ - {"register_name_identifier_request_new", register_name_identifier_request_new, METH_VARARGS}, - {"register_name_identifier_request_rename_attributes_for_query", register_name_identifier_request_rename_attributes_for_query, METH_VARARGS}, - - /* py_register_name_identifier_response.h */ - {"register_name_identifier_response_new_from_request_export", register_name_identifier_response_new_from_request_export, METH_VARARGS}, - {"register_name_identifier_response_new_from_export", register_name_identifier_response_new_from_export, METH_VARARGS}, - - /* py_request.h */ -/* {"request_create", request_create, METH_VARARGS}, */ -/* {"request_getattr", request_getattr, METH_VARARGS}, */ - - /* py_response.h */ -/* {"response_create", response_create, METH_VARARGS}, */ -/* {"response_getattr", response_getattr, METH_VARARGS}, */ -/* {"response_init", response_init, METH_VARARGS}, */ -/* {"response_add_assertion", response_add_assertion, METH_VARARGS}, */ - - /* protocols/elements */ - /* assertion.h */ - {"assertion_new", assertion_new, METH_VARARGS}, - - /* authentication_statement.h */ - {"authentication_statement_new", authentication_statement_new, METH_VARARGS}, - - /* environs */ - {"profile_get_request_type_from_soap_msg", profile_get_request_type_from_soap_msg, METH_VARARGS}, - {"profile_new", profile_new, METH_VARARGS}, - {"profile_get_identity", profile_get_identity, METH_VARARGS}, - {"profile_get_session", profile_get_session, METH_VARARGS}, - {"profile_is_identity_dirty", profile_is_identity_dirty, METH_VARARGS}, - {"profile_is_session_dirty", profile_is_session_dirty, METH_VARARGS}, - {"profile_set_identity", profile_set_identity, METH_VARARGS}, - {"profile_set_identity_from_dump", profile_set_identity_from_dump, METH_VARARGS}, - {"profile_set_session", profile_set_session, METH_VARARGS}, - {"profile_set_session_from_dump", profile_set_session_from_dump, METH_VARARGS}, - - /* py_identity.h */ - {"identity_new", identity_new, METH_VARARGS}, - {"identity_new_from_dump", identity_new_from_dump, METH_VARARGS}, - {"identity_dump", identity_dump, METH_VARARGS}, - - /* py_federation_termination.h */ - {"federation_termination_getattr", federation_termination_getattr, METH_VARARGS}, - {"federation_termination_new", federation_termination_new, METH_VARARGS}, - {"federation_termination_build_notification_msg", federation_termination_build_notification_msg, METH_VARARGS}, - {"federation_termination_destroy", federation_termination_destroy, METH_VARARGS}, - {"federation_termination_init_notification", federation_termination_init_notification, METH_VARARGS}, - {"federation_termination_process_notification_msg", federation_termination_process_notification_msg, METH_VARARGS}, - {"federation_termination_validate_notification", federation_termination_validate_notification, METH_VARARGS}, - - /* py_lecp.h */ - {"lecp_new", lecp_new, METH_VARARGS}, - {"lecp_getattr", lecp_getattr, METH_VARARGS}, - {"lecp_build_authn_request_envelope_msg", lecp_build_authn_request_envelope_msg, METH_VARARGS}, - {"lecp_build_authn_request_msg", lecp_build_authn_request_msg, METH_VARARGS}, - {"lecp_build_authn_response_msg", lecp_build_authn_response_msg, METH_VARARGS}, - {"lecp_build_authn_response_envelope_msg", lecp_build_authn_response_envelope_msg, METH_VARARGS}, - {"lecp_destroy", lecp_destroy, METH_VARARGS}, - {"lecp_init_authn_request", lecp_init_authn_request, METH_VARARGS}, - {"lecp_init_from_authn_request_msg", lecp_init_from_authn_request_msg, METH_VARARGS}, - {"lecp_process_authn_request_envelope_msg", lecp_process_authn_request_envelope_msg, METH_VARARGS}, - {"lecp_process_authn_response_envelope_msg", lecp_process_authn_response_envelope_msg, METH_VARARGS}, - - /* py_login.h */ - {"login_getattr", login_getattr, METH_VARARGS}, - {"login_new", login_new, METH_VARARGS}, - {"login_new_from_dump", login_new_from_dump, METH_VARARGS}, - {"login_accept_sso", login_accept_sso, METH_VARARGS}, - {"login_build_artifact_msg", login_build_artifact_msg, METH_VARARGS}, - {"login_build_authn_request_msg", login_build_authn_request_msg, METH_VARARGS}, - {"login_build_authn_response_msg", login_build_authn_response_msg, METH_VARARGS}, - {"login_build_request_msg", login_build_request_msg, METH_VARARGS}, - {"login_dump", login_dump, METH_VARARGS}, - {"login_init_authn_request", login_init_authn_request, METH_VARARGS}, - {"login_init_from_authn_request_msg", login_init_from_authn_request_msg, METH_VARARGS}, - {"login_init_request", login_init_request, METH_VARARGS}, - {"login_must_authenticate", login_must_authenticate, METH_VARARGS}, - {"login_process_authn_response_msg", login_process_authn_response_msg, METH_VARARGS}, - {"login_process_request_msg", login_process_request_msg, METH_VARARGS}, - {"login_process_response_msg", login_process_response_msg, METH_VARARGS}, - - /* py_logout.h */ - {"logout_getattr", logout_getattr, METH_VARARGS}, - {"logout_new", logout_new, METH_VARARGS}, - {"logout_build_request_msg", logout_build_request_msg, METH_VARARGS}, - {"logout_build_response_msg", logout_build_response_msg, METH_VARARGS}, - {"logout_destroy", logout_destroy, METH_VARARGS}, - {"logout_get_next_providerID", logout_get_next_providerID, METH_VARARGS}, - {"logout_init_request", logout_init_request, METH_VARARGS}, - {"logout_process_request_msg", logout_process_request_msg, METH_VARARGS}, - {"logout_process_response_msg", logout_process_response_msg, METH_VARARGS}, - {"logout_validate_request", logout_validate_request, METH_VARARGS}, - - /* py_register_name_identifier.h */ - {"register_name_identifier_getattr", register_name_identifier_getattr, METH_VARARGS}, - {"register_name_identifier_new", register_name_identifier_new, METH_VARARGS}, - {"register_name_identifier_build_request_msg", register_name_identifier_build_request_msg, METH_VARARGS}, - {"register_name_identifier_build_response_msg", register_name_identifier_build_response_msg, METH_VARARGS}, - {"register_name_identifier_destroy", register_name_identifier_destroy, METH_VARARGS}, - {"register_name_identifier_init_request", register_name_identifier_init_request, METH_VARARGS}, - {"register_name_identifier_process_request_msg", register_name_identifier_process_request_msg, METH_VARARGS}, - {"register_name_identifier_process_response_msg", register_name_identifier_process_response_msg, METH_VARARGS}, - - /* py_server.h */ - {"server_new", server_new, METH_VARARGS}, - {"server_new_from_dump", server_new_from_dump, METH_VARARGS}, - {"server_add_provider", server_add_provider, METH_VARARGS}, - {"server_destroy", server_destroy, METH_VARARGS}, - {"server_dump", server_dump, METH_VARARGS}, - - /* py_session.h */ - {"session_getattr", session_getattr, METH_VARARGS}, - {"session_new", session_new, METH_VARARGS}, - {"session_new_from_dump", session_new_from_dump, METH_VARARGS}, - {"session_add_assertion", session_add_assertion, METH_VARARGS}, - {"session_destroy", session_destroy, METH_VARARGS}, - {"session_dump", session_dump, METH_VARARGS}, - {"session_get_assertion", session_get_assertion, METH_VARARGS}, - {"session_get_authentication_method", session_get_authentication_method, METH_VARARGS}, - {"session_get_next_assertion_remote_providerID", session_get_next_assertion_remote_providerID, METH_VARARGS}, - {"session_remove_assertion", session_remove_assertion, METH_VARARGS}, - - {NULL, NULL} /* End of Methods Sentinel */ -}; - -PyObject *lasso_error; - -void initlassomod(void) { - PyObject *m, *d; - - m = Py_InitModule("lassomod", lasso_methods); - d = PyModule_GetDict(m); - - lasso_error = PyErr_NewException("lassomod.error", NULL, NULL); - PyDict_SetItemString(d, "lassomod error", lasso_error); - Py_INCREF(lasso_error); - PyModule_AddObject(m, "lassomod error", lasso_error); -} diff --git a/python/lassomod.h b/python/lassomod.h deleted file mode 100644 index fa9639a3..00000000 --- a/python/lassomod.h +++ /dev/null @@ -1,38 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_LASSOMOD_H__ -#define __PYLASSO_LASSOMOD_H__ - -#include <lasso/lasso.h> - -#include "utils.h" -#include "wrap_objs.h" - -#define HASH_TABLE_SIZE 10 - -extern PyObject *lasso_error; - -#endif /* __PYLASSO_LASSOMOD_H__ */ diff --git a/python/protocols/.cvsignore b/python/protocols/.cvsignore deleted file mode 100644 index 051d1bd5..00000000 --- a/python/protocols/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -Makefile -Makefile.in -.deps diff --git a/python/protocols/Makefile.am b/python/protocols/Makefile.am deleted file mode 100644 index 31542662..00000000 --- a/python/protocols/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -SUBDIRS = elements - -INCLUDES = \ - -DPACKAGE=\"@PACKAGE@\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lasso \ - $(LASSO_DEFINES) \ - $(LASSO_CFLAGS) \ - $(PY_CFLAGS) \ - $(NULL) - -PROTSOURCES = \ - py_authn_request.c \ - py_authn_response.c \ - py_federation_termination_notification.c \ - py_logout_request.c \ - py_logout_response.c \ - py_name_identifier_mapping_request.c \ - py_name_identifier_mapping_response.c \ - py_register_name_identifier_request.c \ - py_register_name_identifier_response.c - - -libprotocols_la_SOURCES = $(PROTSOURCES) -noinst_LTLIBRARIES = libprotocols.la - -EXTRA_DIST = \ - $(PROTSOURCES) \ - py_authn_request.h \ - py_authn_response.h \ - py_federation_termination_notification.h \ - py_logout_request.h \ - py_logout_response.h \ - py_name_identifier_mapping_request.h \ - py_name_identifier_mapping_response.h \ - py_register_name_identifier_request.h \ - py_register_name_identifier_response.h - diff --git a/python/protocols/elements/.cvsignore b/python/protocols/elements/.cvsignore deleted file mode 100644 index 09653e95..00000000 --- a/python/protocols/elements/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -.deps -Makefile -Makefile.in - diff --git a/python/protocols/elements/Makefile.am b/python/protocols/elements/Makefile.am deleted file mode 100644 index 04d86529..00000000 --- a/python/protocols/elements/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -ELEMSOURCES = py_assertion.c py_authentication_statement.c - -noinst_LTLIBRARIES = libelements.la -libelements_la_SOURCES = $(ELEMSOURCES) - -INCLUDES = \ - -DPACKAGE=\"@PACKAGE@\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lasso \ - $(LASSO_DEFINES) \ - $(LASSO_CFLAGS) \ - $(PY_CFLAGS) \ - $(NULL) - - -EXTRA_DIST = $(ELEMSOURCES) py_assertion.h py_authentication_statement.h diff --git a/python/protocols/elements/py_assertion.c b/python/protocols/elements/py_assertion.c deleted file mode 100644 index 5249c404..00000000 --- a/python/protocols/elements/py_assertion.c +++ /dev/null @@ -1,59 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../../lassomod.h" - -#include "py_assertion.h" - -PyObject *LassoAssertion_wrap(LassoAssertion *assertion) { - PyObject *ret; - - if (assertion == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) assertion, - (char *) "LassoAssertion *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *assertion_new(PyObject *self, PyObject *args) { - const xmlChar *issuer; - xmlChar *requestID; - LassoNode *assertion; - - if (CheckArgs(args, "SS:assertion_new")) { - if(!PyArg_ParseTuple(args, (char *) "ss:assertion_new", - &issuer, &requestID)) - return NULL; - } - else return NULL; - - assertion = lasso_assertion_new(issuer, requestID); - - return (LassoAssertion_wrap(LASSO_ASSERTION(assertion))); -} diff --git a/python/protocols/elements/py_assertion.h b/python/protocols/elements/py_assertion.h deleted file mode 100644 index a772bcf6..00000000 --- a/python/protocols/elements/py_assertion.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_ASSERTION_H__ -#define __PYLASSO_PY_ASSERTION_H__ - -#include <lasso/protocols/elements/assertion.h> - -typedef struct { - PyObject_HEAD - LassoAssertion *obj; -} LassoAssertion_object; - -#define LassoAssertion_get(v) (((v) == Py_None) ? NULL : (((LassoAssertion_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoAssertion_wrap(LassoAssertion *assertion); - -PyObject *assertion_new(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_ASSERTION_H__ */ diff --git a/python/protocols/elements/py_authentication_statement.c b/python/protocols/elements/py_authentication_statement.c deleted file mode 100644 index 41b63a61..00000000 --- a/python/protocols/elements/py_authentication_statement.c +++ /dev/null @@ -1,71 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../../lassomod.h" - -#include "../../xml/py_saml_name_identifier.h" -#include "py_authentication_statement.h" - -PyObject *LassoAuthenticationStatement_wrap(LassoAuthenticationStatement *statement) { - PyObject *ret; - - if (statement == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) statement, - (char *) "LassoAuthenticationStatement *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *authentication_statement_new(PyObject *self, PyObject *args) { - PyObject *identifier_obj, *idp_identifier_obj; - const xmlChar *authenticationMethod; - const xmlChar *reauthenticateOnOrAfter; - LassoSamlNameIdentifier *identifier=NULL, *idp_identifier; - LassoNode *statement; - - if (CheckArgs(args, "SSoO:authentication_statement_new")) { - if(!PyArg_ParseTuple(args, (char *) "ssOO:authentication_statement_new", - &authenticationMethod, &reauthenticateOnOrAfter, - &identifier_obj, &idp_identifier_obj)) - return NULL; - } - else return NULL; - - if (identifier_obj != Py_None) { - identifier = LassoSamlNameIdentifier_get(identifier_obj); - } - idp_identifier = LassoSamlNameIdentifier_get(idp_identifier_obj); - - statement = lasso_authentication_statement_new(authenticationMethod, - reauthenticateOnOrAfter, - identifier, - idp_identifier); - - return (LassoAuthenticationStatement_wrap(LASSO_AUTHENTICATION_STATEMENT(statement))); -} diff --git a/python/protocols/elements/py_authentication_statement.h b/python/protocols/elements/py_authentication_statement.h deleted file mode 100644 index 03d10088..00000000 --- a/python/protocols/elements/py_authentication_statement.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_AUTHENTICATION_STATEMENT_H__ -#define __PYLASSO_PY_AUTHENTICATION_STATEMENT_H__ - -#include <lasso/protocols/elements/authentication_statement.h> - -typedef struct { - PyObject_HEAD - LassoAuthenticationStatement *obj; -} LassoAuthenticationStatement_object; - -#define LassoAuthenticationStatement_get(v) (((v) == Py_None) ? NULL : (((LassoAuthenticationStatement_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoAuthenticationStatement_wrap(LassoAuthenticationStatement *statement); - -PyObject *authentication_statement_new(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_AUTHENTICATION_STATEMENT_H__ */ diff --git a/python/protocols/py_authn_request.c b/python/protocols/py_authn_request.c deleted file mode 100644 index b1e74aca..00000000 --- a/python/protocols/py_authn_request.c +++ /dev/null @@ -1,113 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_authn_request.h" - -PyObject *LassoAuthnRequest_wrap(LassoAuthnRequest *request) { - PyObject *ret; - - if (request == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) request, - (char *) "LassoAuthnRequest *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *authn_request_new(PyObject *self, PyObject *args) { - const xmlChar *providerID; - LassoNode *request; - gint sign_type, sign_method; - - if(!PyArg_ParseTuple(args, (char *) "sii:authn_request_new", &providerID, - &sign_type, &sign_method)) - return NULL; - - request = lasso_authn_request_new(providerID, sign_type, sign_method); - - return (LassoAuthnRequest_wrap(LASSO_AUTHN_REQUEST(request))); -} - -PyObject *authn_request_set_requestAuthnContext(PyObject *self, PyObject *args) { - PyObject *request_obj, *authnContextClassRefs_obj; - PyObject *authnContextStatementRefs_obj; - GPtrArray *authnContextClassRefs = NULL; - GPtrArray *authnContextStatementRefs = NULL; - const xmlChar *authnContextComparison = NULL; - - if(!PyArg_ParseTuple(args, (char *) "O|O|Oz:authn_request_set_requestAuthnContext", - &request_obj, &authnContextClassRefs_obj, - &authnContextStatementRefs_obj, &authnContextComparison)) - return NULL; - - if (authnContextClassRefs_obj != Py_None) { - authnContextClassRefs = GPtrArray_get(authnContextClassRefs_obj); - } - if (authnContextStatementRefs_obj != Py_None) { - authnContextStatementRefs = GPtrArray_get(authnContextStatementRefs_obj); - } - - lasso_authn_request_set_requestAuthnContext(LassoAuthnRequest_get(request_obj), - authnContextClassRefs, - authnContextStatementRefs, - authnContextComparison); - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *authn_request_set_scoping(PyObject *self, PyObject *args) { - PyObject *request_obj; - gint proxyCount; - - if(!PyArg_ParseTuple(args, (char *) "Oi:authn_request_set_scoping", - &request_obj, &proxyCount)) - return NULL; - - lasso_authn_request_set_scoping(LassoAuthnRequest_get(request_obj), - proxyCount); - - Py_INCREF(Py_None); - return (Py_None); -} - -/******************************************************************************/ - -PyObject *authn_request_get_protocolProfile(PyObject *self, PyObject *args) { - gchar *query; - gchar *protocolProfile; - - if(!PyArg_ParseTuple(args, (char *) "s:authn_request_get_protocolProfile", - &query)) - return NULL; - - protocolProfile = lasso_authn_request_get_protocolProfile(query); - - return (xmlCharPtr_wrap(protocolProfile)); -} diff --git a/python/protocols/py_authn_request.h b/python/protocols/py_authn_request.h deleted file mode 100644 index a6a4b0bd..00000000 --- a/python/protocols/py_authn_request.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_AUTHN_REQUEST_H__ -#define __PYLASSO_PY_AUTHN_REQUEST_H__ - -#include <lasso/protocols/authn_request.h> - -typedef struct { - PyObject_HEAD - LassoAuthnRequest *obj; -} LassoAuthnRequest_object; - -#define LassoAuthnRequest_get(v) (((v) == Py_None) ? NULL : (((LassoAuthnRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoAuthnRequest_wrap(LassoAuthnRequest *request); - -PyObject *authn_request_new(PyObject *self, PyObject *args); -PyObject *authn_request_set_requestAuthnContext(PyObject *self, PyObject *args); -PyObject *authn_request_set_scoping(PyObject *self, PyObject *args); - -PyObject *authn_request_get_protocolProfile(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_AUTHN_REQUEST_H__ */ diff --git a/python/protocols/py_authn_response.c b/python/protocols/py_authn_response.c deleted file mode 100644 index c12e479d..00000000 --- a/python/protocols/py_authn_response.c +++ /dev/null @@ -1,64 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "../xml/py_xml.h" -#include "py_authn_response.h" - -/******************************************************************************/ -/* LassoAuthnResponse */ -/******************************************************************************/ - -PyObject *LassoAuthnResponse_wrap(LassoAuthnResponse *response) { - PyObject *ret; - - if (response == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) response, - (char *) "LassoAuthnResponse *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *authn_response_new_from_export(PyObject *self, PyObject *args) { - xmlChar *buffer; - gint type; - LassoNode *response; - - if (CheckArgs(args, "SI:authn_response_new_from_export")) { - if(!PyArg_ParseTuple(args, (char *) "si:authn_response_new_from_export", - &buffer, &type)) - return NULL; - } - else return NULL; - - response = lasso_authn_response_new_from_export(buffer, type); - - return (LassoAuthnResponse_wrap(LASSO_AUTHN_RESPONSE(response))); -} diff --git a/python/protocols/py_authn_response.h b/python/protocols/py_authn_response.h deleted file mode 100644 index c305edd6..00000000 --- a/python/protocols/py_authn_response.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_AUTHN_RESPONSE_H__ -#define __PYLASSO_PY_AUTHN_RESPONSE_H__ - -#include <lasso/protocols/authn_response.h> - -typedef struct { - PyObject_HEAD - LassoAuthnResponse *obj; -} LassoAuthnResponse_object; - -#define LassoAuthnResponse_get(v) (((v) == Py_None) ? NULL : (((LassoAuthnResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoAuthnResponse_wrap(LassoAuthnResponse *response); - -PyObject *authn_response_new_from_export(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_AUTHN_RESPONSE_H__ */ diff --git a/python/protocols/py_federation_termination_notification.c b/python/protocols/py_federation_termination_notification.c deleted file mode 100644 index 3e00c92c..00000000 --- a/python/protocols/py_federation_termination_notification.c +++ /dev/null @@ -1,83 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_federation_termination_notification.h" - -PyObject *LassoFederationTerminationNotification_wrap(LassoFederationTerminationNotification *notification) { - PyObject *ret; - - if (notification == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) notification, - (char *) "LassoFederationTerminationNotification *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *federation_termination_notification_new(PyObject *self, PyObject *args) { - const xmlChar *providerID; - const xmlChar *nameIdentifier; - const xmlChar *nameQualifier = NULL; - const xmlChar *format = NULL; - - LassoNode *notification; - - if (CheckArgs(args, "SSSS:federation_termination_notification_new")) { - if(!PyArg_ParseTuple(args, (char *) "ssss:federation_termination_notification_new", - &providerID, &nameIdentifier,&nameQualifier, &format)) - return NULL; - } - else return NULL; - - notification = lasso_federation_termination_notification_new(providerID, - nameIdentifier, - nameQualifier, - format); - - return (LassoFederationTerminationNotification_wrap(LASSO_FEDERATION_TERMINATION_NOTIFICATION(notification))); -} - -PyObject *federation_termination_notification_new_from_export(PyObject *self, PyObject *args) { - xmlChar *soap_buffer; - gint type; - - LassoNode *notification; - - if (CheckArgs(args, "SI:federation_termination_notification_new_from_export")) { - if(!PyArg_ParseTuple(args, (char *) "si:federation_termination_notification_new_from_export", - &soap_buffer, &type)) - return NULL; - } - else return NULL; - - notification = lasso_federation_termination_notification_new_from_export(soap_buffer, type); - - return (LassoFederationTerminationNotification_wrap(LASSO_FEDERATION_TERMINATION_NOTIFICATION(notification))); -} diff --git a/python/protocols/py_federation_termination_notification.h b/python/protocols/py_federation_termination_notification.h deleted file mode 100644 index 01f03d2b..00000000 --- a/python/protocols/py_federation_termination_notification.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_FEDERATION_TERMINATION_NOTIFICATION_H__ -#define __PYLASSO_PY_FEDERATION_TERMINATION_NOTIFICATION_H__ - -#include <lasso/protocols/federation_termination_notification.h> - -typedef struct { - PyObject_HEAD - LassoFederationTerminationNotification *obj; -} LassoFederationTerminationNotification_object; - -#define LassoFederationTerminationNotification_get(v) (((v) == Py_None) ? NULL : (((LassoFederationTerminationNotification_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoFederationTerminationNotification_wrap(LassoFederationTerminationNotification *notification); - -PyObject *federation_termination_notification_new(PyObject *self, PyObject *args); -PyObject *federation_termination_notification_new_from_export(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_FEDERATION_TERMINATION_NOTIFICATION_H__ */ diff --git a/python/protocols/py_logout_request.c b/python/protocols/py_logout_request.c deleted file mode 100644 index e8d36186..00000000 --- a/python/protocols/py_logout_request.c +++ /dev/null @@ -1,84 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_logout_request.h" - -PyObject *LassoLogoutRequest_wrap(LassoLogoutRequest *request) { - PyObject *ret; - - if (request == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) request, - (char *) "LassoLogoutRequest *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *logout_request_new(PyObject *self, PyObject *args) { - gchar *providerID; - gchar *nameIdentifier; - gchar *nameQualifier; - gchar *format; - - LassoNode *request; - - if (CheckArgs(args, "SSSS:logout_request_new")) { - if(!PyArg_ParseTuple(args, (char *) "ssss:logout_request_new", - &providerID, &nameIdentifier, &nameQualifier, &format)) - return NULL; - } - else return NULL; - - request = lasso_logout_request_new(providerID, - nameIdentifier, nameQualifier, format); - - return (LassoLogoutRequest_wrap(LASSO_LOGOUT_REQUEST(request))); -} - -PyObject *logout_request_new_from_export(PyObject *self, PyObject *args) { - gchar *buffer; - gint type; - LassoNode *request; - - if (CheckArgs(args, "SS:logout_request_new_from_export")) { - if(!PyArg_ParseTuple(args, (char *) "ss:logout_request_new_from_export", - &buffer, &type)) - return NULL; - } - else return NULL; - - request = lasso_logout_request_new_from_export(buffer, type); - if(request==NULL){ - Py_INCREF(Py_None); - return (Py_None); - } - - return (LassoLogoutRequest_wrap(LASSO_LOGOUT_REQUEST(request))); -} diff --git a/python/protocols/py_logout_request.h b/python/protocols/py_logout_request.h deleted file mode 100644 index 2c084c8f..00000000 --- a/python/protocols/py_logout_request.h +++ /dev/null @@ -1,44 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_LOGOUT_REQUEST_H__ -#define __PYLASSO_PY_LOGOUT_REQUEST_H__ - -#include <lasso/protocols/logout_request.h> -#include <lasso/xml/lib_logout_request.h> - -typedef struct { - PyObject_HEAD - LassoLogoutRequest *obj; -} LassoLogoutRequest_object; - -#define LassoLogoutRequest_get(v) (((v) == Py_None) ? NULL : (((LassoLogoutRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLogoutRequest_wrap(LassoLogoutRequest *request); - -PyObject *logout_request_getattr(PyObject *self, PyObject *args); -PyObject *logout_request_new(PyObject *self, PyObject *args); -PyObject *logout_request_new_from_export(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LOGOUT_REQUEST_H__ */ diff --git a/python/protocols/py_logout_response.c b/python/protocols/py_logout_response.c deleted file mode 100644 index f038927f..00000000 --- a/python/protocols/py_logout_response.c +++ /dev/null @@ -1,86 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_logout_response.h" - -PyObject *LassoLogoutResponse_wrap(LassoLogoutResponse *response) { - PyObject *ret; - - if (response == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) response, - (char *) "LassoLogoutResponse *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *logout_response_new_from_request_export(PyObject *self, PyObject *args) { - gchar *request_export; - gchar *providerID; - gchar *status_code_value; - gint export_type; - - LassoNode *response = NULL; - - if (CheckArgs(args, "SSSS:logout_response_new_from_request_export")) { - if(!PyArg_ParseTuple(args, (char *) "ssss:logout_response_new_from_request_export", - &request_export, - &export_type, - &providerID, - &status_code_value)) - return NULL; - } - else return NULL; - - response = lasso_logout_response_new_from_request_export(request_export, - export_type, - providerID, - status_code_value); - - return (LassoLogoutResponse_wrap(LASSO_LOGOUT_RESPONSE(response))); -} - -PyObject *logout_response_new_from_export(PyObject *self, PyObject *args) { - gchar *request_export; - gint export_type; - - LassoNode *response = NULL; - - if (CheckArgs(args, "SS:logout_response_new_from_export")) { - if(!PyArg_ParseTuple(args, (char *) "ss:logout_response_new_from_export", - &request_export, &export_type)) - return NULL; - } - else return NULL; - - response = lasso_logout_response_new_from_export(request_export, export_type); - - return (LassoLogoutResponse_wrap(LASSO_LOGOUT_RESPONSE(response))); -} diff --git a/python/protocols/py_logout_response.h b/python/protocols/py_logout_response.h deleted file mode 100644 index 5a81e70c..00000000 --- a/python/protocols/py_logout_response.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LOGOUT_RESPONSE_H__ -#define __PYLASSO_PY_LOGOUT_RESPONSE_H__ - -#include <lasso/protocols/logout_response.h> - -typedef struct { - PyObject_HEAD - LassoLogoutResponse *obj; -} LassoLogoutResponse_object; - -#define LassoLogoutResponse_get(v) (((v) == Py_None) ? NULL : (((LassoLogoutResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLogoutResponse_wrap(LassoLogoutResponse *response); - -PyObject *logout_response_new_from_request_export(PyObject *self, PyObject *args); -PyObject *logout_response_new_from_export(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LOGOUT_RESPONSE_H__ */ diff --git a/python/protocols/py_name_identifier_mapping_request.c b/python/protocols/py_name_identifier_mapping_request.c deleted file mode 100644 index 7b1516ec..00000000 --- a/python/protocols/py_name_identifier_mapping_request.c +++ /dev/null @@ -1,98 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_name_identifier_mapping_request.h" - -PyObject *LassoNameIdentifierMappingRequest_wrap(LassoNameIdentifierMappingRequest *request) { - PyObject *ret; - - if (request == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) request, - (char *) "LassoNameIdentifierMappingRequest *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *name_identifier_mapping_request_new(PyObject *self, PyObject *args) { - const xmlChar *providerID; - const xmlChar *nameIdentifier; - const xmlChar *nameQualifier = NULL; - const xmlChar *format = NULL; - - LassoNode *request; - - if (CheckArgs(args, "SSSS:name_identifier_mapping_request_new")) { - if(!PyArg_ParseTuple(args, (char *) "ssss:name_identifier_mapping_request_new", - &providerID, &nameIdentifier, - &nameQualifier, &format)) - return NULL; - } - else return NULL; - - request = lasso_name_identifier_mapping_request_new(providerID, nameIdentifier, - nameQualifier, format); - - return (LassoNameIdentifierMappingRequest_wrap(LASSO_NAME_IDENTIFIER_MAPPING_REQUEST(request))); -} - -PyObject *name_identifier_mapping_request_new_from_soap(PyObject *self, PyObject *args) { - const xmlChar *soap_buffer; - - LassoNode *request; - - if (CheckArgs(args, "S:name_identifier_mapping_request_new_from_soap")) { - if(!PyArg_ParseTuple(args, (char *) "s:name_identifier_mapping_request_new_from_soap", - &soap_buffer)) - return NULL; - } - else return NULL; - - request = lasso_name_identifier_mapping_request_new_from_soap(soap_buffer); - - return (LassoNameIdentifierMappingRequest_wrap(LASSO_NAME_IDENTIFIER_MAPPING_REQUEST(request))); -} - -PyObject *name_identifier_mapping_request_new_from_query(PyObject *self, PyObject *args) { - const xmlChar *query; - - LassoNode *request; - - if (CheckArgs(args, "S:name_identifier_mapping_request_new_from_query")) { - if(!PyArg_ParseTuple(args, (char *) "s:name_identifier_mapping_request_new_from_query", - &query)) - return NULL; - } - else return NULL; - - request = lasso_name_identifier_mapping_request_new_from_query(query); - - return (LassoNameIdentifierMappingRequest_wrap(LASSO_NAME_IDENTIFIER_MAPPING_REQUEST(request))); -} diff --git a/python/protocols/py_name_identifier_mapping_request.h b/python/protocols/py_name_identifier_mapping_request.h deleted file mode 100644 index 6384c44b..00000000 --- a/python/protocols/py_name_identifier_mapping_request.h +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_REQUEST_H__ -#define __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_REQUEST_H__ - -#include <lasso/protocols/name_identifier_mapping_request.h> - -typedef struct { - PyObject_HEAD - LassoNameIdentifierMappingRequest *obj; -} LassoNameIdentifierMappingRequest_object; - -#define LassoNameIdentifierMappingRequest_get(v) (((v) == Py_None) ? NULL : (((LassoNameIdentifierMappingRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoNameIdentifierMappingRequest_wrap(LassoNameIdentifierMappingRequest *request); - -PyObject *name_identifier_mapping_request_new(PyObject *self, PyObject *args); -PyObject *name_identifier_mapping_request_new_from_soap(PyObject *self, PyObject *args); -PyObject *name_identifier_mapping_request_new_from_query(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_REQUEST_H__ */ diff --git a/python/protocols/py_name_identifier_mapping_response.c b/python/protocols/py_name_identifier_mapping_response.c deleted file mode 100644 index 61b6d278..00000000 --- a/python/protocols/py_name_identifier_mapping_response.c +++ /dev/null @@ -1,138 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_name_identifier_mapping_response.h" -#include "py_name_identifier_mapping_request.h" - -PyObject *LassoNameIdentifierMappingResponse_wrap(LassoNameIdentifierMappingResponse *response) { - PyObject *ret; - - if (response == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) response, - (char *) "LassoNameIdentifierMappingResponse *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *name_identifier_mapping_response_new_from_request_soap(PyObject *self, PyObject *args) { - const xmlChar *request_soap_dump; - const xmlChar *providerID; - const xmlChar *status_code_value; - - LassoNode *response = NULL; - - if (CheckArgs(args, "SSS:name_identifier_mapping_response_new_from_request_soap")) { - if(!PyArg_ParseTuple(args, (char *) "sss:name_identifier_mapping_response_new_from_request_soap", - &request_soap_dump, - &providerID, - &status_code_value)) - return NULL; - } - else return NULL; - - response = lasso_name_identifier_mapping_response_new_from_request_soap(request_soap_dump, - providerID, - status_code_value); - - return (LassoNameIdentifierMappingResponse_wrap(LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE(response))); -} - -PyObject *name_identifier_mapping_response_new_from_soap(PyObject *self, PyObject *args) { - const xmlChar *response_soap_dump; - - LassoNode *response = NULL; - - if (CheckArgs(args, "S:name_identifier_mapping_response_new_from_soap")) { - if(!PyArg_ParseTuple(args, (char *) "s:name_identifier_mapping_response_new_from_soap", - &response_soap_dump)) - return NULL; - } - else return NULL; - - response = lasso_name_identifier_mapping_response_new_from_soap(response_soap_dump); - - return (LassoNameIdentifierMappingResponse_wrap(LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE(response))); -} - -PyObject *name_identifier_mapping_response_new_from_dump(PyObject *self, PyObject *args) { - const xmlChar *dump; - - LassoNode *response = NULL; - - if (CheckArgs(args, "S:name_identifier_mapping_response_new_from_dump")) { - if(!PyArg_ParseTuple(args, (char *) "s:name_identifier_mapping_response_new_from_dump", - &dump)) - return NULL; - } - else return NULL; - - response = lasso_name_identifier_mapping_response_new_from_soap(dump); - - return (LassoNameIdentifierMappingResponse_wrap(LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE(response))); -} - -PyObject *name_identifier_mapping_response_new_from_request_query(PyObject *self, PyObject *args) { - const xmlChar *query; - const xmlChar *providerID; - const xmlChar *status_code_value; - - LassoNode *response = NULL; - - if (CheckArgs(args, "SSS:name_identifier_mapping_response_new_from_request_query")) { - if(!PyArg_ParseTuple(args, (char *) "sss:name_identifier_mapping_response_new_from_request_query", - &query, - &providerID, - &status_code_value)) - return NULL; - } - else return NULL; - - response = lasso_name_identifier_mapping_response_new_from_request_query(query, providerID, status_code_value); - - return (LassoNameIdentifierMappingResponse_wrap(LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE(response))); -} - -PyObject *name_identifier_mapping_response_new_from_query(PyObject *self, PyObject *args) { - const xmlChar *query; - - LassoNode *response = NULL; - - if (CheckArgs(args, "S:name_identifier_mapping_response_new_from_query")) { - if(!PyArg_ParseTuple(args, (char *) "s:name_identifier_mapping_response_new_from_query", - &query)) - return NULL; - } - else return NULL; - - response = lasso_name_identifier_mapping_response_new_from_query(query); - - return (LassoNameIdentifierMappingResponse_wrap(LASSO_NAME_IDENTIFIER_MAPPING_RESPONSE(response))); -} diff --git a/python/protocols/py_name_identifier_mapping_response.h b/python/protocols/py_name_identifier_mapping_response.h deleted file mode 100644 index 031d525f..00000000 --- a/python/protocols/py_name_identifier_mapping_response.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_RESPONSE_H__ -#define __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_RESPONSE_H__ - -#include <lasso/protocols/name_identifier_mapping_response.h> - -typedef struct { - PyObject_HEAD - LassoNameIdentifierMappingResponse *obj; -} LassoNameIdentifierMappingResponse_object; - -#define LassoNameIdentifierMappingResponse_get(v) (((v) == Py_None) ? NULL : (((LassoNameIdentifierMappingResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoNameIdentifierMappingResponse_wrap(LassoNameIdentifierMappingResponse *response); - -PyObject *name_identifier_mapping_response_new_from_request_soap(PyObject *self, PyObject *args); -PyObject *name_identifier_mapping_response_new_from_soap(PyObject *self, PyObject *args); -PyObject *name_identifier_mapping_response_new_from_dump(PyObject *self, PyObject *args); -PyObject *name_identifier_mapping_response_new_from_request_query(PyObject *self, PyObject *args); -PyObject *name_identifier_mapping_response_new_from_query(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_NAME_IDENTIFIER_MAPPING_RESPONSE_H__ */ diff --git a/python/protocols/py_register_name_identifier_request.c b/python/protocols/py_register_name_identifier_request.c deleted file mode 100644 index 0deba7cf..00000000 --- a/python/protocols/py_register_name_identifier_request.c +++ /dev/null @@ -1,120 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_register_name_identifier_request.h" - -PyObject *LassoRegisterNameIdentifierRequest_wrap(LassoRegisterNameIdentifierRequest *request) { - PyObject *ret; - - if (request == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) request, - (char *) "LassoRegisterNameIdentifierRequest *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *register_name_identifier_request_new(PyObject *self, PyObject *args) { - const xmlChar *providerID; - - const xmlChar *idpNameIdentifier; - const xmlChar *idpNameQualifier; - const xmlChar *idpFormat; - - const xmlChar *spNameIdentifier; - const xmlChar *spNameQualifier; - const xmlChar *spFormat; - - const xmlChar *oldNameIdentifier; - const xmlChar *oldNameQualifier; - const xmlChar *oldFormat; - - LassoNode *request; - - if (CheckArgs(args, "SSSSSSSSSS:register_name_identifier_request_new")) { - if(!PyArg_ParseTuple(args, (char *) "ssssssssss:register_name_identifier_request_new", - &providerID, - &idpNameIdentifier, &idpNameQualifier, &idpFormat, - &spNameIdentifier, &spNameQualifier, &spFormat, - &oldNameIdentifier, &oldNameQualifier, &oldFormat)) - return NULL; - } - else return NULL; - - request = lasso_register_name_identifier_request_new(providerID, - idpNameIdentifier, - idpNameQualifier, - idpFormat, - spNameIdentifier, - spNameQualifier, - spFormat, - oldNameIdentifier, - oldNameQualifier, - oldFormat); - - return (LassoRegisterNameIdentifierRequest_wrap(LASSO_REGISTER_NAME_IDENTIFIER_REQUEST(request))); -} - -PyObject *register_name_identifier_request_rename_attributes_for_query(PyObject *self, PyObject *args){ - PyObject *request_obj; - - if (CheckArgs(args, "O:register_name_identifier_request_rename_attributes_for_query")) { - if(!PyArg_ParseTuple(args, (char *) "O:register_name_identifier_request_rename_attributes_for_query", - &request_obj)) - return NULL; - } - else return NULL; - - lasso_register_name_identifier_request_rename_attributes_for_query(LassoRegisterNameIdentifierRequest_get(request_obj)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *register_name_identifier_request_new_from_export(PyObject *self, PyObject *args) { - gchar *soap_buffer; - LassoNode *request; - gint type; - - if (CheckArgs(args, "SS:register_name_identifier_request_new_from_export")) { - if(!PyArg_ParseTuple(args, (char *) "ss:register_name_identifier_request_new_from_export", - &soap_buffer, &type)) - return NULL; - } - else return NULL; - - request = lasso_register_name_identifier_request_new_from_export(soap_buffer, type); - if(request==NULL){ - Py_INCREF(Py_None); - return (Py_None); - } - - return (LassoRegisterNameIdentifierRequest_wrap(LASSO_REGISTER_NAME_IDENTIFIER_REQUEST(request))); -} diff --git a/python/protocols/py_register_name_identifier_request.h b/python/protocols/py_register_name_identifier_request.h deleted file mode 100644 index 2d04809a..00000000 --- a/python/protocols/py_register_name_identifier_request.h +++ /dev/null @@ -1,45 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_REQUEST_H__ -#define __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_REQUEST_H__ - -#include <lasso/protocols/register_name_identifier_request.h> - -typedef struct { - PyObject_HEAD - LassoRegisterNameIdentifierRequest *obj; -} LassoRegisterNameIdentifierRequest_object; - -#define LassoRegisterNameIdentifierRequest_get(v) (((v) == Py_None) ? NULL : (((LassoRegisterNameIdentifierRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoRegisterNameIdentifierRequest_wrap(LassoRegisterNameIdentifierRequest *request); - -PyObject *register_name_identifier_request_new(PyObject *self, PyObject *args); - -PyObject *register_name_identifier_request_new_from_export(PyObject *self, PyObject *args); - -PyObject *register_name_identifier_request_rename_attributes_for_query(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_REQUEST_H__ */ diff --git a/python/protocols/py_register_name_identifier_response.c b/python/protocols/py_register_name_identifier_response.c deleted file mode 100644 index 5547dd17..00000000 --- a/python/protocols/py_register_name_identifier_response.c +++ /dev/null @@ -1,87 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_register_name_identifier_request.h" -#include "py_register_name_identifier_response.h" - -PyObject *LassoRegisterNameIdentifierResponse_wrap(LassoRegisterNameIdentifierResponse *response) { - PyObject *ret; - - if (response == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) response, - (char *) "LassoRegisterNameIdentifierResponse *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *register_name_identifier_response_new_from_request_export(PyObject *self, PyObject *args) { - gchar *request_export; - gchar *providerID; - gchar *status_code_value; - gint export_type; - - LassoNode *response = NULL; - - if (CheckArgs(args, "SSSS:register_name_identifier_response_new_from_request_export")) { - if(!PyArg_ParseTuple(args, (char *) "ssss:register_name_identifier_response_new_from_request_export", - &request_export, - &export_type, - &providerID, - &status_code_value)) - return NULL; - } - else return NULL; - - response = lasso_register_name_identifier_response_new_from_request_export(request_export, - export_type, - providerID, - status_code_value); - - return (LassoRegisterNameIdentifierResponse_wrap(LASSO_REGISTER_NAME_IDENTIFIER_RESPONSE(response))); -} - -PyObject *register_name_identifier_response_new_from_export(PyObject *self, PyObject *args) { - gchar *request_export; - gint export_type; - - LassoNode *response = NULL; - - if (CheckArgs(args, "SS:register_name_identifier_response_new_from_export")) { - if(!PyArg_ParseTuple(args, (char *) "ss:register_name_identifier_response_new_from_export", - &request_export, &export_type)) - return NULL; - } - else return NULL; - - response = lasso_register_name_identifier_response_new_from_export(request_export, export_type); - - return (LassoRegisterNameIdentifierResponse_wrap(LASSO_REGISTER_NAME_IDENTIFIER_RESPONSE(response))); -} diff --git a/python/protocols/py_register_name_identifier_response.h b/python/protocols/py_register_name_identifier_response.h deleted file mode 100644 index 0d6aad5a..00000000 --- a/python/protocols/py_register_name_identifier_response.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_RESPONSE_H__ -#define __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_RESPONSE_H__ - -#include <lasso/protocols/register_name_identifier_response.h> - -typedef struct { - PyObject_HEAD - LassoRegisterNameIdentifierResponse *obj; -} LassoRegisterNameIdentifierResponse_object; - -#define LassoRegisterNameIdentifierResponse_get(v) (((v) == Py_None) ? NULL : (((LassoRegisterNameIdentifierResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoRegisterNameIdentifierResponse_wrap(LassoRegisterNameIdentifierResponse *response); - -PyObject *register_name_identifier_response_new_from_request_export(PyObject *self, PyObject *args); -PyObject *register_name_identifier_response_new_from_export(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_RESPONSE_H__ */ diff --git a/python/py_lasso.c b/python/py_lasso.c deleted file mode 100644 index 2f494b1c..00000000 --- a/python/py_lasso.c +++ /dev/null @@ -1,62 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include <lasso/lasso_config.h> - -#include "lassomod.h" - -#include "py_lasso.h" - -PyObject *init(PyObject *self, PyObject *args) { - return (int_wrap(lasso_init())); -} - -PyObject *shutdown2(PyObject *self, PyObject *args) { - return (int_wrap(lasso_shutdown())); -} - -PyObject *check_version_exact(PyObject *self, PyObject *args) { - return (int_wrap(lasso_check_version_exact())); -} - -PyObject *check_version(PyObject *self, PyObject *args) { - return (int_wrap(lasso_check_version())); -} - -PyObject *check_version_ext(PyObject *self, PyObject *args) { - int major; - int minor; - int subminor; - lassoCheckVersionMode mode; - - if (CheckArgs(args, "IIII:check_version_ext")) { - if(!PyArg_ParseTuple(args, (char *) "iiii:check_version_ext", - &major, &minor, &subminor, &mode)) - return NULL; - } - else return NULL; - - return (int_wrap(lasso_check_version_ext(major, minor, subminor, mode))); -} diff --git a/python/py_lasso.h b/python/py_lasso.h deleted file mode 100644 index 70fe4c85..00000000 --- a/python/py_lasso.h +++ /dev/null @@ -1,35 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LASSO_H__ -#define __PYLASSO_PY_LASSO_H__ - -PyObject *init(PyObject *self, PyObject *args); -PyObject *shutdown2(PyObject *self, PyObject *args); -PyObject *check_version_exact(PyObject *self, PyObject *args); -PyObject *check_version(PyObject *self, PyObject *args); -PyObject *check_version_ext(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LASSO_H__ */ diff --git a/python/utils.c b/python/utils.c deleted file mode 100644 index 0bd768e5..00000000 --- a/python/utils.c +++ /dev/null @@ -1,101 +0,0 @@ -/* $Id$ - * - * PyLasso - Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include <stdarg.h> - -#include "utils.h" - -int CheckArgs(PyObject *args, char *format) { - PyObject *obj; - int i, nb_args; - - nb_args = PyTuple_GET_SIZE(args); - - /* lowercase means that arg is optional */ - /* O : Instance */ - /* C : Callable */ - /* S : String */ - /* I : Integer */ - /* F : File */ - for (i = 0; i < nb_args; i++) { - obj = PyTuple_GET_ITEM(args, i); - /* O or o : instance */ - if (format[i] == 'O' || format[i] == 'o') { - if (!PyInstance_Check(obj)) { - if (format[i] == 'o' && obj == Py_None) continue; - PyErr_Format(lasso_error, - "%s() argument %d must be an instance.", - format + nb_args, i+1); - return 0; - } - } - /* C or c : callable */ - else if (format[i] == 'C' || format[i] == 'c') { - if (!PyCallable_Check(obj)) { - if (format[i] == 'c' && obj == Py_None) continue; - PyErr_Format(lasso_error, - "%s() argument %d must be callable.", - format + nb_args, i+1); - return 0; - } - } - /* S or s : string */ - else if (format[i] == 'S' || format[i] == 's') { - if (!PyString_Check(obj)) { - if (format[i] == 's' && obj == Py_None) continue; - PyErr_Format(lasso_error, - "%s() argument %d must be a string.", - format + nb_args, i+1); - return 0; - } - } - /* I or i : integer */ - else if (format[i] == 'I' || format[i] == 'i') { - if (!PyInt_Check(obj)) { - if (format[i] == 'i' && obj == Py_None) continue; - PyErr_Format(lasso_error, - "%s() argument %d must be an integer.", - format + nb_args, i+1); - return 0; - } - } - /* F or f : file */ - else if (format[i] == 'F' || format[i] == 'f') { - if (!PyFile_Check(obj)) { - if (format[i] == 'f' && obj == Py_None) continue; - PyErr_Format(lasso_error, - "%s() argument %d must be a file.", - format + nb_args, i+1); - return 0; - } - } - /* type is variable */ - else if (format[i] == '?') { - continue; - } - } - - return 1; -} diff --git a/python/utils.h b/python/utils.h deleted file mode 100644 index 9f5be831..00000000 --- a/python/utils.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __PYLASSO_UTILS_H__ -#define __PYLASSO_UTILS_H__ - -#undef _POSIX_C_SOURCE -#include <Python.h> - -extern PyObject *lasso_error; - -int CheckArgs(PyObject *args, char *format); - -#endif /* __PYLASSO_UTILS_H__ */ diff --git a/python/wrap_objs.c b/python/wrap_objs.c deleted file mode 100644 index 6ca35ee8..00000000 --- a/python/wrap_objs.c +++ /dev/null @@ -1,204 +0,0 @@ -#include "wrap_objs.h" - -/*****************************************************************************/ -/* Functions to wrap Python objects -> C objects */ -/*****************************************************************************/ - -xmlChar** PythonStringList_get(PyObject *list_obj) { - int i; - xmlChar **list = NULL; - - if (list_obj == Py_None) return NULL; - - /* convert Python list into a NULL terminated C list */ - list = (xmlChar **) xmlMalloc ((PyList_Size(list_obj)+1)*sizeof (xmlChar *)); - for (i=0; i<PyList_Size(list_obj); i++) - list[i] = PyString_AsString(PyList_GetItem(list_obj, i)); - list[i] = NULL; - - return list; -} - -GPtrArray* GPtrArray_get(PyObject *list_obj) { - int i; - GPtrArray *list = NULL; - - if (list_obj == Py_None) return NULL; - - /* convert Python list into a GLib GPtrArray */ - list = g_ptr_array_new(); - for (i=0; i<PyList_Size(list_obj); i++) { - g_ptr_array_add(list, PyString_AsString(PyList_GetItem(list_obj, i))); - } - - return list; -} - -/*****************************************************************************/ -/* Functions to wrap C objects -> Python objects */ -/*****************************************************************************/ - -PyObject *int_wrap(int val) { - return (Py_BuildValue("i", val)); -} - -PyObject *charPtr_wrap(char *str) { - PyObject *ret; - - if (str == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyString_FromString(str); - /* deallocation */ - free (str); - - return (ret); -} - -PyObject *charPtrConst_wrap(const char *str) { - PyObject *ret; - - if (str == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyString_FromString(str); - return (ret); -} - -/*****************************************************************************/ -/* Functions to wrap GLib objects -> Python objects */ -/*****************************************************************************/ - -PyObject* GPtrArray_wrap(GPtrArray *array) { - PyObject *list; - int i; - - list = PyList_New(array->len); - for (i=0; i<array->len; i++) { - /* PyList_SetItem(list, i, */ - /* PyString_FromString((char *) g_ptr_array_index(array, i))); */ - PyList_SET_ITEM(list, i, - PyString_FromString((char *) g_ptr_array_index(array, i))); - } - - /* free array */ - /* for (i=0; i<array->len; i++) { */ - /* xmlFree(array->pdata[i]); */ - /* } */ - /* g_ptr_array_free(array, TRUE); */ - - return (list); -} - -/*****************************************************************************/ -/* Functions to wrap LibXML objects -> Python objects */ -/*****************************************************************************/ - -PyObject* xmlCharPtr_wrap(xmlChar *str) { - PyObject *ret; - - if (str == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyString_FromString((char *) str); - /* deallocation */ - xmlFree(str); - return (ret); -} - -PyObject *xmlCharPtrConst_wrap(const xmlChar *str) { - PyObject *ret; - - if (str == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyString_FromString((char *) str); - return (ret); -} - -PyObject *wrap_xmlDocPtr(xmlDocPtr doc) { - PyObject *ret; - - if (doc == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) doc, (char *) "xmlDocPtr", NULL); - return (ret); -} - -PyObject *wrap_xmlNodePtr(xmlNodePtr node) { - PyObject *ret; - - if (node == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "xmlNodePtr", NULL); - return (ret); -} - -PyObject *wrap_xmlNodeSetPtr(xmlNodeSetPtr nset) { - PyObject *ret; - - if (nset == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) nset, (char *) "xmlNodeSetPtr", NULL); - return (ret); -} - -PyObject *wrap_xmlOutputBufferPtr(xmlOutputBufferPtr buf) { - PyObject *ret; - - if (buf == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) buf, - (char *) "xmlOutputBufferPtr", NULL); - return (ret); -} - -/*****************************************************************************/ -/* Functions to wrap XMLSec objects -> Python objects */ -/*****************************************************************************/ - -PyObject *wrap_xmlSecPtr(xmlSecPtr ptr) { - PyObject *ret; - - if (ptr == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = (PyCObject_FromVoidPtr((void *) ptr, NULL)); - return (ret); -} - -PyObject *wrap_xmlSecBytePtr(xmlSecByte *str) { - PyObject *ret; - - if (str == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyString_FromString(str); - xmlFree(str); - return (ret); -} - -PyObject *wrap_xmlSecBytePtrConst(const xmlSecByte *str) { - PyObject *ret; - - if (str == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyString_FromString(str); - return (ret); -} diff --git a/python/wrap_objs.h b/python/wrap_objs.h deleted file mode 100644 index 7b2e5e62..00000000 --- a/python/wrap_objs.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef __PYXMLSEC_WRAP_OBJS_H__ -#define __PYXMLSEC_WRAP_OBJS_H__ - -#undef _POSIX_C_SOURCE -#include <Python.h> - -#include <lasso/lasso.h> - -typedef struct { - PyObject_HEAD - xmlDocPtr obj; -} xmlDocPtr_object; - -typedef struct { - PyObject_HEAD - xmlNodePtr obj; -} xmlNodePtr_object; - -typedef struct { - PyObject_HEAD - xmlOutputBufferPtr obj; -} xmlOutputBufferPtr_object; - -typedef struct { - PyObject_HEAD - xmlNodeSetPtr obj; -} xmlNodeSetPtr_object; - -typedef struct { - PyObject_HEAD - xmlSecPtr obj; -} xmlSecPtr_object; - -typedef struct { - PyObject_HEAD - gpointer *obj; -} gpointer_object; - -/* Functions to wrap LibXML Python objects -> LibXML C objects */ -#define xmlDocPtr_get(v) (((v) == Py_None) ? NULL : (((xmlDocPtr_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -#define xmlNodePtr_get(v) (((v) == Py_None) ? NULL : (((xmlNodePtr_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -#define xmlNodeSetPtr_get(v) (((v) == Py_None) ? NULL : (((xmlNodeSetPtr_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -#define xmlOutputBufferPtr_get(v) (((v) == Py_None) ? NULL : (((xmlOutputBufferPtr_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -#define gpointer_get(v) (((v) == Py_None) ? NULL : (((gpointer_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) - -/* Functions to wrap XMLSec Python objects -> XMLSec C objects */ -#define xmlSecPtr_get(v) (((v) == Py_None) ? NULL : (((xmlSecPtr_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) - -/* Functions to wrap Python objects -> C objects */ -#define PythonFile_get(v) (((v) == Py_None) ? NULL : (PyFile_Check(v) ? (PyFile_AsFile(v)) : stdout)) - -xmlChar** PythonStringList_get(PyObject *list_obj); -GPtrArray* GPtrArray_get(PyObject *list_obj); - -PyObject *int_wrap(int val); -PyObject *charPtr_wrap(char *str); -PyObject *charPtrConst_wrap(const char *str); - -PyObject* GPtrArray_wrap(GPtrArray *array); - -PyObject *xmlCharPtr_wrap(xmlChar *str); -PyObject *xmlCharPtrConst_wrap(const xmlChar *str); -PyObject *wrap_xmlDocPtr(xmlDocPtr doc); -PyObject *wrap_xmlNodePtr(xmlNodePtr node); -PyObject *wrap_xmlNodeSetPtr(xmlNodeSetPtr nset); -PyObject *wrap_xmlOutputBufferPtr(xmlOutputBufferPtr buf); - -PyObject *wrap_xmlSecPtr(xmlSecPtr ptr); -PyObject *wrap_xmlSecBytePtr(xmlSecByte *str); -PyObject *wrap_xmlSecBytePtrConst(const xmlSecByte *str); - -#endif /* __PYXMLSEC_WRAP_OBJS_H__ */ diff --git a/python/xml/.cvsignore b/python/xml/.cvsignore deleted file mode 100644 index 09653e95..00000000 --- a/python/xml/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -.deps -Makefile -Makefile.in - diff --git a/python/xml/Makefile.am b/python/xml/Makefile.am deleted file mode 100644 index 6e8c0521..00000000 --- a/python/xml/Makefile.am +++ /dev/null @@ -1,43 +0,0 @@ -XMLSOURCES = \ - py_lib_authentication_statement.c \ - py_lib_authn_request.c \ - py_lib_federation_termination_notification.c \ - py_lib_logout_request.c \ - py_lib_logout_response.c \ - py_lib_name_identifier_mapping_request.c \ - py_lib_name_identifier_mapping_response.c \ - py_lib_register_name_identifier_request.c \ - py_saml_assertion.c \ - py_saml_authentication_statement.c \ - py_saml_name_identifier.c \ - py_samlp_response.c \ - py_xml.c - -noinst_LTLIBRARIES = libxml.la -libxml_la_SOURCES = $(XMLSOURCES) - -INCLUDES = \ - -DPACKAGE=\"@PACKAGE@\" \ - -I$(top_srcdir) \ - -I$(top_srcdir)/lasso \ - $(LASSO_DEFINES) \ - $(LASSO_CFLAGS) \ - $(PY_CFLAGS) \ - $(NULL) - -EXTRA_DIST = \ - $(XMLSOURCES) \ - py_lib_authentication_statement.h \ - py_lib_authn_request.h \ - py_lib_federation_termination_notification.h \ - py_lib_logout_request.h \ - py_lib_logout_response.h \ - py_lib_name_identifier_mapping_request.h \ - py_lib_name_identifier_mapping_response.h \ - py_lib_register_name_identifier_request.h \ - py_saml_assertion.h \ - py_saml_authentication_statement.h \ - py_saml_name_identifier.h \ - py_samlp_response.h \ - py_xml.h - diff --git a/python/xml/py_lib_authentication_statement.c b/python/xml/py_lib_authentication_statement.c deleted file mode 100644 index c647f79c..00000000 --- a/python/xml/py_lib_authentication_statement.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_lib_authentication_statement.h" - -PyObject *LassoLibAuthenticationStatement_wrap(LassoLibAuthenticationStatement *node) { - PyObject *ret; - - if (node == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) node, - (char *) "LassoLibAuthenticationStatement *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_authentication_statement_new(PyObject *self, PyObject *args) { - LassoNode *node; - - node = lasso_lib_authentication_statement_new(); - - return (LassoLibAuthenticationStatement_wrap(LASSO_LIB_AUTHENTICATION_STATEMENT(node))); -} - -PyObject *lib_authentication_statement_set_sessionIndex(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *sessionIndex; - - if (CheckArgs(args, "OS:lib_authentication_statement_set_sessionIndex")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_authentication_statement_set_sessionIndex", - &node_obj, &sessionIndex)) - return NULL; - } - else return NULL; - - lasso_lib_authentication_statement_set_sessionIndex(LassoLibAuthenticationStatement_get(node_obj), - sessionIndex); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_lib_authentication_statement.h b/python/xml/py_lib_authentication_statement.h deleted file mode 100644 index 087af4b7..00000000 --- a/python/xml/py_lib_authentication_statement.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LIB_AUTHENTICATION_STATEMENT_H__ -#define __PYLASSO_PY_LIB_AUTHENTICATION_STATEMENT_H__ - -#include <lasso/xml/lib_authentication_statement.h> - -typedef struct { - PyObject_HEAD - LassoLibAuthenticationStatement *obj; -} LassoLibAuthenticationStatement_object; - -#define LassoLibAuthenticationStatement_get(v) (((v) == Py_None) ? NULL : (((LassoLibAuthenticationStatement_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibAuthenticationStatement_wrap(LassoLibAuthenticationStatement *statement); - -PyObject *lib_authentication_statement_new(PyObject *self, PyObject *args); -PyObject *lib_authentication_statement_set_sessionIndex(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_AUTHENTICATION_STATEMENT_H__ */ diff --git a/python/xml/py_lib_authn_request.c b/python/xml/py_lib_authn_request.c deleted file mode 100644 index 81c80da3..00000000 --- a/python/xml/py_lib_authn_request.c +++ /dev/null @@ -1,158 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_lib_authn_request.h" - -PyObject *LassoLibAuthnRequest_wrap(LassoLibAuthnRequest *request) { - PyObject *ret; - - if (request == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) request, - (char *) "LassoLibAuthnRequest *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_authn_request_new(PyObject *self, PyObject *args) { - LassoNode *request; - - request = lasso_lib_authn_request_new(); - - return (LassoLibAuthnRequest_wrap(LASSO_LIB_AUTHN_REQUEST(request))); -} - -PyObject *lib_authn_request_set_consent(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *consent; - - if (CheckArgs(args, "OS:lib_authn_request_set_consent")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_authn_request_set_forceAuthn", - &node_obj, &consent)) - return NULL; - } - else return NULL; - - lasso_lib_authn_request_set_consent(LassoLibAuthnRequest_get(node_obj), - consent); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_authn_request_set_forceAuthn(PyObject *self, PyObject *args) { - PyObject *node_obj; - gint forceAuthn; - - if (CheckArgs(args, "OI:lib_authn_request_set_forceAuthn")) { - if(!PyArg_ParseTuple(args, (char *) "Oi:lib_authn_request_set_forceAuthn", - &node_obj, &forceAuthn)) - return NULL; - } - else return NULL; - - lasso_lib_authn_request_set_forceAuthn(LassoLibAuthnRequest_get(node_obj), - forceAuthn); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_authn_request_set_isPassive(PyObject *self, PyObject *args) { - PyObject *node_obj; - gint isPassive; - - if (CheckArgs(args, "OI:lib_authn_request_set_isPassive")) { - if(!PyArg_ParseTuple(args, (char *) "Oi:lib_authn_request_set_isPassive", - &node_obj, &isPassive)) - return NULL; - } - else return NULL; - - lasso_lib_authn_request_set_isPassive(LassoLibAuthnRequest_get(node_obj), - isPassive); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_authn_request_set_nameIDPolicy(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *nameIDPolicy; - - if (CheckArgs(args, "OS:lib_authn_request_set_nameIDPolicy")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_authn_request_set_nameIDPolicy", - &node_obj, &nameIDPolicy)) - return NULL; - } - else return NULL; - - lasso_lib_authn_request_set_nameIDPolicy(LassoLibAuthnRequest_get(node_obj), - nameIDPolicy); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_authn_request_set_protocolProfile(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *protocolProfile; - - if (CheckArgs(args, "OS:lib_authn_request_set_protocolProfile")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_authn_request_set_protocolProfile", - &node_obj, &protocolProfile)) - return NULL; - } - else return NULL; - - lasso_lib_authn_request_set_protocolProfile(LassoLibAuthnRequest_get(node_obj), - protocolProfile); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_authn_request_set_relayState(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *relayState; - - if (CheckArgs(args, "OS:lib_authn_request_set_relayState")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_authn_request_set_relayState", - &node_obj, &relayState)) - return NULL; - } - else return NULL; - - lasso_lib_authn_request_set_relayState(LassoLibAuthnRequest_get(node_obj), - relayState); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_lib_authn_request.h b/python/xml/py_lib_authn_request.h deleted file mode 100644 index 604cb9be..00000000 --- a/python/xml/py_lib_authn_request.h +++ /dev/null @@ -1,47 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LIB_AUTHN_REQUEST_H__ -#define __PYLASSO_PY_LIB_AUTHN_REQUEST_H__ - -#include <lasso/xml/lib_authn_request.h> - -typedef struct { - PyObject_HEAD - LassoLibAuthnRequest *obj; -} LassoLibAuthnRequest_object; - -#define LassoLibAuthnRequest_get(v) (((v) == Py_None) ? NULL : (((LassoLibAuthnRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibAuthnRequest_wrap(LassoLibAuthnRequest *request); - -PyObject *lib_authn_request_new(PyObject *self, PyObject *args); -PyObject *lib_authn_request_set_consent(PyObject *self, PyObject *args); -PyObject *lib_authn_request_set_forceAuthn(PyObject *self, PyObject *args); -PyObject *lib_authn_request_set_isPassive(PyObject *self, PyObject *args); -PyObject *lib_authn_request_set_nameIDPolicy(PyObject *self, PyObject *args); -PyObject *lib_authn_request_set_protocolProfile(PyObject *self, PyObject *args); -PyObject *lib_authn_request_set_relayState(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_AUTHN_REQUEST_H__ */ diff --git a/python/xml/py_lib_authn_response.c b/python/xml/py_lib_authn_response.c deleted file mode 100644 index b94f9ffc..00000000 --- a/python/xml/py_lib_authn_response.c +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - - -#include "../lassomod.h" - -#include "py_lib_authn_response.h" - -PyObject *LassoLibAuthnResponse_wrap(LassoLibAuthnResponse *response) { - PyObject *ret; - - if (response == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) response, - (char *) "LassoLibAuthnResponse *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_authn_response_new(PyObject *self, PyObject *args) { - LassoNode *response; - - response = lasso_lib_authn_response_new(); - - return (LassoLibAuthnResponse_wrap(LASSO_LIB_AUTHN_RESPONSE(response))); -} - -PyObject *lib_authn_response_set_relayState(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *relayState; - - if (CheckArgs(args, "OS:lib_authn_response_set_relayState")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_authn_response_set_relayState", - &node_obj, &relayState)) - return NULL; - } - else return NULL; - - lasso_lib_authn_response_set_relayState(LassoLibAuthnResponse_get(node_obj), - relayState); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_lib_authn_response.h b/python/xml/py_lib_authn_response.h deleted file mode 100644 index 9fd2d4c8..00000000 --- a/python/xml/py_lib_authn_response.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LIB_AUTHN_RESPONSE_H__ -#define __PYLASSO_PY_LIB_AUTHN_RESPONSE_H__ - -#include <lasso/xml/lib_authn_response.h> - -typedef struct { - PyObject_HEAD - LassoLibAuthnResponse *obj; -} LassoLibAuthnResponse_object; - -#define LassoLibAuthnResponse_get(v) (((v) == Py_None) ? NULL : (((LassoLibAuthnResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibAuthnResponse_wrap(LassoLibAuthnResponse *response); - -PyObject *lib_authn_response_new(PyObject *self, PyObject *args); -PyObject *lib_authn_response_add_assertion(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_AUTHN_RESPONSE_H__ */ diff --git a/python/xml/py_lib_federation_termination_notification.c b/python/xml/py_lib_federation_termination_notification.c deleted file mode 100644 index 3efd5ee8..00000000 --- a/python/xml/py_lib_federation_termination_notification.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_lib_federation_termination_notification.h" - -PyObject *LassoLibFederationTerminationNotification_wrap(LassoLibFederationTerminationNotification *notification) { - PyObject *ret; - - if (notification == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) notification, - (char *) "LassoLibFederationTerminationNotification *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_federation_termination_notification_new(PyObject *self, PyObject *args) { - LassoNode *node; - - node = lasso_lib_federation_termination_notification_new(); - - return (LassoLibFederationTerminationNotification_wrap(LASSO_LIB_FEDERATION_TERMINATION_NOTIFICATION(node))); -} - -PyObject *lib_federation_termination_notification_set_consent(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *consent; - - if (CheckArgs(args, "OS:lib_federation_termination_notification_set_consent")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_federation_termination_notification_set_consent", - &node_obj, &consent)) - return NULL; - } - else return NULL; - - lasso_lib_federation_termination_notification_set_consent(LassoLibFederationTerminationNotification_get(node_obj), - consent); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_lib_federation_termination_notification.h b/python/xml/py_lib_federation_termination_notification.h deleted file mode 100644 index 33a8e452..00000000 --- a/python/xml/py_lib_federation_termination_notification.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_LIB_FEDERATION_TERMINATION_NOTIFICATION_H__ -#define __PYLASSO_PY_LIB_FEDERATION_TERMINATION_NOTIFICATION_H__ - -#include <lasso/xml/lib_federation_termination_notification.h> - -typedef struct { - PyObject_HEAD - LassoLibFederationTerminationNotification *obj; -} LassoLibFederationTerminationNotification_object; - -#define LassoLibFederationTerminationNotification_get(v) (((v) == Py_None) ? NULL : (((LassoLibFederationTerminationNotification_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibFederationTerminationNotification_wrap(LassoLibFederationTerminationNotification *notification); - -PyObject *lib_federation_termination_notification_new(PyObject *self, PyObject *args); -PyObject *lib_federation_termination_notification_set_consent(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_FEDERATION_TERMINATION_NOTIFICATION_H__ */ diff --git a/python/xml/py_lib_logout_request.c b/python/xml/py_lib_logout_request.c deleted file mode 100644 index b88bc4cb..00000000 --- a/python/xml/py_lib_logout_request.c +++ /dev/null @@ -1,140 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_lib_logout_request.h" -#include "py_saml_name_identifier.h" - -PyObject *LassoLibLogoutRequest_wrap(LassoLibLogoutRequest *request) { - PyObject *ret; - - if (request == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) request, - (char *) "LassoLibLogoutRequest *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_logout_request_new(PyObject *self, PyObject *args) { - LassoNode *request; - - request = lasso_lib_logout_request_new(); - - return (LassoLibLogoutRequest_wrap(LASSO_LIB_LOGOUT_REQUEST(request))); -} - -PyObject *lib_logout_request_set_consent(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *consent; - - if (CheckArgs(args, "OS:lib_logout_request_set_consent")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_logout_request_set_consent", - &node_obj, &consent)) - return NULL; - } - else return NULL; - - lasso_lib_logout_request_set_consent(LassoLibLogoutRequest_get(node_obj), - consent); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_logout_request_set_nameIdentifier(PyObject *self, PyObject *args) { - PyObject *node_obj, *nameIdentifier_obj; - - if (CheckArgs(args, "OO:lib_logout_request_set_nameIdentifier")) { - if(!PyArg_ParseTuple(args, (char *) "OO:lib_logout_request_set_nameIdentifier", - &node_obj, &nameIdentifier_obj)) - return NULL; - } - else return NULL; - - lasso_lib_logout_request_set_nameIdentifier(LassoLibLogoutRequest_get(node_obj), - LassoSamlNameIdentifier_get(nameIdentifier_obj)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_logout_request_set_providerID(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *providerID; - - if (CheckArgs(args, "OS:lib_logout_request_set_providerID")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_logout_request_set_providerID", - &node_obj, &providerID)) - return NULL; - } - else return NULL; - - lasso_lib_logout_request_set_providerID(LassoLibLogoutRequest_get(node_obj), - providerID); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_logout_request_set_relayState(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *relayState; - - if (CheckArgs(args, "OS:lib_logout_request_set_relayState")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_logout_request_set_relayState", - &node_obj, &relayState)) - return NULL; - } - else return NULL; - - lasso_lib_logout_request_set_relayState(LassoLibLogoutRequest_get(node_obj), - relayState); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *lib_logout_request_set_sessionIndex(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *sessionIndex; - - if (CheckArgs(args, "OS:lib_logout_request_set_sessionIndex")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_logout_request_set_sessionIndex", - &node_obj, &sessionIndex)) - return NULL; - } - else return NULL; - - lasso_lib_logout_request_set_sessionIndex(LassoLibLogoutRequest_get(node_obj), - sessionIndex); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_lib_logout_request.h b/python/xml/py_lib_logout_request.h deleted file mode 100644 index 6c665d7b..00000000 --- a/python/xml/py_lib_logout_request.h +++ /dev/null @@ -1,46 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LIB_LOGOUT_REQUEST_H__ -#define __PYLASSO_PY_LIB_LOGOUT_REQUEST_H__ - -#include <lasso/xml/lib_logout_request.h> - -typedef struct { - PyObject_HEAD - LassoLibLogoutRequest *obj; -} LassoLibLogoutRequest_object; - -#define LassoLibLogoutRequest_get(v) (((v) == Py_None) ? NULL : (((LassoLibLogoutRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibLogoutRequest_wrap(LassoLibLogoutRequest *request); - -PyObject *lib_logout_request_new(PyObject *self, PyObject *args); -PyObject *lib_logout_request_set_consent(PyObject *self, PyObject *args); -PyObject *lib_logout_request_set_nameIdentifier(PyObject *self, PyObject *args); -PyObject *lib_logout_request_set_providerID(PyObject *self, PyObject *args); -PyObject *lib_logout_request_set_relayState(PyObject *self, PyObject *args); -PyObject *lib_logout_request_set_sessionIndex(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_LOGOUT_REQUEST_H__ */ diff --git a/python/xml/py_lib_logout_response.c b/python/xml/py_lib_logout_response.c deleted file mode 100644 index 74c41ec8..00000000 --- a/python/xml/py_lib_logout_response.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_lib_logout_response.h" - -PyObject *LassoLibLogoutResponse_wrap(LassoLibLogoutResponse *response) { - PyObject *ret; - - if (response == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) response, - (char *) "LassoLibLogoutResponse *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_logout_response_new(PyObject *self, PyObject *args) { - LassoNode *response; - - response = lasso_lib_logout_response_new(); - - return (LassoLibLogoutResponse_wrap(LASSO_LIB_LOGOUT_RESPONSE(response))); -} diff --git a/python/xml/py_lib_logout_response.h b/python/xml/py_lib_logout_response.h deleted file mode 100644 index fabcf871..00000000 --- a/python/xml/py_lib_logout_response.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_LIB_LOGOUT_RESPONSE_H__ -#define __PYLASSO_PY_LIB_LOGOUT_RESPONSE_H__ - -#include <lasso/xml/lib_logout_response.h> - -typedef struct { - PyObject_HEAD - LassoLibLogoutResponse *obj; -} LassoLibLogoutResponse_object; - -#define LassoLibLogoutResponse_get(v) (((v) == Py_None) ? NULL : (((LassoLibLogoutResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibLogoutResponse_wrap(LassoLibLogoutResponse *response); - -PyObject *lib_logout_response_new(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_LOGOUT_RESPONSE_H__ */ diff --git a/python/xml/py_lib_name_identifier_mapping_request.c b/python/xml/py_lib_name_identifier_mapping_request.c deleted file mode 100644 index 36c48808..00000000 --- a/python/xml/py_lib_name_identifier_mapping_request.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_lib_name_identifier_mapping_request.h" - -PyObject *LassoLibNameIdentifierMappingRequest_wrap(LassoLibNameIdentifierMappingRequest *request) { - PyObject *ret; - - if (request == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) request, - (char *) "LassoLibNameIdentifierMappingRequest *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_name_identifier_mapping_request_new(PyObject *self, PyObject *args) { - LassoNode *node; - - node = lasso_lib_name_identifier_mapping_request_new(); - - return (LassoLibNameIdentifierMappingRequest_wrap(LASSO_LIB_NAME_IDENTIFIER_MAPPING_REQUEST(node))); -} - -PyObject *lib_name_identifier_mapping_request_set_consent(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *consent; - - if (CheckArgs(args, "OS:lib_name_identifier_mapping_request_set_consent")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_name_identifier_mapping_request_set_consent", - &node_obj, &consent)) - return NULL; - } - else return NULL; - - lasso_lib_name_identifier_mapping_request_set_consent(LassoLibNameIdentifierMappingRequest_get(node_obj), - consent); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_lib_name_identifier_mapping_request.h b/python/xml/py_lib_name_identifier_mapping_request.h deleted file mode 100644 index b37649d9..00000000 --- a/python/xml/py_lib_name_identifier_mapping_request.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_LIB_NAME_IDENTIFIER_MAPPING_REQUEST_H__ -#define __PYLASSO_PY_LIB_NAME_IDENTIFIER_MAPPING_REQUEST_H__ - -#include <lasso/xml/lib_name_identifier_mapping_request.h> - -typedef struct { - PyObject_HEAD - LassoLibNameIdentifierMappingRequest *obj; -} LassoLibNameIdentifierMappingRequest_object; - -#define LassoLibNameIdentifierMappingRequest_get(v) (((v) == Py_None) ? NULL : (((LassoLibNameIdentifierMappingRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibNameIdentifierMappingRequest_wrap(LassoLibNameIdentifierMappingRequest *request); - -PyObject *lib_name_identifier_mapping_request_new(PyObject *self, PyObject *args); -PyObject *lib_name_identifier_mapping_request_set_consent(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_NAME_IDENTIFIER_MAPPING_REQUEST_H__ */ diff --git a/python/xml/py_lib_name_identifier_mapping_response.c b/python/xml/py_lib_name_identifier_mapping_response.c deleted file mode 100644 index 239185a0..00000000 --- a/python/xml/py_lib_name_identifier_mapping_response.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_lib_name_identifier_mapping_response.h" - -PyObject *LassoLibNameIdentifierMappingResponse_wrap(LassoLibNameIdentifierMappingResponse *response) { - PyObject *ret; - - if (response == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) response, - (char *) "LassoLibNameIdentifierMappingResponse *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_name_identifier_mapping_response_new(PyObject *self, PyObject *args) { - LassoNode *response; - - response = lasso_lib_name_identifier_mapping_response_new(); - - return (LassoLibNameIdentifierMappingResponse_wrap(LASSO_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE(response))); -} diff --git a/python/xml/py_lib_name_identifier_mapping_response.h b/python/xml/py_lib_name_identifier_mapping_response.h deleted file mode 100644 index 88ea30ca..00000000 --- a/python/xml/py_lib_name_identifier_mapping_response.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE_H__ -#define __PYLASSO_PY_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE_H__ - -#include <lasso/xml/lib_name_identifier_mapping_response.h> - -typedef struct { - PyObject_HEAD - LassoLibNameIdentifierMappingResponse *obj; -} LassoLibNameIdentifierMappingResponse_object; - -#define LassoLibNameIdentifierMappingResponse_get(v) (((v) == Py_None) ? NULL : (((LassoLibNameIdentifierMappingResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibNameIdentifierMappingResponse_wrap(LassoLibNameIdentifierMappingResponse *response); - -PyObject *lib_name_identifier_mapping_response_new(PyObject *self, PyObject *args); -PyObject *lib_name_identifier_mapping_response_set_consent(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_NAME_IDENTIFIER_MAPPING_RESPONSE_H__ */ diff --git a/python/xml/py_lib_register_name_identifier_request.c b/python/xml/py_lib_register_name_identifier_request.c deleted file mode 100644 index e5498163..00000000 --- a/python/xml/py_lib_register_name_identifier_request.c +++ /dev/null @@ -1,68 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_lib_register_name_identifier_request.h" - -PyObject *LassoLibRegisterNameIdentifierRequest_wrap(LassoLibRegisterNameIdentifierRequest *request) { - PyObject *ret; - - if (request == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) request, - (char *) "LassoLibRegisterNameIdentifierRequest *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *lib_register_name_identifier_request_new(PyObject *self, PyObject *args) { - LassoNode *node; - - node = lasso_lib_register_name_identifier_request_new(); - - return (LassoLibRegisterNameIdentifierRequest_wrap(LASSO_LIB_REGISTER_NAME_IDENTIFIER_REQUEST(node))); -} - -PyObject *lib_register_name_identifier_request_set_relayState(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *relayState; - - if (CheckArgs(args, "OS:lib_register_name_identifier_request_set_relayState")) { - if(!PyArg_ParseTuple(args, (char *) "Os:lib_register_name_identifier_request_set_relayState", - &node_obj, &relayState)) - return NULL; - } - else return NULL; - - lasso_lib_register_name_identifier_request_set_relayState(LassoLibRegisterNameIdentifierRequest_get(node_obj), - relayState); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_lib_register_name_identifier_request.h b/python/xml/py_lib_register_name_identifier_request.h deleted file mode 100644 index 64684edb..00000000 --- a/python/xml/py_lib_register_name_identifier_request.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Author: Valery Febvre <vfebvre@easter-eggs.com> - * Nicolas Clapies <nclapies@entrouvert.com> - * - * 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 __PYLASSO_PY_LIB_REGISTER_NAME_IDENTIFIER_REQUEST_H__ -#define __PYLASSO_PY_LIB_REGISTER_NAME_IDENTIFIER_REQUEST_H__ - -#include <lasso/xml/lib_register_name_identifier_request.h> - -typedef struct { - PyObject_HEAD - LassoLibRegisterNameIdentifierRequest *obj; -} LassoLibRegisterNameIdentifierRequest_object; - -#define LassoLibRegisterNameIdentifierRequest_get(v) (((v) == Py_None) ? NULL : (((LassoLibRegisterNameIdentifierRequest_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoLibRegisterNameIdentifierRequest_wrap(LassoLibRegisterNameIdentifierRequest *request); - -PyObject *lib_register_name_identifier_request_new(PyObject *self, PyObject *args); -PyObject *lib_register_name_identifier_request_set_relayState(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_LIB_REGISTER_NAME_IDENTIFIER_REQUEST_H__ */ diff --git a/python/xml/py_saml_assertion.c b/python/xml/py_saml_assertion.c deleted file mode 100644 index 7faa0c59..00000000 --- a/python/xml/py_saml_assertion.c +++ /dev/null @@ -1,91 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_saml_assertion.h" -#include "py_saml_authentication_statement.h" - -PyObject *LassoSamlAssertion_wrap(LassoSamlAssertion *node) { - PyObject *ret; - - if (node == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) node, - (char *) "LassoSamlAssertion *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *saml_assertion_new(PyObject *self, PyObject *args) { - LassoNode *node; - - node = lasso_saml_assertion_new(); - - return (LassoSamlAssertion_wrap(LASSO_SAML_ASSERTION(node))); -} - -PyObject *saml_assertion_add_authenticationStatement(PyObject *self, PyObject *args) { - PyObject *node_obj, *authenticationStatement_obj; - - if (CheckArgs(args, "OO:saml_assertion_add_authenticationStatement")) { - if(!PyArg_ParseTuple(args, (char *) "OO:saml_assertion_add_authenticationStatement", - &node_obj, &authenticationStatement_obj)) - return NULL; - } - else return NULL; - - lasso_saml_assertion_add_authenticationStatement(LassoSamlAssertion_get(node_obj), - LassoSamlAuthenticationStatement_get(authenticationStatement_obj)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *saml_assertion_set_signature(PyObject *self, PyObject *args) { - PyObject *node_obj; - gint sign_method; - const xmlChar *private_key_file; - const xmlChar *certificate_file; - int ret; - - if (CheckArgs(args, "OISS:saml_assertion_set_signature")) { - if(!PyArg_ParseTuple(args, (char *) "Oiss:saml_assertion_set_signature", - &node_obj, &sign_method, &private_key_file, - &certificate_file)) - return NULL; - } - else return NULL; - - ret = lasso_saml_assertion_set_signature(LassoSamlAssertion_get(node_obj), - sign_method, - private_key_file, certificate_file); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_saml_assertion.h b/python/xml/py_saml_assertion.h deleted file mode 100644 index a71eddf3..00000000 --- a/python/xml/py_saml_assertion.h +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_SAML_ASSERTION_H__ -#define __PYLASSO_PY_SAML_ASSERTION_H__ - -#include <lasso/xml/saml_assertion.h> - -typedef struct { - PyObject_HEAD - LassoSamlAssertion *obj; -} LassoSamlAssertion_object; - -#define LassoSamlAssertion_get(v) (((v) == Py_None) ? NULL : (((LassoSamlAssertion_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoSamlAssertion_wrap(LassoSamlAssertion *assertion); - -PyObject *saml_assertion_new(PyObject *self, PyObject *args); -PyObject *saml_assertion_add_authenticationStatement(PyObject *self, PyObject *args); -PyObject *saml_assertion_set_signature(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_SAML_ASSERTION_H__ */ diff --git a/python/xml/py_saml_authentication_statement.c b/python/xml/py_saml_authentication_statement.c deleted file mode 100644 index 2a0a6af3..00000000 --- a/python/xml/py_saml_authentication_statement.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_saml_authentication_statement.h" - -PyObject *LassoSamlAuthenticationStatement_wrap(LassoSamlAuthenticationStatement *node) { - PyObject *ret; - - if (node == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) node, - (char *) "LassoSamlAuthenticationStatement *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *saml_authentication_statement_new(PyObject *self, PyObject *args) { - LassoNode *node; - - node = lasso_saml_authentication_statement_new(); - - return (LassoSamlAuthenticationStatement_wrap(LASSO_SAML_AUTHENTICATION_STATEMENT(node))); -} diff --git a/python/xml/py_saml_authentication_statement.h b/python/xml/py_saml_authentication_statement.h deleted file mode 100644 index a0da8f9c..00000000 --- a/python/xml/py_saml_authentication_statement.h +++ /dev/null @@ -1,41 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_SAML_AUTHENTICATION_STATEMENT_H__ -#define __PYLASSO_PY_SAML_AUTHENTICATION_STATEMENT_H__ - -#include <lasso/xml/saml_authentication_statement.h> - -typedef struct { - PyObject_HEAD - LassoSamlAuthenticationStatement *obj; -} LassoSamlAuthenticationStatement_object; - -#define LassoSamlAuthenticationStatement_get(v) (((v) == Py_None) ? NULL : (((LassoSamlAuthenticationStatement_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoSamlAuthenticationStatement_wrap(LassoSamlAuthenticationStatement *statement); - -PyObject *saml_authentication_statement_new(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_SAML_AUTHENTICATION_STATEMENT_H__ */ diff --git a/python/xml/py_saml_name_identifier.c b/python/xml/py_saml_name_identifier.c deleted file mode 100644 index 90a4027f..00000000 --- a/python/xml/py_saml_name_identifier.c +++ /dev/null @@ -1,94 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_saml_name_identifier.h" - -PyObject *LassoSamlNameIdentifier_wrap(LassoSamlNameIdentifier *node) { - PyObject *ret; - - if (node == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) node, - (char *) "LassoSamlNameIdentifier *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *saml_name_identifier_new(PyObject *self, PyObject *args) { - xmlChar *content; - LassoNode *node; - - if (CheckArgs(args, "S:saml_name_identifier_new")) { - if(!PyArg_ParseTuple(args, (char *) "s:saml_name_identifier_new", - &content)) - return NULL; - } - else return NULL; - - node = lasso_saml_name_identifier_new(content); - - return (LassoSamlNameIdentifier_wrap(LASSO_SAML_NAME_IDENTIFIER(node))); -} - -PyObject *saml_name_identifier_set_format(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *format; - - if (CheckArgs(args, "OS:saml_name_identifier_set_format")) { - if(!PyArg_ParseTuple(args, (char *) "Os:saml_name_identifier_set_format", - &node_obj, &format)) - return NULL; - } - else return NULL; - - lasso_saml_name_identifier_set_format(LASSO_SAML_NAME_IDENTIFIER(node_obj), - format); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *saml_name_identifier_set_nameQualifier(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *nameQualifier; - - if (CheckArgs(args, "OS:saml_name_identifier_set_nameQualifier")) { - if(!PyArg_ParseTuple(args, (char *) "Os:saml_name_identifier_set_nameQualifier", - &node_obj, &nameQualifier)) - return NULL; - } - else return NULL; - - lasso_saml_name_identifier_set_nameQualifier(LASSO_SAML_NAME_IDENTIFIER(node_obj), - nameQualifier); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_saml_name_identifier.h b/python/xml/py_saml_name_identifier.h deleted file mode 100644 index 410c0474..00000000 --- a/python/xml/py_saml_name_identifier.h +++ /dev/null @@ -1,43 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_SAML_NAME_IDENTIFIER_H__ -#define __PYLASSO_PY_SAML_NAME_IDENTIFIER_H__ - -#include <lasso/xml/saml_name_identifier.h> - -typedef struct { - PyObject_HEAD - LassoSamlNameIdentifier *obj; -} LassoSamlNameIdentifier_object; - -#define LassoSamlNameIdentifier_get(v) (((v) == Py_None) ? NULL : (((LassoSamlNameIdentifier_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoSamlNameIdentifier_wrap(LassoSamlNameIdentifier *identifier); - -PyObject *saml_name_identifier_new(PyObject *self, PyObject *args); -PyObject *saml_name_identifier_set_format(PyObject *self, PyObject *args); -PyObject *saml_name_identifier_set_nameQualifier(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_SAML_NAME_IDENTIFIER_H__ */ diff --git a/python/xml/py_samlp_response.c b/python/xml/py_samlp_response.c deleted file mode 100644 index c1dab9bd..00000000 --- a/python/xml/py_samlp_response.c +++ /dev/null @@ -1,67 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_samlp_response.h" - -PyObject *LassoSamlpResponse_wrap(LassoSamlpResponse *node) { - PyObject *ret; - - if (node == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) node, - (char *) "LassoSamlpResponse *", NULL); - return (ret); -} - -/******************************************************************************/ - -PyObject *samlp_response_new(PyObject *self, PyObject *args) { - LassoNode *node; - - node = lasso_samlp_response_new(); - - return (LassoSamlpResponse_wrap(LASSO_SAMLP_RESPONSE(node))); -} - -PyObject *samlp_response_add_assertion(PyObject *self, PyObject *args) { - PyObject *node_obj, *assertion_obj; - - if (CheckArgs(args, "OO:samlp_response_add_assertion")) { - if(!PyArg_ParseTuple(args, (char *) "OO:samlp_response_add_assertion", - &node_obj, &assertion_obj)) - return NULL; - } - else return NULL; - - lasso_samlp_response_add_assertion(LassoSamlpResponse_get(node_obj), - gpointer_get(assertion_obj)); - - Py_INCREF(Py_None); - return (Py_None); -} diff --git a/python/xml/py_samlp_response.h b/python/xml/py_samlp_response.h deleted file mode 100644 index 9232e7ca..00000000 --- a/python/xml/py_samlp_response.h +++ /dev/null @@ -1,42 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_SAMLP_RESPONSE_H__ -#define __PYLASSO_PY_SAMLP_RESPONSE_H__ - -#include <lasso/xml/samlp_response.h> - -typedef struct { - PyObject_HEAD - LassoSamlpResponse *obj; -} LassoSamlpResponse_object; - -#define LassoSamlpResponse_get(v) (((v) == Py_None) ? NULL : (((LassoSamlpResponse_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoSamlpResponse_wrap(LassoSamlpResponse *response); - -PyObject *samlp_response_new(PyObject *self, PyObject *args); -PyObject *samlp_response_add_assertion(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_SAMLP_RESPONSE_H__ */ diff --git a/python/xml/py_xml.c b/python/xml/py_xml.c deleted file mode 100644 index 83636187..00000000 --- a/python/xml/py_xml.c +++ /dev/null @@ -1,213 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 - */ - -#include "../lassomod.h" - -#include "py_xml.h" - -PyObject *LassoNode_wrap(LassoNode *node) { - PyObject *ret; - - if (node == NULL) { - Py_INCREF(Py_None); - return (Py_None); - } - ret = PyCObject_FromVoidPtrAndDesc((void *) node, - (char *) "LassoNode *", NULL); - return (ret); -} - -/******************************************************************************/ -/* LassoNode */ -/******************************************************************************/ - -PyObject *node_destroy(PyObject *self, PyObject *args) { - PyObject *node_obj; - - if (CheckArgs(args, "O:node_destroy")) { - if(!PyArg_ParseTuple(args, (char *) "O:node_destroy", &node_obj)) - return NULL; - } - else return NULL; - - lasso_node_destroy(LassoNode_get(node_obj)); - - Py_INCREF(Py_None); - return (Py_None); -} - -PyObject *node_dump(PyObject *self, PyObject *args) { - PyObject *node_obj; - xmlChar *encoding; - int format; - xmlChar *ret; - - if (CheckArgs(args, "OSI:node_dump")) { - if(!PyArg_ParseTuple(args, (char *) "Osi:node_dump", - &node_obj, &encoding, &format)) - return NULL; - } - else return NULL; - - ret = lasso_node_dump(LassoNode_get(node_obj), encoding, format); - - return (xmlCharPtr_wrap(ret)); -} - -PyObject *node_export(PyObject *self, PyObject *args) { - PyObject *node_obj; - xmlChar *ret; - - if (CheckArgs(args, "O:node_export")) { - if(!PyArg_ParseTuple(args, (char *) "O:node_export", &node_obj)) - return NULL; - } - else return NULL; - - ret = lasso_node_export(LassoNode_get(node_obj)); - - return (xmlCharPtr_wrap(ret)); -} - -PyObject *node_export_to_base64(PyObject *self, PyObject *args) { - PyObject *node_obj; - xmlChar *ret; - - if (CheckArgs(args, "O:node_export_to_base64")) { - if(!PyArg_ParseTuple(args, (char *) "O:node_export_to_base64", &node_obj)) - return NULL; - } - else return NULL; - - ret = lasso_node_export_to_base64(LassoNode_get(node_obj)); - - return (xmlCharPtr_wrap(ret)); -} - -PyObject *node_export_to_query(PyObject *self, PyObject *args) { - PyObject *node_obj; - guint sign_method; - const gchar *private_key_file; - gchar *ret; - - if (CheckArgs(args, "Ois:node_export_to_query")) { - if(!PyArg_ParseTuple(args, (char *) "Oiz:node_export_to_query", - &node_obj, &sign_method, &private_key_file)) - return NULL; - } - else return NULL; - - ret = lasso_node_export_to_query(LassoNode_get(node_obj), - sign_method, private_key_file); - - return (charPtr_wrap(ret)); -} - -PyObject *node_export_to_soap(PyObject *self, PyObject *args) { - PyObject *node_obj; - gchar *ret; - - if (CheckArgs(args, "O:node_export_to_soap")) { - if(!PyArg_ParseTuple(args, (char *) "O:node_export_to_soap", - &node_obj)) - return NULL; - } - else return NULL; - - ret = lasso_node_export_to_soap(LassoNode_get(node_obj)); - - return (xmlCharPtr_wrap(ret)); -} - -PyObject *node_get_attr_value(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *name; - xmlChar *ret = NULL; - - if (CheckArgs(args, "OS:node_get_attr_value")) { - if(!PyArg_ParseTuple(args, (char *) "Os:node_get_attr_value", - &node_obj, &name)) - return NULL; - } - else return NULL; - - ret = lasso_node_get_attr_value(LassoNode_get(node_obj), name, NULL); - /* FIXME generate an exception here */ - - return (xmlCharPtr_wrap(ret)); -} - -PyObject *node_get_child(PyObject *self, PyObject *args) { - PyObject *node_obj; - const xmlChar *name, *href; - LassoNode *ret; - - if (CheckArgs(args, "OSs:node_get_child")) { - if(!PyArg_ParseTuple(args, (char *) "Osz:node_get_child", - &node_obj, &name, &href)) - return NULL; - } - else return NULL; - - ret = lasso_node_get_child(LassoNode_get(node_obj), name, href, NULL); - /* FIXME generate an exception here */ - - return (LassoNode_wrap(ret)); -} - -PyObject *node_get_content(PyObject *self, PyObject *args) { - PyObject *node_obj; - xmlChar *ret; - - if (CheckArgs(args, "O:node_get_content")) { - if(!PyArg_ParseTuple(args, (char *) "O:node_get_content", - &node_obj)) - return NULL; - } - else return NULL; - - ret = lasso_node_get_content(LassoNode_get(node_obj), NULL); - /* FIXME generate an exception here */ - - return (xmlCharPtr_wrap(ret)); -} - -PyObject *node_verify_signature(PyObject *self, PyObject *args) { - PyObject *node_obj; - const gchar *certificate_file; - gint ret; - - if (CheckArgs(args, "OS:node_verify_signature")) { - if(!PyArg_ParseTuple(args, (char *) "Os:node_verify_signature", - &node_obj, &certificate_file)) - return NULL; - } - else return NULL; - - ret = lasso_node_verify_signature(LassoNode_get(node_obj), - certificate_file); - - return (int_wrap(ret)); -} diff --git a/python/xml/py_xml.h b/python/xml/py_xml.h deleted file mode 100644 index 6bf4a62b..00000000 --- a/python/xml/py_xml.h +++ /dev/null @@ -1,50 +0,0 @@ -/* $Id$ - * - * PyLasso -- Python bindings for Lasso library - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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 __PYLASSO_PY_XML_H__ -#define __PYLASSO_PY_XML_H__ - -#include "../../lasso/xml/xml.h" - -typedef struct { - PyObject_HEAD - LassoNode *obj; -} LassoNode_object; - -#define LassoNode_get(v) (((v) == Py_None) ? NULL : (((LassoNode_object *)(PyObject_GetAttr(v, PyString_FromString("_o"))))->obj)) -PyObject *LassoNode_wrap(LassoNode *node); - -PyObject *node_destroy(PyObject *self, PyObject *args); -PyObject *node_dump(PyObject *self, PyObject *args); -PyObject *node_export(PyObject *self, PyObject *args); -PyObject *node_export_to_base64(PyObject *self, PyObject *args); -PyObject *node_export_to_query(PyObject *self, PyObject *args); -PyObject *node_export_to_soap(PyObject *self, PyObject *args); -PyObject *node_get_attr_value(PyObject *self, PyObject *args); -PyObject *node_get_child(PyObject *self, PyObject *args); -PyObject *node_get_content(PyObject *self, PyObject *args); -PyObject *node_verify_signature(PyObject *self, PyObject *args); - -#endif /* __PYLASSO_PY_XML_H__ */ |
