Struct
CamelURL
Description [src]
struct CamelURL {
gchar* protocol;
gchar* user;
gchar* authmech;
gchar* host;
gint port;
gchar* path;
GData* params;
gchar* query;
gchar* fragment;
}
URI parsing, encoding, and manipulation.
CamelURL provides a URI parser, encoder, and logic for merging relative
URIs with base URIs. When a URI string is parsed, it is split into its
constituent parts and stored in a decoded form:
protocol, user, authentication mechanism, password, host, port, path,
query parameters, query string, and fragment.
Field values are read directly from the struct members, but should only be written via the camel_url_set_*() accessor functions, which manage memory correctly.
camel_url_to_string() serialises a CamelURL back to a string,
with optional flags to hide sensitive fields such as URI parameters (e.g. CAMEL_URL_HIDE_PARAMS) or authentication details (e.g. CAMEL_URL_HIDE_AUTH).
camel_url_new_with_base() creates a new URI by resolving a relative URI
string against a base CamelURL, following all relevant RFC rules.
camel_url_encode() and camel_url_decode() handle percent-encoding (%XX escaping) of URI components.
Structure members
protocol:gchar*No description available.
user:gchar*No description available.
authmech:gchar*No description available.
host:gchar*No description available.
port:gintNo description available.
path:gchar*No description available.
params:GDataNo description available.
query:gchar*No description available.
fragment:gchar*No description available.
Functions
camel_url_decode
%-decodes the passed-in URL in place. The decoded version is never longer than the encoded version, so there does not need to be any additional space at the end of the string.
camel_url_encode
This %-encodes the given URL part and returns the escaped version in allocated memory, which the caller must free when it is done.