diff options
author | Dan Winship <danw@src.gnome.org> | 2002-04-04 02:18:31 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-04-04 02:18:31 +0800 |
commit | df281e27199559d0166142ef78c01d7a38d60964 (patch) | |
tree | bcc2c33128259bc537e3611ac82aca2f28c513a4 /camel/camel-provider.h | |
parent | e9a1f5121d164292990f5cec0ef73efd4ddf0ed5 (diff) | |
download | gsoc2013-evolution-df281e27199559d0166142ef78c01d7a38d60964.tar.gz gsoc2013-evolution-df281e27199559d0166142ef78c01d7a38d60964.tar.zst gsoc2013-evolution-df281e27199559d0166142ef78c01d7a38d60964.zip |
make service_cache be an array of CAMEL_NUM_PROVIDER_TYPES elements so you
* camel-provider.h (CamelProvider): make service_cache be an array
of CAMEL_NUM_PROVIDER_TYPES elements so you can have a single
provider offer both stores and transports. (Eg, Exchange, NNTP)
* providers/imap/camel-imap-provider.c: Don't initialize
service_cache here. (The session code can do it itself since the
url_hash and url_equal functions are stored as part of the
provider.)
* providers/nntp/camel-nntp-provider.c: Likewise.
* providers/local/camel-local-provider.c: Likewise.
* providers/pop3/camel-pop3-provider.c: Likewise.
* providers/sendmail/camel-sendmail-provider.c: Likewise.
* providers/smtp/camel-smtp-provider.c: Likewise.
* camel-session.c (register_provider): Initialize the provider's
service cache(s) here.
(camel_session_class_init): Don't initialize.
vee_provider.service_cache here.
(camel_session_destroy_provider): Update to destroy multiple
service_caches.
(service_cache_remove, get_service): Tweak these a bit to deal
with multiple service_caches.
svn path=/trunk/; revision=16330
Diffstat (limited to 'camel/camel-provider.h')
-rw-r--r-- | camel/camel-provider.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/camel/camel-provider.h b/camel/camel-provider.h index 9269745786..ae6016abcf 100644 --- a/camel/camel-provider.h +++ b/camel/camel-provider.h @@ -103,6 +103,8 @@ extern char *camel_provider_type_name[CAMEL_NUM_PROVIDER_TYPES]; #define CAMEL_URL_PATH_IS_ABSOLUTE (1 << 12) +#define CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT(prov) (prov->object_types[CAMEL_PROVIDER_STORE] && prov->object_types[CAMEL_PROVIDER_TRANSPORT]) + /* Generic extra config stuff */ typedef enum { CAMEL_PROVIDER_CONF_END, @@ -148,12 +150,17 @@ typedef struct { /* Extra configuration information */ CamelProviderConfEntry *extra_conf; - CamelType object_types [CAMEL_NUM_PROVIDER_TYPES]; + /* CamelType(s) of its store and/or transport. If both are + * set, then they are assumed to be linked together and the + * transport type can only be used in an account that also + * uses the store type (eg, Exchange or NNTP). + */ + CamelType object_types[CAMEL_NUM_PROVIDER_TYPES]; /* GList of CamelServiceAuthTypes the provider supports */ GList *authtypes; - GHashTable *service_cache; + GHashTable *service_cache[CAMEL_NUM_PROVIDER_TYPES]; GHashFunc url_hash; GCompareFunc url_equal; |