diff options
| author | Nicolas Clapies <nclapies@entrouvert.com> | 2004-04-27 13:35:41 +0000 |
|---|---|---|
| committer | Nicolas Clapies <nclapies@entrouvert.com> | 2004-04-27 13:35:41 +0000 |
| commit | c30649b1c4577bb10c62ccce85e62db889e3b1a0 (patch) | |
| tree | bb1b6b4b9865e93f26c4f0bbdad481d4b02723d6 | |
| parent | a8d4a678963c6f693fc0ed90e1a6e4151ecb1150 (diff) | |
| download | lasso-c30649b1c4577bb10c62ccce85e62db889e3b1a0.tar.gz lasso-c30649b1c4577bb10c62ccce85e62db889e3b1a0.tar.xz lasso-c30649b1c4577bb10c62ccce85e62db889e3b1a0.zip | |
add fonction to change names of attributes in identitiers
| -rw-r--r-- | lasso/Attic/protocols/register_name_identifier_request.c | 24 | ||||
| -rw-r--r-- | lasso/Attic/protocols/register_name_identifier_request.h | 25 | ||||
| -rw-r--r-- | python/lasso.py | 3 | ||||
| -rw-r--r-- | python/lassomod.c | 2 | ||||
| -rw-r--r-- | python/protocols/py_register_name_identifier_request.c | 12 | ||||
| -rw-r--r-- | python/protocols/py_register_name_identifier_request.h | 1 |
6 files changed, 56 insertions, 11 deletions
diff --git a/lasso/Attic/protocols/register_name_identifier_request.c b/lasso/Attic/protocols/register_name_identifier_request.c index f346701f..7274a733 100644 --- a/lasso/Attic/protocols/register_name_identifier_request.c +++ b/lasso/Attic/protocols/register_name_identifier_request.c @@ -26,6 +26,30 @@ #include <lasso/protocols/register_name_identifier_request.h> /*****************************************************************************/ +/* public methods */ +/*****************************************************************************/ + +void +lasso_register_name_identifier_change_attribute_names_identifiers(LassoRegisterNameIdentifierRequest *request) +{ + LassoNode *idpidentifier, *spidentifier, *oldidentifier; + + g_return_if_fail (LASSO_IS_REGISTER_NAME_IDENTIFIER_REQUEST(request)); + + idpidentifier = lasso_node_get_child(LASSO_NODE(request), "IDPProvidedNameIdentifier"); + lasso_node_rename_prop(idpidentifier, "NameQualifier", "IDPNameQualifier"); + lasso_node_rename_prop(idpidentifier, "Format", "IDPFormat"); + + spidentifier = lasso_node_get_child(LASSO_NODE(request), "SPProvidedNameIdentifier"); + lasso_node_rename_prop(spidentifier, "NameQualifier", "SPNameQualifier"); + lasso_node_rename_prop(spidentifier, "Format", "SPFormat"); + + oldidentifier = lasso_node_get_child(LASSO_NODE(request), "OldProvidedNameIdentifier"); + lasso_node_rename_prop(oldidentifier, "NameQualifier", "OldNameQualifier"); + lasso_node_rename_prop(oldidentifier, "Format", "OldFormat"); +} + +/*****************************************************************************/ /* instance and class init functions */ /*****************************************************************************/ diff --git a/lasso/Attic/protocols/register_name_identifier_request.h b/lasso/Attic/protocols/register_name_identifier_request.h index 9b49d68c..cb32085a 100644 --- a/lasso/Attic/protocols/register_name_identifier_request.h +++ b/lasso/Attic/protocols/register_name_identifier_request.h @@ -52,17 +52,20 @@ struct _LassoRegisterNameIdentifierRequestClass { LassoLibRegisterNameIdentifierRequestClass parent; }; -LASSO_EXPORT GType lasso_register_name_identifier_request_get_type (void); -LASSO_EXPORT LassoNode* lasso_register_name_identifier_request_new (const xmlChar *providerID, - const xmlChar *idpProvidedNameIdentifier, - const xmlChar *idpNameQualifier, - const xmlChar *idpFormat, - const xmlChar *spProvidedNameIdentifier, - const xmlChar *spNameQualifier, - const xmlChar *spFormat, - const xmlChar *oldProvidedNameIdentifier, - const xmlChar *oldNameQualifier, - const xmlChar *oldFormat); +LASSO_EXPORT GType lasso_register_name_identifier_request_get_type (void); + +LASSO_EXPORT LassoNode* lasso_register_name_identifier_request_new (const xmlChar *providerID, + const xmlChar *idpProvidedNameIdentifier, + const xmlChar *idpNameQualifier, + const xmlChar *idpFormat, + const xmlChar *spProvidedNameIdentifier, + const xmlChar *spNameQualifier, + const xmlChar *spFormat, + const xmlChar *oldProvidedNameIdentifier, + const xmlChar *oldNameQualifier, + const xmlChar *oldFormat); + +LASSO_EXPORT void lasso_register_name_identifier_change_attribute_names_identifiers(LassoRegisterNameIdentifierRequest *request); #ifdef __cplusplus } diff --git a/python/lasso.py b/python/lasso.py index 0ad484f8..07d7a206 100644 --- a/python/lasso.py +++ b/python/lasso.py @@ -339,6 +339,9 @@ class RegisterNameIdentifierRequest(Node): ret = Node(_obj=ret) return ret + def changeAttributeNamesIdentifiers(self): + lassomod.register_name_identifier_request_change_attribute_names_identifiers(self); + class RegisterNameIdentifierResponse(Node): def __init__(self, providerID, diff --git a/python/lassomod.c b/python/lassomod.c index 480a1578..3fb18552 100644 --- a/python/lassomod.c +++ b/python/lassomod.c @@ -61,6 +61,8 @@ static PyMethodDef lasso_methods[] = { /* py_register_name_identifier.h */ {"register_name_identifier_request_getattr", register_name_identifier_request_getattr, METH_VARARGS}, {"register_name_identifier_request", register_name_identifier_request, METH_VARARGS}, + {"register_name_identifier_request_change_attribute_names_identifiers", + register_name_identifier_request_change_attribute_names_identifiers, METH_VARARGS}, {"register_name_identifier_response_getattr", register_name_identifier_response_getattr, METH_VARARGS}, {"register_name_identifier_response", register_name_identifier_response, METH_VARARGS}, diff --git a/python/protocols/py_register_name_identifier_request.c b/python/protocols/py_register_name_identifier_request.c index 6df48e50..3c0790e8 100644 --- a/python/protocols/py_register_name_identifier_request.c +++ b/python/protocols/py_register_name_identifier_request.c @@ -94,3 +94,15 @@ PyObject *register_name_identifier_request(PyObject *self, PyObject *args) { return (lassoRegisterNameIdentifierRequest_wrap(request)); } + +PyObject *register_name_identifier_request_change_attribute_names_identifiers(PyObject *self, PyObject *args){ + PyObject *request_obj; + + if(!PyArg_ParseTuple(args, (char *) "O:register_name_identifier_request", + &request_obj)) + return NULL; + + lasso_register_name_identifier_change_attribute_names_identifiers(lassoRegisterNameIdentifierRequest_get(request_obj)); + + return (int_wrap(1)); +} diff --git a/python/protocols/py_register_name_identifier_request.h b/python/protocols/py_register_name_identifier_request.h index cb4cfc3c..14bb2f7f 100644 --- a/python/protocols/py_register_name_identifier_request.h +++ b/python/protocols/py_register_name_identifier_request.h @@ -38,5 +38,6 @@ PyObject *lassoRegisterNameIdentifierRequest_wrap(LassoRegisterNameIdentifierReq PyObject *register_name_identifier_request_getattr(PyObject *self, PyObject *args); PyObject *register_name_identifier_request(PyObject *self, PyObject *args); +PyObject *register_name_identifier_request_change_attribute_names_identifiers(PyObject *self, PyObject *args); #endif /* __PYLASSO_PY_REGISTER_NAME_IDENTIFIER_REQUEST_H__ */ |
