From 81b5acd5eb4528e10d3da2045ce8b0887effeabc Mon Sep 17 00:00:00 2001 From: Nicolas Clapies Date: Thu, 22 Jul 2004 09:54:05 +0000 Subject: profile context with function to parse a soap request --- python/environs/py_profile_context.c | 44 ++++++++++++++++++++++++++++++++++++ python/environs/py_profile_context.h | 35 ++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 python/environs/py_profile_context.c create mode 100644 python/environs/py_profile_context.h (limited to 'python/environs') diff --git a/python/environs/py_profile_context.c b/python/environs/py_profile_context.c new file mode 100644 index 00000000..655c2b3a --- /dev/null +++ b/python/environs/py_profile_context.c @@ -0,0 +1,44 @@ +/* $Id$ + * + * PyLasso -- Python bindings for Lasso library + * + * Copyright (C) 2004 Entr'ouvert + * http://lasso.labs.libre-entreprise.org + * + * Authors: Valery Febvre + * Nicolas Clapies + * + * 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_context.h" + +PyObject *profile_context_get_request_type_from_soap_msg(PyObject *self, PyObject *args) { + gchar *soap_buffer; + gint type; + + if (CheckArgs(args, "S:profile_context_get_request_type_from_soap_msg")) { + if(!PyArg_ParseTuple(args, (char *) "s:profile_context_get_request_type_from_soap_msg", + &soap_buffer)) + return NULL; + } + else return NULL; + + type = lasso_profile_context_get_request_type_from_soap_msg(soap_buffer); + + return(int_wrap(type)); +} + diff --git a/python/environs/py_profile_context.h b/python/environs/py_profile_context.h new file mode 100644 index 00000000..00ec0117 --- /dev/null +++ b/python/environs/py_profile_context.h @@ -0,0 +1,35 @@ +/* $Id$ + * + * PyLasso -- Python bindings for Lasso library + * + * Copyright (C) 2004 Entr'ouvert + * http://lasso.labs.libre-entreprise.org + * + * Authors: Valery Febvre + * Nicolas Clapies + * + * 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_CONTEXT_H__ +#define __PYLASSO_PY_PROFILE_CONTEXT_H__ + +#include + +PyObject *profile_context_get_request_type_from_soap_msg(PyObject *self, PyObject *args); + +#endif /* __PYLASSO_PY_PROFILE_CONTEXT_H__ */ + + -- cgit