diff options
Diffstat (limited to 'camel/providers/nntp')
-rw-r--r-- | camel/providers/nntp/Makefile.am | 3 | ||||
-rw-r--r-- | camel/providers/nntp/camel-nntp-provider.c | 46 | ||||
-rw-r--r-- | camel/providers/nntp/libcamelnntp.urls | 2 |
3 files changed, 36 insertions, 15 deletions
diff --git a/camel/providers/nntp/Makefile.am b/camel/providers/nntp/Makefile.am index 2aabff29ef..ec393ea907 100644 --- a/camel/providers/nntp/Makefile.am +++ b/camel/providers/nntp/Makefile.am @@ -7,6 +7,7 @@ libcamelnntpincludedir = $(includedir)/camel providerdir = $(pkglibdir)/camel-providers/$(VERSION) provider_LTLIBRARIES = libcamelnntp.la +provider_DATA = libcamelnntp.urls INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \ -I$(top_srcdir)/intl \ @@ -28,4 +29,4 @@ libcamelnntpinclude_HEADERS = \ libcamelnntp_la_LDFLAGS = -version-info 0:0:0 -rpath $(libdir) -EXTRA_DIST = +EXTRA_DIST = libcamelnntp.urls diff --git a/camel/providers/nntp/camel-nntp-provider.c b/camel/providers/nntp/camel-nntp-provider.c index 5ddda3f39d..449de945e6 100644 --- a/camel/providers/nntp/camel-nntp-provider.c +++ b/camel/providers/nntp/camel-nntp-provider.c @@ -26,27 +26,45 @@ #include "config.h" #include "camel-nntp-store.h" #include "camel-provider.h" +#include "camel-session.h" - -static CamelProvider _nntp_provider = { - (GtkType) 0, - PROVIDER_STORE, - PROVIDER_REMOTE, +static CamelProvider news_provider = { "news", - "Camel default NNTP provider", - "This is a provider that reads from a NNTP server.", - (GModule *) NULL + "USENET news", + + "This is a read-only provider for USENET newsgroups.", + + CAMEL_PROVIDER_IS_REMOTE, + + { 0, 0 } }; -CamelProvider * -camel_provider_module_init (void); +static CamelProvider nntp_provider = { + "nntp", + "USENET news via NNTP", + "This is a provider for reading from and posting to" + "USENET newsgroups.", -CamelProvider * -camel_provider_module_init (void) + CAMEL_PROVIDER_IS_REMOTE, + + { 0, 0 } +}; + +void +camel_provider_module_init (CamelSession *session) { - _nntp_provider.object_type = camel_nntp_store_get_type(); - return &_nntp_provider; + news_provider.object_types[CAMEL_PROVIDER_STORE] = + camel_nntp_store_get_type(); + nntp_provider.object_types[CAMEL_PROVIDER_STORE] = + camel_nntp_store_get_type(); +#ifdef NOTYET + nntp_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = + camel_nntp_transport_get_type(); +#endif + + camel_session_register_provider (session", &news_provider); + camel_session_register_provider (session", &nntp_provider); } diff --git a/camel/providers/nntp/libcamelnntp.urls b/camel/providers/nntp/libcamelnntp.urls new file mode 100644 index 0000000000..dee2e70f14 --- /dev/null +++ b/camel/providers/nntp/libcamelnntp.urls @@ -0,0 +1,2 @@ +news +nntp |