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



Author: danw
Date: Mon Jan  7 00:54:03 2008
New Revision: 1014
URL: http://svn.gnome.org/viewvc/libsoup?rev=1014&view=rev

Log:
	* libsoup/soup-message-body.c (soup_buffer_get_type): Register
	SoupBuffer as a boxed type.

	* libsoup/soup-message.c (soup_message_class_init): Use
	SOUP_TYPE_BUFFER in got_chunk signal definition

	* libsoup/soup-server.c (soup_client_context_get_type): Register
	SoupClientContext as a pointer type
	(soup_server_class_init): use SOUP_TYPE_CLIENT_CONTEXT in signal
	definitions.

	* libsoup/soup-marshal.list: clean this up


Modified:
   branches/libsoup-2.4/ChangeLog
   branches/libsoup-2.4/libsoup/soup-marshal.list
   branches/libsoup-2.4/libsoup/soup-message-body.c
   branches/libsoup-2.4/libsoup/soup-message-body.h
   branches/libsoup-2.4/libsoup/soup-message.c
   branches/libsoup-2.4/libsoup/soup-server.c
   branches/libsoup-2.4/libsoup/soup-server.h

Modified: branches/libsoup-2.4/ChangeLog
==============================================================================
--- branches/libsoup-2.4/ChangeLog	(original)
+++ branches/libsoup-2.4/ChangeLog	Mon Jan  7 00:54:03 2008
@@ -1,5 +1,20 @@
 2008-01-06  Dan Winship  <danw gnome org>
 
+	* libsoup/soup-message-body.c (soup_buffer_get_type): Register
+	SoupBuffer as a boxed type.
+
+	* libsoup/soup-message.c (soup_message_class_init): Use
+	SOUP_TYPE_BUFFER in got_chunk signal definition
+
+	* libsoup/soup-server.c (soup_client_context_get_type): Register
+	SoupClientContext as a pointer type
+	(soup_server_class_init): use SOUP_TYPE_CLIENT_CONTEXT in signal
+	definitions.
+
+	* libsoup/soup-marshal.list: clean this up
+
+2008-01-06  Dan Winship  <danw gnome org>
+
 	* libsoup/soup-server.c (SoupClientContext): Make this opaque.
 	(soup_client_context_get_socket)
 	(soup_client_context_get_auth_domain)

Modified: branches/libsoup-2.4/libsoup/soup-marshal.list
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-marshal.list	(original)
+++ branches/libsoup-2.4/libsoup/soup-marshal.list	Mon Jan  7 00:54:03 2008
@@ -1,8 +1,6 @@
-NONE:NONE
+NONE:BOXED
 NONE:INT
+NONE:NONE
 NONE:OBJECT
 NONE:OBJECT,OBJECT,BOOLEAN
-NONE:POINTER
 NONE:POINTER,OBJECT
-BOOLEAN:OBJECT,STRING,STRING
-BOOLEAN:OBJECT,STRING,POINTER

Modified: branches/libsoup-2.4/libsoup/soup-message-body.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-message-body.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-message-body.c	Mon Jan  7 00:54:03 2008
@@ -132,6 +132,20 @@
 	}
 }
 
+GType
+soup_buffer_get_type (void)
+{
+	static GType type = 0;
+
+	if (type == 0) {
+		type = g_boxed_type_register_static (
+			g_intern_static_string ("SoupBuffer"),
+			(GBoxedCopyFunc)soup_buffer_copy,
+			(GBoxedFreeFunc)soup_buffer_free);
+	}
+	return type;
+}
+
 typedef struct {
 	SoupMessageBody body;
 	GSList *chunks, *last;

Modified: branches/libsoup-2.4/libsoup/soup-message-body.h
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-message-body.h	(original)
+++ branches/libsoup-2.4/libsoup/soup-message-body.h	Mon Jan  7 00:54:03 2008
@@ -53,6 +53,9 @@
 	gsize       length;
 } SoupBuffer;
 
+GType soup_buffer_get_type (void);
+#define SOUP_TYPE_BUFFER (soup_buffer_get_type ())
+
 SoupBuffer *soup_buffer_new           (SoupMemoryUse  use,
 				       gconstpointer  data,
 				       gsize          length);

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	Mon Jan  7 00:54:03 2008
@@ -269,7 +269,7 @@
 			      NULL, NULL,
 			      got_foo_signal_wrapper,
 			      G_TYPE_NONE, 1,
-			      G_TYPE_POINTER);
+			      SOUP_TYPE_BUFFER);
 
 	/**
 	 * SoupMessage::got-body:
@@ -627,7 +627,7 @@
 	GSignalInvocationHint *hint = invocation_hint;
 
 	if (hint->signal_id == signals[GOT_CHUNK]) {
-		soup_marshal_NONE__POINTER (closure, return_value,
+		soup_marshal_NONE__BOXED (closure, return_value,
 					    n_param_values, param_values,
 					    invocation_hint, marshal_data);
 	} else {

Modified: branches/libsoup-2.4/libsoup/soup-server.c
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-server.c	(original)
+++ branches/libsoup-2.4/libsoup/soup-server.c	Mon Jan  7 00:54:03 2008
@@ -191,7 +191,7 @@
 			      NULL, NULL,
 			      soup_marshal_NONE__POINTER_OBJECT,
 			      G_TYPE_NONE, 2,
-			      G_TYPE_POINTER,
+			      SOUP_TYPE_CLIENT_CONTEXT,
 			      SOUP_TYPE_MESSAGE);
 
 	/**
@@ -216,7 +216,7 @@
 			      NULL, NULL,
 			      soup_marshal_NONE__POINTER_OBJECT,
 			      G_TYPE_NONE, 2,
-			      G_TYPE_POINTER,
+			      SOUP_TYPE_CLIENT_CONTEXT,
 			      SOUP_TYPE_MESSAGE);
 
 	/**
@@ -236,7 +236,7 @@
 			      NULL, NULL,
 			      soup_marshal_NONE__POINTER_OBJECT,
 			      G_TYPE_NONE, 2,
-			      G_TYPE_POINTER,
+			      SOUP_TYPE_CLIENT_CONTEXT,
 			      SOUP_TYPE_MESSAGE);
 
 	/**
@@ -265,7 +265,7 @@
 			      NULL, NULL,
 			      soup_marshal_NONE__POINTER_OBJECT,
 			      G_TYPE_NONE, 2,
-			      G_TYPE_POINTER,
+			      SOUP_TYPE_CLIENT_CONTEXT,
 			      SOUP_TYPE_MESSAGE);
 
 	/* properties */
@@ -812,6 +812,15 @@
  * also be of use in some situations (eg, tracking when multiple
  * requests are made on the same connection).
  **/
+GType
+soup_client_context_get_type (void)
+{
+	static GType type = 0;
+
+	if (type == 0)
+		type = g_pointer_type_register_static ("SoupClientContext");
+	return type;
+}
 
 /**
  * soup_client_context_get_socket:

Modified: branches/libsoup-2.4/libsoup/soup-server.h
==============================================================================
--- branches/libsoup-2.4/libsoup/soup-server.h	(original)
+++ branches/libsoup-2.4/libsoup/soup-server.h	Mon Jan  7 00:54:03 2008
@@ -37,6 +37,9 @@
 GType soup_server_get_type (void);
 
 typedef struct SoupClientContext SoupClientContext;
+GType soup_client_context_get_type (void);
+#define SOUP_TYPE_CLIENT_CONTEXT (soup_client_context_get_type ())
+
 typedef void (*SoupServerCallback) (SoupServer        *server,
 				    SoupMessage       *msg, 
 				    const char        *path,



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