evolution-rss r146 - trunk/src
- From: lucilanga svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-rss r146 - trunk/src
- Date: Mon, 4 Feb 2008 20:08:11 +0000 (GMT)
Author: lucilanga
Date: Mon Feb 4 20:08:10 2008
New Revision: 146
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=146&view=rev
Log:
libsoup 2.4 port
Modified:
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 20:08:10 2008
@@ -43,12 +43,11 @@
#if LIBSOUP_VERSION < 2003000
got_chunk_blocking_cb(SoupMessage *msg, CallbackInfo *info) {
#else
-got_chunk_blocking_cb(SoupMessage *msg, CallbackInfo *info) {
+got_chunk_blocking_cb(SoupMessage *msg, SoupBuffer *chunk, 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,
@@ -61,13 +60,11 @@
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;
+ info->current += chunk->length;
#endif
-g_print("response_body2\n");
progress.current = info->current;
progress.total = info->total;
@@ -178,7 +175,7 @@
//this will insert proxy in the session
void
-proxyfy_session(SoupSession *session)
+proxify_session(SoupSession *session)
{
gboolean use_proxy =
gconf_client_get_bool(rss_gconf, GCONF_KEY_USE_PROXY, NULL);
@@ -209,8 +206,10 @@
puri->passwd = g_strdup(pass_proxy);
}*/
g_object_set (G_OBJECT (session), SOUP_SESSION_PROXY_URI, puri, NULL);
+#if LIBSOUP_VERSION < 2003000
if (puri)
g_free(puri);
+#endif
if (proxy_uri)
g_free(proxy_uri);
}
@@ -300,6 +299,7 @@
}
static void
+#if LIBSOUP_VERSION < 2003000
authenticate (SoupSession *session,
SoupMessage *msg,
const char *auth_type,
@@ -307,13 +307,25 @@
char **username,
char **password,
gpointer data)
+#else
+authenticate (SoupSession *session,
+ SoupMessage *msg,
+ SoupAuth *auth,
+ gboolean retrying,
+ gpointer data)
+#endif
{
gchar *user = g_hash_table_lookup(rf->hruser, data);
gchar *pass = g_hash_table_lookup(rf->hrpass, data);
if (user && pass)
{
+#if LIBSOUP_VERSION < 2003000
*username = g_strdup(user);
*password = g_strdup(pass);
+#else
+ if (!retrying)
+ soup_auth_authenticate (auth, user, pass);
+#endif
}
else
{
@@ -329,8 +341,13 @@
else
rf->soup_auth_retry = TRUE;
}
+#if LIBSOUP_VERSION < 2003000
*username = g_strdup(g_hash_table_lookup(rf->hruser, data));
*password = g_strdup(g_hash_table_lookup(rf->hrpass, data));
+#else
+ if (!retrying)
+ soup_auth_authenticate (auth, user, pass);
+#endif
}
}
}
@@ -383,7 +400,7 @@
// soup_session_async_new_with_options(SOUP_SESSION_TIMEOUT, SS_TIMEOUT, NULL);
soup_session_async_new();
-/// proxyfy_session(soup_sess);
+ proxify_session(soup_sess);
info = g_new0(CallbackInfo, 1);
info->user_cb = cb;
info->user_data = data;
@@ -501,7 +518,7 @@
#endif
g_free(agstr);
- proxyfy_session(soup_sess);
+ proxify_session(soup_sess);
rf->b_session = soup_sess;
rf->b_msg_session = req;
soup_session_send_message(soup_sess, req);
Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c (original)
+++ trunk/src/rss.c Mon Feb 4 20:08:10 2008
@@ -3957,7 +3957,9 @@
gchar *
lookup_feed_folder(gchar *folder)
{
+ g_print("folder:%s\n", folder);
gchar *new_folder = g_hash_table_lookup(rf->reversed_feed_folders, folder);
+ g_print("folder:%s\n", new_folder);
return new_folder ? new_folder : folder;
}
@@ -5125,7 +5127,11 @@
}
static void
+#if LIBSOUP_VERSION < 2003000
finish_enclosure (SoupMessage *msg, create_feed *user_data)
+#else
+finish_enclosure (SoupSession *soup_sess, SoupMessage *msg, create_feed *user_data)
+#endif
{
gchar *tmpdir = NULL;
gchar *name = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]