[Xfce4-commits] <midori:master> Remove katze_net_new and katze_net_get_session
Christian Dywan
noreply at xfce.org
Wed Sep 8 02:06:02 CEST 2010
Updating branch refs/heads/master
to 7ac801799fb497aeb47936f7e6fcd45f96c2c1c4 (commit)
from 1b80f16bf4f0c59cd7cf95119334c246cde4c4f5 (commit)
commit 7ac801799fb497aeb47936f7e6fcd45f96c2c1c4
Author: Christian Dywan <christian at twotoasts.de>
Date: Tue Sep 7 22:39:51 2010 +0200
Remove katze_net_new and katze_net_get_session
katze/katze-net.c | 49 +++----------------------------------------------
katze/katze-net.h | 6 ------
2 files changed, 3 insertions(+), 52 deletions(-)
diff --git a/katze/katze-net.c b/katze/katze-net.c
index 6467832..63f7aa8 100644
--- a/katze/katze-net.c
+++ b/katze/katze-net.c
@@ -71,16 +71,7 @@ katze_net_finalize (GObject* object)
G_OBJECT_CLASS (katze_net_parent_class)->finalize (object);
}
-/**
- * katze_net_new:
- *
- * Instantiates a new #KatzeNet instance.
- *
- * Return value: a new #KatzeNet
- *
- * Deprecated: 0.2.7
- **/
-KatzeNet*
+static KatzeNet*
katze_net_new (void)
{
static KatzeNet* net = NULL;
@@ -97,23 +88,6 @@ katze_net_new (void)
return net;
}
-/**
- * katze_net_get_session:
- *
- * Retrieves the session of the net.
- *
- * Return value: a session, or %NULL
- *
- * Deprecated: 0.2.7: Use webkit_get_default_session ().
- **/
-gpointer
-katze_net_get_session (KatzeNet* net)
-{
- g_return_val_if_fail (KATZE_IS_NET (net), NULL);
-
- return webkit_get_default_session ();
-}
-
typedef struct
{
KatzeNet* net;
@@ -149,8 +123,7 @@ katze_net_get_cached_path (KatzeNet* net,
gchar* cached_filename;
gchar* cached_path;
- if (!net)
- net = katze_net_new ();
+ net = katze_net_new ();
if (subfolder)
cache_path = g_build_filename (net->cache_path, subfolder, NULL);
@@ -207,26 +180,11 @@ katze_net_got_body_cb (SoupMessage* msg,
KatzeNetPriv* priv)
{
KatzeNetRequest* request;
- #if 0
- gchar* filename;
- FILE* fp;
- #endif
request = priv->request;
if (msg->response_body->length > 0)
{
- #if 0
- /* FIXME: Caching */
- filename = katze_net_get_cached_path (net, request->uri, NULL);
- if ((fp = fopen (filename, "wb")))
- {
- fwrite (msg->response_body->data,
- 1, msg->response_body->length, fp);
- fclose (fp);
- }
- g_free (filename);
- #endif
request->data = g_memdup (msg->response_body->data,
msg->response_body->length);
request->length = msg->response_body->length;
@@ -340,8 +298,7 @@ katze_net_load_uri (KatzeNet* net,
if (!status_cb && !transfer_cb)
return;
- if (net == NULL)
- net = katze_net_new ();
+ net = katze_net_new ();
request = g_new0 (KatzeNetRequest, 1);
request->uri = g_strdup (uri);
diff --git a/katze/katze-net.h b/katze/katze-net.h
index f26a0ce..5658ff4 100644
--- a/katze/katze-net.h
+++ b/katze/katze-net.h
@@ -37,12 +37,6 @@ typedef struct _KatzeNetClass KatzeNetClass;
GType
katze_net_get_type (void) G_GNUC_CONST;
-KatzeNet*
-katze_net_new (void);
-
-gpointer
-katze_net_get_session (KatzeNet* net);
-
typedef enum
{
KATZE_NET_VERIFIED,
More information about the Xfce4-commits
mailing list