Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / providers / imapp / camel-imapp-provider.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-pop3-provider.c: pop3 provider registration code */
3
4 /* 
5  * Authors :
6  *   Dan Winship <danw@ximian.com>
7  *   Michael Zucchi <notzed@ximian.com>
8  *
9  * Copyright (C) 2002 Ximian, Inc. (www.ximian.com)
10  *
11  * This program is free software; you can redistribute it and/or 
12  * modify it under the terms of version 2 of the GNU Lesser General Public 
13  * License as published by the Free Software Foundation.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
23  * USA
24  */
25
26 #ifdef HAVE_CONFIG_H
27 #include <config.h>
28 #endif
29
30 #include <glib/gi18n-lib.h>
31
32 #include "camel/camel-provider.h"
33 #include "camel/camel-sasl.h"
34 #include "camel/camel-session.h"
35 #include "camel/camel-url.h"
36
37 #include "camel-imapp-store.h"
38
39 CamelProviderConfEntry imapp_conf_entries[] = {
40         { CAMEL_PROVIDER_CONF_SECTION_START, "storage", NULL,
41           N_("Message storage") },
42         { CAMEL_PROVIDER_CONF_SECTION_END },
43         { CAMEL_PROVIDER_CONF_END }
44 };
45
46 static CamelProvider imapp_provider = {
47         "imapp",
48         
49         N_("IMAP+"),
50         
51         N_("Experimental IMAP 4(.1) client\n"
52            "This is untested and unsupported code, you want to use plain imap instead.\n\n"
53            " !!! DO NOT USE THIS FOR PRODUCTION EMAIL  !!!\n"),
54         "mail",
55         
56         CAMEL_PROVIDER_IS_REMOTE | CAMEL_PROVIDER_IS_SOURCE |
57         CAMEL_PROVIDER_IS_STORAGE | CAMEL_PROVIDER_SUPPORTS_SSL,
58         
59         CAMEL_URL_NEED_USER | CAMEL_URL_NEED_HOST | CAMEL_URL_ALLOW_AUTH,
60         
61         imapp_conf_entries,
62         
63         /* ... */
64 };
65
66 CamelServiceAuthType camel_imapp_password_authtype = {
67         N_("Password"),
68         
69         N_("This option will connect to the IMAP server using a "
70            "plaintext password."),
71         
72         "",
73         TRUE
74 };
75
76 void camel_imapp_module_init(void);
77
78 void
79 camel_imapp_module_init(void)
80 {
81         extern void camel_exception_setup(void);
82
83         imapp_provider.object_types[CAMEL_PROVIDER_STORE] = camel_imapp_store_get_type();
84         imapp_provider.url_hash = camel_url_hash;
85         imapp_provider.url_equal = camel_url_equal;
86
87         imapp_provider.authtypes = g_list_prepend(imapp_provider.authtypes, camel_sasl_authtype_list(FALSE));
88         imapp_provider.authtypes = g_list_prepend(imapp_provider.authtypes, &camel_imapp_password_authtype);
89         imapp_provider.translation_domain = GETTEXT_PACKAGE;
90
91         /* blah ... could just use it in object setup? */
92         /* TEMPORARY */
93         camel_exception_setup();
94
95         camel_provider_register(&imapp_provider);
96 }
97
98 void
99 camel_provider_module_init(void)
100 {
101         camel_imapp_module_init();
102 }