1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright 2008 Red Hat, Inc.
9 #include <libsoup/soup-types.h>
10 #include <libsoup/soup-multipart.h>
14 #define SOUP_FORM_MIME_TYPE_URLENCODED "application/x-www-form-urlencoded"
15 #define SOUP_FORM_MIME_TYPE_MULTIPART "multipart/form-data"
17 GHashTable *soup_form_decode (const char *encoded_form);
18 SOUP_AVAILABLE_IN_2_26
19 GHashTable *soup_form_decode_multipart (SoupMessage *msg,
20 const char *file_control_name,
25 char *soup_form_encode (const char *first_field,
26 ...) G_GNUC_NULL_TERMINATED;
27 char *soup_form_encode_hash (GHashTable *form_data_set);
28 char *soup_form_encode_datalist (GData **form_data_set);
29 char *soup_form_encode_valist (const char *first_field,
32 #ifndef SOUP_DISABLE_DEPRECATED
33 /* Compatibility with libsoup 2.3.0 */
34 #define soup_form_decode_urlencoded soup_form_decode
35 #define soup_form_encode_urlencoded soup_form_encode_hash
36 #define soup_form_encode_urlencoded_list soup_form_encode_datalist
39 SoupMessage *soup_form_request_new (const char *method,
41 const char *first_field,
42 ...) G_GNUC_NULL_TERMINATED;
43 SoupMessage *soup_form_request_new_from_hash (const char *method,
45 GHashTable *form_data_set);
46 SoupMessage *soup_form_request_new_from_datalist (const char *method,
48 GData **form_data_set);
49 SOUP_AVAILABLE_IN_2_26
50 SoupMessage *soup_form_request_new_from_multipart (const char *uri,
51 SoupMultipart *multipart);
55 #endif /* SOUP_FORM_H */