aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-10-03 04:14:57 +0800
committerDan Winship <danw@src.gnome.org>2000-10-03 04:14:57 +0800
commit853d2b99ff4a6509cad65e893a84bb00bae4f669 (patch)
treeb50681527a971284cb48fea4879397c191cd2db3
parentbfe2227dd0f527b2c8da97d73ed2361a564f08bd (diff)
downloadgsoc2013-evolution-853d2b99ff4a6509cad65e893a84bb00bae4f669.tar
gsoc2013-evolution-853d2b99ff4a6509cad65e893a84bb00bae4f669.tar.gz
gsoc2013-evolution-853d2b99ff4a6509cad65e893a84bb00bae4f669.tar.bz2
gsoc2013-evolution-853d2b99ff4a6509cad65e893a84bb00bae4f669.tar.lz
gsoc2013-evolution-853d2b99ff4a6509cad65e893a84bb00bae4f669.tar.xz
gsoc2013-evolution-853d2b99ff4a6509cad65e893a84bb00bae4f669.tar.zst
gsoc2013-evolution-853d2b99ff4a6509cad65e893a84bb00bae4f669.zip
Remove default_ports.
* camel-provider.h: Remove default_ports. * camel-remote-store.c (remote_connect): Get default_port from CamelRemoteStore rather than CamelProvider. * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize CamelRemoteStore::default_port * providers/*/camel-*-provider.c: Remove default_ports. svn path=/trunk/; revision=5669
-rw-r--r--camel/ChangeLog12
-rw-r--r--camel/camel-provider.h1
-rw-r--r--camel/camel-remote-store.c9
-rw-r--r--camel/camel-remote-store.h2
-rw-r--r--camel/providers/cache/camel-cache-provider.c1
-rw-r--r--camel/providers/imap/camel-imap-provider.c1
-rw-r--r--camel/providers/imap/camel-imap-store.c3
-rw-r--r--camel/providers/mbox/camel-mbox-provider.c1
-rw-r--r--camel/providers/mh/camel-mh-provider.c1
-rw-r--r--camel/providers/nntp/camel-nntp-provider.c2
-rw-r--r--camel/providers/nntp/camel-nntp-store.c2
-rw-r--r--camel/providers/pop3/camel-pop3-provider.c1
-rw-r--r--camel/providers/pop3/camel-pop3-store.c5
-rw-r--r--camel/providers/sendmail/camel-sendmail-provider.c1
-rw-r--r--camel/providers/smtp/camel-smtp-provider.c1
-rw-r--r--camel/providers/vee/camel-vee-provider.c1
16 files changed, 24 insertions, 20 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 958476ed03..f986a5e6d9 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,17 @@
2000-10-02 Dan Winship <danw@helixcode.com>
+ * camel-provider.h: Remove default_ports.
+
+ * camel-remote-store.c (remote_connect): Get default_port from
+ CamelRemoteStore rather than CamelProvider.
+
+ * providers/{imap,nntp,pop3}/camel-*-store.c: Initialize
+ CamelRemoteStore::default_port
+
+ * providers/*/camel-*-provider.c: Remove default_ports.
+
+2000-10-02 Dan Winship <danw@helixcode.com>
+
* camel-folder.[ch]: Remove
camel_folder_{get,free}_subfolder_info, as we want to be able to
scan the whole subfolder tree without having to open any folders,
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
index d77ae6e23a..00375029db 100644
--- a/camel/camel-provider.h
+++ b/camel/camel-provider.h
@@ -79,7 +79,6 @@ typedef struct {
int flags;
CamelType object_types [CAMEL_NUM_PROVIDER_TYPES];
- gint default_ports [CAMEL_NUM_PROVIDER_TYPES];
GHashTable *service_cache;
diff --git a/camel/camel-remote-store.c b/camel/camel-remote-store.c
index 601d5bc4c1..5d1b762fbb 100644
--- a/camel/camel-remote-store.c
+++ b/camel/camel-remote-store.c
@@ -218,13 +218,8 @@ remote_connect (CamelService *service, CamelException *ex)
if (service->url->port)
port = service->url->port;
- else {
- CamelProvider *prov = camel_service_get_provider (service);
-
- port = prov->default_ports[CAMEL_PROVIDER_STORE];
- g_assert (port); /* a remote service MUST define a valid default port */
- }
-
+ else
+ port = store->default_port;
sin.sin_port = htons (port);
memcpy (&sin.sin_addr, h->h_addr, sizeof (sin.sin_addr));
diff --git a/camel/camel-remote-store.h b/camel/camel-remote-store.h
index 4530c22f14..4a91f7a3e7 100644
--- a/camel/camel-remote-store.h
+++ b/camel/camel-remote-store.h
@@ -42,7 +42,7 @@ typedef struct {
CamelStore parent_object;
CamelStream *istream, *ostream;
- guint timeout_id;
+ guint timeout_id, default_port;
} CamelRemoteStore;
diff --git a/camel/providers/cache/camel-cache-provider.c b/camel/providers/cache/camel-cache-provider.c
index 94d38a2243..217f06816a 100644
--- a/camel/providers/cache/camel-cache-provider.c
+++ b/camel/providers/cache/camel-cache-provider.c
@@ -38,7 +38,6 @@ static CamelProvider cache_provider = {
0,
- { 0, 0 },
{ 0, 0 }
};
diff --git a/camel/providers/imap/camel-imap-provider.c b/camel/providers/imap/camel-imap-provider.c
index a0a6279340..21452d5cee 100644
--- a/camel/providers/imap/camel-imap-provider.c
+++ b/camel/providers/imap/camel-imap-provider.c
@@ -45,7 +45,6 @@ static CamelProvider imap_provider = {
CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
{ 0, 0 },
- { 143, 0 },
NULL
};
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index eab33b308f..dcb3782e89 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -100,12 +100,15 @@ static void
camel_imap_store_init (gpointer object, gpointer klass)
{
CamelService *service = CAMEL_SERVICE (object);
+ CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
CamelImapStore *imap_store = CAMEL_IMAP_STORE (object);
service->url_flags |= (CAMEL_SERVICE_URL_NEED_USER |
CAMEL_SERVICE_URL_NEED_HOST |
CAMEL_SERVICE_URL_ALLOW_PATH |
CAMEL_SERVICE_URL_ALLOW_AUTH);
+
+ remote_store->default_port = 143;
imap_store->dir_sep = NULL;
imap_store->current_folder = NULL;
diff --git a/camel/providers/mbox/camel-mbox-provider.c b/camel/providers/mbox/camel-mbox-provider.c
index 0a73f13ab4..d4048e1be3 100644
--- a/camel/providers/mbox/camel-mbox-provider.c
+++ b/camel/providers/mbox/camel-mbox-provider.c
@@ -41,7 +41,6 @@ static CamelProvider mbox_provider = {
CAMEL_PROVIDER_IS_SOURCE | CAMEL_PROVIDER_IS_STORAGE,
{ 0, 0 },
- { 0, 0 },
NULL
};
diff --git a/camel/providers/mh/camel-mh-provider.c b/camel/providers/mh/camel-mh-provider.c
index e7315ce849..58e97eed30 100644
--- a/camel/providers/mh/camel-mh-provider.c
+++ b/camel/providers/mh/camel-mh-provider.c
@@ -40,7 +40,6 @@ static CamelProvider mh_provider = {
CAMEL_PROVIDER_IS_STORAGE,
{0, 0},
- {0, 0},
NULL
};
diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c
index 6cd7d96978..214fd4b0fa 100644
--- a/camel/providers/nntp/camel-nntp-provider.c
+++ b/camel/providers/nntp/camel-nntp-provider.c
@@ -39,7 +39,6 @@ static CamelProvider news_provider = {
CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_STORAGE,
{ 0, 0 },
- { 119, 0 },
NULL
};
@@ -56,7 +55,6 @@ static CamelProvider nntp_provider = {
CAMEL_PROVIDER_IS_REMOTE,
{ 0, 0 },
- { 119, 0 },
NULL
};
diff --git a/camel/providers/nntp/camel-nntp-store.c b/camel/providers/nntp/camel-nntp-store.c
index 1e6ccd53c1..710e1d2e13 100644
--- a/camel/providers/nntp/camel-nntp-store.c
+++ b/camel/providers/nntp/camel-nntp-store.c
@@ -386,8 +386,10 @@ static void
camel_nntp_store_init (gpointer object, gpointer klass)
{
CamelService *service = CAMEL_SERVICE (object);
+ CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
service->url_flags = CAMEL_SERVICE_URL_NEED_HOST;
+ remote_store->default_port = 119;
}
CamelType
diff --git a/camel/providers/pop3/camel-pop3-provider.c b/camel/providers/pop3/camel-pop3-provider.c
index 3a82f65232..52399c99ec 100644
--- a/camel/providers/pop3/camel-pop3-provider.c
+++ b/camel/providers/pop3/camel-pop3-provider.c
@@ -42,7 +42,6 @@ static CamelProvider pop3_provider = {
CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE,
{ 0, 0 },
- { 110, 0 },
NULL
};
diff --git a/camel/providers/pop3/camel-pop3-store.c b/camel/providers/pop3/camel-pop3-store.c
index 3219d4cfc3..c5159eda1d 100644
--- a/camel/providers/pop3/camel-pop3-store.c
+++ b/camel/providers/pop3/camel-pop3-store.c
@@ -113,9 +113,12 @@ static void
camel_pop3_store_init (gpointer object, gpointer klass)
{
CamelService *service = CAMEL_SERVICE (object);
+ CamelRemoteStore *remote_store = CAMEL_REMOTE_STORE (object);
- service->url_flags |= (CAMEL_SERVICE_URL_NEED_USER | CAMEL_SERVICE_URL_NEED_HOST |
+ service->url_flags |= (CAMEL_SERVICE_URL_NEED_USER |
+ CAMEL_SERVICE_URL_NEED_HOST |
CAMEL_SERVICE_URL_ALLOW_AUTH);
+ remote_store->default_port = 110;
}
CamelType
diff --git a/camel/providers/sendmail/camel-sendmail-provider.c b/camel/providers/sendmail/camel-sendmail-provider.c
index 8da50cf426..3b0b35dd72 100644
--- a/camel/providers/sendmail/camel-sendmail-provider.c
+++ b/camel/providers/sendmail/camel-sendmail-provider.c
@@ -41,7 +41,6 @@ static CamelProvider sendmail_provider = {
0,
{ 0, 0 },
- { 0, 0 },
NULL
};
diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c
index ea5aec70cc..1d18e445cc 100644
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ b/camel/providers/smtp/camel-smtp-provider.c
@@ -40,7 +40,6 @@ static CamelProvider smtp_provider = {
0,
{ 0, 0 },
- { 0, 25 },
NULL
};
diff --git a/camel/providers/vee/camel-vee-provider.c b/camel/providers/vee/camel-vee-provider.c
index cbec03d58d..e36e7fcff1 100644
--- a/camel/providers/vee/camel-vee-provider.c
+++ b/camel/providers/vee/camel-vee-provider.c
@@ -36,7 +36,6 @@ static CamelProvider vee_provider = {
0,
{ 0, 0 },
- { 0, 0 },
NULL
};