summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorNicolas Clapies <nclapies@entrouvert.com>2004-05-06 14:42:04 +0000
committerNicolas Clapies <nclapies@entrouvert.com>2004-05-06 14:42:04 +0000
commit71ed7f38a91309cd81daca5d2c697f21a6b646b7 (patch)
treea646595489058def5ad4a7003476a90e4338705f /python
parentd7394d35caea8fe9d256b97f194ad4e832826545 (diff)
downloadlasso-71ed7f38a91309cd81daca5d2c697f21a6b646b7.tar.gz
lasso-71ed7f38a91309cd81daca5d2c697f21a6b646b7.tar.xz
lasso-71ed7f38a91309cd81daca5d2c697f21a6b646b7.zip
add class method constructor new_from_query in LogoutResponse
Diffstat (limited to 'python')
-rw-r--r--python/lasso.py5
-rw-r--r--python/lassomod.c1
-rw-r--r--python/protocols/py_logout_response.c17
-rw-r--r--python/protocols/py_logout_response.h1
4 files changed, 24 insertions, 0 deletions
diff --git a/python/lasso.py b/python/lasso.py
index 73897f42..cc20815d 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -362,6 +362,11 @@ class LogoutResponse(LibLogoutResponse):
return LogoutResponse(obj);
new_from_request_query = classmethod(new_from_request_query)
+ def new_from_query(cls, query):
+ obj = lassomod.logout_response_new_from_query(query)
+ return LogoutResponse(obj);
+ new_from_query = classmethod(new_from_query)
+
class NameIdentifierMappingRequest(LibNameIdentifierMappingRequest):
def __init__(self, providerID, nameIdentifier, nameQualifier, format,
diff --git a/python/lassomod.c b/python/lassomod.c
index 3396e88e..62c628d1 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -138,6 +138,7 @@ static PyMethodDef lasso_methods[] = {
{"logout_response_new_from_soap", logout_response_new_from_soap, METH_VARARGS},
{"logout_response_new_from_dump", logout_response_new_from_dump, METH_VARARGS},
{"logout_response_new_from_request_query", logout_response_new_from_request_query, METH_VARARGS},
+ {"logout_response_new_from_query", logout_response_new_from_query, METH_VARARGS},
/* py_name_identifier_mapping_request.h */
{"name_identifier_mapping_request_new", name_identifier_mapping_request_new, METH_VARARGS},
diff --git a/python/protocols/py_logout_response.c b/python/protocols/py_logout_response.c
index 32a8a87d..34f535cd 100644
--- a/python/protocols/py_logout_response.c
+++ b/python/protocols/py_logout_response.c
@@ -118,3 +118,20 @@ PyObject *logout_response_new_from_request_query(PyObject *self, PyObject *args)
return (LassoLogoutResponse_wrap(LASSO_LOGOUT_RESPONSE(response)));
}
+
+PyObject *logout_response_new_from_query(PyObject *self, PyObject *args) {
+ const xmlChar *query;
+
+ LassoNode *response = NULL;
+
+ if (CheckArgs(args, "S:logout_response_new_from_request_query")) {
+ if(!PyArg_ParseTuple(args, (char *) "s:logout_response_new_from_request_query",
+ &query))
+ return NULL;
+ }
+ else return NULL;
+
+ response = lasso_logout_response_new_from_query(query);
+
+ return (LassoLogoutResponse_wrap(LASSO_LOGOUT_RESPONSE(response)));
+}
diff --git a/python/protocols/py_logout_response.h b/python/protocols/py_logout_response.h
index 2994444d..04d1d22e 100644
--- a/python/protocols/py_logout_response.h
+++ b/python/protocols/py_logout_response.h
@@ -39,5 +39,6 @@ PyObject *logout_response_new_from_request_soap(PyObject *self, PyObject *args);
PyObject *logout_response_new_from_soap(PyObject *self, PyObject *args);
PyObject *logout_response_new_from_dump(PyObject *self, PyObject *args);
PyObject *logout_response_new_from_request_query(PyObject *self, PyObject *args);
+PyObject *logout_response_new_from_query(PyObject *self, PyObject *args);
#endif /* __PYLASSO_PY_LOGOUT_RESPONSE_H__ */