diff options
author | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-08-26 15:13:46 +0000 |
---|---|---|
committer | Benjamin Dauvergne <bdauvergne@entrouvert.com> | 2009-08-26 15:13:46 +0000 |
commit | 55f20515343534d990b1cd9b0986fb159b47788e (patch) | |
tree | 728dd2641371e5b62586c5413ec2e3d65ffd0519 /lasso/xml | |
parent | 59926d7545ecca45086484bd9bf60ffa7d7a8b12 (diff) | |
download | lasso-55f20515343534d990b1cd9b0986fb159b47788e.tar.gz lasso-55f20515343534d990b1cd9b0986fb159b47788e.tar.xz lasso-55f20515343534d990b1cd9b0986fb159b47788e.zip |
ID-WSF: Lots of modifications
Migrate lots of code to use new utility macros. Try to simplify most
code paths or to factorize with LassoWsfProfile.
* lasso/id-wsf/wsf_profile.c:
Add API:
- lasso_wsf_profile_build_soap_response_msg to build SOAP fault for
Lasso errors,
- lasso_wsf_profile_set_msg_url_from_description, to set the
destination URL using the chosen LassoDiscoDescription (with
respect to the security mechanism),
- lasso_wsf_profile_init_soap_response to initialize a response to
the current request, to use in sub classes,
- lasso_wsf_profile_get_remote_provider_id, retrieve the SOAP
binding corresponding information,
- lasso_wsf_profile_get_remote_provider, simplification of
lasso_wsf_profile_get_remote_provider_id,
- lasso_wsf_profile_get_soap_fault, retrieve the last setted SOAP
fault, used by sub classes,
- lasso_wsf_profile_set_soap_fault, set a SOAP fault, to be returned
by the next call by lasso_wsf_profile_build_soap_response_msg, to
use in sub classes,
- lasso_wsf_profile_set/get_status_code, set/get the stored status
code, to use in the next lasso_xxx_build_response_message, to use
in sub classes.
Change name lasso_wsf_profile_get_description_autos to
lasso_wsf_profile_get_description_auto.
Do not access directly the session is_dirty field (it has been
sealed).
* lasso/id-wsf/wsf_profile.h:
Add helper macro lasso_wsf_profile_helper_set_status to set status
code of an ID-WSF response message containing a Status element using
the stored status code.
* lasso/id-wsf/wsf_profile_private.h:
Add new fields (moved public fields).
Add lasso_wsf_profile_set_msg_url_from_description,
lasso_wsf_profile_build_soap_fault_response_msg.
* lasso/id-wsf/data_service_private.h:
Remove file.
* lasso/id-wsf/data_service.h: Remove all public fields.
* lasso/id-wsf/data_service.c:
Remove private structure. Use the equivalents LassoWsfProfile private
fields. Update documentation. Use LassoWsfProfile generic functions
for initializing requests. Add API lasso_data_service_get_query_item,
lasso_data_service_get_answers, lasso_data_service_get_answer,
lasso_data_service_get_answers_by_select,
lasso_data_service_get_answer_for_item_id,
lasso_data_service_add_modification.
Remove lasso_data_service_need_redirect_user use equivalent function
lasso_interaction_profile_service_build_redirect_response_msg. Remove
lasso_data_service_get_resource_offering,
lasso_data_service_set_offering.
* lasso/id-wsf/discovery.c:
Add documentation. Change some signatures. Remove
lasso_discovery_get_description_auto. Change name of
lasso_discovery_init_insert to lasso_discovery_init_modify. Add a
generic lasso_discovery_process_request_msg.
Add internal function lasso_discovery_init_offering, to get
automatically an offering if possible. Remove useless init_from_xml.
Rework lasso_discovery_build_credential implementation.
overloading. Remove lasso_discovery_destroy.
* lasso/id-wsf/discovery.h:
Remove lasso_discovery_destroy.
* lasso/id-wsf/interaction_profile_service.c:
Add lasso_interaction_profile_service_build_redirect_response_msg.
* lasso/id-wsf/personal_profile_service.c:
Update lasso_personal_profile_service_get_email to use
lasso_data_service_get_answers_by_select.
* lasso/xml/dst_modify.c:
make modification parameter optional to the constructor.
Diffstat (limited to 'lasso/xml')
-rw-r--r-- | lasso/xml/dst_modify.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lasso/xml/dst_modify.c b/lasso/xml/dst_modify.c index 5ac35ff9..75839b85 100644 --- a/lasso/xml/dst_modify.c +++ b/lasso/xml/dst_modify.c @@ -182,12 +182,16 @@ LassoDstModify* lasso_dst_modify_new(LassoDstModification *modification) { LassoDstModify *modify; + /* Force a warning */ + LassoDstModification *_modification = LASSO_DST_MODIFICATION(modification); g_return_val_if_fail(LASSO_IS_DST_MODIFICATION(modification) == TRUE, NULL); modify = g_object_new(LASSO_TYPE_DST_MODIFY, NULL); - modify->Modification = g_list_append(modify->Modification, modification); + if (LASSO_IS_DST_MODIFICATION(_modification)) { + modify->Modification = g_list_append(modify->Modification, _modification); + } return modify; } |