From 69c489d590ddeb7d532ddb99943e0990173a8110 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 8 Nov 2012 11:28:39 -0500 Subject: [PATCH] Add per-version deprecation/availability warnings Add SOUP_VERSION_X_XX, SOUP_VERSION_MIN_REQUIRED, and SOUP_VERSION_MAX_ALLOWED, to enable version-based warnings. Tag all functions with appropriate SOUP_AVAILABLE_IN_ and SOUP_DEPRECATED_IN_ macros. Also, fix up some "Since" tags to not refer to unstable releases or non-.0 point releases. --- docs/reference/libsoup-2.4-sections.txt | 14 ++- libsoup/soup-address.h | 5 ++ libsoup/soup-auth.h | 3 + libsoup/soup-cache.h | 8 ++ libsoup/soup-content-decoder.c | 2 +- libsoup/soup-content-decoder.h | 3 +- libsoup/soup-content-sniffer.c | 17 +++- libsoup/soup-content-sniffer.h | 4 + libsoup/soup-cookie-jar-sqlite.h | 2 + libsoup/soup-cookie-jar-text.h | 2 + libsoup/soup-cookie-jar.c | 4 + libsoup/soup-cookie-jar.h | 20 ++++- libsoup/soup-cookie.c | 2 + libsoup/soup-cookie.h | 31 +++++++ libsoup/soup-date.c | 4 + libsoup/soup-date.h | 19 ++++ libsoup/soup-form.h | 2 + libsoup/soup-gnome-features.h | 3 + libsoup/soup-headers.h | 4 + libsoup/soup-logger.h | 8 +- libsoup/soup-message-body.c | 8 +- libsoup/soup-message-body.h | 11 ++- libsoup/soup-message-headers.c | 4 +- libsoup/soup-message-headers.h | 17 +++- libsoup/soup-message.c | 4 +- libsoup/soup-message.h | 6 ++ libsoup/soup-misc.h | 3 +- libsoup/soup-multipart-input-stream.h | 6 ++ libsoup/soup-multipart.h | 9 ++ libsoup/soup-proxy-resolver.c | 101 +++------------------ libsoup/soup-proxy-resolver.h | 3 + libsoup/soup-proxy-uri-resolver.h | 3 + libsoup/soup-request-data.h | 1 + libsoup/soup-request-file.h | 2 + libsoup/soup-request-http.h | 2 + libsoup/soup-request.h | 8 ++ libsoup/soup-requester.h | 5 ++ libsoup/soup-session-feature.h | 6 ++ libsoup/soup-session.c | 52 ++++++----- libsoup/soup-session.h | 12 +++ libsoup/soup-socket.c | 4 +- libsoup/soup-status.h | 3 +- libsoup/soup-tld.h | 5 +- libsoup/soup-types.h | 1 + libsoup/soup-uri.c | 6 +- libsoup/soup-uri.h | 11 +++ libsoup/soup-version.c | 140 +++++++++++++++++++++++++++++ libsoup/soup-version.h.in | 152 ++++++++++++++++++++++++++++++++ 48 files changed, 597 insertions(+), 145 deletions(-) diff --git a/docs/reference/libsoup-2.4-sections.txt b/docs/reference/libsoup-2.4-sections.txt index 4c1c60b..81f4b77 100644 --- a/docs/reference/libsoup-2.4-sections.txt +++ b/docs/reference/libsoup-2.4-sections.txt @@ -1210,10 +1210,22 @@ soup_get_major_version soup_get_minor_version soup_get_micro_version soup_check_version - SOUP_MAJOR_VERSION SOUP_MINOR_VERSION SOUP_MICRO_VERSION SOUP_CHECK_VERSION + +SOUP_VERSION_MIN_REQUIRED +SOUP_VERSION_MAX_ALLOWED +SOUP_VERSION_2_24 +SOUP_VERSION_2_26 +SOUP_VERSION_2_28 +SOUP_VERSION_2_30 +SOUP_VERSION_2_32 +SOUP_VERSION_2_34 +SOUP_VERSION_2_36 +SOUP_VERSION_2_38 +SOUP_VERSION_2_40 +SOUP_VERSION_2_42 diff --git a/libsoup/soup-address.h b/libsoup/soup-address.h index 579d1d3..dd4c275 100644 --- a/libsoup/soup-address.h +++ b/libsoup/soup-address.h @@ -77,13 +77,18 @@ const char *soup_address_get_physical (SoupAddress *addr); guint soup_address_get_port (SoupAddress *addr); struct sockaddr *soup_address_get_sockaddr (SoupAddress *addr, int *len); +SOUP_AVAILABLE_IN_2_32 GSocketAddress *soup_address_get_gsockaddr (SoupAddress *addr); gboolean soup_address_is_resolved (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_26 guint soup_address_hash_by_name (gconstpointer addr); +SOUP_AVAILABLE_IN_2_26 gboolean soup_address_equal_by_name (gconstpointer addr1, gconstpointer addr2); +SOUP_AVAILABLE_IN_2_26 guint soup_address_hash_by_ip (gconstpointer addr); +SOUP_AVAILABLE_IN_2_26 gboolean soup_address_equal_by_ip (gconstpointer addr1, gconstpointer addr2); diff --git a/libsoup/soup-auth.h b/libsoup/soup-auth.h index 18f11c7..9951021 100644 --- a/libsoup/soup-auth.h +++ b/libsoup/soup-auth.h @@ -73,9 +73,12 @@ const char *soup_auth_get_realm (SoupAuth *auth); char *soup_auth_get_info (SoupAuth *auth); #ifdef LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY +SOUP_AVAILABLE_IN_2_28 GSList *soup_auth_get_saved_users (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_28 const char *soup_auth_get_saved_password (SoupAuth *auth, const char *user); +SOUP_AVAILABLE_IN_2_28 void soup_auth_save_password (SoupAuth *auth, const char *username, const char *password); diff --git a/libsoup/soup-cache.h b/libsoup/soup-cache.h index 8585d51..64dcb78 100644 --- a/libsoup/soup-cache.h +++ b/libsoup/soup-cache.h @@ -77,17 +77,25 @@ typedef struct { void (*_libsoup_reserved3)(void); } SoupCacheClass; +SOUP_AVAILABLE_IN_2_34 GType soup_cache_get_type (void); +SOUP_AVAILABLE_IN_2_34 SoupCache *soup_cache_new (const char *cache_dir, SoupCacheType cache_type); +SOUP_AVAILABLE_IN_2_34 void soup_cache_flush (SoupCache *cache); +SOUP_AVAILABLE_IN_2_34 void soup_cache_clear (SoupCache *cache); +SOUP_AVAILABLE_IN_2_34 void soup_cache_dump (SoupCache *cache); +SOUP_AVAILABLE_IN_2_34 void soup_cache_load (SoupCache *cache); +SOUP_AVAILABLE_IN_2_34 void soup_cache_set_max_size (SoupCache *cache, guint max_size); +SOUP_AVAILABLE_IN_2_34 guint soup_cache_get_max_size (SoupCache *cache); G_END_DECLS diff --git a/libsoup/soup-content-decoder.c b/libsoup/soup-content-decoder.c index fa7629a..8aac8a8 100644 --- a/libsoup/soup-content-decoder.c +++ b/libsoup/soup-content-decoder.c @@ -40,7 +40,7 @@ * will be decoded (and the %SOUP_MESSAGE_CONTENT_DECODED flag will * not be set). * - * Since: 2.28.2 + * Since: 2.30 **/ struct _SoupContentDecoderPrivate { diff --git a/libsoup/soup-content-decoder.h b/libsoup/soup-content-decoder.h index e0b2238..471f813 100644 --- a/libsoup/soup-content-decoder.h +++ b/libsoup/soup-content-decoder.h @@ -37,7 +37,8 @@ typedef struct { void (*_libsoup_reserved5) (void); } SoupContentDecoderClass; -GType soup_content_decoder_get_type (void); +SOUP_AVAILABLE_IN_2_30 +GType soup_content_decoder_get_type (void); G_END_DECLS diff --git a/libsoup/soup-content-sniffer.c b/libsoup/soup-content-sniffer.c index 012c0dc..e8f69d4 100644 --- a/libsoup/soup-content-sniffer.c +++ b/libsoup/soup-content-sniffer.c @@ -28,7 +28,7 @@ * content sniffing to a session with soup_session_add_feature() or * soup_session_add_feature_by_type(). * - * Since: 2.27.3 + * Since: 2.28 **/ static void soup_content_sniffer_session_feature_init (SoupSessionFeatureInterface *feature_interface, gpointer interface_data); @@ -567,7 +567,7 @@ soup_content_sniffer_session_feature_init (SoupSessionFeatureInterface *feature_ * * Returns: a new #SoupContentSniffer * - * Since: 2.27.3 + * Since: 2.28 **/ SoupContentSniffer * soup_content_sniffer_new () @@ -589,6 +589,8 @@ soup_content_sniffer_new () * * Return value: the sniffed Content-Type of @buffer; this will never be %NULL, * but may be "application/octet-stream". + * + * Since: 2.28 */ char * soup_content_sniffer_sniff (SoupContentSniffer *sniffer, @@ -602,6 +604,17 @@ soup_content_sniffer_sniff (SoupContentSniffer *sniffer, return SOUP_CONTENT_SNIFFER_GET_CLASS (sniffer)->sniff (sniffer, msg, buffer, params); } +/** + * soup_content_sniffer_get_buffer_size: + * @sniffer: a #SoupContentSniffer + * + * Gets the number of bytes @sniffer needs in order to properly sniff + * a buffer. + * + * Return value: the number of bytes to sniff + * + * Since: 2.28 + */ gsize soup_content_sniffer_get_buffer_size (SoupContentSniffer *sniffer) { diff --git a/libsoup/soup-content-sniffer.h b/libsoup/soup-content-sniffer.h index 59c0154..eb1e4bd 100644 --- a/libsoup/soup-content-sniffer.h +++ b/libsoup/soup-content-sniffer.h @@ -43,14 +43,18 @@ typedef struct { void (*_libsoup_reserved5) (void); } SoupContentSnifferClass; +SOUP_AVAILABLE_IN_2_28 GType soup_content_sniffer_get_type (void); +SOUP_AVAILABLE_IN_2_28 SoupContentSniffer *soup_content_sniffer_new (void); +SOUP_AVAILABLE_IN_2_28 char *soup_content_sniffer_sniff (SoupContentSniffer *sniffer, SoupMessage *msg, SoupBuffer *buffer, GHashTable **params); +SOUP_AVAILABLE_IN_2_28 gsize soup_content_sniffer_get_buffer_size (SoupContentSniffer *sniffer); G_END_DECLS diff --git a/libsoup/soup-cookie-jar-sqlite.h b/libsoup/soup-cookie-jar-sqlite.h index 19dfbfa..97cdf33 100644 --- a/libsoup/soup-cookie-jar-sqlite.h +++ b/libsoup/soup-cookie-jar-sqlite.h @@ -34,8 +34,10 @@ typedef struct { #define SOUP_COOKIE_JAR_SQLITE_FILENAME "filename" +SOUP_AVAILABLE_IN_2_26 GType soup_cookie_jar_sqlite_get_type (void); +SOUP_AVAILABLE_IN_2_26 SoupCookieJar *soup_cookie_jar_sqlite_new (const char *filename, gboolean read_only); diff --git a/libsoup/soup-cookie-jar-text.h b/libsoup/soup-cookie-jar-text.h index cc186dd..83b8f28 100644 --- a/libsoup/soup-cookie-jar-text.h +++ b/libsoup/soup-cookie-jar-text.h @@ -34,8 +34,10 @@ typedef struct { #define SOUP_COOKIE_JAR_TEXT_FILENAME "filename" +SOUP_AVAILABLE_IN_2_26 GType soup_cookie_jar_text_get_type (void); +SOUP_AVAILABLE_IN_2_26 SoupCookieJar *soup_cookie_jar_text_new (const char *filename, gboolean read_only); diff --git a/libsoup/soup-cookie-jar.c b/libsoup/soup-cookie-jar.c index 3180680..80bb832 100644 --- a/libsoup/soup-cookie-jar.c +++ b/libsoup/soup-cookie-jar.c @@ -241,6 +241,10 @@ soup_cookie_jar_new (void) * This function exists for backward compatibility, but does not do * anything any more; cookie jars are saved automatically when they * are changed. + * + * Since: 2.24 + * + * Deprecated: This is a no-op. */ void soup_cookie_jar_save (SoupCookieJar *jar) diff --git a/libsoup/soup-cookie-jar.h b/libsoup/soup-cookie-jar.h index 7ef0506..395fbe3 100644 --- a/libsoup/soup-cookie-jar.h +++ b/libsoup/soup-cookie-jar.h @@ -47,37 +47,51 @@ typedef enum { SOUP_COOKIE_JAR_ACCEPT_NO_THIRD_PARTY } SoupCookieJarAcceptPolicy; +SOUP_AVAILABLE_IN_2_24 GType soup_cookie_jar_get_type (void); +SOUP_AVAILABLE_IN_2_24 SoupCookieJar * soup_cookie_jar_new (void); -#ifndef LIBSOUP_DISABLE_DEPRECATED -void soup_cookie_jar_save (SoupCookieJar *jar); -#endif +SOUP_AVAILABLE_IN_2_24 char * soup_cookie_jar_get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http); +SOUP_AVAILABLE_IN_2_40 GSList * soup_cookie_jar_get_cookie_list (SoupCookieJar *jar, SoupURI *uri, gboolean for_http); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_jar_set_cookie (SoupCookieJar *jar, SoupURI *uri, const char *cookie); +SOUP_AVAILABLE_IN_2_30 void soup_cookie_jar_set_cookie_with_first_party (SoupCookieJar *jar, SoupURI *uri, SoupURI *first_party, const char *cookie); +SOUP_AVAILABLE_IN_2_26 void soup_cookie_jar_add_cookie (SoupCookieJar *jar, SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_40 void soup_cookie_jar_add_cookie_with_first_party (SoupCookieJar *jar, SoupURI *first_party, SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_26 void soup_cookie_jar_delete_cookie (SoupCookieJar *jar, SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_26 GSList * soup_cookie_jar_all_cookies (SoupCookieJar *jar); +SOUP_AVAILABLE_IN_2_30 void soup_cookie_jar_set_accept_policy (SoupCookieJar *jar, SoupCookieJarAcceptPolicy policy); +SOUP_AVAILABLE_IN_2_30 SoupCookieJarAcceptPolicy soup_cookie_jar_get_accept_policy (SoupCookieJar *jar); +SOUP_AVAILABLE_IN_2_40 gboolean soup_cookie_jar_is_persistent (SoupCookieJar *jar); +SOUP_AVAILABLE_IN_2_24 +SOUP_DEPRECATED_IN_2_26 +void soup_cookie_jar_save (SoupCookieJar *jar); + G_END_DECLS #endif /* SOUP_COOKIE_JAR_H */ diff --git a/libsoup/soup-cookie.c b/libsoup/soup-cookie.c index c553c52..731a4a5 100755 --- a/libsoup/soup-cookie.c +++ b/libsoup/soup-cookie.c @@ -1065,6 +1065,8 @@ soup_cookie_applies_to_uri (SoupCookie *cookie, SoupURI *uri) * match. This may change in the future. * * Return value: whether the cookies are equal. + * + * Since: 2.24 */ gboolean soup_cookie_equal (SoupCookie *cookie1, SoupCookie *cookie2) diff --git a/libsoup/soup-cookie.h b/libsoup/soup-cookie.h index 3a3c388..9624291 100644 --- a/libsoup/soup-cookie.h +++ b/libsoup/soup-cookie.h @@ -20,6 +20,7 @@ struct _SoupCookie { gboolean http_only; }; +SOUP_AVAILABLE_IN_2_24 GType soup_cookie_get_type (void); #define SOUP_TYPE_COOKIE (soup_cookie_get_type()) @@ -28,61 +29,91 @@ GType soup_cookie_get_type (void); #define SOUP_COOKIE_MAX_AGE_ONE_WEEK (SOUP_COOKIE_MAX_AGE_ONE_DAY * 7) #define SOUP_COOKIE_MAX_AGE_ONE_YEAR (SOUP_COOKIE_MAX_AGE_ONE_DAY * 365.2422) +SOUP_AVAILABLE_IN_2_24 SoupCookie *soup_cookie_new (const char *name, const char *value, const char *domain, const char *path, int max_age); +SOUP_AVAILABLE_IN_2_24 SoupCookie *soup_cookie_parse (const char *header, SoupURI *origin); +SOUP_AVAILABLE_IN_2_24 SoupCookie *soup_cookie_copy (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_32 const char *soup_cookie_get_name (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_set_name (SoupCookie *cookie, const char *name); +SOUP_AVAILABLE_IN_2_32 const char *soup_cookie_get_value (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_set_value (SoupCookie *cookie, const char *value); +SOUP_AVAILABLE_IN_2_32 const char *soup_cookie_get_domain (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_set_domain (SoupCookie *cookie, const char *domain); +SOUP_AVAILABLE_IN_2_32 const char *soup_cookie_get_path (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_set_path (SoupCookie *cookie, const char *path); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_set_max_age (SoupCookie *cookie, int max_age); +SOUP_AVAILABLE_IN_2_32 SoupDate *soup_cookie_get_expires (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_set_expires (SoupCookie *cookie, SoupDate *expires); +SOUP_AVAILABLE_IN_2_32 gboolean soup_cookie_get_secure (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_set_secure (SoupCookie *cookie, gboolean secure); +SOUP_AVAILABLE_IN_2_32 gboolean soup_cookie_get_http_only (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_set_http_only (SoupCookie *cookie, gboolean http_only); +SOUP_AVAILABLE_IN_2_24 char *soup_cookie_to_set_cookie_header (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 char *soup_cookie_to_cookie_header (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 gboolean soup_cookie_applies_to_uri (SoupCookie *cookie, SoupURI *uri); +SOUP_AVAILABLE_IN_2_24 gboolean soup_cookie_equal (SoupCookie *cookie1, SoupCookie *cookie2); +SOUP_AVAILABLE_IN_2_24 void soup_cookie_free (SoupCookie *cookie); +SOUP_AVAILABLE_IN_2_24 GSList *soup_cookies_from_response (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_24 GSList *soup_cookies_from_request (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_24 void soup_cookies_to_response (GSList *cookies, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_24 void soup_cookies_to_request (GSList *cookies, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_24 void soup_cookies_free (GSList *cookies); +SOUP_AVAILABLE_IN_2_24 char *soup_cookies_to_cookie_header (GSList *cookies); +SOUP_AVAILABLE_IN_2_30 gboolean soup_cookie_domain_matches (SoupCookie *cookie, const char *host); diff --git a/libsoup/soup-date.c b/libsoup/soup-date.c index 9973078..16988f4 100644 --- a/libsoup/soup-date.c +++ b/libsoup/soup-date.c @@ -897,6 +897,8 @@ soup_date_get_offset (SoupDate *date) * @date: a #SoupDate * * Copies @date. + * + * Since: 2.24 **/ SoupDate * soup_date_copy (SoupDate *date) @@ -915,6 +917,8 @@ soup_date_copy (SoupDate *date) * @date: a #SoupDate * * Frees @date. + * + * Since: 2.24 **/ void soup_date_free (SoupDate *date) diff --git a/libsoup/soup-date.h b/libsoup/soup-date.h index 0924607..c6414c1 100644 --- a/libsoup/soup-date.h +++ b/libsoup/soup-date.h @@ -35,37 +35,56 @@ typedef enum { SOUP_DATE_ISO8601_XMLRPC } SoupDateFormat; +SOUP_AVAILABLE_IN_2_24 GType soup_date_get_type (void); #define SOUP_TYPE_DATE (soup_date_get_type ()) +SOUP_AVAILABLE_IN_2_24 SoupDate *soup_date_new (int year, int month, int day, int hour, int minute, int second); +SOUP_AVAILABLE_IN_2_24 SoupDate *soup_date_new_from_string (const char *date_string); +SOUP_AVAILABLE_IN_2_24 SoupDate *soup_date_new_from_time_t (time_t when); +SOUP_AVAILABLE_IN_2_24 SoupDate *soup_date_new_from_now (int offset_seconds); +SOUP_AVAILABLE_IN_2_24 char *soup_date_to_string (SoupDate *date, SoupDateFormat format); +SOUP_AVAILABLE_IN_2_24 time_t soup_date_to_time_t (SoupDate *date); +SOUP_AVAILABLE_IN_2_24 void soup_date_to_timeval (SoupDate *date, GTimeVal *time); +SOUP_AVAILABLE_IN_2_24 gboolean soup_date_is_past (SoupDate *date); +SOUP_AVAILABLE_IN_2_32 int soup_date_get_year (SoupDate *date); +SOUP_AVAILABLE_IN_2_32 int soup_date_get_month (SoupDate *date); +SOUP_AVAILABLE_IN_2_32 int soup_date_get_day (SoupDate *date); +SOUP_AVAILABLE_IN_2_32 int soup_date_get_hour (SoupDate *date); +SOUP_AVAILABLE_IN_2_32 int soup_date_get_minute (SoupDate *date); +SOUP_AVAILABLE_IN_2_32 int soup_date_get_second (SoupDate *date); +SOUP_AVAILABLE_IN_2_32 int soup_date_get_utc (SoupDate *date); +SOUP_AVAILABLE_IN_2_32 int soup_date_get_offset (SoupDate *date); +SOUP_AVAILABLE_IN_2_24 SoupDate *soup_date_copy (SoupDate *date); +SOUP_AVAILABLE_IN_2_24 void soup_date_free (SoupDate *date); G_END_DECLS diff --git a/libsoup/soup-form.h b/libsoup/soup-form.h index f2be1bc..fa080c4 100644 --- a/libsoup/soup-form.h +++ b/libsoup/soup-form.h @@ -15,6 +15,7 @@ G_BEGIN_DECLS #define SOUP_FORM_MIME_TYPE_MULTIPART "multipart/form-data" GHashTable *soup_form_decode (const char *encoded_form); +SOUP_AVAILABLE_IN_2_26 GHashTable *soup_form_decode_multipart (SoupMessage *msg, const char *file_control_name, char **filename, @@ -45,6 +46,7 @@ SoupMessage *soup_form_request_new_from_hash (const char *method, SoupMessage *soup_form_request_new_from_datalist (const char *method, const char *uri, GData **form_data_set); +SOUP_AVAILABLE_IN_2_26 SoupMessage *soup_form_request_new_from_multipart (const char *uri, SoupMultipart *multipart); diff --git a/libsoup/soup-gnome-features.h b/libsoup/soup-gnome-features.h index 84d6459..6e36b0e 100644 --- a/libsoup/soup-gnome-features.h +++ b/libsoup/soup-gnome-features.h @@ -10,14 +10,17 @@ G_BEGIN_DECLS +SOUP_AVAILABLE_IN_2_26 GType soup_proxy_resolver_gnome_get_type (void); #define SOUP_TYPE_PROXY_RESOLVER_GNOME (soup_proxy_resolver_gnome_get_type ()) +SOUP_AVAILABLE_IN_2_26 GType soup_gnome_features_2_26_get_type (void); #define SOUP_TYPE_GNOME_FEATURES_2_26 (soup_gnome_features_2_26_get_type ()) #ifndef G_OS_WIN32 #ifdef LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY +SOUP_AVAILABLE_IN_2_28 GType soup_password_manager_gnome_get_type (void); #define SOUP_TYPE_PASSWORD_MANAGER_GNOME (soup_password_manager_gnome_get_type ()) #endif /* LIBSOUP_I_HAVE_READ_BUG_594377_AND_KNOW_SOUP_PASSWORD_MANAGER_MIGHT_GO_AWAY */ diff --git a/libsoup/soup-headers.h b/libsoup/soup-headers.h index cc542c3..687ea41 100644 --- a/libsoup/soup-headers.h +++ b/libsoup/soup-headers.h @@ -13,6 +13,7 @@ G_BEGIN_DECLS /* HTTP Header Parsing */ +SOUP_AVAILABLE_IN_2_26 gboolean soup_headers_parse (const char *str, int len, SoupMessageHeaders *dest); @@ -47,12 +48,15 @@ gboolean soup_header_contains (const char *header, const char *token); GHashTable *soup_header_parse_param_list (const char *header); +SOUP_AVAILABLE_IN_2_24 GHashTable *soup_header_parse_semi_param_list (const char *header); void soup_header_free_param_list (GHashTable *param_list); +SOUP_AVAILABLE_IN_2_26 void soup_header_g_string_append_param (GString *string, const char *name, const char *value); +SOUP_AVAILABLE_IN_2_30 void soup_header_g_string_append_param_quoted (GString *string, const char *name, const char *value); diff --git a/libsoup/soup-logger.h b/libsoup/soup-logger.h index 8ada23d..a33f3fa 100644 --- a/libsoup/soup-logger.h +++ b/libsoup/soup-logger.h @@ -53,15 +53,13 @@ GType soup_logger_get_type (void); SoupLogger *soup_logger_new (SoupLoggerLogLevel level, int max_body_size); -#ifndef LIBSOUP_DISABLE_DEPRECATED -/* Use soup_session_add/remove_feature */ -G_DEPRECATED_FOR(soup_session_add_feature) + +SOUP_DEPRECATED_IN_2_24_FOR(soup_session_add_feature) void soup_logger_attach (SoupLogger *logger, SoupSession *session); -G_DEPRECATED_FOR(soup_session_remove_feature) +SOUP_DEPRECATED_IN_2_24_FOR(soup_session_remove_feature) void soup_logger_detach (SoupLogger *logger, SoupSession *session); -#endif void soup_logger_set_request_filter (SoupLogger *logger, SoupLoggerFilter request_filter, diff --git a/libsoup/soup-message-body.c b/libsoup/soup-message-body.c index 0868d84..c541887 100644 --- a/libsoup/soup-message-body.c +++ b/libsoup/soup-message-body.c @@ -415,7 +415,7 @@ soup_message_body_new (void) * be discarded, and you will be responsible for recreating the * request body after the #SoupMessage::restarted signal is emitted. * - * Since: 2.4.1 + * Since: 2.24 **/ void soup_message_body_set_accumulate (SoupMessageBody *body, @@ -435,7 +435,7 @@ soup_message_body_set_accumulate (SoupMessageBody *body, * * Return value: the accumulate flag for @body. * - * Since: 2.4.1 + * Since: 2.24 **/ gboolean soup_message_body_get_accumulate (SoupMessageBody *body) @@ -664,7 +664,7 @@ soup_message_body_get_chunk (SoupMessageBody *body, goffset offset) * This is a low-level method which you should not normally need to * use. * - * Since: 2.4.1 + * Since: 2.24 **/ void soup_message_body_got_chunk (SoupMessageBody *body, SoupBuffer *chunk) @@ -691,7 +691,7 @@ soup_message_body_got_chunk (SoupMessageBody *body, SoupBuffer *chunk) * there are further restrictions on its proper use which are not * documented here. * - * Since: 2.4.1 + * Since: 2.24 **/ void soup_message_body_wrote_chunk (SoupMessageBody *body, SoupBuffer *chunk) diff --git a/libsoup/soup-message-body.h b/libsoup/soup-message-body.h index ee84083..885cfd0 100644 --- a/libsoup/soup-message-body.h +++ b/libsoup/soup-message-body.h @@ -28,6 +28,7 @@ GType soup_buffer_get_type (void); SoupBuffer *soup_buffer_new (SoupMemoryUse use, gconstpointer data, gsize length); +SOUP_AVAILABLE_IN_2_32 SoupBuffer *soup_buffer_new_take (guchar *data, gsize length); SoupBuffer *soup_buffer_new_subbuffer (SoupBuffer *parent, @@ -39,12 +40,15 @@ SoupBuffer *soup_buffer_new_with_owner (gconstpointer data, gpointer owner, GDestroyNotify owner_dnotify); gpointer soup_buffer_get_owner (SoupBuffer *buffer); +SOUP_AVAILABLE_IN_2_32 void soup_buffer_get_data (SoupBuffer *buffer, const guint8 **data, gsize *length); +SOUP_AVAILABLE_IN_2_40 +GBytes *soup_buffer_get_as_bytes (SoupBuffer *buffer); + SoupBuffer *soup_buffer_copy (SoupBuffer *buffer); void soup_buffer_free (SoupBuffer *buffer); -GBytes *soup_buffer_get_as_bytes (SoupBuffer *buffer); typedef struct { const char *data; @@ -56,14 +60,17 @@ GType soup_message_body_get_type (void); SoupMessageBody *soup_message_body_new (void); +SOUP_AVAILABLE_IN_2_24 void soup_message_body_set_accumulate(SoupMessageBody *body, gboolean accumulate); +SOUP_AVAILABLE_IN_2_24 gboolean soup_message_body_get_accumulate(SoupMessageBody *body); void soup_message_body_append (SoupMessageBody *body, SoupMemoryUse use, gconstpointer data, gsize length); +SOUP_AVAILABLE_IN_2_32 void soup_message_body_append_take (SoupMessageBody *body, guchar *data, gsize length); @@ -77,8 +84,10 @@ SoupBuffer *soup_message_body_flatten (SoupMessageBody *body); SoupBuffer *soup_message_body_get_chunk (SoupMessageBody *body, goffset offset); +SOUP_AVAILABLE_IN_2_24 void soup_message_body_got_chunk (SoupMessageBody *body, SoupBuffer *chunk); +SOUP_AVAILABLE_IN_2_24 void soup_message_body_wrote_chunk (SoupMessageBody *body, SoupBuffer *chunk); diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c index 1dd53dd..876db61 100644 --- a/libsoup/soup-message-headers.c +++ b/libsoup/soup-message-headers.c @@ -300,7 +300,7 @@ soup_message_headers_remove (SoupMessageHeaders *hdrs, const char *name) * * Return value: the header's value or %NULL if not found. * - * Since: 2.26.1 + * Since: 2.28 **/ const char * soup_message_headers_get_one (SoupMessageHeaders *hdrs, const char *name) @@ -338,7 +338,7 @@ soup_message_headers_get_one (SoupMessageHeaders *hdrs, const char *name) * * Return value: the header's value or %NULL if not found. * - * Since: 2.26.1 + * Since: 2.28 **/ const char * soup_message_headers_get_list (SoupMessageHeaders *hdrs, const char *name) diff --git a/libsoup/soup-message-headers.h b/libsoup/soup-message-headers.h index da66f7a..c6c43d5 100644 --- a/libsoup/soup-message-headers.h +++ b/libsoup/soup-message-headers.h @@ -33,15 +33,16 @@ void soup_message_headers_remove (SoupMessageHeaders *hdrs, const char *name); void soup_message_headers_clear (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_36 void soup_message_headers_clean_connection_headers (SoupMessageHeaders *hdrs); -#ifndef LIBSOUP_DISABLE_DEPRECATED -G_DEPRECATED_FOR(soup_message_headers_get_one or soup_message_headers_get_list) +SOUP_DEPRECATED_IN_2_28_FOR ("soup_message_headers_get_one or soup_message_headers_get_list") const char *soup_message_headers_get (SoupMessageHeaders *hdrs, const char *name); -#endif +SOUP_AVAILABLE_IN_2_28 const char *soup_message_headers_get_one (SoupMessageHeaders *hdrs, const char *name); +SOUP_AVAILABLE_IN_2_28 const char *soup_message_headers_get_list (SoupMessageHeaders *hdrs, const char *name); @@ -97,38 +98,48 @@ typedef struct { goffset end; } SoupRange; +SOUP_AVAILABLE_IN_2_26 gboolean soup_message_headers_get_ranges (SoupMessageHeaders *hdrs, goffset total_length, SoupRange **ranges, int *length); +SOUP_AVAILABLE_IN_2_26 void soup_message_headers_free_ranges (SoupMessageHeaders *hdrs, SoupRange *ranges); +SOUP_AVAILABLE_IN_2_26 void soup_message_headers_set_ranges (SoupMessageHeaders *hdrs, SoupRange *ranges, int length); +SOUP_AVAILABLE_IN_2_26 void soup_message_headers_set_range (SoupMessageHeaders *hdrs, goffset start, goffset end); +SOUP_AVAILABLE_IN_2_26 gboolean soup_message_headers_get_content_range (SoupMessageHeaders *hdrs, goffset *start, goffset *end, goffset *total_length); +SOUP_AVAILABLE_IN_2_26 void soup_message_headers_set_content_range (SoupMessageHeaders *hdrs, goffset start, goffset end, goffset total_length); +SOUP_AVAILABLE_IN_2_26 const char *soup_message_headers_get_content_type (SoupMessageHeaders *hdrs, GHashTable **params); +SOUP_AVAILABLE_IN_2_26 void soup_message_headers_set_content_type (SoupMessageHeaders *hdrs, const char *content_type, GHashTable *params); +SOUP_AVAILABLE_IN_2_26 gboolean soup_message_headers_get_content_disposition (SoupMessageHeaders *hdrs, char **disposition, GHashTable **params); +SOUP_AVAILABLE_IN_2_26 void soup_message_headers_set_content_disposition (SoupMessageHeaders *hdrs, const char *disposition, GHashTable *params); diff --git a/libsoup/soup-message.c b/libsoup/soup-message.c index 5ff836f..445cdff 100644 --- a/libsoup/soup-message.c +++ b/libsoup/soup-message.c @@ -389,7 +389,7 @@ soup_message_class_init (SoupMessageClass *message_class) * every successful write() call, not only after finishing a * complete "chunk". * - * Since: 2.4.1 + * Since: 2.24 **/ signals[WROTE_BODY_DATA] = g_signal_new ("wrote_body_data", @@ -554,7 +554,7 @@ soup_message_class_init (SoupMessageClass *message_class) * that sniffing could be done is delivered on the first * emission of #SoupMessage::got-chunk. * - * Since: 2.27.3 + * Since: 2.28 **/ signals[CONTENT_SNIFFED] = g_signal_new ("content_sniffed", diff --git a/libsoup/soup-message.h b/libsoup/soup-message.h index d74ee13..676de66 100644 --- a/libsoup/soup-message.h +++ b/libsoup/soup-message.h @@ -105,9 +105,12 @@ gboolean soup_message_is_keepalive (SoupMessage *msg); SoupURI *soup_message_get_uri (SoupMessage *msg); void soup_message_set_uri (SoupMessage *msg, SoupURI *uri); +SOUP_AVAILABLE_IN_2_26 SoupAddress *soup_message_get_address (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_30 SoupURI *soup_message_get_first_party (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_30 void soup_message_set_first_party (SoupMessage *msg, SoupURI *first_party); @@ -128,6 +131,7 @@ void soup_message_set_flags (SoupMessage *msg, SoupMessageFlags soup_message_get_flags (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_34 gboolean soup_message_get_https_status (SoupMessage *msg, GTlsCertificate **certificate, GTlsCertificateFlags *errors); @@ -157,6 +161,7 @@ void soup_message_set_status_full (SoupMessage *msg, guint status_code, const char *reason_phrase); +SOUP_AVAILABLE_IN_2_38 void soup_message_set_redirect (SoupMessage *msg, guint status_code, const char *redirect_uri); @@ -171,6 +176,7 @@ void soup_message_set_chunk_allocator (SoupMessage *msg, gpointer user_data, GDestroyNotify destroy_notify); +SOUP_AVAILABLE_IN_2_28 void soup_message_disable_feature (SoupMessage *msg, GType feature_type); diff --git a/libsoup/soup-misc.h b/libsoup/soup-misc.h index 0807b5f..534b59d 100644 --- a/libsoup/soup-misc.h +++ b/libsoup/soup-misc.h @@ -6,7 +6,7 @@ #ifndef SOUP_MISC_H #define SOUP_MISC_H 1 -#include +#include G_BEGIN_DECLS @@ -19,6 +19,7 @@ GSource *soup_add_io_watch (GMainContext *async_context, GSource *soup_add_idle (GMainContext *async_context, GSourceFunc function, gpointer data); +SOUP_AVAILABLE_IN_2_24 GSource *soup_add_completion (GMainContext *async_context, GSourceFunc function, gpointer data); diff --git a/libsoup/soup-multipart-input-stream.h b/libsoup/soup-multipart-input-stream.h index 77f0f81..20cdefd 100644 --- a/libsoup/soup-multipart-input-stream.h +++ b/libsoup/soup-multipart-input-stream.h @@ -33,25 +33,31 @@ struct _SoupMultipartInputStreamClass { GFilterInputStreamClass parent_class; }; +SOUP_AVAILABLE_IN_2_40 GType soup_multipart_input_stream_get_type (void) G_GNUC_CONST; +SOUP_AVAILABLE_IN_2_40 SoupMultipartInputStream *soup_multipart_input_stream_new (SoupMessage *msg, GInputStream *base_stream); +SOUP_AVAILABLE_IN_2_40 GInputStream *soup_multipart_input_stream_next_part (SoupMultipartInputStream *multipart, GCancellable *cancellable, GError **error); +SOUP_AVAILABLE_IN_2_40 void soup_multipart_input_stream_next_part_async (SoupMultipartInputStream *multipart, int io_priority, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data); +SOUP_AVAILABLE_IN_2_40 GInputStream *soup_multipart_input_stream_next_part_finish (SoupMultipartInputStream *multipart, GAsyncResult *res, GError **error); +SOUP_AVAILABLE_IN_2_40 SoupMessageHeaders *soup_multipart_input_stream_get_headers (SoupMultipartInputStream *multipart); diff --git a/libsoup/soup-multipart.h b/libsoup/soup-multipart.h index cc01eec..ef2e36c 100644 --- a/libsoup/soup-multipart.h +++ b/libsoup/soup-multipart.h @@ -17,33 +17,42 @@ typedef struct SoupMultipart SoupMultipart; GType soup_multipart_get_type (void); #define SOUP_TYPE_MULTIPART (soup_multipart_get_type ()) +SOUP_AVAILABLE_IN_2_26 SoupMultipart *soup_multipart_new (const char *mime_type); +SOUP_AVAILABLE_IN_2_26 SoupMultipart *soup_multipart_new_from_message (SoupMessageHeaders *headers, SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_26 int soup_multipart_get_length (SoupMultipart *multipart); +SOUP_AVAILABLE_IN_2_26 gboolean soup_multipart_get_part (SoupMultipart *multipart, int part, SoupMessageHeaders **headers, SoupBuffer **body); +SOUP_AVAILABLE_IN_2_26 void soup_multipart_append_part (SoupMultipart *multipart, SoupMessageHeaders *headers, SoupBuffer *body); +SOUP_AVAILABLE_IN_2_26 void soup_multipart_append_form_string (SoupMultipart *multipart, const char *control_name, const char *data); +SOUP_AVAILABLE_IN_2_26 void soup_multipart_append_form_file (SoupMultipart *multipart, const char *control_name, const char *filename, const char *content_type, SoupBuffer *body); +SOUP_AVAILABLE_IN_2_26 void soup_multipart_to_message (SoupMultipart *multipart, SoupMessageHeaders *dest_headers, SoupMessageBody *dest_body); +SOUP_AVAILABLE_IN_2_26 void soup_multipart_free (SoupMultipart *multipart); G_END_DECLS diff --git a/libsoup/soup-proxy-resolver.c b/libsoup/soup-proxy-resolver.c index 7512278..a84c27a 100644 --- a/libsoup/soup-proxy-resolver.c +++ b/libsoup/soup-proxy-resolver.c @@ -13,7 +13,6 @@ #include "soup.h" static void soup_proxy_resolver_default_init (SoupProxyResolverInterface *iface); -static void soup_proxy_resolver_uri_resolver_interface_init (SoupProxyURIResolverInterface *uri_resolver_interface); G_DEFINE_INTERFACE_WITH_CODE (SoupProxyResolver, soup_proxy_resolver, G_TYPE_OBJECT, g_type_interface_add_prerequisite (g_define_type_id, SOUP_TYPE_SESSION_FEATURE); @@ -32,10 +31,16 @@ soup_proxy_resolver_get_proxy_async (SoupProxyResolver *proxy_resolver, SoupProxyResolverCallback callback, gpointer user_data) { +#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#endif SOUP_PROXY_RESOLVER_GET_CLASS (proxy_resolver)-> get_proxy_async (proxy_resolver, msg, async_context, cancellable, callback, user_data); +#ifdef G_GNUC_END_IGNORE_DEPRECATIONS +G_GNUC_END_IGNORE_DEPRECATIONS +#endif } guint @@ -44,94 +49,12 @@ soup_proxy_resolver_get_proxy_sync (SoupProxyResolver *proxy_resolver, GCancellable *cancellable, SoupAddress **addr) { +#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#endif return SOUP_PROXY_RESOLVER_GET_CLASS (proxy_resolver)-> get_proxy_sync (proxy_resolver, msg, cancellable, addr); -} - -/* SoupProxyURIResolver implementation */ - -static SoupURI * -uri_from_address (SoupAddress *addr) -{ - SoupURI *proxy_uri; - - proxy_uri = soup_uri_new (NULL); - soup_uri_set_scheme (proxy_uri, SOUP_URI_SCHEME_HTTP); - soup_uri_set_host (proxy_uri, soup_address_get_name (addr)); - soup_uri_set_port (proxy_uri, soup_address_get_port (addr)); - soup_uri_set_path (proxy_uri, ""); - return proxy_uri; -} - -typedef struct { - SoupProxyURIResolverCallback callback; - gpointer user_data; -} ProxyURIResolverAsyncData; - -static void -compat_got_proxy (SoupProxyResolver *proxy_resolver, - SoupMessage *msg, guint status, SoupAddress *proxy_addr, - gpointer user_data) -{ - ProxyURIResolverAsyncData *purad = user_data; - SoupURI *proxy_uri; - - proxy_uri = proxy_addr ? uri_from_address (proxy_addr) : NULL; - purad->callback (SOUP_PROXY_URI_RESOLVER (proxy_resolver), - status, proxy_uri, purad->user_data); - g_object_unref (msg); - if (proxy_uri) - soup_uri_free (proxy_uri); - g_slice_free (ProxyURIResolverAsyncData, purad); -} - -static void -compat_get_proxy_uri_async (SoupProxyURIResolver *proxy_uri_resolver, - SoupURI *uri, GMainContext *async_context, - GCancellable *cancellable, - SoupProxyURIResolverCallback callback, - gpointer user_data) -{ - SoupMessage *dummy_msg; - ProxyURIResolverAsyncData *purad; - - dummy_msg = soup_message_new_from_uri (SOUP_METHOD_GET, uri); - - purad = g_slice_new (ProxyURIResolverAsyncData); - purad->callback = callback; - purad->user_data = user_data; - - soup_proxy_resolver_get_proxy_async ( - SOUP_PROXY_RESOLVER (proxy_uri_resolver), dummy_msg, - async_context, cancellable, - compat_got_proxy, purad); -} - -static guint -compat_get_proxy_uri_sync (SoupProxyURIResolver *proxy_uri_resolver, - SoupURI *uri, GCancellable *cancellable, - SoupURI **proxy_uri) -{ - SoupMessage *dummy_msg; - SoupAddress *proxy_addr = NULL; - guint status; - - dummy_msg = soup_message_new_from_uri (SOUP_METHOD_GET, uri); - status = soup_proxy_resolver_get_proxy_sync ( - SOUP_PROXY_RESOLVER (proxy_uri_resolver), dummy_msg, - cancellable, &proxy_addr); - g_object_unref (dummy_msg); - if (!proxy_addr) - return status; - - *proxy_uri = uri_from_address (proxy_addr); - g_object_unref (proxy_addr); - return status; -} - -static void -soup_proxy_resolver_uri_resolver_interface_init (SoupProxyURIResolverInterface *uri_resolver_interface) -{ - uri_resolver_interface->get_proxy_uri_async = compat_get_proxy_uri_async; - uri_resolver_interface->get_proxy_uri_sync = compat_get_proxy_uri_sync; +#ifdef G_GNUC_END_IGNORE_DEPRECATIONS +G_GNUC_END_IGNORE_DEPRECATIONS +#endif } diff --git a/libsoup/soup-proxy-resolver.h b/libsoup/soup-proxy-resolver.h index dd78714..f5933d9 100644 --- a/libsoup/soup-proxy-resolver.h +++ b/libsoup/soup-proxy-resolver.h @@ -39,14 +39,17 @@ typedef struct { } SoupProxyResolverInterface; +SOUP_DEPRECATED_IN_2_28_FOR(SoupProxyURIResolver) GType soup_proxy_resolver_get_type (void); +SOUP_DEPRECATED_IN_2_28 void soup_proxy_resolver_get_proxy_async (SoupProxyResolver *proxy_resolver, SoupMessage *msg, GMainContext *async_context, GCancellable *cancellable, SoupProxyResolverCallback callback, gpointer user_data); +SOUP_DEPRECATED_IN_2_28 guint soup_proxy_resolver_get_proxy_sync (SoupProxyResolver *proxy_resolver, SoupMessage *msg, GCancellable *cancellable, diff --git a/libsoup/soup-proxy-uri-resolver.h b/libsoup/soup-proxy-uri-resolver.h index 1d15b8d..95c118f 100644 --- a/libsoup/soup-proxy-uri-resolver.h +++ b/libsoup/soup-proxy-uri-resolver.h @@ -43,14 +43,17 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupProxyURIResolverInterface; +SOUP_AVAILABLE_IN_2_28 GType soup_proxy_uri_resolver_get_type (void); +SOUP_AVAILABLE_IN_2_28 void soup_proxy_uri_resolver_get_proxy_uri_async (SoupProxyURIResolver *proxy_uri_resolver, SoupURI *uri, GMainContext *async_context, GCancellable *cancellable, SoupProxyURIResolverCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_28 guint soup_proxy_uri_resolver_get_proxy_uri_sync (SoupProxyURIResolver *proxy_uri_resolver, SoupURI *uri, GCancellable *cancellable, diff --git a/libsoup/soup-request-data.h b/libsoup/soup-request-data.h index aeb9599..f750b04 100644 --- a/libsoup/soup-request-data.h +++ b/libsoup/soup-request-data.h @@ -47,6 +47,7 @@ typedef struct { SoupRequestClass parent; } SoupRequestDataClass; +SOUP_AVAILABLE_IN_2_34 GType soup_request_data_get_type (void); G_END_DECLS diff --git a/libsoup/soup-request-file.h b/libsoup/soup-request-file.h index acb1a08..e86c597 100644 --- a/libsoup/soup-request-file.h +++ b/libsoup/soup-request-file.h @@ -47,8 +47,10 @@ typedef struct { SoupRequestClass parent; } SoupRequestFileClass; +SOUP_AVAILABLE_IN_2_34 GType soup_request_file_get_type (void); +SOUP_AVAILABLE_IN_2_34 GFile *soup_request_file_get_file (SoupRequestFile *file); G_END_DECLS diff --git a/libsoup/soup-request-http.h b/libsoup/soup-request-http.h index 6402646..750005a 100644 --- a/libsoup/soup-request-http.h +++ b/libsoup/soup-request-http.h @@ -47,8 +47,10 @@ typedef struct { SoupRequestClass parent; } SoupRequestHTTPClass; +SOUP_AVAILABLE_IN_2_34 GType soup_request_http_get_type (void); +SOUP_AVAILABLE_IN_2_34 SoupMessage *soup_request_http_get_message (SoupRequestHTTP *http); G_END_DECLS diff --git a/libsoup/soup-request.h b/libsoup/soup-request.h index a48e917..bc6cdff 100644 --- a/libsoup/soup-request.h +++ b/libsoup/soup-request.h @@ -71,26 +71,34 @@ struct _SoupRequestClass { const char * (*get_content_type) (SoupRequest *request); }; +SOUP_AVAILABLE_IN_2_34 GType soup_request_get_type (void); #define SOUP_REQUEST_URI "uri" #define SOUP_REQUEST_SESSION "session" +SOUP_AVAILABLE_IN_2_34 GInputStream *soup_request_send (SoupRequest *request, GCancellable *cancellable, GError **error); +SOUP_AVAILABLE_IN_2_34 void soup_request_send_async (SoupRequest *request, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_34 GInputStream *soup_request_send_finish (SoupRequest *request, GAsyncResult *result, GError **error); +SOUP_AVAILABLE_IN_2_34 SoupURI *soup_request_get_uri (SoupRequest *request); +SOUP_AVAILABLE_IN_2_34 SoupSession *soup_request_get_session (SoupRequest *request); +SOUP_AVAILABLE_IN_2_34 goffset soup_request_get_content_length (SoupRequest *request); +SOUP_AVAILABLE_IN_2_34 const char *soup_request_get_content_type (SoupRequest *request); G_END_DECLS diff --git a/libsoup/soup-requester.h b/libsoup/soup-requester.h index a10f1e5..3bf249c 100644 --- a/libsoup/soup-requester.h +++ b/libsoup/soup-requester.h @@ -48,18 +48,23 @@ typedef struct { GObjectClass parent_class; } SoupRequesterClass; +SOUP_AVAILABLE_IN_2_34 GType soup_requester_get_type (void); +SOUP_AVAILABLE_IN_2_34 SoupRequester *soup_requester_new (void); +SOUP_AVAILABLE_IN_2_34 SoupRequest *soup_requester_request (SoupRequester *requester, const char *uri_string, GError **error); +SOUP_AVAILABLE_IN_2_34 SoupRequest *soup_requester_request_uri (SoupRequester *requester, SoupURI *uri, GError **error); +SOUP_AVAILABLE_IN_2_34 GQuark soup_requester_error_quark (void); #define SOUP_REQUESTER_ERROR soup_requester_error_quark () diff --git a/libsoup/soup-session-feature.h b/libsoup/soup-session-feature.h index aa64aa0..962c8e1 100644 --- a/libsoup/soup-session-feature.h +++ b/libsoup/soup-session-feature.h @@ -46,17 +46,23 @@ typedef struct { } SoupSessionFeatureInterface; +SOUP_AVAILABLE_IN_2_24 GType soup_session_feature_get_type (void); +SOUP_AVAILABLE_IN_2_24 void soup_session_feature_attach (SoupSessionFeature *feature, SoupSession *session); +SOUP_AVAILABLE_IN_2_24 void soup_session_feature_detach (SoupSessionFeature *feature, SoupSession *session); +SOUP_AVAILABLE_IN_2_34 gboolean soup_session_feature_add_feature (SoupSessionFeature *feature, GType type); +SOUP_AVAILABLE_IN_2_34 gboolean soup_session_feature_remove_feature (SoupSessionFeature *feature, GType type); +SOUP_AVAILABLE_IN_2_34 gboolean soup_session_feature_has_feature (SoupSessionFeature *feature, GType type); diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c index f571b9e..3eecd06 100644 --- a/libsoup/soup-session.c +++ b/libsoup/soup-session.c @@ -476,7 +476,13 @@ soup_session_set_property (GObject *object, guint prop_id, uri = g_value_get_boxed (value); if (uri) { +#ifdef G_GNUC_BEGIN_IGNORE_DEPRECATIONS +G_GNUC_BEGIN_IGNORE_DEPRECATIONS +#endif soup_session_remove_feature_by_type (session, SOUP_TYPE_PROXY_RESOLVER); +#ifdef G_GNUC_END_IGNORE_DEPRECATIONS +G_GNUC_END_IGNORE_DEPRECATIONS +#endif feature = SOUP_SESSION_FEATURE (soup_proxy_resolver_static_new (uri)); soup_session_add_feature (session, feature); g_object_unref (feature); @@ -1781,23 +1787,23 @@ prefetch_uri (SoupSession *session, SoupURI *uri, } /** -* soup_session_prepare_for_uri: -* @session: a #SoupSession -* @uri: a #SoupURI which may be required -* -* Tells @session that @uri may be requested shortly, and so the -* session can try to prepare (resolving the domain name, obtaining -* proxy address, etc.) in order to work more quickly once the URI is -* actually requested. -* -* This method acts asynchronously, in @session's -* #SoupSession:async_context. If you are using #SoupSessionSync and do -* not have a main loop running, then you can't use this method. -* -* Since: 2.30 -* -* Deprecated: 2.38: use soup_session_prefetch_dns() instead -**/ + * soup_session_prepare_for_uri: + * @session: a #SoupSession + * @uri: a #SoupURI which may be required + * + * Tells @session that @uri may be requested shortly, and so the + * session can try to prepare (resolving the domain name, obtaining + * proxy address, etc.) in order to work more quickly once the URI is + * actually requested. + * + * This method acts asynchronously, in @session's + * #SoupSession:async_context. If you are using #SoupSessionSync and do + * not have a main loop running, then you can't use this method. + * + * Since: 2.30 + * + * Deprecated: 2.38: use soup_session_prefetch_dns() instead + **/ void soup_session_prepare_for_uri (SoupSession *session, SoupURI *uri) { @@ -2151,7 +2157,7 @@ soup_session_class_init (SoupSessionClass *session_class) * #SoupMessage::finished (and all of the other #SoupMessage * signals) may be invoked multiple times for a given message. * - * Since: 2.4.1 + * Since: 2.24 **/ signals[REQUEST_QUEUED] = g_signal_new ("request-queued", @@ -2194,7 +2200,7 @@ soup_session_class_init (SoupSessionClass *session_class) * #SoupSession::request_queued for a detailed description of the * message lifecycle within a session. * - * Since: 2.4.1 + * Since: 2.24 **/ signals[REQUEST_UNQUEUED] = g_signal_new ("request-unqueued", @@ -2347,7 +2353,7 @@ soup_session_class_init (SoupSessionClass *session_class) * if you want to ensure that all future connections will have * this timeout value. * - * Since: 2.4.1 + * Since: 2.24 **/ /** * SOUP_SESSION_IDLE_TIMEOUT: @@ -2355,7 +2361,7 @@ soup_session_class_init (SoupSessionClass *session_class) * Alias for the #SoupSession:idle-timeout property. (The idle * connection lifetime.) * - * Since: 2.4.1 + * Since: 2.24 **/ g_object_class_install_property ( object_class, PROP_IDLE_TIMEOUT, @@ -2384,7 +2390,7 @@ soup_session_class_init (SoupSessionClass *session_class) "Use NTLM", "Whether or not to use NTLM authentication", FALSE, - G_PARAM_READWRITE)); + G_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** * SoupSession:ssl-ca-file: * @@ -2408,7 +2414,7 @@ soup_session_class_init (SoupSessionClass *session_class) "SSL CA file", "File containing SSL CA certificates", NULL, - G_PARAM_READWRITE)); + G_PARAM_READWRITE | G_PARAM_DEPRECATED)); /** * SOUP_SESSION_USE_SYSTEM_CA_FILE: * diff --git a/libsoup/soup-session.h b/libsoup/soup-session.h index 8748a76..4dd79ff 100644 --- a/libsoup/soup-session.h +++ b/libsoup/soup-session.h @@ -103,32 +103,44 @@ void soup_session_cancel_message (SoupSession *session, guint status_code); void soup_session_abort (SoupSession *session); +SOUP_AVAILABLE_IN_2_30 +SOUP_DEPRECATED_IN_2_38_FOR (soup_session_prefetch_dns) void soup_session_prepare_for_uri (SoupSession *session, SoupURI *uri); +SOUP_AVAILABLE_IN_2_38 void soup_session_prefetch_dns (SoupSession *session, const char *hostname, GCancellable *cancellable, SoupAddressCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_38 gboolean soup_session_would_redirect (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_38 gboolean soup_session_redirect_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_24 void soup_session_add_feature (SoupSession *session, SoupSessionFeature *feature); +SOUP_AVAILABLE_IN_2_24 void soup_session_add_feature_by_type (SoupSession *session, GType feature_type); +SOUP_AVAILABLE_IN_2_24 void soup_session_remove_feature (SoupSession *session, SoupSessionFeature *feature); +SOUP_AVAILABLE_IN_2_24 void soup_session_remove_feature_by_type (SoupSession *session, GType feature_type); +SOUP_AVAILABLE_IN_2_26 GSList *soup_session_get_features (SoupSession *session, GType feature_type); +SOUP_AVAILABLE_IN_2_26 SoupSessionFeature *soup_session_get_feature (SoupSession *session, GType feature_type); +SOUP_AVAILABLE_IN_2_28 SoupSessionFeature *soup_session_get_feature_for_message(SoupSession *session, GType feature_type, SoupMessage *msg); diff --git a/libsoup/soup-socket.c b/libsoup/soup-socket.c index a9d6bd5..cd4bf76 100644 --- a/libsoup/soup-socket.c +++ b/libsoup/soup-socket.c @@ -544,14 +544,14 @@ soup_socket_class_init (SoupSocketClass *socket_class) * Alias for the #SoupSocket:use-thread-context property. (Use * g_main_context_get_thread_default()) * - * Since: 2.36.1 + * Since: 2.38 */ /** * SoupSocket:use-thread-context: * * Use g_main_context_get_thread_default(). * - * Since: 2.36.1 + * Since: 2.38 */ g_object_class_install_property ( object_class, PROP_USE_THREAD_CONTEXT, diff --git a/libsoup/soup-status.h b/libsoup/soup-status.h index fc8d5a3..669c122 100644 --- a/libsoup/soup-status.h +++ b/libsoup/soup-status.h @@ -8,7 +8,7 @@ #ifndef SOUP_STATUS_H #define SOUP_STATUS_H 1 -#include +#include G_BEGIN_DECLS @@ -94,6 +94,7 @@ typedef enum { } SoupKnownStatusCode; const char *soup_status_get_phrase (guint status_code); +SOUP_AVAILABLE_IN_2_26 guint soup_status_proxify (guint status_code); #define SOUP_HTTP_ERROR soup_http_error_quark() diff --git a/libsoup/soup-tld.h b/libsoup/soup-tld.h index 38de46a..4b099a2 100644 --- a/libsoup/soup-tld.h +++ b/libsoup/soup-tld.h @@ -10,14 +10,17 @@ G_BEGIN_DECLS +SOUP_AVAILABLE_IN_2_40 const char *soup_tld_get_base_domain (const char *hostname, GError **error); +SOUP_AVAILABLE_IN_2_40 gboolean soup_tld_domain_is_public_suffix (const char *domain); /* Errors */ -#define SOUP_TLD_ERROR soup_tld_error_quark() +SOUP_AVAILABLE_IN_2_40 GQuark soup_tld_error_quark (void); +#define SOUP_TLD_ERROR soup_tld_error_quark() typedef enum { SOUP_TLD_ERROR_INVALID_HOSTNAME, diff --git a/libsoup/soup-types.h b/libsoup/soup-types.h index d022039..77e5425 100644 --- a/libsoup/soup-types.h +++ b/libsoup/soup-types.h @@ -8,6 +8,7 @@ #include +#include #include G_BEGIN_DECLS diff --git a/libsoup/soup-uri.c b/libsoup/soup-uri.c index d19290b..709d3ad 100644 --- a/libsoup/soup-uri.c +++ b/libsoup/soup-uri.c @@ -1163,7 +1163,7 @@ soup_uri_set_fragment (SoupURI *uri, const char *fragment) * * Return value: the new #SoupURI * - * Since: 2.26.3 + * Since: 2.28 **/ SoupURI * soup_uri_copy_host (SoupURI *uri) @@ -1190,7 +1190,7 @@ soup_uri_copy_host (SoupURI *uri) * * Return value: a hash * - * Since: 2.26.3 + * Since: 2.28 **/ guint soup_uri_host_hash (gconstpointer key) @@ -1214,7 +1214,7 @@ soup_uri_host_hash (gconstpointer key) * Return value: whether or not the URIs are equal in scheme, host, * and port. * - * Since: 2.26.3 + * Since: 2.28 **/ gboolean soup_uri_host_equal (gconstpointer v1, gconstpointer v2) diff --git a/libsoup/soup-uri.h b/libsoup/soup-uri.h index e2195b1..fca97f7 100644 --- a/libsoup/soup-uri.h +++ b/libsoup/soup-uri.h @@ -63,24 +63,31 @@ char *soup_uri_normalize (const char *part, gboolean soup_uri_uses_default_port (SoupURI *uri); +SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_scheme (SoupURI *uri); void soup_uri_set_scheme (SoupURI *uri, const char *scheme); +SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_user (SoupURI *uri); void soup_uri_set_user (SoupURI *uri, const char *user); +SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_password (SoupURI *uri); void soup_uri_set_password (SoupURI *uri, const char *password); +SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_host (SoupURI *uri); void soup_uri_set_host (SoupURI *uri, const char *host); +SOUP_AVAILABLE_IN_2_32 guint soup_uri_get_port (SoupURI *uri); void soup_uri_set_port (SoupURI *uri, guint port); +SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_path (SoupURI *uri); void soup_uri_set_path (SoupURI *uri, const char *path); +SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_query (SoupURI *uri); void soup_uri_set_query (SoupURI *uri, const char *query); @@ -89,12 +96,16 @@ void soup_uri_set_query_from_form (SoupURI *uri, void soup_uri_set_query_from_fields (SoupURI *uri, const char *first_field, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_fragment (SoupURI *uri); void soup_uri_set_fragment (SoupURI *uri, const char *fragment); +SOUP_AVAILABLE_IN_2_28 SoupURI *soup_uri_copy_host (SoupURI *uri); +SOUP_AVAILABLE_IN_2_28 guint soup_uri_host_hash (gconstpointer key); +SOUP_AVAILABLE_IN_2_28 gboolean soup_uri_host_equal (gconstpointer v1, gconstpointer v2); diff --git a/libsoup/soup-version.c b/libsoup/soup-version.c index e2ed0bf..84c146e 100644 --- a/libsoup/soup-version.c +++ b/libsoup/soup-version.c @@ -144,3 +144,143 @@ soup_check_version (guint major, { return SOUP_CHECK_VERSION (major, minor, micro); } + +/** + * SOUP_VERSION_MIN_REQUIRED: + * + * A macro that should be defined by the user prior to including + * libsoup.h. The definition should be one of the predefined libsoup + * version macros: %SOUP_VERSION_2_24, %SOUP_VERSION_2_26, ... + * + * This macro defines the earliest version of libsoup that the package + * is required to be able to compile against. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions that were deprecated in version + * %SOUP_VERSION_MIN_REQUIRED or earlier will cause warnings (but + * using functions deprecated in later releases will not). + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_MAX_ALLOWED: + * + * A macro that should be defined by the user prior to including + * libsoup.h. The definition should be one of the predefined libsoup + * version macros: %SOUP_VERSION_2_24, %SOUP_VERSION_2_26, ... + * + * This macro defines the latest version of the libsoup API that the + * package is allowed to make use of. + * + * If the compiler is configured to warn about the use of deprecated + * functions, then using functions added after version + * %SOUP_VERSION_MAX_ALLOWED will cause warnings. + * + * Unless you are using SOUP_CHECK_VERSION() or the like to compile + * different code depending on the libsoup version, then this should be + * set to the same value as %SOUP_VERSION_MIN_REQUIRED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_24: + * + * A macro that evaluates to the 2.24 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_26: + * + * A macro that evaluates to the 2.26 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_28: + * + * A macro that evaluates to the 2.28 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_30: + * + * A macro that evaluates to the 2.30 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_32: + * + * A macro that evaluates to the 2.32 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_34: + * + * A macro that evaluates to the 2.34 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_36: + * + * A macro that evaluates to the 2.36 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_38: + * + * A macro that evaluates to the 2.38 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_40: + * + * A macro that evaluates to the 2.40 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + +/** + * SOUP_VERSION_2_42: + * + * A macro that evaluates to the 2.42 version of libsoup, in a format + * that can be used by %SOUP_VERSION_MIN_REQUIRED and + * %SOUP_VERSION_MAX_ALLOWED. + * + * Since: 2.42 + */ + diff --git a/libsoup/soup-version.h.in b/libsoup/soup-version.h.in index 96bb302..f873aa1 100644 --- a/libsoup/soup-version.h.in +++ b/libsoup/soup-version.h.in @@ -32,6 +32,158 @@ gboolean soup_check_version (guint major, guint minor, guint micro); +/* Deprecation / Availability macros */ + +#define SOUP_ENCODE_VERSION(major,minor) ((major) << 16 | (minor) << 8) + +#define SOUP_VERSION_2_24 (SOUP_ENCODE_VERSION (2, 24)) +#define SOUP_VERSION_2_26 (SOUP_ENCODE_VERSION (2, 26)) +#define SOUP_VERSION_2_28 (SOUP_ENCODE_VERSION (2, 28)) +#define SOUP_VERSION_2_30 (SOUP_ENCODE_VERSION (2, 30)) +#define SOUP_VERSION_2_32 (SOUP_ENCODE_VERSION (2, 32)) +#define SOUP_VERSION_2_34 (SOUP_ENCODE_VERSION (2, 34)) +#define SOUP_VERSION_2_36 (SOUP_ENCODE_VERSION (2, 36)) +#define SOUP_VERSION_2_38 (SOUP_ENCODE_VERSION (2, 38)) +#define SOUP_VERSION_2_40 (SOUP_ENCODE_VERSION (2, 40)) +#define SOUP_VERSION_2_42 (SOUP_ENCODE_VERSION (2, 42)) + +/* evaluates to the current stable version; for development cycles, + * this means the next stable target + */ +#if (SOUP_MINOR_VERSION % 2) +#define SOUP_VERSION_CUR_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION + 1)) +#else +#define SOUP_VERSION_CUR_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION)) +#endif + +/* evaluates to the previous stable version */ +#if (SOUP_MINOR_VERSION % 2) +#define SOUP_VERSION_PREV_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 1)) +#else +#define SOUP_VERSION_PREV_STABLE (SOUP_ENCODE_VERSION (SOUP_MAJOR_VERSION, SOUP_MINOR_VERSION - 2)) +#endif + +#ifndef SOUP_VERSION_MIN_REQUIRED +# define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE) +#elif SOUP_VERSION_MIN_REQUIRED == 0 +# undef SOUP_VERSION_MIN_REQUIRED +# define SOUP_VERSION_MIN_REQUIRED (SOUP_VERSION_CUR_STABLE + 2) +#endif + +#if !defined (SOUP_VERSION_MAX_ALLOWED) || (SOUP_VERSION_MAX_ALLOWED == 0) +# undef SOUP_VERSION_MAX_ALLOWED +# define SOUP_VERSION_MAX_ALLOWED (SOUP_VERSION_CUR_STABLE) +#endif + +/* sanity checks */ +#if SOUP_VERSION_MIN_REQUIRED > SOUP_VERSION_CUR_STABLE +#error "SOUP_VERSION_MIN_REQUIRED must be <= SOUP_VERSION_CUR_STABLE" +#endif +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_MIN_REQUIRED +#error "SOUP_VERSION_MAX_ALLOWED must be >= SOUP_VERSION_MIN_REQUIRED" +#endif +#if SOUP_VERSION_MIN_REQUIRED < SOUP_VERSION_2_24 +#error "SOUP_VERSION_MIN_REQUIRED must be >= SOUP_VERSION_2_24" +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_24 +# define SOUP_DEPRECATED_IN_2_24 GLIB_DEPRECATED +# define SOUP_DEPRECATED_IN_2_24_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_24 +# define SOUP_DEPRECATED_IN_2_24_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_24 +# define SOUP_AVAILABLE_IN_2_24 GLIB_UNAVAILABLE(2, 24) +#else +# define SOUP_AVAILABLE_IN_2_24 +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_26 +# define SOUP_DEPRECATED_IN_2_26 GLIB_DEPRECATED +# define SOUP_DEPRECATED_IN_2_26_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_26 +# define SOUP_DEPRECATED_IN_2_26_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_26 +# define SOUP_AVAILABLE_IN_2_26 GLIB_UNAVAILABLE(2, 26) +#else +# define SOUP_AVAILABLE_IN_2_26 +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_28 +# define SOUP_DEPRECATED_IN_2_28 GLIB_DEPRECATED +# define SOUP_DEPRECATED_IN_2_28_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_28 +# define SOUP_DEPRECATED_IN_2_28_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_28 +# define SOUP_AVAILABLE_IN_2_28 GLIB_UNAVAILABLE(2, 28) +#else +# define SOUP_AVAILABLE_IN_2_28 +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_30 +# define SOUP_DEPRECATED_IN_2_30 GLIB_DEPRECATED +# define SOUP_DEPRECATED_IN_2_30_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_30 +# define SOUP_DEPRECATED_IN_2_30_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_30 +# define SOUP_AVAILABLE_IN_2_30 GLIB_UNAVAILABLE(2, 30) +#else +# define SOUP_AVAILABLE_IN_2_30 +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_32 +# define SOUP_DEPRECATED_IN_2_32 GLIB_DEPRECATED +# define SOUP_DEPRECATED_IN_2_32_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_32 +# define SOUP_DEPRECATED_IN_2_32_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_32 +# define SOUP_AVAILABLE_IN_2_32 GLIB_UNAVAILABLE(2, 32) +#else +# define SOUP_AVAILABLE_IN_2_32 +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_34 +# define SOUP_DEPRECATED_IN_2_34 GLIB_DEPRECATED +# define SOUP_DEPRECATED_IN_2_34_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_34 +# define SOUP_DEPRECATED_IN_2_34_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_34 +# define SOUP_AVAILABLE_IN_2_34 GLIB_UNAVAILABLE(2, 34) +#else +# define SOUP_AVAILABLE_IN_2_34 +#endif + +#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_36 +# define SOUP_DEPRECATED_IN_2_36 GLIB_DEPRECATED +# define SOUP_DEPRECATED_IN_2_36_FOR(f) GLIB_DEPRECATED_FOR(f) +#else +# define SOUP_DEPRECATED_IN_2_36 +# define SOUP_DEPRECATED_IN_2_36_FOR(f) +#endif + +#if SOUP_VERSION_MAX_ALLOWED < SOUP_VERSION_2_36 +# define SOUP_AVAILABLE_IN_2_36 GLIB_UNAVAILABLE(2, 36) +#else +# define SOUP_AVAILABLE_IN_2_36 +#endif + G_END_DECLS #endif /* SOUP_VERSION_H */ -- 2.7.4