libsoup r1028 - in branches/libsoup-2.4: . libsoup



Author: danw
Date: Fri Jan 11 17:23:33 2008
New Revision: 1028
URL: http://svn.gnome.org/viewvc/libsoup?rev=1028&view=rev

Log:
	* libsoup/soup-auth-domain.c (soup_auth_domain_set_filter):
	* libsoup/soup-auth-domain-basic.c
	(soup_auth_domain_basic_set_auth_callback):
	* libsoup/soup-auth-domain-digest.c
	(soup_auth_domain_digest_set_auth_callback):
	* libsoup/soup-message.c (soup_message_cleanup_response)
	(soup_message_set_flags, soup_message_set_http_version)
	(soup_message_set_uri, soup_message_set_status)
	(soup_message_set_status_full): 
	* libsoup/soup-message-client-io.c (parse_response_headers): 
	* libsoup/soup-message-server-io.c (parse_request_headers):
	Call g_object_notify() when changing properties.	


Modified:
   branches/libsoup-2.4/ChangeLog
   branches/libsoup-2.4/libsoup/soup-auth-domain-basic.c
   branches/libsoup-2.4/libsoup/soup-auth-domain-digest.c
   branches/libsoup-2.4/libsoup/soup-auth-domain.c
   branches/libsoup-2.4/libsoup/soup-message-client-io.c
   branches/libsoup-2.4/libsoup/soup-message-server-io.c
   branches/libsoup-2.4/libsoup/soup-message.c

Modified: branches/libsoup-2.4/libsoup/soup-auth-domain-basic.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-auth-domain-basic.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-auth-domain-basic.c	Fri Jan 11 17:23:33 2008
@@ -229,6 +229,9 @@
 	priv->auth_callback = callback;
 	priv->auth_data = user_data;
 	priv->auth_dnotify = dnotify;
+
+	g_object_notify (G_OBJECT (domain), SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK);
+	g_object_notify (G_OBJECT (domain), SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA);
 }
 
 static void

Modified: branches/libsoup-2.4/libsoup/soup-auth-domain-digest.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-auth-domain-digest.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-auth-domain-digest.c	Fri Jan 11 17:23:33 2008
@@ -224,6 +224,9 @@
 	priv->auth_callback = callback;
 	priv->auth_data = user_data;
 	priv->auth_dnotify = dnotify;
+
+	g_object_notify (G_OBJECT (domain), SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK);
+	g_object_notify (G_OBJECT (domain), SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA);
 }
 
 static char *

Modified: branches/libsoup-2.4/libsoup/soup-auth-domain.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-auth-domain.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-auth-domain.c	Fri Jan 11 17:23:33 2008
@@ -302,6 +302,9 @@
 	priv->filter = filter;
 	priv->filter_data = filter_data;
 	priv->filter_dnotify = dnotify;
+
+	g_object_notify (G_OBJECT (domain), SOUP_AUTH_DOMAIN_FILTER);
+	g_object_notify (G_OBJECT (domain), SOUP_AUTH_DOMAIN_FILTER_DATA);
 }
 
 /**

Modified: branches/libsoup-2.4/libsoup/soup-message-client-io.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-message-client-io.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-message-client-io.c	Fri Jan 11 17:23:33 2008
@@ -35,8 +35,13 @@
 					  (char **) &req->reason_phrase))
 		return SOUP_STATUS_MALFORMED;
 
-	if (version < priv->http_version)
+	g_object_notify (G_OBJECT (req), SOUP_MESSAGE_STATUS_CODE);
+	g_object_notify (G_OBJECT (req), SOUP_MESSAGE_REASON_PHRASE);
+
+	if (version < priv->http_version) {
 		priv->http_version = version;
+		g_object_notify (G_OBJECT (req), SOUP_MESSAGE_HTTP_VERSION);
+	}
 
 	if ((req->method == SOUP_METHOD_HEAD ||
 	     req->status_code  == SOUP_STATUS_NO_CONTENT ||

Modified: branches/libsoup-2.4/libsoup/soup-message-server-io.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-message-server-io.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-message-server-io.c	Fri Jan 11 17:23:33 2008
@@ -24,26 +24,26 @@
 		       SoupEncoding *encoding, gpointer sock)
 {
 	SoupMessagePrivate *priv = SOUP_MESSAGE_GET_PRIVATE (msg);
-	SoupURI *uri;
 	char *req_method, *req_path, *url;
+	SoupHTTPVersion version;
 	const char *req_host;
 	guint status;
+	SoupURI *uri;
 
 	status = soup_headers_parse_request (headers, headers_len,
 					     msg->request_headers,
 					     &req_method,
 					     &req_path,
-					     &priv->http_version);
+					     &version);
 	if (!SOUP_STATUS_IS_SUCCESSFUL (status))
 		return status;
 
 	g_object_set (G_OBJECT (msg),
 		      SOUP_MESSAGE_METHOD, req_method,
+		      SOUP_MESSAGE_HTTP_VERSION, version,
 		      NULL);
 	g_free (req_method);
 
-
-
 	/* Handle request body encoding */
 	*encoding = soup_message_headers_get_encoding (msg->request_headers);
 	if (*encoding == SOUP_ENCODING_UNRECOGNIZED) {

Modified: branches/libsoup-2.4/libsoup/soup-message.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-message.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-message.c	Fri Jan 11 17:23:33 2008
@@ -1055,6 +1055,8 @@
 		g_free ((char *) req->reason_phrase);
 		req->reason_phrase = NULL;
 	}
+	g_object_notify (G_OBJECT (req), SOUP_MESSAGE_STATUS_CODE);
+	g_object_notify (G_OBJECT (req), SOUP_MESSAGE_REASON_PHRASE);
 }
 
 /**
@@ -1084,6 +1086,7 @@
 	g_return_if_fail (SOUP_IS_MESSAGE (msg));
 
 	SOUP_MESSAGE_GET_PRIVATE (msg)->msg_flags = flags;
+	g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_FLAGS);
 }
 
 /**
@@ -1125,6 +1128,7 @@
 	g_return_if_fail (SOUP_IS_MESSAGE (msg));
 
 	SOUP_MESSAGE_GET_PRIVATE (msg)->http_version = version;
+	g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_HTTP_VERSION);
 }
 
 /**
@@ -1213,6 +1217,8 @@
 	if (priv->uri)
 		soup_uri_free (priv->uri);
 	priv->uri = soup_uri_copy (uri);
+
+	g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_URI);
 }
 
 /**
@@ -1249,6 +1255,8 @@
 
 	msg->status_code = status_code;
 	msg->reason_phrase = g_strdup (soup_status_get_phrase (status_code));
+	g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_STATUS_CODE);
+	g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_REASON_PHRASE);
 }
 
 /**
@@ -1272,6 +1280,8 @@
 
 	msg->status_code = status_code;
 	msg->reason_phrase = g_strdup (reason_phrase);
+	g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_STATUS_CODE);
+	g_object_notify (G_OBJECT (msg), SOUP_MESSAGE_REASON_PHRASE);
 }
 
 void



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