evolution-rss r145 - in trunk: . src



Author: lucilanga
Date: Mon Feb  4 18:19:52 2008
New Revision: 145
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=145&view=rev

Log:
libsoup 2.4 porting

Modified:
   trunk/ChangeLog
   trunk/src/network-soup.c
   trunk/src/rss.c

Modified: trunk/src/network-soup.c
==============================================================================
--- trunk/src/network-soup.c	(original)
+++ trunk/src/network-soup.c	Mon Feb  4 18:19:52 2008
@@ -40,10 +40,15 @@
 } CallbackInfo;
 
 static void
+#if LIBSOUP_VERSION < 2003000
+got_chunk_blocking_cb(SoupMessage *msg, CallbackInfo *info) {
+#else
 got_chunk_blocking_cb(SoupMessage *msg, CallbackInfo *info) {
+#endif
     NetStatusProgress progress = {0};
     const char* clen;
 
+g_print("response_body1\n");
     if (info->total == 0) {
 #if LIBSOUP_VERSION < 2003000
         clen = soup_message_get_header(msg->response_headers,
@@ -56,11 +61,13 @@
             return;
         info->total = atoi(clen);
     }
+g_print("response_body1\n");
 #if LIBSOUP_VERSION < 2003000
     info->current += msg->response.length;
 #else
     info->current += msg->response_body->length;
 #endif
+g_print("response_body2\n");
 
     progress.current = info->current;
     progress.total = info->total;
@@ -68,7 +75,12 @@
 }
 
 static void
+#if LIBSOUP_VERSION < 2003000
 got_chunk_cb(SoupMessage *msg, CallbackInfo *info) {
+#else
+got_chunk_cb(SoupMessage *msg, SoupBuffer *chunk, CallbackInfo *info) {
+#endif
+
 	NetStatusProgress *progress = NULL;
 	const char* clen;
 	
@@ -87,7 +99,7 @@
 #if LIBSOUP_VERSION < 2003000
 	info->current += msg->response.length;
 #else
-	info->current += msg->response_body->length;
+	info->current += chunk->length;
 #endif
 	progress = g_new0(NetStatusProgress, 1);
 
@@ -414,7 +426,7 @@
 #endif
 	g_free(agstr);
 
-	g_signal_connect(G_OBJECT(msg), "got-chunk",
+	g_signal_connect(G_OBJECT(msg), "got_chunk",
 			G_CALLBACK(got_chunk_cb), info);	//FIXME Find a way to free this maybe weak_ref
 
 	soup_session_queue_message (soup_sess, msg,

Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c	(original)
+++ trunk/src/rss.c	Mon Feb  4 18:19:52 2008
@@ -3603,7 +3603,11 @@
 }
 
 void
+#if LIBSOUP_VERSION < 2003000
 finish_feed (SoupMessage *msg, gpointer user_data)
+#else
+finish_feed (SoupSession *soup_sess, SoupMessage *msg, gpointer user_data)
+#endif
 {
 	GError *err = NULL;
 	gchar *chn_name = NULL;



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