![]() | ![]() | ![]() | SOUP Reference Manual | ![]() |
---|
enum SoupProtocol; struct 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, SOUP_PROTOCOL_FILE } SoupProtocol;
struct SoupUri { SoupProtocol protocol; gchar *user; gchar *authmech; gchar *passwd; gchar *host; gint port; gchar *path; gchar *querystring; };
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.
uri_string : | The string containing the URL to scan |
Returns : | a SoupUri structure containing the URL items. |
gchar* soup_uri_to_string (const SoupUri *uri, gboolean show_password);
uri : | |
show_password : | |
Returns : |
|
<<< soup-socket | soup-fault >>> |