![]() |
![]() |
![]() |
gURLChecker Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
gboolean uc_url_is_faked (UCLinkProperties *prop
,UCHTMLTag *tag
); gchar * uc_url_extract_url_from_local_path (const gchar *path
); void uc_url_correction (UCLinkProperties *prop
); gchar * uc_url_normalize (const gchar *current_host
,const gchar *current_path
,gchar *url
); gchar * uc_url_get_hostname (const gchar *current_host
,const gchar *url
); gchar * uc_url_get_port (const gchar *url
); gchar * uc_url_add_protocol (const gchar *proto
,const gchar *host
); gchar * uc_url_add_slash (const gchar *url
); gboolean uc_url_is_valid (const gchar *url
); gchar * uc_url_get_protocol (const gchar *url
); gboolean uc_url_parse (const gchar *current_host
,const gchar *current_path
,gchar *rurl
,gchar **host
,gchar **port
,gchar **path
,gchar **args
); gchar * uc_url_get_ip (gchar *host
);
gboolean uc_url_is_faked (UCLinkProperties *prop
,UCHTMLTag *tag
);
Check if the link is in fact a redirection or if it has another location.
|
A UCLinkProperties object. |
|
A UCHTMLTag. |
Returns : |
TRUE if URL has been modified. Tag struct is modified. |
gchar * uc_url_extract_url_from_local_path (const gchar *path
);
A little tricky: extract a URL from a path. The URL must be at the end of the given path.
|
The path from which to extract URL. |
Returns : |
The URL in a newly allocated string or NULL . |
gchar * uc_url_normalize (const gchar *current_host
,const gchar *current_path
,gchar *url
);
Build a full URI from the given parameters.
|
The current host. |
|
The current path. |
|
The URI. |
Returns : |
A full and normalized URI. A new allocated string. |
gchar * uc_url_get_hostname (const gchar *current_host
,const gchar *url
);
Get the hostname of a given url. If the url doesn't have host name, then current_host is send.
|
The current host. |
|
The URI. |
Returns : |
The hostname of a given URI. A new allocated string. |
gchar * uc_url_get_port (const gchar *url
);
Get the port of a given url.
|
The URI. |
Returns : |
The port of the given URI. A new allocated string. |
gchar * uc_url_add_protocol (const gchar *proto
,const gchar *host
);
Add the given protocol to the given url.
|
The protocol to add. |
|
The host. |
Returns : |
The host plus the given protocole. A new allocated string. |
gchar * uc_url_add_slash (const gchar *url
);
Check if the given url url
end by a slash. if not, add it.
|
a URL. |
Returns : |
a new allocated string ended by a slash. |
gboolean uc_url_is_valid (const gchar *url
);
Quikly (loosly) check the validity of a given url.
|
The URI. |
Returns : |
TRUE if the given URI is valid. |
gchar * uc_url_get_protocol (const gchar *url
);
Get the protocol of a given url.
|
The URI. |
Returns : |
The protocole of the given URI. If not, a return a default protocol: UC_PROTOCOL_HTTP or UC_PROTOCOL_HTTPS. A new allocated string. |
gboolean uc_url_parse (const gchar *current_host
,const gchar *current_path
,gchar *rurl
,gchar **host
,gchar **port
,gchar **path
,gchar **args
);
Parse a given url.
|
The current host. |
|
The current_path. |
|
The URI to parse. |
|
String to put the host. |
|
String to put the port. |
|
String to put the path. |
|
String to put the arguments. |
Returns : |
TRUE if it is ok. parameters host , port , path and args are
modified. |