Re: [Evolution-hackers] Creating a new server type



On Wed, 2004-10-06 at 10:36 -0400, Dan Winship wrote:
> On Wed, 2004-10-06 at 15:10 +0200, Thomas Cataldo wrote:
> > static CamelProvider obm_provider = {
> >     "obm",
> >     N_("Aliacom O.B.M."),
> > 
> >     N_("For contacts and multi-user calendering"),
> > 
> >     "obm",
> > 
> >     CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_EXTERNAL |
> >     CAMEL_PROVIDER_SUPPORTS_SSL,
> 
> (IS_EXTERNAL is actually meaningless in 2.0. That should have
> disappeared...)
> 
> In addition to what Not Zed said about implementing CamelStore, you also
> need to set CAMEL_PROVIDER_IS_SOURCE here to make it show up in the
> menu. Setting IS_SOURCE but not IS_STORAGE means that the provider is
> like POP, meaning it won't show up in the folder tree, but evolution-
> mail will call your CamelStore implementation to fetch new messages when
> the user clicks Send/Receive, so you're going to have to fake that
> properly too.

Will do that as soon as I can make it show up in the menu.

The following code does not make it show up :

static CamelProvider obm_provider = {
    "obm",
    N_("Aliacom O.B.M."),
    N_("For contacts and multi-user calendering"),
    "obm",

    CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE |
    CAMEL_PROVIDER_SUPPORTS_SSL,

    CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST |
    CAMEL_URL_ALLOW_PASSWORD | CAMEL_URL_ALLOW_AUTH,
    obm_conf_entries
};

[...]

void
camel_provider_module_init (void)
{
    obm_provider.object_types[CAMEL_PROVIDER_STORE] = camel_pop3_store_get_type(); 
    obm_provider.authtypes =
	g_list_prepend (NULL, &camel_obm_password_authtype);
    obm_provider.url_hash = obm_url_hash;
    obm_provider.url_equal = obm_url_equal;

    bindtextdomain (GETTEXT_PACKAGE, CONNECTOR_LOCALEDIR);
    obm_provider.translation_domain = GETTEXT_PACKAGE;

    camel_provider_register (&obm_provider);
}





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]