![]() |
![]() |
![]() |
Camel Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
CamelURL; #define CAMEL_URL_HIDE_PASSWORD #define CAMEL_URL_HIDE_PARAMS #define CAMEL_URL_HIDE_AUTH #define CAMEL_URL_HIDE_ALL CamelURL * camel_url_new_with_base (CamelURL *base
,const gchar *url_string
); CamelURL * camel_url_new (const gchar *url_string
,CamelException *ex
); gchar * camel_url_to_string (CamelURL *url
,guint32 flags
); void camel_url_free (CamelURL *url
); gchar * camel_url_encode (const gchar *part
,const gchar *escape_extra
); void camel_url_decode (gchar *part
); gchar * camel_url_decode_path (const gchar *path
); void camel_url_set_protocol (CamelURL *url
,const gchar *protocol
); void camel_url_set_user (CamelURL *url
,const gchar *user
); void camel_url_set_authmech (CamelURL *url
,const gchar *authmech
); void camel_url_set_passwd (CamelURL *url
,const gchar *passwd
); void camel_url_set_host (CamelURL *url
,const gchar *host
); void camel_url_set_port (CamelURL *url
,gint port
); void camel_url_set_path (CamelURL *url
,const gchar *path
); void camel_url_set_param (CamelURL *url
,const gchar *name
,const gchar *value
); void camel_url_set_query (CamelURL *url
,const gchar *query
); void camel_url_set_fragment (CamelURL *url
,const gchar *fragment
); const gchar * camel_url_get_param (CamelURL *url
,const gchar *name
); guint camel_url_hash (gconstpointer v
); gint camel_url_equal (gconstpointer v
,gconstpointer v2
); CamelURL * camel_url_copy (const CamelURL *in
);
typedef struct { gchar *protocol; gchar *user; gchar *authmech; gchar *passwd; gchar *host; gint port; gchar *path; GData *params; gchar *query; gchar *fragment; } CamelURL;
#define CAMEL_URL_HIDE_ALL (CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS | CAMEL_URL_HIDE_AUTH)
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
,CamelException *ex
);
Parses an absolute URL.
|
a URL string |
|
a CamelException |
Returns : |
a CamelURL if it can be parsed, or NULL otherwise
|
gchar * camel_url_to_string (CamelURL *url
,guint32 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 *part
,const gchar *escape_extra
);
This -encodes
the given URL part and returns the escaped version
in allocated memory, which the caller must free when it is done.
|
a URL part |
|
additional characters beyond " \"%#<>{}|\^[]`"
to escape (or NULL )
|
Returns : |
the encoded string |
void camel_url_decode (gchar *part
);
-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.
|
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_passwd (CamelURL *url
,const gchar *passwd
);
Set the password of a CamelURL.
|
a CamelURL |
|
password |
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 *name
,const 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 |
const gchar * 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 otherwise
|