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/camel-provider.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'camel/camel-provider.h') diff --git a/camel/camel-provider.h b/camel/camel-provider.h index 54b9ef2a2a..3099efa265 100644 --- a/camel/camel-provider.h +++ b/camel/camel-provider.h @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* camel-provider.h : provider management */ +/* camel-provider.h : provider definition */ /* * @@ -31,6 +31,11 @@ extern "C" { #pragma } #endif /* __cplusplus }*/ +#include +#include + +#define CAMEL_PROVIDER(obj) (CamelProvider *)(obj) + typedef enum { PROVIDER_STORE, PROVIDER_TRANSPORT @@ -40,11 +45,15 @@ typedef enum { typedef struct { GtkType object_type; /* used to create instance of the provider */ ProviderType provider_type; /* is a store or a transport */ - gchar *protocol; /* name of the protocol ("imap"/"smtp"/"mh" ...) */ - gchar *provider_name; /* name of the provider ("Raymond the imap provider") */ - gchar *description; /* Useful when multiple providers are available for a same protocol */ + gchar *protocol; /* name of the protocol ("imap"/"smtp"/"mh" ...) */ + gchar *name; /* name of the provider ("Raymond the imap provider") */ + gchar *description; /* Useful when multiple providers are available for a same protocol */ + + GModule *gmodule; } CamelProvider; +void camel_provider_register (CamelProvider *provider); +const CamelProvider *camel_provider_register_as_module (const gchar *module_path); #ifdef __cplusplus -- cgit