libsoup r1017 - in branches/libsoup-2.4: . libsoup tests



Author: danw
Date: Mon Jan  7 02:01:06 2008
New Revision: 1017
URL: http://svn.gnome.org/viewvc/libsoup?rev=1017&view=rev

Log:
	* libsoup/soup-soap-message.c:
	* libsoup/soup-soap-response.c: For the second time, remove SOAP
	support from libsoup... These APIs are not really all that helpful
	in the grand scheme of SOAPiness, and are only used by the
	Evolution GroupWise backend, which can just import this code and
	integrate it better there.

	* libsoup/soup-misc.c (soup_xml_real_node): 
	* libsoup/soup-xmlrpc.c: Move soup_xml_real_node out of soup-misc
	to soup-xmlrpc, and make it private. libxml is no longer exposed
	in the public API.


Removed:
   branches/libsoup-2.4/libsoup/soup-soap-message.c
   branches/libsoup-2.4/libsoup/soup-soap-message.h
   branches/libsoup-2.4/libsoup/soup-soap-response.c
   branches/libsoup-2.4/libsoup/soup-soap-response.h
   branches/libsoup-2.4/tests/dict.c
Modified:
   branches/libsoup-2.4/ChangeLog
   branches/libsoup-2.4/README
   branches/libsoup-2.4/libsoup/Makefile.am
   branches/libsoup-2.4/libsoup/soup-message-headers.c
   branches/libsoup-2.4/libsoup/soup-misc.c
   branches/libsoup-2.4/libsoup/soup-misc.h
   branches/libsoup-2.4/libsoup/soup-xmlrpc.c
   branches/libsoup-2.4/libsoup/soup.h
   branches/libsoup-2.4/tests/Makefile.am
   branches/libsoup-2.4/tests/xmlrpc-test.c

Modified: branches/libsoup-2.4/ChangeLog
==============================================================================
--- branches/libsoup-2.4/ChangeLog	(original)
+++ branches/libsoup-2.4/ChangeLog	Mon Jan  7 02:01:06 2008
@@ -1,5 +1,19 @@
 2008-01-06  Dan Winship  <danw gnome org>
 
+	* libsoup/soup-soap-message.c:
+	* libsoup/soup-soap-response.c: For the second time, remove SOAP
+	support from libsoup... These APIs are not really all that helpful
+	in the grand scheme of SOAPiness, and are only used by the
+	Evolution GroupWise backend, which can just import this code and
+	integrate it better there.
+
+	* libsoup/soup-misc.c (soup_xml_real_node): 
+	* libsoup/soup-xmlrpc.c: Move soup_xml_real_node out of soup-misc
+	to soup-xmlrpc, and make it private. libxml is no longer exposed
+	in the public API.
+
+2008-01-06  Dan Winship  <danw gnome org>
+
 	* libsoup/soup-date.c (soup_date_new_from_now): new method to
 	generate a date relative to now.
 	(soup_date_new, etc): document SoupDate methods

Modified: branches/libsoup-2.4/README
==============================================================================
--- branches/libsoup-2.4/README	(original)
+++ branches/libsoup-2.4/README	Mon Jan  7 02:01:06 2008
@@ -8,7 +8,7 @@
   * Proxy support, including authentication and SSL tunneling
   * Client support for Digest, NTLM, and Basic authentication
   * Server support for Digest and Basic authentication
-  * Basic client-side SOAP and XML-RPC support
+  * XML-RPC support
 
 See the documentation in docs/reference/ and the test programs in
 tests/ for simple examples of how to use the code. The

Modified: branches/libsoup-2.4/libsoup/Makefile.am
==============================================================================
--- branches/libsoup-2.4/libsoup/Makefile.am	(original)
+++ branches/libsoup-2.4/libsoup/Makefile.am	Mon Jan  7 02:01:06 2008
@@ -65,8 +65,6 @@
 	soup-session.h		\
 	soup-session-async.h	\
 	soup-session-sync.h	\
-	soup-soap-message.h	\
-	soup-soap-response.h	\
 	soup-socket.h		\
 	soup-status.h		\
 	soup-types.h		\
@@ -137,8 +135,6 @@
 	soup-session-async.c		\
 	soup-session-private.h		\
 	soup-session-sync.c		\
-	soup-soap-message.c		\
-	soup-soap-response.c		\
 	soup-socket.c			\
 	soup-ssl.h			\
 	soup-status.c			\

Modified: branches/libsoup-2.4/libsoup/soup-message-headers.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-message-headers.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-message-headers.c	Mon Jan  7 02:01:06 2008
@@ -5,6 +5,8 @@
  * Copyright (C) 2007, 2008 Red Hat, Inc.
  */
 
+#include <stdio.h>
+
 #include "soup-message-headers.h"
 #include "soup-misc.h"
 

Modified: branches/libsoup-2.4/libsoup/soup-misc.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-misc.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-misc.c	Mon Jan  7 02:01:06 2008
@@ -190,21 +190,3 @@
 	g_source_unref (source);
 	return source;
 }
-
-/**
- * soup_xml_real_node:
- * @node: an %xmlNodePtr
- *
- * Finds the first "real" node (ie, not a comment or whitespace) at or
- * after @node at its level in the tree.
- *
- * Return: a node, or %NULL
- **/
-xmlNode *
-soup_xml_real_node (xmlNode *node)
-{
-	while (node && (node->type == XML_COMMENT_NODE ||
-			xmlIsBlankNode (node)))
-		node = node->next;
-	return node;
-}

Modified: branches/libsoup-2.4/libsoup/soup-misc.h
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-misc.h	(original)
+++ branches/libsoup-2.4/libsoup/soup-misc.h	Mon Jan  7 02:01:06 2008
@@ -7,7 +7,6 @@
 #define SOUP_MISC_H 1
 
 #include <glib-object.h>
-#include <libxml/tree.h>
 
 G_BEGIN_DECLS
 
@@ -36,8 +35,6 @@
 gboolean           soup_str_case_equal       (gconstpointer v1,
 					      gconstpointer v2);
 
-xmlNode           *soup_xml_real_node        (xmlNode      *node);
-
 /**
  * soup_ssl_supported:
  *

Modified: branches/libsoup-2.4/libsoup/soup-xmlrpc.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-xmlrpc.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-xmlrpc.c	Mon Jan  7 02:01:06 2008
@@ -21,6 +21,8 @@
 #include "soup-misc.h"
 #include "soup-session.h"
 
+static xmlNode *find_real_node (xmlNode *node);
+
 static gboolean insert_value (xmlNode *parent, GValue *value);
 
 static void
@@ -413,7 +415,7 @@
 
 	memset (value, 0, sizeof (GValue));
 
-	typenode = soup_xml_real_node (xmlvalue->children);
+	typenode = find_real_node (xmlvalue->children);
 	if (!typenode) {
 		/* If no type node, it's a string */
 		content = xmlNodeGetContent (typenode);
@@ -469,9 +471,9 @@
 		GValue mgval;
 		
 		hash = soup_value_hash_new ();
-		for (member = soup_xml_real_node (typenode->children);
+		for (member = find_real_node (typenode->children);
 		     member;
-		     member = soup_xml_real_node (member->next)) {
+		     member = find_real_node (member->next)) {
 			if (strcmp ((const char *)member->name, "member") != 0) {
 				g_hash_table_destroy (hash);
 				return FALSE;
@@ -479,9 +481,9 @@
 			mname = mxval = NULL;
 			memset (&mgval, 0, sizeof (mgval));
 
-			for (child = soup_xml_real_node (member->children);
+			for (child = find_real_node (member->children);
 			     child;
-			     child = soup_xml_real_node (child->next)) {
+			     child = find_real_node (child->next)) {
 				if (!strcmp ((const char *)child->name, "name"))
 					mname = child;
 				else if (!strcmp ((const char *)child->name, "value"))
@@ -506,14 +508,14 @@
 		GValueArray *array;
 		GValue gval;
 
-		data = soup_xml_real_node (typenode->children);
+		data = find_real_node (typenode->children);
 		if (!data || strcmp ((const char *)data->name, "data") != 0)
 			return FALSE;
 
 		array = g_value_array_new (1);
-		for (xval = soup_xml_real_node (data->children);
+		for (xval = find_real_node (data->children);
 		     xval;
-		     xval = soup_xml_real_node (xval->next)) {
+		     xval = find_real_node (xval->next)) {
 			memset (&gval, 0, sizeof (gval));
 			if (strcmp ((const char *)xval->name, "value") != 0 ||
 			    !parse_value (xval, &gval)) {
@@ -565,19 +567,19 @@
 	if (!node || strcmp ((const char *)node->name, "methodCall") != 0)
 		goto fail;
 
-	node = soup_xml_real_node (node->children);
+	node = find_real_node (node->children);
 	if (!node || strcmp ((const char *)node->name, "methodName") != 0)
 		goto fail;
 	xmlMethodName = xmlNodeGetContent (node);
 
-	node = soup_xml_real_node (node->next);
+	node = find_real_node (node->next);
 	if (!node || strcmp ((const char *)node->name, "params") != 0)
 		goto fail;
 
 	*params = g_value_array_new (1);
-	param = soup_xml_real_node (node->children);
+	param = find_real_node (node->children);
 	while (param && !strcmp ((const char *)param->name, "param")) {
-		xval = soup_xml_real_node (param->children);
+		xval = find_real_node (param->children);
 		if (!xval || !strcmp ((const char *)xval->name, "value") ||
 		    !parse_value (xval, &value)) {
 			g_value_array_free (*params);
@@ -672,7 +674,7 @@
 	if (!node || strcmp ((const char *)node->name, "methodResponse") != 0)
 		goto fail;
 
-	node = soup_xml_real_node (node->children);
+	node = find_real_node (node->children);
 	if (!node)
 		goto fail;
 
@@ -680,9 +682,9 @@
 		int fault_code = -1;
 		xmlChar *fault_string = NULL;
 
-		for (node = soup_xml_real_node (node->children);
+		for (node = find_real_node (node->children);
 		     node;
-		     node = soup_xml_real_node (node->next)) {
+		     node = find_real_node (node->next)) {
 			if (!strcmp ((const char *)node->name, "faultCode")) {
 				xmlChar *content = xmlNodeGetContent (node);
 				fault_code = atoi ((char *)content);
@@ -702,10 +704,10 @@
 		if (fault_string)
 			xmlFree (fault_string);
 	} else if (!strcmp ((const char *)node->name, "params")) {
-		node = soup_xml_real_node (node->children);
+		node = find_real_node (node->children);
 		if (!node || strcmp ((const char *)node->name, "param") != 0)
 			goto fail;
-		node = soup_xml_real_node (node->children);
+		node = find_real_node (node->children);
 		if (!node || strcmp ((const char *)node->name, "value") != 0)
 			goto fail;
 		if (!parse_value (node, value))
@@ -777,3 +779,12 @@
 		error = g_quark_from_static_string ("soup_xmlrpc_fault_quark");
 	return error;
 }
+
+static xmlNode *
+find_real_node (xmlNode *node)
+{
+	while (node && (node->type == XML_COMMENT_NODE ||
+			xmlIsBlankNode (node)))
+		node = node->next;
+	return node;
+}

Modified: branches/libsoup-2.4/libsoup/soup.h
==============================================================================
--- branches/libsoup-2.4/libsoup/soup.h	(original)
+++ branches/libsoup-2.4/libsoup/soup.h	Mon Jan  7 02:01:06 2008
@@ -25,8 +25,6 @@
 #include <libsoup/soup-server.h>
 #include <libsoup/soup-session-async.h>
 #include <libsoup/soup-session-sync.h>
-#include <libsoup/soup-soap-message.h>
-#include <libsoup/soup-soap-response.h>
 #include <libsoup/soup-socket.h>
 #include <libsoup/soup-status.h>
 #include <libsoup/soup-uri.h>

Modified: branches/libsoup-2.4/tests/Makefile.am
==============================================================================
--- branches/libsoup-2.4/tests/Makefile.am	(original)
+++ branches/libsoup-2.4/tests/Makefile.am	Mon Jan  7 02:01:06 2008
@@ -11,7 +11,6 @@
 	context-test	\
 	continue-test	\
 	date		\
-	dict		\
 	dns		\
 	get		\
 	getbug		\
@@ -30,7 +29,6 @@
 context_test_SOURCES = context-test.c
 continue_test_SOURCES = continue-test.c
 date_SOURCES = date.c
-dict_SOURCES = dict.c
 dns_SOURCES = dns.c
 get_SOURCES = get.c
 getbug_SOURCES = getbug.c

Modified: branches/libsoup-2.4/tests/xmlrpc-test.c
==============================================================================
--- branches/libsoup-2.4/tests/xmlrpc-test.c	(original)
+++ branches/libsoup-2.4/tests/xmlrpc-test.c	Mon Jan  7 02:01:06 2008
@@ -3,6 +3,8 @@
  * Copyright (C) 2001-2003, Ximian, Inc.
  */
 
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]