Fix build running with libSoup < 2.25.2

This commit is contained in:
Christian Dywan 2009-02-20 00:53:21 +01:00
parent 787dec54a8
commit f2d5d6e29d

View file

@ -33,7 +33,7 @@ struct _KatzeHttpCookiesClass
GObjectClass parent_class; GObjectClass parent_class;
}; };
#if HAVE_LIBSOUP_2_25_2 #if HAVE_LIBSOUP
static void static void
katze_http_cookies_session_feature_iface_init (SoupSessionFeatureInterface *iface, katze_http_cookies_session_feature_iface_init (SoupSessionFeatureInterface *iface,
gpointer data); gpointer data);
@ -42,6 +42,8 @@ G_DEFINE_TYPE_WITH_CODE (KatzeHttpCookies, katze_http_cookies, G_TYPE_OBJECT,
G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE, G_IMPLEMENT_INTERFACE (SOUP_TYPE_SESSION_FEATURE,
katze_http_cookies_session_feature_iface_init)); katze_http_cookies_session_feature_iface_init));
#if HAVE_LIBSOUP_2_25_2
/* Cookie jar saving to Mozilla format /* Cookie jar saving to Mozilla format
Copyright (C) 2008 Xan Lopez <xan@gnome.org> Copyright (C) 2008 Xan Lopez <xan@gnome.org>
Copyright (C) 2008 Dan Winship <danw@gnome.org> Copyright (C) 2008 Dan Winship <danw@gnome.org>
@ -303,13 +305,16 @@ katze_http_cookies_detach (SoupSessionFeature* feature,
g_signal_handlers_disconnect_by_func (session, g_signal_handlers_disconnect_by_func (session,
katze_http_cookies_session_request_queued_cb, feature); katze_http_cookies_session_request_queued_cb, feature);
} }
#endif
static void static void
katze_http_cookies_session_feature_iface_init (SoupSessionFeatureInterface *iface, katze_http_cookies_session_feature_iface_init (SoupSessionFeatureInterface *iface,
gpointer data) gpointer data)
{ {
#if HAVE_LIBSOUP_2_25_2
iface->attach = katze_http_cookies_attach; iface->attach = katze_http_cookies_attach;
iface->detach = katze_http_cookies_detach; iface->detach = katze_http_cookies_detach;
#endif
} }
#else #else
G_DEFINE_TYPE (KatzeHttpCookies, katze_http_cookies, G_TYPE_OBJECT) G_DEFINE_TYPE (KatzeHttpCookies, katze_http_cookies, G_TYPE_OBJECT)