6 * @brief Contains the methods used to support the FDO URI specification.
7 * @addtogroup Efreet_Uri Efreet_Uri: The FDO URI Specification functions
15 typedef struct Efreet_Uri Efreet_Uri;
19 * @brief Contains a simple rappresentation of an uri. The string don't have
20 * special chars escaped.
24 const char *protocol; /**< The protocol used (usually 'file')*/
25 const char *hostname; /**< The name of the host if any, or NULL */
26 const char *path; /**< The full file path whitout protocol nor host*/
32 * @param uri Create an URI string from an Efreet_Uri struct
33 * @return The string rapresentation of uri (ex: 'file:///home/my%20name')
34 * @brief Get the string rapresentation of the given uri struct escaping
35 * illegal caracters. Remember to free the string with eina_stringshare_del()
36 * when you don't need it anymore.
37 * @note The resulting string will contain the protocol and the path but not
38 * the hostname, as many apps doesn't handle it.
40 EAPI const char *efreet_uri_encode(Efreet_Uri *uri);
43 * @param val a valid uri string to parse
44 * @return Return The corresponding Efreet_Uri structure. Or NULL on errors.
45 * @brief Read a single uri and return an Efreet_Uri struct. If there's no
46 * hostname in the uri then the hostname parameter will be NULL. All the uri
47 * escaped chars will be converted to normal.
49 EAPI Efreet_Uri *efreet_uri_decode(const char *val);
52 * @param uri The uri to free
53 * @brief Free the given uri structure.
55 EAPI void efreet_uri_free(Efreet_Uri *uri);