aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-url.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-03-30 01:34:00 +0800
committerDan Winship <danw@src.gnome.org>2001-03-30 01:34:00 +0800
commitbd52985962ec52ed1a89a466c66fab61e5fe9134 (patch)
treef88fa33bdeefeff0d51e994825e91897dfd1b82b /camel/camel-url.c
parentfeaa9ddc81a8d4f0c3c037fd2822a56107bbab6b (diff)
downloadgsoc2013-evolution-bd52985962ec52ed1a89a466c66fab61e5fe9134.tar
gsoc2013-evolution-bd52985962ec52ed1a89a466c66fab61e5fe9134.tar.gz
gsoc2013-evolution-bd52985962ec52ed1a89a466c66fab61e5fe9134.tar.bz2
gsoc2013-evolution-bd52985962ec52ed1a89a466c66fab61e5fe9134.tar.lz
gsoc2013-evolution-bd52985962ec52ed1a89a466c66fab61e5fe9134.tar.xz
gsoc2013-evolution-bd52985962ec52ed1a89a466c66fab61e5fe9134.tar.zst
gsoc2013-evolution-bd52985962ec52ed1a89a466c66fab61e5fe9134.zip
change "gboolean show_passwd" to "guint32 flags".
* camel-url.c (camel_url_to_string): change "gboolean show_passwd" to "guint32 flags". * tests/misc/url.c (main): Update calls to camel_url_to_string * providers/imap/camel-imap-store.c (construct): Call camel_url_to_string with flags to hide password, authtype, and params to create the base_url. (etc): Update for the fact that the base_url no longer has the "/" at the end. * camel-service.c (construct): Update calls to camel_url_to_string (pass CAMEL_URL_HIDE_PASSWORD) svn path=/trunk/; revision=9014
Diffstat (limited to 'camel/camel-url.c')
-rw-r--r--camel/camel-url.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/camel/camel-url.c b/camel/camel-url.c
index 28f913495d..535564f28e 100644
--- a/camel/camel-url.c
+++ b/camel/camel-url.c
@@ -292,12 +292,12 @@ camel_url_new (const char *url_string, CamelException *ex)
/**
* camel_url_to_string:
* @url: a CamelURL
- * @show_password: whether or not to include the password in the output
+ * @flags: additional translation options.
*
* Return value: a string representing @url, which the caller must free.
**/
char *
-camel_url_to_string (CamelURL *url, gboolean show_passwd)
+camel_url_to_string (CamelURL *url, guint32 flags)
{
GString *str;
char *enc, *return_result;
@@ -322,7 +322,7 @@ camel_url_to_string (CamelURL *url, gboolean show_passwd)
g_string_sprintfa (str, ";auth=%s", enc);
g_free (enc);
}
- if (show_passwd && url->passwd) {
+ if (url->passwd && !(flags & CAMEL_URL_HIDE_PASSWORD)) {
enc = camel_url_encode (url->passwd, TRUE, "@/");
g_string_sprintfa (str, ":%s", enc);
g_free (enc);
@@ -342,7 +342,7 @@ camel_url_to_string (CamelURL *url, gboolean show_passwd)
g_string_sprintfa (str, "%s", enc);
g_free (enc);
}
- if (url->params)
+ if (url->params && !(flags & CAMEL_URL_HIDE_PARAMS))
g_datalist_foreach (&url->params, output_param, str);
if (url->query) {
enc = camel_url_encode (url->query, FALSE, "#");