| Goffice Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
gboolean go_url_check_extension (gchar const *uri,gchar const *std_ext,gchar **new_uri); gchar * go_url_decode (gchar const *text); gchar * go_url_encode (gchar const *text,int type); char * go_url_make_relative (const char *uri,const char *ref_uri); char * go_url_resolve_relative (const char *ref_uri,const char *rel_uri); GError * go_url_show (gchar const *url); char * go_url_simplify (const char *uri);
gboolean go_url_check_extension (gchar const *uri,gchar const *std_ext,gchar **new_uri);
Modifies given uri by adding the extension std_ext if needed.
If no std_ext is given or uri already has some extension,
it just copies uri.
Value in new_uri: newly allocated string which you should free after use, containing (optionally) modified uri.
|
Uri |
|
Standard extension for the content type |
|
New uri |
Returns : |
FALSE if the uri has an extension not matching std_ext
|
gchar * go_url_decode (gchar const *text);
Decode the result of go_url_encode.
|
constant buffer to decode. |
Returns : |
a decoded string which the caller is responsible for freeing. |
gchar * go_url_encode (gchar const *text,int type);
url-encode a string according to RFC 2368.
|
The constant text to be encoded |
|
0 : mailto, 1: file or http |
Returns : |
an encoded string which the caller is responsible for freeing. |
char * go_url_make_relative (const char *uri,const char *ref_uri);
|
|
|
|
Returns : |
char * go_url_resolve_relative (const char *ref_uri,const char *rel_uri);
|
|
|
|
Returns : |