aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-session.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-04-06 11:52:39 +0800
committerDan Winship <danw@src.gnome.org>2000-04-06 11:52:39 +0800
commit2e4a5463075e387151afcdf61b74202a729944db (patch)
tree451716a6b189f11de18346a86716cbedf010f609 /camel/camel-session.c
parent080049ac37387efd71551bfdb661e15c0e1ce8ce (diff)
downloadgsoc2013-evolution-2e4a5463075e387151afcdf61b74202a729944db.tar
gsoc2013-evolution-2e4a5463075e387151afcdf61b74202a729944db.tar.gz
gsoc2013-evolution-2e4a5463075e387151afcdf61b74202a729944db.tar.bz2
gsoc2013-evolution-2e4a5463075e387151afcdf61b74202a729944db.tar.lz
gsoc2013-evolution-2e4a5463075e387151afcdf61b74202a729944db.tar.xz
gsoc2013-evolution-2e4a5463075e387151afcdf61b74202a729944db.tar.zst
gsoc2013-evolution-2e4a5463075e387151afcdf61b74202a729944db.zip
the URL RFC says the port must be numeric, so we don't want to do
* g_url_new really wanted to take a CamelException. So, rename Gurl to CamelURL, g_url_* to camel_url_* (with camel_url_new taking an exception), and url-util.[ch] to camel-url.[ch]. Also force url->port to be numeric and remove camel_service_getport. (I was confused before: the URL RFC says the port must be numeric, so we don't want to do getportbyname.) svn path=/trunk/; revision=2300
Diffstat (limited to 'camel/camel-session.c')
-rw-r--r--camel/camel-session.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 1667651fa3..6cf8da12d5 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -33,7 +33,7 @@
#include "camel-transport.h"
#include "camel-exception.h"
#include "string-utils.h"
-#include "url-util.h"
+#include "camel-url.h"
#include "hash-table-utils.h"
@@ -108,7 +108,7 @@ camel_session_new (CamelAuthCallback authenticator)
* @provider: provider object
*
* Set the default implementation for a protocol. The protocol
- * is determined by provider->protocol field (See CamelProtocol).
+ * is determined by provider->protocol field (See CamelProvider).
* It overrides the default provider for this protocol.
*
**/
@@ -170,7 +170,7 @@ camel_session_get_store_from_provider (CamelSession *session,
**/
static CamelStore *
get_store_for_protocol_with_url (CamelSession *session, const char *protocol,
- Gurl *url, CamelException *ex)
+ CamelURL *url, CamelException *ex)
{
const CamelProvider *provider = NULL;
@@ -235,21 +235,17 @@ CamelStore *
camel_session_get_store (CamelSession *session, const char *url_string,
CamelException *ex)
{
- Gurl *url;
+ CamelURL *url;
CamelStore *store;
- url = g_url_new (url_string);
- if (url == NULL || url->protocol == NULL) {
- camel_exception_setv(ex, CAMEL_EXCEPTION_SERVICE_URL_INVALID,
- "Could not determine protocol for "
- "URL '%s'", url_string);
+ url = camel_url_new (url_string, ex);
+ if (!url)
return NULL;
- }
store = get_store_for_protocol_with_url (session, url->protocol,
url, ex);
if (store == NULL)
- g_url_free (url);
+ camel_url_free (url);
return store;
}