diff options
| author | Nicolas Clapies <nclapies@entrouvert.com> | 2004-05-05 17:06:35 +0000 |
|---|---|---|
| committer | Nicolas Clapies <nclapies@entrouvert.com> | 2004-05-05 17:06:35 +0000 |
| commit | 72ae1962b53001874dfd435ce6013b111b4fac5d (patch) | |
| tree | 7c4fc90c260f6d9230f674531f24a921434b0732 /python | |
| parent | b57e1b705be534e86a4273e036ab7c94f38ff2d0 (diff) | |
| download | lasso-72ae1962b53001874dfd435ce6013b111b4fac5d.tar.gz lasso-72ae1962b53001874dfd435ce6013b111b4fac5d.tar.xz lasso-72ae1962b53001874dfd435ce6013b111b4fac5d.zip | |
binding for low level of logout request and response C class
Diffstat (limited to 'python')
| -rw-r--r-- | python/xml/py_lib_logout_response.c | 50 | ||||
| -rw-r--r-- | python/xml/py_lib_logout_response.h | 41 |
2 files changed, 91 insertions, 0 deletions
diff --git a/python/xml/py_lib_logout_response.c b/python/xml/py_lib_logout_response.c new file mode 100644 index 00000000..d86d98da --- /dev/null +++ b/python/xml/py_lib_logout_response.c @@ -0,0 +1,50 @@ +/* $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_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 new file mode 100644 index 00000000..13e4ed04 --- /dev/null +++ b/python/xml/py_lib_logout_response.h @@ -0,0 +1,41 @@ +/* $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_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__ */ |
