summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2009-09-11 15:51:44 +0000
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2009-09-11 15:51:44 +0000
commitec01a14f54ec6685c3ab8c5e166e2fcddfe3e8df (patch)
treef95db178c98863cc844d432058796794cd13e9a7
parentacdf38fb29879b0d2be34e15c664859ef3fa22b1 (diff)
downloadlasso-ec01a14f54ec6685c3ab8c5e166e2fcddfe3e8df.tar.gz
lasso-ec01a14f54ec6685c3ab8c5e166e2fcddfe3e8df.tar.xz
lasso-ec01a14f54ec6685c3ab8c5e166e2fcddfe3e8df.zip
XML SOAP: add new soap fault constructor
* lasso/xml/soap_fault.c: * lasso/xml/soap_fault.h: add a full constructor allowing to set faultcode and faultstring in one call.
-rw-r--r--lasso/xml/soap_fault.c20
-rw-r--r--lasso/xml/soap_fault.h2
2 files changed, 20 insertions, 2 deletions
diff --git a/lasso/xml/soap_fault.c b/lasso/xml/soap_fault.c
index 146978df..6939634e 100644
--- a/lasso/xml/soap_fault.c
+++ b/lasso/xml/soap_fault.c
@@ -22,8 +22,9 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "private.h"
-#include "soap_fault.h"
+#include "./private.h"
+#include "./soap_fault.h"
+#include "../utils.h"
/**
* SECTION:soap_fault
@@ -134,3 +135,18 @@ lasso_soap_fault_new_from_message(const gchar *message)
return node;
}
+
+LassoSoapFault*
+lasso_soap_fault_new_full(const char *faultcode, const char *faultstring)
+{
+ LassoSoapFault *soap_fault;
+
+ if (! faultcode && ! faultstring)
+ return NULL;
+ soap_fault = g_object_new(LASSO_TYPE_SOAP_FAULT, NULL);
+ lasso_assign_string(soap_fault->faultcode, faultcode);
+ lasso_assign_string(soap_fault->faultstring, faultstring);
+
+ return soap_fault;
+}
+
diff --git a/lasso/xml/soap_fault.h b/lasso/xml/soap_fault.h
index 92f57a5d..144d3164 100644
--- a/lasso/xml/soap_fault.h
+++ b/lasso/xml/soap_fault.h
@@ -65,6 +65,8 @@ LASSO_EXPORT LassoSoapFault* lasso_soap_fault_new(void);
LASSO_EXPORT LassoSoapFault* lasso_soap_fault_new_from_message(const gchar *message);
+LASSO_EXPORT LassoSoapFault* lasso_soap_fault_new_full(const char *faultcode, const char *faultstring);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */