Remove katze_net_new and katze_net_get_session

This commit is contained in:
Christian Dywan 2010-09-07 22:39:51 +02:00
parent 1b80f16bf4
commit 7ac801799f
2 changed files with 3 additions and 52 deletions

View file

@ -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,7 +123,6 @@ katze_net_get_cached_path (KatzeNet* net,
gchar* cached_filename;
gchar* cached_path;
if (!net)
net = katze_net_new ();
if (subfolder)
@ -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,7 +298,6 @@ katze_net_load_uri (KatzeNet* net,
if (!status_cb && !transfer_cb)
return;
if (net == NULL)
net = katze_net_new ();
request = g_new0 (KatzeNetRequest, 1);

View file

@ -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,