summaryrefslogtreecommitdiff
path: root/libsoup/soup-form.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2008-02-01 15:23:31 +0000
committerDan Winship <danw@src.gnome.org>2008-02-01 15:23:31 +0000
commit9adc9e9d0dea849093e4520091dd06c9fb850e6f (patch)
treeca28ed1edb70e88d6bd4a957fa6ec6d1628ccbd1 /libsoup/soup-form.h
parenta49e0bcee33eeede3a2764277ae5096192d9d726 (diff)
downloadlibsoup-9adc9e9d0dea849093e4520091dd06c9fb850e6f.tar.gz
new
* libsoup/soup-date.c (soup_date_to_time_t): new * libsoup/soup-form.c (soup_form_decode): Remove "_urlencoded" from name. (And add back-compat #define.) (soup_form_encode): New, takes varargs parameters for each form construction. (soup_form_encode_hash, soup_form_encode_datalist): renamed, with back-compat #defines (soup_form_request_new, soup_form_request_new_from_hash) (soup_form_request_new_from_datalist): New methods to construct a GET or POST message with form data. * libsoup/soup-uri.c (soup_uri_set_query_from_fields): New, takes varargs like soup_form_encode(). * libsoup/soup-value-utils.c (soup_value_hash_new_with_vals) (soup_value_hash_insert_vals, soup_value_hash_lookup_vals): New routines to work with multiple value hash values at once. (soup_value_array_new): tiny wrapper, for naming consistency (soup_value_array_new_with_vals, soup_value_array_append_vals): New routines to work with multiple value array values at once. svn path=/trunk/; revision=1063
Diffstat (limited to 'libsoup/soup-form.h')
-rw-r--r--libsoup/soup-form.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/libsoup/soup-form.h b/libsoup/soup-form.h
index 9502244c..9db5abf0 100644
--- a/libsoup/soup-form.h
+++ b/libsoup/soup-form.h
@@ -10,10 +10,32 @@
G_BEGIN_DECLS
-GHashTable *soup_form_decode_urlencoded (const char *encoded_form);
+GHashTable *soup_form_decode (const char *encoded_form);
-char *soup_form_encode_urlencoded (GHashTable *form_data_set);
-char *soup_form_encode_urlencoded_list (GData **form_data_set);
+char *soup_form_encode (const char *first_field,
+ ...) G_GNUC_NULL_TERMINATED;
+char *soup_form_encode_hash (GHashTable *form_data_set);
+char *soup_form_encode_datalist (GData **form_data_set);
+char *soup_form_encode_valist (const char *first_field,
+ va_list args);
+
+#ifndef LIBSOUP_DISABLE_DEPRECATED
+/* Compatibility with libsoup 2.3.0 */
+#define soup_form_decode_urlencoded soup_form_decode
+#define soup_form_encode_urlencoded soup_form_encode_hash
+#define soup_form_encode_urlencoded_list soup_form_encode_datalist
+#endif
+
+SoupMessage *soup_form_request_new (const char *method,
+ const char *uri,
+ const char *first_field,
+ ...) G_GNUC_NULL_TERMINATED;
+SoupMessage *soup_form_request_new_from_hash (const char *method,
+ const char *uri,
+ GHashTable *form_data_set);
+SoupMessage *soup_form_request_new_from_datalist (const char *method,
+ const char *uri,
+ GData **form_data_set);
G_END_DECLS