diff options
author | Dan Winship <danw@src.gnome.org> | 2000-04-30 23:36:16 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-04-30 23:36:16 +0800 |
commit | 0524f7c06a47544f26997da30317b35361c9d62b (patch) | |
tree | f682673b15a5b721325ba90d43fe84ce70074c83 /camel/providers/mbox | |
parent | 3c358f3c18ccbe888b77ea5d6fe67c9a385a715f (diff) | |
download | gsoc2013-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/providers/mbox')
-rw-r--r-- | camel/providers/mbox/Makefile.am | 3 | ||||
-rw-r--r-- | camel/providers/mbox/camel-mbox-provider.c | 29 | ||||
-rw-r--r-- | camel/providers/mbox/libcamelmbox.urls | 1 |
3 files changed, 14 insertions, 19 deletions
diff --git a/camel/providers/mbox/Makefile.am b/camel/providers/mbox/Makefile.am index 258c01a94e..25a26e25db 100644 --- a/camel/providers/mbox/Makefile.am +++ b/camel/providers/mbox/Makefile.am @@ -8,6 +8,7 @@ libcamelmboxincludedir = $(includedir)/camel providerdir = $(pkglibdir)/camel-providers/$(VERSION) provider_LTLIBRARIES = libcamelmbox.la +provider_DATA = libcamelmbox.urls INCLUDES = -I.. \ -I$(srcdir)/.. \ @@ -37,5 +38,5 @@ libcamelmbox_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) libcamelmbox_la_LIBADD = $(top_builddir)/e-util/libeutil.la $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS) #libcamelmbox_la_LIBADD = $(top_builddir)/libibex/libibex.la $(UNICODE_LIBS) -EXTRA_DIST = +EXTRA_DIST = libcamelmbox.urls diff --git a/camel/providers/mbox/camel-mbox-provider.c b/camel/providers/mbox/camel-mbox-provider.c index 74c4345306..04ce88de12 100644 --- a/camel/providers/mbox/camel-mbox-provider.c +++ b/camel/providers/mbox/camel-mbox-provider.c @@ -26,32 +26,25 @@ #include "config.h" #include "camel-mbox-store.h" #include "camel-provider.h" +#include "camel-session.h" - -static CamelProvider _mbox_provider = { - (GtkType) 0, - PROVIDER_STORE, - 0, - +static CamelProvider mbox_provider = { "mbox", "UNIX mbox-format mail files", "For reading mail delivered by the local system, and for " "storing mail on local disk.", - (GModule *) NULL -}; - -CamelProvider * -camel_provider_module_init (void); + 0, + { 0, 0 } +}; -CamelProvider * -camel_provider_module_init (void) +void +camel_provider_module_init (CamelSession *session) { - _mbox_provider.object_type = camel_mbox_store_get_type(); - return &_mbox_provider; -} - - + mbox_provider.object_types[CAMEL_PROVIDER_STORE] = + camel_mbox_store_get_type(); + camel_session_register_provider (session, &mbox_provider); +} diff --git a/camel/providers/mbox/libcamelmbox.urls b/camel/providers/mbox/libcamelmbox.urls new file mode 100644 index 0000000000..e021190356 --- /dev/null +++ b/camel/providers/mbox/libcamelmbox.urls @@ -0,0 +1 @@ +mbox |