aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-provider.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-04-30 23:36:16 +0800
committerDan Winship <danw@src.gnome.org>2000-04-30 23:36:16 +0800
commit0524f7c06a47544f26997da30317b35361c9d62b (patch)
treef682673b15a5b721325ba90d43fe84ce70074c83 /camel/camel-provider.h
parent3c358f3c18ccbe888b77ea5d6fe67c9a385a715f (diff)
downloadgsoc2013-evolution-0524f7c06a47544f26997da30317b35361c9d62b.tar
gsoc2013-evolution-0524f7c06a47544f26997da30317b35361c9d62b.tar.gz
gsoc2013-evolution-0524f7c06a47544f26997da30317b35361c9d62b.tar.bz2
gsoc2013-evolution-0524f7c06a47544f26997da30317b35361c9d62b.tar.lz
gsoc2013-evolution-0524f7c06a47544f26997da30317b35361c9d62b.tar.xz
gsoc2013-evolution-0524f7c06a47544f26997da30317b35361c9d62b.tar.zst
gsoc2013-evolution-0524f7c06a47544f26997da30317b35361c9d62b.zip
Tweak the definition of CamelProvider. Among other things, a provider may
* camel-provider.h: Tweak the definition of CamelProvider. Among other things, a provider may now be both a store and a transport. * camel-provider.c: Remove a lot of code we had no intention of using. This now only contains two functions: camel_provider_init to read the installed .urls files, and camel_provider_load to load and register a new provider. * camel-session.c: Remove more unused code and simplify some of the remaining code. The list of available provider modules is now stored in the session, and it handles calling camel_provider_load to load them as needed. Provider registration is now done by calling back from the module init routine, which allows a single module to register providers for multiple URL types. * providers/*: Update provider structures and init routines for the new stuff. Add a .urls file to each provider specifying what urls it handles, and install that with the library. * providers/nntp/camel-nntp-provider.c: Add hints towards supporting both news: and nntp: URLs, and using nntp as both a store and a transport. svn path=/trunk/; revision=2691
Diffstat (limited to 'camel/camel-provider.h')
-rw-r--r--camel/camel-provider.h44
1 files changed, 23 insertions, 21 deletions
diff --git a/camel/camel-provider.h b/camel/camel-provider.h
index d359ca90c8..cac6e9d6cc 100644
--- a/camel/camel-provider.h
+++ b/camel/camel-provider.h
@@ -1,15 +1,15 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* camel-provider.h : provider definition */
-/*
+/*
*
- * Author :
+ * Author :
* Bertrand Guiheneuf <bertrand@helixcode.com>
*
* Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com)
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
@@ -35,27 +35,26 @@ extern "C" {
#endif /* __cplusplus }*/
#include <gtk/gtk.h>
-#include <gmodule.h>
+#include "camel-types.h"
#define CAMEL_PROVIDER(obj) ((CamelProvider *)(obj))
typedef enum {
- PROVIDER_STORE,
- PROVIDER_TRANSPORT
-} ProviderType;
+ CAMEL_PROVIDER_STORE,
+ CAMEL_PROVIDER_TRANSPORT,
+ CAMEL_NUM_PROVIDER_TYPES
+} CamelProviderType;
-#define PROVIDER_REMOTE 0x01
+extern char *camel_provider_type_name[CAMEL_NUM_PROVIDER_TYPES];
-typedef struct {
- GtkType object_type; /* used to create instance of the provider */
- ProviderType provider_type; /* is a store or a transport */
- int flags; /* information about the provider */
+#define CAMEL_PROVIDER_IS_REMOTE (1 << 0)
+typedef struct {
/* Provider name used in CamelURLs. */
- gchar *protocol;
+ char *protocol;
/* Provider name as used by people. (May be the same as protocol) */
- gchar *name;
+ char *name;
/* Description of the provider. A novice user should be able
* to read this description, and the information provided by
@@ -63,16 +62,19 @@ typedef struct {
* this provider is relevant to him, and if so, which
* information goes with it.
*/
- gchar *description;
+ char *description;
+
+ int flags;
- GModule *gmodule;
+ GtkType object_types [CAMEL_NUM_PROVIDER_TYPES];
} CamelProvider;
-void camel_provider_register (CamelProvider *provider);
-const CamelProvider *camel_provider_register_as_module (const gchar *module_path);
-const CamelProvider *camel_provider_get_for_protocol (const gchar *protocol, ProviderType type);
-GList *camel_provider_scan (void);
+GHashTable *camel_provider_init (void);
+void camel_provider_load (CamelSession *session, const char *path,
+ CamelException *ex);
+/* This is defined by each module, not by camel-provider.c. */
+void camel_provider_module_init (CamelSession *session);
#ifdef __cplusplus
}