Functions | |
gchar * | rox_unescape_uri (const char *uri) |
gchar * | rox_encode_path_as_uri (const guchar *path) |
gchar * | rox_escape_uri_path (const char *path) |
gchar * | rox_uri_get_handler (const char *scheme) |
int | rox_uri_launch_handler (const char *uri, gboolean block, GError **err) |
int | rox_uri_launch (const char *uri) |
const char * | rox_hostname (void) |
gchar* rox_encode_path_as_uri | ( | const guchar * | path | ) |
Convert a local path into a file: URI with problematic characters replaced with %xx escapes.
[in] | path | to encode |
gchar* rox_escape_uri_path | ( | const char * | path | ) |
Escape path for future use in URI by replacing problematic characters with a %xx escape sequence.
[in] | path | path to be escaped |
const char* rox_hostname | ( | void | ) |
Return the canonical hostname for use in drag and drop.
gchar* rox_unescape_uri | ( | const char * | uri | ) |
Convert a URI with %xx escapes into one without
[in] | uri | URI to be converted. |
gchar* rox_uri_get_handler | ( | const char * | scheme | ) |
Return the handler for URI's of the named scheme (e.g. http, file, ftp, etc.) The handler for file is always rox, otherwise it obtained from the configuration directory rox.sourceforge.net/URI.
[in] | scheme | URI scheme to get handler for (do not include trailing ':' character) |
NULL
is returned if no handler is defined. int rox_uri_launch | ( | const char * | uri | ) |
Launch a URI. If there is a handler for the MIME type text/x-uri then that is executed with '-' as a single argument and the URI pass in on standard input. If there is no such handler then each of the following commands is tried in turn:
[in] | uri | URI to launch |
int rox_uri_launch_handler | ( | const char * | uri, | |
gboolean | block, | |||
GError ** | err | |||
) |
For a given URI pass it to the appropriate launcher. rox_uri_get_handler() is used to look up the launcher command which is executed.
[in] | uri | the URI to launch |
[in] | block | if FALSE then do not wait for command to complete, otherwise block until so. |
[in,out] | err | location to store error message when launching fails, or NULL to discard it |
-1
if no launcher is defined or -2
if an error occured (check err).