![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
struct CamelURL; enum CamelURLFlags; #define CAMEL_URL_HIDE_ALL CamelURL * camel_url_new_with_base (CamelURL *base
,const
); CamelURL * camel_url_new (gchar *url_stringconst
,gchar *url_string);
GError **errorgchar * camel_url_to_string (CamelURL *url
,CamelURLFlags flags
);void camel_url_free (CamelURL *url
);gchar * camel_url_encode (const
,gchar *partconst
);gchar *escape_extravoid camel_url_decode ();
gchar *partgchar * camel_url_decode_path (const
);gchar *pathvoid camel_url_set_protocol (CamelURL *url
,const
);gchar *protocolvoid camel_url_set_user (CamelURL *url
,const
);gchar *uservoid camel_url_set_authmech (CamelURL *url
,const
);gchar *authmechvoid camel_url_set_host (CamelURL *url
,const
);gchar *hostvoid camel_url_set_port (CamelURL *url
,);
gint portvoid camel_url_set_path (CamelURL *url
,const
);gchar *pathvoid camel_url_set_param (CamelURL *url
,const
,gchar *nameconst
);gchar *valuevoid camel_url_set_query (CamelURL *url
,const
);gchar *queryvoid camel_url_set_fragment (CamelURL *url
,const
); constgchar *fragmentgchar * camel_url_get_param (CamelURL *url
,const
);gchar *nameguint camel_url_hash ();
gconstpointer vgint camel_url_equal (,
gconstpointer v); CamelURL * camel_url_copy (
gconstpointer v2CamelURL *in
);
struct CamelURL { gchar *protocol; gchar *user; gchar *authmech; gchar *host; gint port; gchar *path; GData *params; gchar *query; gchar *fragment; };
typedef enum { CAMEL_URL_HIDE_PARAMS = 1 << 0, CAMEL_URL_HIDE_AUTH = 1 << 1 } CamelURLFlags;
CamelURL * camel_url_new_with_base (CamelURL *base
,const
);gchar *url_string
Parses url_string
relative to base
.
|
a base URL |
|
the URL |
Returns : |
a parsed CamelURL |
CamelURL * camel_url_new (const
,gchar *url_string);
GError **error
Parses an absolute URL.
|
a URL string |
|
return location for a NULL |
Returns : |
a CamelURL if it can be parsed, or NULL |
gchar * camel_url_to_string (CamelURL *url
,CamelURLFlags flags
);
Flatten a CamelURL into a string.
|
a CamelURL |
|
additional translation options |
Returns : |
a string representing url , which the caller must free |
gchar * camel_url_encode (const
,gchar *partconst
);gchar *escape_extra
This -encodes
|
a URL part |
|
additional characters beyond " \"%#<>{}|\^[]`"
to escape (or NULL |
Returns : |
the encoded string |
void camel_url_decode ();
gchar *part
-decodes
|
a URL part |
void camel_url_set_protocol (CamelURL *url
,const
);gchar *protocol
Set the protocol of a CamelURL.
|
a CamelURL |
|
protocol schema |
void camel_url_set_user (CamelURL *url
,const
);gchar *user
Set the user of a CamelURL.
|
a CamelURL |
|
username |
void camel_url_set_authmech (CamelURL *url
,const
);gchar *authmech
Set the authmech of a CamelURL.
|
a CamelURL |
|
authentication mechanism |
void camel_url_set_host (CamelURL *url
,const
);gchar *host
Set the hostname of a CamelURL.
|
a CamelURL |
|
hostname |
void camel_url_set_port (CamelURL *url
,);
gint port
Set the port on a CamelURL.
|
a CamelURL |
|
port |
void camel_url_set_path (CamelURL *url
,const
);gchar *path
Set the path component of a CamelURL.
|
a CamelURL |
|
path |
void camel_url_set_param (CamelURL *url
,const
,gchar *nameconst
);gchar *value
Set a param on the CamelURL.
|
a CamelURL |
|
name of the param to set |
|
value of the param to set |
void camel_url_set_query (CamelURL *url
,const
);gchar *query
Set the query of a CamelURL.
|
a CamelURL |
|
url query |
void camel_url_set_fragment (CamelURL *url
,const
);gchar *fragment
Set the fragment of a CamelURL.
|
a CamelURL |
|
url fragment |
constgchar * camel_url_get_param (CamelURL *url
,const
);gchar *name
Get the value of the specified param on the URL.
|
a CamelURL |
|
name of the param |
Returns : |
the value of a param if found or NULL |