1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
4 * Copyright 1999-2002 Ximian, Inc.
11 #include <libsoup/soup-types.h>
12 #include <libsoup/soup-misc.h>
31 GType soup_uri_get_type (void);
32 #define SOUP_TYPE_URI (soup_uri_get_type ())
34 #define SOUP_URI_SCHEME_HTTP _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_HTTP, "http")
35 #define SOUP_URI_SCHEME_HTTPS _SOUP_ATOMIC_INTERN_STRING (_SOUP_URI_SCHEME_HTTPS, "https")
36 extern gpointer _SOUP_URI_SCHEME_HTTP, _SOUP_URI_SCHEME_HTTPS;
38 SoupURI *soup_uri_new_with_base (SoupURI *base,
39 const char *uri_string);
40 SoupURI *soup_uri_new (const char *uri_string);
42 char *soup_uri_to_string (SoupURI *uri,
43 gboolean just_path_and_query);
45 SoupURI *soup_uri_copy (SoupURI *uri);
47 gboolean soup_uri_equal (SoupURI *uri1,
50 void soup_uri_free (SoupURI *uri);
52 char *soup_uri_encode (const char *part,
53 const char *escape_extra);
54 char *soup_uri_decode (const char *part);
55 char *soup_uri_normalize (const char *part,
56 const char *unescape_extra);
58 gboolean soup_uri_uses_default_port (SoupURI *uri);
60 void soup_uri_set_scheme (SoupURI *uri,
62 void soup_uri_set_user (SoupURI *uri,
64 void soup_uri_set_password (SoupURI *uri,
65 const char *password);
66 void soup_uri_set_host (SoupURI *uri,
68 void soup_uri_set_port (SoupURI *uri,
70 void soup_uri_set_path (SoupURI *uri,
72 void soup_uri_set_query (SoupURI *uri,
74 void soup_uri_set_query_from_form (SoupURI *uri,
76 void soup_uri_set_query_from_fields (SoupURI *uri,
77 const char *first_field,
78 ...) G_GNUC_NULL_TERMINATED;
79 void soup_uri_set_fragment (SoupURI *uri,
80 const char *fragment);
82 SoupURI *soup_uri_copy_host (SoupURI *uri);
83 guint soup_uri_host_hash (gconstpointer key);
84 gboolean soup_uri_host_equal (gconstpointer v1,
87 #define SOUP_URI_VALID_FOR_HTTP(uri) ((uri) && ((uri)->scheme == SOUP_URI_SCHEME_HTTP || (uri)->scheme == SOUP_URI_SCHEME_HTTPS) && (uri)->host && (uri)->path)