From a478ee7e9d44ea7947b2dc51fcf5d7f09735ee52 Mon Sep 17 00:00:00 2001 From: bertrand Date: Wed, 11 Aug 1999 22:34:09 +0000 Subject: new file. MH provider registration stuff. 1999-08-12 bertrand * camel/providers/MH/camel-mh-provider.c: new file. MH provider registration stuff. * camel/camel-provider.c (camel_provider_register_as_module): load a provider from a shared object (plugin). (camel_provider_register): register a provider "by hand". Used for statically defined providers. * tests/test7.c: new test. tests providers loading framework. Providers modules loading Works !!! :)))) svn path=/trunk/; revision=1105 --- camel/providers/MH/Makefile.am | 1 + camel/providers/MH/camel-mh-provider.c | 46 ++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 camel/providers/MH/camel-mh-provider.c (limited to 'camel/providers') diff --git a/camel/providers/MH/Makefile.am b/camel/providers/MH/Makefile.am index 0f52c9fb40..35403a7347 100644 --- a/camel/providers/MH/Makefile.am +++ b/camel/providers/MH/Makefile.am @@ -13,6 +13,7 @@ INCLUDES = -I.. -I$(srcdir)/.. -I$(includedir) \ libcamelmh_la_SOURCES = \ camel-mh-folder.c \ + camel-mh-provider.c \ camel-mh-store.c libcamelmhinclude_HEADERS = \ diff --git a/camel/providers/MH/camel-mh-provider.c b/camel/providers/MH/camel-mh-provider.c new file mode 100644 index 0000000000..6be4b11e9c --- /dev/null +++ b/camel/providers/MH/camel-mh-provider.c @@ -0,0 +1,46 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* camel-mh-provider.c: mh provider registration code */ + +/* + * + * Copyright (C) 1999 Bertrand Guiheneuf . + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +#include "config.h" +#include "camel-mh-store.h" +#include "camel-provider.h" +#include "camel-log.h" + + +static CamelProvider _mh_provider = { + (GtkType) 0, + PROVIDER_STORE, + "mh", + "Camel default mh provider", + "This is a very simple provider, mh is a bad protocol anyway", + (GModule *) NULL +}; + + + +CamelProvider * +camel_provider_module_init () +{ + _mh_provider.object_type = camel_mh_store_get_type(); + return &_mh_provider; +} -- cgit v1.2.3