aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/smtp
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/providers/smtp
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/providers/smtp')
-rw-r--r--camel/providers/smtp/Makefile.am3
-rw-r--r--camel/providers/smtp/camel-smtp-provider.c26
-rw-r--r--camel/providers/smtp/libcamelsmtp.urls1
3 files changed, 14 insertions, 16 deletions
diff --git a/camel/providers/smtp/Makefile.am b/camel/providers/smtp/Makefile.am
index dee3a50abb..8c49e8778b 100644
--- a/camel/providers/smtp/Makefile.am
+++ b/camel/providers/smtp/Makefile.am
@@ -7,6 +7,7 @@ libcamelsmtpincludedir = $(includedir)/camel
providerdir = $(pkglibdir)/camel-providers/$(VERSION)
provider_LTLIBRARIES = libcamelsmtp.la
+provider_DATA = libcamelsmtp.urls
INCLUDES = \
-I.. \
@@ -27,4 +28,4 @@ libcamelsmtpinclude_HEADERS = \
libcamelsmtp_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir)
-EXTRA_DIST =
+EXTRA_DIST = libcamelsmtp.urls
diff --git a/camel/providers/smtp/camel-smtp-provider.c b/camel/providers/smtp/camel-smtp-provider.c
index 03ef1a9eb3..44560ce34c 100644
--- a/camel/providers/smtp/camel-smtp-provider.c
+++ b/camel/providers/smtp/camel-smtp-provider.c
@@ -26,30 +26,26 @@
#include "config.h"
#include "camel-smtp-transport.h"
#include "camel-provider.h"
+#include "camel-session.h"
-
-static CamelProvider _smtp_provider = {
- (GtkType) 0,
- PROVIDER_TRANSPORT,
- 0,
-
+static CamelProvider smtp_provider = {
"smtp",
"SMTP",
"For delivering mail by connecting to a remote mailhub using SMTP.",
- (GModule *) NULL
-};
-
-CamelProvider *
-camel_provider_module_init (void);
+ 0,
+ { 0, 0 }
+};
-CamelProvider *
-camel_provider_module_init (void)
+void
+camel_provider_module_init (CamelSession *session)
{
- _smtp_provider.object_type = camel_smtp_transport_get_type();
- return &_smtp_provider;
+ smtp_provider.object_types[CAMEL_TRANSPORT_TYPE] =
+ camel_smtp_transport_get_type();
+
+ camel_session_register_provider (session, &smtp_provider);
}
diff --git a/camel/providers/smtp/libcamelsmtp.urls b/camel/providers/smtp/libcamelsmtp.urls
new file mode 100644
index 0000000000..ec2fc0fc16
--- /dev/null
+++ b/camel/providers/smtp/libcamelsmtp.urls
@@ -0,0 +1 @@
+smtp