| SOUP Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
enum SoupProtocol; typedef SoupUri; SoupUri* soup_uri_new (const gchar *uri_string); gchar* soup_uri_to_string (const SoupUri *uri, gboolean show_password); SoupUri* soup_uri_copy (const SoupUri *uri); void soup_uri_free (SoupUri *uri); |
typedef enum {
SOUP_PROTOCOL_HTTP = 1,
SOUP_PROTOCOL_HTTPS,
SOUP_PROTOCOL_SMTP,
SOUP_PROTOCOL_SOCKS4,
SOUP_PROTOCOL_SOCKS5
} SoupProtocol; |
typedef struct {
SoupProtocol protocol;
gchar *user;
gchar *authmech;
gchar *passwd;
gchar *host;
gint port;
gchar *path;
gchar *querystring;
gchar **query_elems;
} SoupUri; |
SoupUri* soup_uri_new (const gchar *uri_string); |
This routine takes a gchar and parses it as a URL of the form: protocol://user;AUTH=mech:passwordhost:port/path?querystring There is no test on the values. For example, "port" can be a string, not only a number! The SoupUri structure fields are filled with the scan results. When a member of the general URL can not be found, the corresponding SoupUri member is NULL. Fields filled in the SoupUri structure are allocated and url_string is not modified.