| Evolution API Reference: libedataserver, utility library |
|---|
EUrlEUrl — A URI data structure and associated functions. |
#include <libedataserver/e-url.h>
EUri;
char* e_url_shroud (const char *url);
gboolean e_url_equal (const char *url1,
const char *url2);
EUri* e_uri_new (const char *uri_string);
void e_uri_free (EUri *uri);
const char* e_uri_get_param (EUri *uri,
const char *name);
EUri* e_uri_copy (EUri *uri);
char* e_uri_to_string (EUri *uri,
gboolean show_password);
typedef struct {
char *protocol;
char *user;
char *authmech;
char *passwd;
char *host;
int port;
char *path;
GData *params;
char *query;
char *fragment;
} EUri;
A structure representing a URI.
| char *protocol; | The protocol to use. |
| char *user; | A user name. |
| char *authmech; | The authentication mechanism. |
| char *passwd; | The connection password. |
| char *host; | The host name. |
| int port; | The port number. |
| char *path; | The file path on the host. |
| GData *params; | Additional parameters. |
| char *query; | |
| char *fragment; |
char* e_url_shroud (const char *url);
Removes the moniker (i.e. mailto:) from a url.
| url : | The url to shroud. |
| Returns : | The newly-allocated shrouded url. |
gboolean e_url_equal (const char *url1,
const char *url2);Checks two urls for equality, after first removing any monikers on the urls.
| url1 : | The first url to compare. |
| url2 : | The second url to compare. |
| Returns : | TRUE if the urls are equal, FALSE if they are not. |
EUri* e_uri_new (const char *uri_string);
Creates an EUri representation of the uri given in uri_string.
void e_uri_free (EUri *uri);
Frees the memory of an EUri structure.
| uri : | A pointer to the EUri to free. |
const char* e_uri_get_param (EUri *uri, const char *name);
Retrieves the value of the parameter associated with name in uri.
| uri : | The EUri to get the parameter from. |
| name : | The name of the parameter to get. |
| Returns : | The value of the parameter. |
EUri* e_uri_copy (EUri *uri);
Makes a copy of uri.
| uri : | The EUri to copy. |
| Returns : | The newly-allocated copy of uri. |
char* e_uri_to_string (EUri *uri, gboolean show_password);
Creates a string representation of uri. The password will only be included in the string if show_password is set to TRUE.
| uri : | The EUri to convert to a string. |
| show_password : | Whether or not to show the password in the string. |
| Returns : | The string representation of uri. |
| << Utility Functions | EXMLHash >> |