diff options
29 files changed, 269 insertions, 7 deletions
diff --git a/libsoup/Makefile.am b/libsoup/Makefile.am index 235ef501..27f8b279 100644 --- a/libsoup/Makefile.am +++ b/libsoup/Makefile.am @@ -249,6 +249,7 @@ BUILT_SOURCES = \ soup_enum_types_sources = $(libsoupinclude_HEADERS) $(libsoupgnomeinclude_HEADERS) soup_enum_types_MKENUMS_C_FLAGS = --fhead "\#define LIBSOUP_USE_UNSTABLE_REQUEST_API" +soup_enum_types_MKENUMS_H_FLAGS = --fhead "\#include <libsoup/soup-version.h>\n\#define GLIB_MKENUMS_EXTERN _SOUP_EXTERN\n" # # Introspection support diff --git a/libsoup/soup-address.h b/libsoup/soup-address.h index 797a5506..af178de5 100644 --- a/libsoup/soup-address.h +++ b/libsoup/soup-address.h @@ -56,30 +56,41 @@ typedef void (*SoupAddressCallback) (SoupAddress *addr, guint status, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 GType soup_address_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_address_new (const char *name, guint port); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_address_new_from_sockaddr (struct sockaddr *sa, int len); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_address_new_any (SoupAddressFamily family, guint port); +SOUP_AVAILABLE_IN_2_4 void soup_address_resolve_async (SoupAddress *addr, GMainContext *async_context, GCancellable *cancellable, SoupAddressCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 guint soup_address_resolve_sync (SoupAddress *addr, GCancellable *cancellable); +SOUP_AVAILABLE_IN_2_4 const char *soup_address_get_name (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_4 const char *soup_address_get_physical (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_4 guint soup_address_get_port (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_4 struct sockaddr *soup_address_get_sockaddr (SoupAddress *addr, int *len); SOUP_AVAILABLE_IN_2_32 GSocketAddress *soup_address_get_gsockaddr (SoupAddress *addr); +SOUP_AVAILABLE_IN_2_4 gboolean soup_address_is_resolved (SoupAddress *addr); SOUP_AVAILABLE_IN_2_26 diff --git a/libsoup/soup-auth-domain-basic.h b/libsoup/soup-auth-domain-basic.h index af80d17e..f1caeb2a 100644 --- a/libsoup/soup-auth-domain-basic.h +++ b/libsoup/soup-auth-domain-basic.h @@ -35,8 +35,10 @@ typedef struct { #define SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK "auth-callback" #define SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA "auth-data" +SOUP_AVAILABLE_IN_2_4 GType soup_auth_domain_basic_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupAuthDomain *soup_auth_domain_basic_new (const char *optname1, ...) G_GNUC_NULL_TERMINATED; @@ -46,6 +48,7 @@ typedef gboolean (*SoupAuthDomainBasicAuthCallback) (SoupAuthDomain *domain, const char *password, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_basic_set_auth_callback (SoupAuthDomain *domain, SoupAuthDomainBasicAuthCallback callback, gpointer user_data, diff --git a/libsoup/soup-auth-domain-digest.h b/libsoup/soup-auth-domain-digest.h index 98e1a3aa..8940a18f 100644 --- a/libsoup/soup-auth-domain-digest.h +++ b/libsoup/soup-auth-domain-digest.h @@ -35,8 +35,10 @@ typedef struct { #define SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK "auth-callback" #define SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA "auth-data" +SOUP_AVAILABLE_IN_2_4 GType soup_auth_domain_digest_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupAuthDomain *soup_auth_domain_digest_new (const char *optname1, ...) G_GNUC_NULL_TERMINATED; @@ -45,11 +47,13 @@ typedef char * (*SoupAuthDomainDigestAuthCallback) (SoupAuthDomain *domain, const char *username, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_digest_set_auth_callback (SoupAuthDomain *domain, SoupAuthDomainDigestAuthCallback callback, gpointer user_data, GDestroyNotify dnotify); +SOUP_AVAILABLE_IN_2_4 char *soup_auth_domain_digest_encode_password (const char *username, const char *realm, const char *password); diff --git a/libsoup/soup-auth-domain.h b/libsoup/soup-auth-domain.h index e3fd3bc1..2bec0961 100644 --- a/libsoup/soup-auth-domain.h +++ b/libsoup/soup-auth-domain.h @@ -59,37 +59,48 @@ typedef gboolean (*SoupAuthDomainGenericAuthCallback) (SoupAuthDomain *domain, const char *username, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 GType soup_auth_domain_get_type (void); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_add_path (SoupAuthDomain *domain, const char *path); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_remove_path (SoupAuthDomain *domain, const char *path); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_set_filter (SoupAuthDomain *domain, SoupAuthDomainFilter filter, gpointer filter_data, GDestroyNotify dnotify); +SOUP_AVAILABLE_IN_2_4 const char *soup_auth_domain_get_realm (SoupAuthDomain *domain); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_set_generic_auth_callback (SoupAuthDomain *domain, SoupAuthDomainGenericAuthCallback auth_callback, gpointer auth_data, GDestroyNotify dnotify); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_domain_check_password (SoupAuthDomain *domain, SoupMessage *msg, const char *username, const char *password); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_domain_covers (SoupAuthDomain *domain, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 char *soup_auth_domain_accepts (SoupAuthDomain *domain, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_auth_domain_challenge (SoupAuthDomain *domain, SoupMessage *msg); /* protected */ +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_domain_try_generic_auth_callback (SoupAuthDomain *domain, SoupMessage *msg, const char *username); diff --git a/libsoup/soup-auth-manager.h b/libsoup/soup-auth-manager.h index c1fcc6e6..74d70ddb 100644 --- a/libsoup/soup-auth-manager.h +++ b/libsoup/soup-auth-manager.h @@ -33,8 +33,10 @@ typedef struct { SoupAuth *auth, gboolean retrying); } SoupAuthManagerClass; +SOUP_AVAILABLE_IN_2_4 GType soup_auth_manager_get_type (void); +SOUP_AVAILABLE_IN_2_4 void soup_auth_manager_use_auth (SoupAuthManager *manager, SoupURI *uri, SoupAuth *auth); diff --git a/libsoup/soup-auth.h b/libsoup/soup-auth.h index 824857e2..d2e6a100 100644 --- a/libsoup/soup-auth.h +++ b/libsoup/soup-auth.h @@ -60,44 +60,60 @@ typedef struct { #define SOUP_AUTH_IS_FOR_PROXY "is-for-proxy" #define SOUP_AUTH_IS_AUTHENTICATED "is-authenticated" +SOUP_AVAILABLE_IN_2_4 GType soup_auth_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupAuth *soup_auth_new (GType type, SoupMessage *msg, const char *auth_header); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_update (SoupAuth *auth, SoupMessage *msg, const char *auth_header); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_is_for_proxy (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 const char *soup_auth_get_scheme_name (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 const char *soup_auth_get_host (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 const char *soup_auth_get_realm (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 char *soup_auth_get_info (SoupAuth *auth); +SOUP_AVAILABLE_IN_2_4 void soup_auth_authenticate (SoupAuth *auth, const char *username, const char *password); +SOUP_AVAILABLE_IN_2_4 gboolean soup_auth_is_authenticated (SoupAuth *auth); SOUP_AVAILABLE_IN_2_42 gboolean soup_auth_is_ready (SoupAuth *auth, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 char *soup_auth_get_authorization (SoupAuth *auth, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 GSList *soup_auth_get_protection_space (SoupAuth *auth, SoupURI *source_uri); +SOUP_AVAILABLE_IN_2_4 void soup_auth_free_protection_space (SoupAuth *auth, GSList *space); /* The actual auth types, which can be added/removed as features */ #define SOUP_TYPE_AUTH_BASIC (soup_auth_basic_get_type ()) +SOUP_AVAILABLE_IN_2_4 GType soup_auth_basic_get_type (void); #define SOUP_TYPE_AUTH_DIGEST (soup_auth_digest_get_type ()) +SOUP_AVAILABLE_IN_2_4 GType soup_auth_digest_get_type (void); #define SOUP_TYPE_AUTH_NTLM (soup_auth_ntlm_get_type ()) +SOUP_AVAILABLE_IN_2_4 GType soup_auth_ntlm_get_type (void); /* Deprecated SoupPasswordManager-related APIs: all are now no-ops */ diff --git a/libsoup/soup-form.h b/libsoup/soup-form.h index 21b8db1e..a0df0344 100644 --- a/libsoup/soup-form.h +++ b/libsoup/soup-form.h @@ -14,6 +14,7 @@ G_BEGIN_DECLS #define SOUP_FORM_MIME_TYPE_URLENCODED "application/x-www-form-urlencoded" #define SOUP_FORM_MIME_TYPE_MULTIPART "multipart/form-data" +SOUP_AVAILABLE_IN_2_4 GHashTable *soup_form_decode (const char *encoded_form); SOUP_AVAILABLE_IN_2_26 GHashTable *soup_form_decode_multipart (SoupMessage *msg, @@ -22,10 +23,14 @@ GHashTable *soup_form_decode_multipart (SoupMessage *msg, char **content_type, SoupBuffer **file); +SOUP_AVAILABLE_IN_2_4 char *soup_form_encode (const char *first_field, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 char *soup_form_encode_hash (GHashTable *form_data_set); +SOUP_AVAILABLE_IN_2_4 char *soup_form_encode_datalist (GData **form_data_set); +SOUP_AVAILABLE_IN_2_4 char *soup_form_encode_valist (const char *first_field, va_list args); @@ -36,13 +41,16 @@ char *soup_form_encode_valist (const char *first_field, #define soup_form_encode_urlencoded_list soup_form_encode_datalist #endif +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_form_request_new (const char *method, const char *uri, const char *first_field, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_form_request_new_from_hash (const char *method, const char *uri, GHashTable *form_data_set); +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_form_request_new_from_datalist (const char *method, const char *uri, GData **form_data_set); diff --git a/libsoup/soup-headers.h b/libsoup/soup-headers.h index 687ea41e..d1f34618 100644 --- a/libsoup/soup-headers.h +++ b/libsoup/soup-headers.h @@ -18,6 +18,7 @@ gboolean soup_headers_parse (const char *str, int len, SoupMessageHeaders *dest); +SOUP_AVAILABLE_IN_2_4 guint soup_headers_parse_request (const char *str, int len, SoupMessageHeaders *req_headers, @@ -25,11 +26,13 @@ guint soup_headers_parse_request (const char *str, char **req_path, SoupHTTPVersion *ver); +SOUP_AVAILABLE_IN_2_4 gboolean soup_headers_parse_status_line (const char *status_line, SoupHTTPVersion *ver, guint *status_code, char **reason_phrase); +SOUP_AVAILABLE_IN_2_4 gboolean soup_headers_parse_response (const char *str, int len, SoupMessageHeaders *headers, @@ -38,18 +41,23 @@ gboolean soup_headers_parse_response (const char *str, char **reason_phrase); /* Individual header parsing */ - +SOUP_AVAILABLE_IN_2_4 GSList *soup_header_parse_list (const char *header); +SOUP_AVAILABLE_IN_2_4 GSList *soup_header_parse_quality_list (const char *header, GSList **unacceptable); +SOUP_AVAILABLE_IN_2_4 void soup_header_free_list (GSList *list); +SOUP_AVAILABLE_IN_2_4 gboolean soup_header_contains (const char *header, const char *token); +SOUP_AVAILABLE_IN_2_4 GHashTable *soup_header_parse_param_list (const char *header); SOUP_AVAILABLE_IN_2_24 GHashTable *soup_header_parse_semi_param_list (const char *header); +SOUP_AVAILABLE_IN_2_4 void soup_header_free_param_list (GHashTable *param_list); SOUP_AVAILABLE_IN_2_26 diff --git a/libsoup/soup-logger.h b/libsoup/soup-logger.h index d84c765e..ef9172d9 100644 --- a/libsoup/soup-logger.h +++ b/libsoup/soup-logger.h @@ -49,29 +49,36 @@ typedef void (*SoupLoggerPrinter) (SoupLogger *logger, const char *data, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 GType soup_logger_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupLogger *soup_logger_new (SoupLoggerLogLevel level, int max_body_size); #ifndef SOUP_DISABLE_DEPRECATED +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_24_FOR(soup_session_add_feature) void soup_logger_attach (SoupLogger *logger, SoupSession *session); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_24_FOR(soup_session_remove_feature) void soup_logger_detach (SoupLogger *logger, SoupSession *session); #endif +SOUP_AVAILABLE_IN_2_4 void soup_logger_set_request_filter (SoupLogger *logger, SoupLoggerFilter request_filter, gpointer filter_data, GDestroyNotify destroy); +SOUP_AVAILABLE_IN_2_4 void soup_logger_set_response_filter (SoupLogger *logger, SoupLoggerFilter response_filter, gpointer filter_data, GDestroyNotify destroy); +SOUP_AVAILABLE_IN_2_4 void soup_logger_set_printer (SoupLogger *logger, SoupLoggerPrinter printer, gpointer printer_data, diff --git a/libsoup/soup-message-body.h b/libsoup/soup-message-body.h index 885cfd00..fc6c200b 100644 --- a/libsoup/soup-message-body.h +++ b/libsoup/soup-message-body.h @@ -22,23 +22,28 @@ typedef struct { gsize length; } SoupBuffer; +SOUP_AVAILABLE_IN_2_4 GType soup_buffer_get_type (void); #define SOUP_TYPE_BUFFER (soup_buffer_get_type ()) +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_buffer_new (SoupMemoryUse use, gconstpointer data, gsize length); SOUP_AVAILABLE_IN_2_32 SoupBuffer *soup_buffer_new_take (guchar *data, gsize length); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_buffer_new_subbuffer (SoupBuffer *parent, gsize offset, gsize length); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_buffer_new_with_owner (gconstpointer data, gsize length, gpointer owner, GDestroyNotify owner_dnotify); +SOUP_AVAILABLE_IN_2_4 gpointer soup_buffer_get_owner (SoupBuffer *buffer); SOUP_AVAILABLE_IN_2_32 void soup_buffer_get_data (SoupBuffer *buffer, @@ -47,7 +52,9 @@ void soup_buffer_get_data (SoupBuffer *buffer, SOUP_AVAILABLE_IN_2_40 GBytes *soup_buffer_get_as_bytes (SoupBuffer *buffer); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_buffer_copy (SoupBuffer *buffer); +SOUP_AVAILABLE_IN_2_4 void soup_buffer_free (SoupBuffer *buffer); typedef struct { @@ -55,9 +62,11 @@ typedef struct { goffset length; } SoupMessageBody; +SOUP_AVAILABLE_IN_2_4 GType soup_message_body_get_type (void); #define SOUP_TYPE_MESSAGE_BODY (soup_message_body_get_type ()) +SOUP_AVAILABLE_IN_2_4 SoupMessageBody *soup_message_body_new (void); SOUP_AVAILABLE_IN_2_24 @@ -66,6 +75,7 @@ void soup_message_body_set_accumulate(SoupMessageBody *body, SOUP_AVAILABLE_IN_2_24 gboolean soup_message_body_get_accumulate(SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_append (SoupMessageBody *body, SoupMemoryUse use, gconstpointer data, @@ -74,13 +84,18 @@ SOUP_AVAILABLE_IN_2_32 void soup_message_body_append_take (SoupMessageBody *body, guchar *data, gsize length); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_append_buffer (SoupMessageBody *body, SoupBuffer *buffer); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_truncate (SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_complete (SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_message_body_flatten (SoupMessageBody *body); +SOUP_AVAILABLE_IN_2_4 SoupBuffer *soup_message_body_get_chunk (SoupMessageBody *body, goffset offset); @@ -91,6 +106,7 @@ SOUP_AVAILABLE_IN_2_24 void soup_message_body_wrote_chunk (SoupMessageBody *body, SoupBuffer *chunk); +SOUP_AVAILABLE_IN_2_4 void soup_message_body_free (SoupMessageBody *body); G_END_DECLS diff --git a/libsoup/soup-message-headers.h b/libsoup/soup-message-headers.h index ce8ff209..829e3522 100644 --- a/libsoup/soup-message-headers.h +++ b/libsoup/soup-message-headers.h @@ -11,6 +11,7 @@ G_BEGIN_DECLS typedef struct SoupMessageHeaders SoupMessageHeaders; +SOUP_AVAILABLE_IN_2_4 GType soup_message_headers_get_type (void); #define SOUP_TYPE_MESSAGE_HEADERS (soup_message_headers_get_type ()) @@ -20,25 +21,32 @@ typedef enum { SOUP_MESSAGE_HEADERS_MULTIPART } SoupMessageHeadersType; +SOUP_AVAILABLE_IN_2_4 SoupMessageHeaders *soup_message_headers_new (SoupMessageHeadersType type); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_free (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_append (SoupMessageHeaders *hdrs, const char *name, const char *value); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_replace (SoupMessageHeaders *hdrs, const char *name, const char *value); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_remove (SoupMessageHeaders *hdrs, const char *name); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_clear (SoupMessageHeaders *hdrs); SOUP_AVAILABLE_IN_2_36 void soup_message_headers_clean_connection_headers (SoupMessageHeaders *hdrs); #ifndef SOUP_DISABLE_DEPRECATED +SOUP_AVAILABLE_IN_2_4 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); @@ -62,6 +70,7 @@ typedef void (*SoupMessageHeadersForeachFunc)(const char *name, const char *value, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_foreach (SoupMessageHeaders *hdrs, SoupMessageHeadersForeachFunc func, gpointer user_data); @@ -74,8 +83,10 @@ typedef struct { gpointer dummy[3]; } SoupMessageHeadersIter; +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_iter_init (SoupMessageHeadersIter *iter, SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 gboolean soup_message_headers_iter_next (SoupMessageHeadersIter *iter, const char **name, const char **value); @@ -91,11 +102,15 @@ typedef enum { SOUP_ENCODING_BYTERANGES } SoupEncoding; +SOUP_AVAILABLE_IN_2_4 SoupEncoding soup_message_headers_get_encoding (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_set_encoding (SoupMessageHeaders *hdrs, SoupEncoding encoding); +SOUP_AVAILABLE_IN_2_4 goffset soup_message_headers_get_content_length (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_set_content_length (SoupMessageHeaders *hdrs, goffset content_length); @@ -104,7 +119,9 @@ typedef enum { SOUP_EXPECTATION_CONTINUE = (1 << 1) } SoupExpectation; +SOUP_AVAILABLE_IN_2_4 SoupExpectation soup_message_headers_get_expectations (SoupMessageHeaders *hdrs); +SOUP_AVAILABLE_IN_2_4 void soup_message_headers_set_expectations (SoupMessageHeaders *hdrs, SoupExpectation expectations); diff --git a/libsoup/soup-message.h b/libsoup/soup-message.h index 1dc2258c..1e46b28c 100644 --- a/libsoup/soup-message.h +++ b/libsoup/soup-message.h @@ -58,6 +58,7 @@ typedef struct { void (*_libsoup_reserved3) (void); } SoupMessageClass; +SOUP_AVAILABLE_IN_2_4 GType soup_message_get_type (void); #define SOUP_MESSAGE_METHOD "method" @@ -78,16 +79,20 @@ GType soup_message_get_type (void); #define SOUP_MESSAGE_TLS_ERRORS "tls-errors" #define SOUP_MESSAGE_PRIORITY "priority" +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_message_new (const char *method, const char *uri_string); +SOUP_AVAILABLE_IN_2_4 SoupMessage *soup_message_new_from_uri (const char *method, SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_message_set_request (SoupMessage *msg, const char *content_type, SoupMemoryUse req_use, const char *req_body, gsize req_length); +SOUP_AVAILABLE_IN_2_4 void soup_message_set_response (SoupMessage *msg, const char *content_type, SoupMemoryUse resp_use, @@ -99,13 +104,18 @@ typedef enum { SOUP_HTTP_1_1 = 1 /*< nick=http-1-1 >*/ } SoupHTTPVersion; +SOUP_AVAILABLE_IN_2_4 void soup_message_set_http_version (SoupMessage *msg, SoupHTTPVersion version); +SOUP_AVAILABLE_IN_2_4 SoupHTTPVersion soup_message_get_http_version (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 gboolean soup_message_is_keepalive (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 SoupURI *soup_message_get_uri (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_set_uri (SoupMessage *msg, SoupURI *uri); SOUP_AVAILABLE_IN_2_26 @@ -130,9 +140,11 @@ typedef enum { SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS = (1 << 8) } SoupMessageFlags; +SOUP_AVAILABLE_IN_2_4 void soup_message_set_flags (SoupMessage *msg, SoupMessageFlags flags); +SOUP_AVAILABLE_IN_2_4 SoupMessageFlags soup_message_get_flags (SoupMessage *msg); SOUP_AVAILABLE_IN_2_34 @@ -142,12 +154,14 @@ gboolean soup_message_get_https_status (SoupMessage *msg, /* Specialized signal handlers */ +SOUP_AVAILABLE_IN_2_4 guint soup_message_add_header_handler (SoupMessage *msg, const char *signal, const char *header, GCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 guint soup_message_add_status_code_handler ( SoupMessage *msg, const char *signal, @@ -158,9 +172,11 @@ guint soup_message_add_status_code_handler ( /* * Status Setting */ +SOUP_AVAILABLE_IN_2_4 void soup_message_set_status (SoupMessage *msg, guint status_code); +SOUP_AVAILABLE_IN_2_4 void soup_message_set_status_full (SoupMessage *msg, guint status_code, const char *reason_phrase); @@ -176,6 +192,7 @@ typedef SoupBuffer * (*SoupChunkAllocator) (SoupMessage *msg, gsize max_len, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_42_FOR(SoupRequest) void soup_message_set_chunk_allocator (SoupMessage *msg, SoupChunkAllocator allocator, @@ -207,21 +224,33 @@ void soup_message_set_priority (SoupMessage *msg, SOUP_AVAILABLE_IN_2_44 SoupMessagePriority soup_message_get_priority (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_informational (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_headers (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_chunk (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_body_data (SoupMessage *msg, SoupBuffer *chunk); +SOUP_AVAILABLE_IN_2_4 void soup_message_wrote_body (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_got_informational (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_got_headers (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_got_chunk (SoupMessage *msg, SoupBuffer *chunk); +SOUP_AVAILABLE_IN_2_4 void soup_message_got_body (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_content_sniffed (SoupMessage *msg, const char *content_type, GHashTable *params); SOUP_AVAILABLE_IN_2_50 void soup_message_starting (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_restarted (SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_message_finished (SoupMessage *msg); G_END_DECLS diff --git a/libsoup/soup-misc.h b/libsoup/soup-misc.h index 534b59d6..ecb09a86 100644 --- a/libsoup/soup-misc.h +++ b/libsoup/soup-misc.h @@ -11,11 +11,13 @@ G_BEGIN_DECLS /* Non-default-GMainContext operations */ +SOUP_AVAILABLE_IN_2_4 GSource *soup_add_io_watch (GMainContext *async_context, GIOChannel *chan, GIOCondition condition, GIOFunc function, gpointer data); +SOUP_AVAILABLE_IN_2_4 GSource *soup_add_idle (GMainContext *async_context, GSourceFunc function, gpointer data); @@ -23,6 +25,7 @@ SOUP_AVAILABLE_IN_2_24 GSource *soup_add_completion (GMainContext *async_context, GSourceFunc function, gpointer data); +SOUP_AVAILABLE_IN_2_4 GSource *soup_add_timeout (GMainContext *async_context, guint interval, GSourceFunc function, @@ -30,7 +33,9 @@ GSource *soup_add_timeout (GMainContext *async_context, /* Misc utils */ +SOUP_AVAILABLE_IN_2_4 guint soup_str_case_hash (gconstpointer key); +SOUP_AVAILABLE_IN_2_4 gboolean soup_str_case_equal (gconstpointer v1, gconstpointer v2); @@ -38,7 +43,8 @@ gboolean soup_str_case_equal (gconstpointer v1, /* character classes */ -extern const char soup_char_attributes[]; +SOUP_AVAILABLE_IN_2_4 +const char soup_char_attributes[]; #define SOUP_CHAR_URI_PERCENT_ENCODED 0x01 #define SOUP_CHAR_URI_GEN_DELIMS 0x02 #define SOUP_CHAR_URI_SUB_DELIMS 0x04 @@ -52,8 +58,8 @@ extern const char soup_char_attributes[]; #define soup_char_is_token(ch) (!(soup_char_attributes[(guchar)ch] & (SOUP_CHAR_HTTP_SEPARATOR | SOUP_CHAR_HTTP_CTL))) /* SSL stuff */ - -extern const gboolean soup_ssl_supported; +SOUP_AVAILABLE_IN_2_4 +const gboolean soup_ssl_supported; /* Part of a debugging API */ diff --git a/libsoup/soup-multipart.h b/libsoup/soup-multipart.h index ef2e36c7..ddd1b360 100644 --- a/libsoup/soup-multipart.h +++ b/libsoup/soup-multipart.h @@ -14,6 +14,7 @@ G_BEGIN_DECLS typedef struct SoupMultipart SoupMultipart; +SOUP_AVAILABLE_IN_2_26 GType soup_multipart_get_type (void); #define SOUP_TYPE_MULTIPART (soup_multipart_get_type ()) diff --git a/libsoup/soup-proxy-resolver-default.h b/libsoup/soup-proxy-resolver-default.h index 6c9715cf..4bc6c744 100644 --- a/libsoup/soup-proxy-resolver-default.h +++ b/libsoup/soup-proxy-resolver-default.h @@ -6,7 +6,7 @@ #ifndef SOUP_PROXY_RESOLVER_DEFAULT_H #define SOUP_PROXY_RESOLVER_DEFAULT_H 1 -#include <glib-object.h> +#include <libsoup/soup-types.h> #define SOUP_PROXY_RESOLVER_DEFAULT(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_PROXY_RESOLVER_DEFAULT, SoupProxyResolverDefault)) #define SOUP_PROXY_RESOLVER_DEFAULT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_PROXY_RESOLVER_DEFAULT, SoupProxyResolverDefaultClass)) @@ -24,6 +24,7 @@ typedef struct { } SoupProxyResolverDefaultClass; +SOUP_AVAILABLE_IN_2_4 GType soup_proxy_resolver_default_get_type (void); #define SOUP_TYPE_PROXY_RESOLVER_DEFAULT (soup_proxy_resolver_default_get_type ()) diff --git a/libsoup/soup-proxy-resolver.h b/libsoup/soup-proxy-resolver.h index 72e48852..755d2196 100644 --- a/libsoup/soup-proxy-resolver.h +++ b/libsoup/soup-proxy-resolver.h @@ -39,9 +39,11 @@ typedef struct { } SoupProxyResolverInterface; +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_28 GType soup_proxy_resolver_get_type (void); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_28 void soup_proxy_resolver_get_proxy_async (SoupProxyResolver *proxy_resolver, SoupMessage *msg, @@ -49,6 +51,7 @@ void soup_proxy_resolver_get_proxy_async (SoupProxyResolver *proxy_resolver, GCancellable *cancellable, SoupProxyResolverCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_28 guint soup_proxy_resolver_get_proxy_sync (SoupProxyResolver *proxy_resolver, SoupMessage *msg, diff --git a/libsoup/soup-server.h b/libsoup/soup-server.h index 36a94907..63294870 100644 --- a/libsoup/soup-server.h +++ b/libsoup/soup-server.h @@ -20,6 +20,7 @@ G_BEGIN_DECLS #define SOUP_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SERVER, SoupServerClass)) typedef struct SoupClientContext SoupClientContext; +SOUP_AVAILABLE_IN_2_4 GType soup_client_context_get_type (void); #define SOUP_TYPE_CLIENT_CONTEXT (soup_client_context_get_type ()) @@ -54,6 +55,7 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupServerClass; +SOUP_AVAILABLE_IN_2_4 GType soup_server_get_type (void); #define SOUP_SERVER_TLS_CERTIFICATE "tls-certificate" @@ -62,6 +64,7 @@ GType soup_server_get_type (void); #define SOUP_SERVER_HTTP_ALIASES "http-aliases" #define SOUP_SERVER_HTTPS_ALIASES "https-aliases" +SOUP_AVAILABLE_IN_2_4 SoupServer *soup_server_new (const char *optname1, ...) G_GNUC_NULL_TERMINATED; @@ -70,6 +73,7 @@ gboolean soup_server_set_ssl_cert_file (SoupServer *server const char *ssl_cert_file, const char *ssl_key_file, GError **error); +SOUP_AVAILABLE_IN_2_4 gboolean soup_server_is_https (SoupServer *server); SOUP_AVAILABLE_IN_2_48 @@ -102,6 +106,7 @@ GSList *soup_server_get_uris (SoupServer *server SOUP_AVAILABLE_IN_2_48 GSList *soup_server_get_listeners (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 void soup_server_disconnect (SoupServer *server); SOUP_AVAILABLE_IN_2_50 @@ -120,6 +125,7 @@ typedef void (*SoupServerCallback) (SoupServer *server, SoupClientContext *client, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_server_add_handler (SoupServer *server, const char *path, SoupServerCallback callback, @@ -146,18 +152,22 @@ void soup_server_add_websocket_handler (SoupServer gpointer user_data, GDestroyNotify destroy); +SOUP_AVAILABLE_IN_2_4 void soup_server_remove_handler (SoupServer *server, const char *path); +SOUP_AVAILABLE_IN_2_4 void soup_server_add_auth_domain (SoupServer *server, SoupAuthDomain *auth_domain); +SOUP_AVAILABLE_IN_2_4 void soup_server_remove_auth_domain (SoupServer *server, SoupAuthDomain *auth_domain); /* I/O */ - +SOUP_AVAILABLE_IN_2_4 void soup_server_pause_message (SoupServer *server, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_server_unpause_message (SoupServer *server, SoupMessage *msg); @@ -169,8 +179,11 @@ SOUP_AVAILABLE_IN_2_48 GSocketAddress *soup_client_context_get_local_address (SoupClientContext *client); SOUP_AVAILABLE_IN_2_48 GSocketAddress *soup_client_context_get_remote_address (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_4 const char *soup_client_context_get_host (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_4 SoupAuthDomain *soup_client_context_get_auth_domain (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_4 const char *soup_client_context_get_auth_user (SoupClientContext *client); SOUP_AVAILABLE_IN_2_50 @@ -184,24 +197,32 @@ GIOStream *soup_client_context_steal_connection (SoupClientContext *clien #define SOUP_SERVER_SSL_CERT_FILE "ssl-cert-file" #define SOUP_SERVER_SSL_KEY_FILE "ssl-key-file" +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_48 guint soup_server_get_port (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_48 SoupSocket *soup_server_get_listener (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_48 GMainContext *soup_server_get_async_context (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_48 void soup_server_run (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_48 void soup_server_run_async (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_48 void soup_server_quit (SoupServer *server); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_48 SoupAddress *soup_client_context_get_address (SoupClientContext *client); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_48 SoupSocket *soup_client_context_get_socket (SoupClientContext *client); diff --git a/libsoup/soup-session-async.h b/libsoup/soup-session-async.h index 96217638..a39b6b9f 100644 --- a/libsoup/soup-session-async.h +++ b/libsoup/soup-session-async.h @@ -33,10 +33,13 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupSessionAsyncClass; +SOUP_AVAILABLE_IN_2_4 GType soup_session_async_get_type (void); #ifndef SOUP_DISABLE_DEPRECATED +SOUP_AVAILABLE_IN_2_4 SoupSession *soup_session_async_new (void); +SOUP_AVAILABLE_IN_2_4 SoupSession *soup_session_async_new_with_options (const char *optname1, ...) G_GNUC_NULL_TERMINATED; #endif diff --git a/libsoup/soup-session-sync.h b/libsoup/soup-session-sync.h index cf81f6b0..b658aa55 100644 --- a/libsoup/soup-session-sync.h +++ b/libsoup/soup-session-sync.h @@ -33,10 +33,13 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupSessionSyncClass; +SOUP_AVAILABLE_IN_2_4 GType soup_session_sync_get_type (void); #ifndef SOUP_DISABLE_DEPRECATED +SOUP_AVAILABLE_IN_2_4 SoupSession *soup_session_sync_new (void); +SOUP_AVAILABLE_IN_2_4 SoupSession *soup_session_sync_new_with_options (const char *optname1, ...) G_GNUC_NULL_TERMINATED; #endif diff --git a/libsoup/soup-session.h b/libsoup/soup-session.h index 4c64ce43..25dd02b8 100644 --- a/libsoup/soup-session.h +++ b/libsoup/soup-session.h @@ -59,6 +59,7 @@ typedef struct { void (*_libsoup_reserved4) (void); } SoupSessionClass; +SOUP_AVAILABLE_IN_2_42 GType soup_session_get_type (void); #define SOUP_SESSION_LOCAL_ADDRESS "local-address" @@ -92,26 +93,34 @@ SOUP_AVAILABLE_IN_2_42 SoupSession *soup_session_new_with_options (const char *optname1, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 void soup_session_queue_message (SoupSession *session, SoupMessage *msg, SoupSessionCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 void soup_session_requeue_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 guint soup_session_send_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_session_pause_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_session_unpause_message (SoupSession *session, SoupMessage *msg); +SOUP_AVAILABLE_IN_2_4 void soup_session_cancel_message (SoupSession *session, SoupMessage *msg, guint status_code); +SOUP_AVAILABLE_IN_2_4 void soup_session_abort (SoupSession *session); +SOUP_AVAILABLE_IN_2_4 GMainContext *soup_session_get_async_context(SoupSession *session); SOUP_AVAILABLE_IN_2_42 @@ -131,7 +140,7 @@ GInputStream *soup_session_send (SoupSession *session, GError **error); #ifndef SOUP_DISABLE_DEPRECATED -/* SOUP_AVAILABLE_IN_2_30 -- this trips up gtkdoc-scan */ +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); diff --git a/libsoup/soup-socket.h b/libsoup/soup-socket.h index 5c1264f9..993d1c66 100644 --- a/libsoup/soup-socket.h +++ b/libsoup/soup-socket.h @@ -57,32 +57,45 @@ typedef void (*SoupSocketCallback) (SoupSocket *sock, guint status, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 GType soup_socket_get_type (void); +SOUP_AVAILABLE_IN_2_4 SoupSocket *soup_socket_new (const char *optname1, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 void soup_socket_connect_async (SoupSocket *sock, GCancellable *cancellable, SoupSocketCallback callback, gpointer user_data); +SOUP_AVAILABLE_IN_2_4 guint soup_socket_connect_sync (SoupSocket *sock, GCancellable *cancellable); +SOUP_AVAILABLE_IN_2_4 int soup_socket_get_fd (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_listen (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_start_ssl (SoupSocket *sock, GCancellable *cancellable); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_start_proxy_ssl (SoupSocket *sock, const char *ssl_host, GCancellable *cancellable); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_is_ssl (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 void soup_socket_disconnect (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 gboolean soup_socket_is_connected (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_socket_get_local_address (SoupSocket *sock); +SOUP_AVAILABLE_IN_2_4 SoupAddress *soup_socket_get_remote_address (SoupSocket *sock); typedef enum { @@ -92,12 +105,14 @@ typedef enum { SOUP_SOCKET_ERROR } SoupSocketIOStatus; +SOUP_AVAILABLE_IN_2_4 SoupSocketIOStatus soup_socket_read (SoupSocket *sock, gpointer buffer, gsize len, gsize *nread, GCancellable *cancellable, GError **error); +SOUP_AVAILABLE_IN_2_4 SoupSocketIOStatus soup_socket_read_until (SoupSocket *sock, gpointer buffer, gsize len, @@ -108,6 +123,7 @@ SoupSocketIOStatus soup_socket_read_until (SoupSocket *sock, GCancellable *cancellable, GError **error); +SOUP_AVAILABLE_IN_2_4 SoupSocketIOStatus soup_socket_write (SoupSocket *sock, gconstpointer buffer, gsize len, diff --git a/libsoup/soup-status.h b/libsoup/soup-status.h index fb4147c6..28d481db 100644 --- a/libsoup/soup-status.h +++ b/libsoup/soup-status.h @@ -93,11 +93,13 @@ typedef enum { SOUP_STATUS_NOT_EXTENDED = 510 /* RFC 2774 */ } SoupStatus; +SOUP_AVAILABLE_IN_2_4 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() +SOUP_AVAILABLE_IN_2_4 GQuark soup_http_error_quark (void); #ifndef SOUP_DISABLE_DEPRECATED diff --git a/libsoup/soup-uri.h b/libsoup/soup-uri.h index 1a81e978..b9360c64 100644 --- a/libsoup/soup-uri.h +++ b/libsoup/soup-uri.h @@ -28,6 +28,7 @@ struct _SoupURI { char *fragment; }; +SOUP_AVAILABLE_IN_2_4 GType soup_uri_get_type (void); #define SOUP_TYPE_URI (soup_uri_get_type ()) @@ -45,63 +46,83 @@ SOUP_VAR gpointer _SOUP_URI_SCHEME_FTP; SOUP_VAR gpointer _SOUP_URI_SCHEME_FILE, _SOUP_URI_SCHEME_DATA, _SOUP_URI_SCHEME_RESOURCE; SOUP_VAR gpointer _SOUP_URI_SCHEME_WS, _SOUP_URI_SCHEME_WSS; +SOUP_AVAILABLE_IN_2_4 SoupURI *soup_uri_new_with_base (SoupURI *base, const char *uri_string); +SOUP_AVAILABLE_IN_2_4 SoupURI *soup_uri_new (const char *uri_string); +SOUP_AVAILABLE_IN_2_4 char *soup_uri_to_string (SoupURI *uri, gboolean just_path_and_query); +SOUP_AVAILABLE_IN_2_4 SoupURI *soup_uri_copy (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 gboolean soup_uri_equal (SoupURI *uri1, SoupURI *uri2); +SOUP_AVAILABLE_IN_2_4 void soup_uri_free (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 char *soup_uri_encode (const char *part, const char *escape_extra); +SOUP_AVAILABLE_IN_2_4 char *soup_uri_decode (const char *part); +SOUP_AVAILABLE_IN_2_4 char *soup_uri_normalize (const char *part, const char *unescape_extra); +SOUP_AVAILABLE_IN_2_4 gboolean soup_uri_uses_default_port (SoupURI *uri); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_scheme (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_scheme (SoupURI *uri, const char *scheme); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_user (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_user (SoupURI *uri, const char *user); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_password (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_password (SoupURI *uri, const char *password); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_host (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_host (SoupURI *uri, const char *host); SOUP_AVAILABLE_IN_2_32 guint soup_uri_get_port (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_port (SoupURI *uri, guint port); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_path (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_path (SoupURI *uri, const char *path); SOUP_AVAILABLE_IN_2_32 const char *soup_uri_get_query (SoupURI *uri); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_query (SoupURI *uri, const char *query); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_query_from_form (SoupURI *uri, GHashTable *form); +SOUP_AVAILABLE_IN_2_4 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); +SOUP_AVAILABLE_IN_2_4 void soup_uri_set_fragment (SoupURI *uri, const char *fragment); diff --git a/libsoup/soup-value-utils.h b/libsoup/soup-value-utils.h index 2a50abc8..7910beff 100644 --- a/libsoup/soup-value-utils.h +++ b/libsoup/soup-value-utils.h @@ -29,59 +29,74 @@ G_STMT_START { \ g_free (getv_error); \ } G_STMT_END +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 GHashTable *soup_value_hash_new (void); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 GHashTable *soup_value_hash_new_with_vals (const char *first_key, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 void soup_value_hash_insert_value (GHashTable *hash, const char *key, GValue *value); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 void soup_value_hash_insert (GHashTable *hash, const char *key, GType type, ...); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 void soup_value_hash_insert_vals (GHashTable *hash, const char *first_key, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 gboolean soup_value_hash_lookup (GHashTable *hash, const char *key, GType type, ...); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 gboolean soup_value_hash_lookup_vals (GHashTable *hash, const char *first_key, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 GValueArray *soup_value_array_from_args (va_list args); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 gboolean soup_value_array_to_args (GValueArray *array, va_list args); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 GValueArray *soup_value_array_new (void); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 GValueArray *soup_value_array_new_with_vals (GType first_type, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 void soup_value_array_insert (GValueArray *array, guint index_, GType type, ...); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 void soup_value_array_append (GValueArray *array, GType type, ...); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 void soup_value_array_append_vals (GValueArray *array, GType first_type, ...) G_GNUC_NULL_TERMINATED; +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 gboolean soup_value_array_get_nth (GValueArray *array, guint index_, @@ -89,6 +104,7 @@ gboolean soup_value_array_get_nth (GValueArray *array, ...); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52 GType soup_byte_array_get_type (void); #define SOUP_TYPE_BYTE_ARRAY (soup_byte_array_get_type ()) diff --git a/libsoup/soup-version.h.in b/libsoup/soup-version.h.in index f0775a8c..de908c26 100644 --- a/libsoup/soup-version.h.in +++ b/libsoup/soup-version.h.in @@ -324,6 +324,20 @@ gboolean soup_check_version (guint major, # define SOUP_AVAILABLE_IN_2_52 _SOUP_EXTERN #endif +SOUP_AVAILABLE_IN_2_42 +guint soup_get_major_version (void); + +SOUP_AVAILABLE_IN_2_42 +guint soup_get_minor_version (void); + +SOUP_AVAILABLE_IN_2_42 +guint soup_get_micro_version (void); + +SOUP_AVAILABLE_IN_2_42 +gboolean soup_check_version (guint major, + guint minor, + guint micro); + G_END_DECLS #endif /* SOUP_VERSION_H */ diff --git a/libsoup/soup-websocket-connection.h b/libsoup/soup-websocket-connection.h index 2f6af000..515961b6 100644 --- a/libsoup/soup-websocket-connection.h +++ b/libsoup/soup-websocket-connection.h @@ -61,6 +61,7 @@ typedef struct { SOUP_AVAILABLE_IN_2_50 GType soup_websocket_connection_get_type (void) G_GNUC_CONST; +SOUP_AVAILABLE_IN_2_50 SoupWebsocketConnection *soup_websocket_connection_new (GIOStream *stream, SoupURI *uri, SoupWebsocketConnectionType type, diff --git a/libsoup/soup-xmlrpc-old.h b/libsoup/soup-xmlrpc-old.h index 47ab15cb..1f486eff 100644 --- a/libsoup/soup-xmlrpc-old.h +++ b/libsoup/soup-xmlrpc-old.h @@ -11,19 +11,23 @@ G_BEGIN_DECLS /* XML-RPC client */ +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_build_request) char *soup_xmlrpc_build_method_call (const char *method_name, GValue *params, int n_params); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_message_new) SoupMessage *soup_xmlrpc_request_new (const char *uri, const char *method_name, ...); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_parse_response) gboolean soup_xmlrpc_parse_method_response (const char *method_response, int length, GValue *value, GError **error); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_parse_response) gboolean soup_xmlrpc_extract_method_response (const char *method_response, int length, @@ -32,22 +36,27 @@ gboolean soup_xmlrpc_extract_method_response (const char *method_response, ...); /* XML-RPC server */ +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_parse_request) gboolean soup_xmlrpc_parse_method_call (const char *method_call, int length, char **method_name, GValueArray **params); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_parse_request) gboolean soup_xmlrpc_extract_method_call (const char *method_call, int length, char **method_name, ...); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_build_response) char *soup_xmlrpc_build_method_response (GValue *value); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_message_set_response) void soup_xmlrpc_set_response (SoupMessage *msg, GType type, ...); +SOUP_AVAILABLE_IN_2_4 SOUP_DEPRECATED_IN_2_52_FOR(soup_xmlrpc_message_set_fault) void soup_xmlrpc_set_fault (SoupMessage *msg, int fault_code, diff --git a/libsoup/soup-xmlrpc.h b/libsoup/soup-xmlrpc.h index 89d99a16..1c4634f2 100644 --- a/libsoup/soup-xmlrpc.h +++ b/libsoup/soup-xmlrpc.h @@ -43,6 +43,7 @@ char *soup_xmlrpc_parse_request (const char *method_call, SOUP_AVAILABLE_IN_2_52 char *soup_xmlrpc_build_response (GVariant *value, GError **error); +SOUP_AVAILABLE_IN_2_4 char *soup_xmlrpc_build_fault (int fault_code, const char *fault_format, ...) G_GNUC_PRINTF (2, 3); @@ -66,6 +67,7 @@ SoupDate *soup_xmlrpc_variant_get_datetime (GVariant *variant, /* Errors */ #define SOUP_XMLRPC_ERROR soup_xmlrpc_error_quark() +SOUP_AVAILABLE_IN_2_4 GQuark soup_xmlrpc_error_quark (void); typedef enum { @@ -74,6 +76,7 @@ typedef enum { } SoupXMLRPCError; #define SOUP_XMLRPC_FAULT soup_xmlrpc_fault_quark() +SOUP_AVAILABLE_IN_2_4 GQuark soup_xmlrpc_fault_quark (void); typedef enum { |