1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
/*
* camel-null-store.c
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) version 3.
*
* 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with the program; if not, see <http://www.gnu.org/licenses/>
*
*/
#include "camel-null-store.h"
#include <config.h>
#include <glib/gi18n-lib.h>
G_DEFINE_TYPE (CamelNullStore, camel_null_store, CAMEL_TYPE_STORE)
static CamelProvider null_provider = {
/* protocol: */ "none",
/* name: */ N_("None"),
/* description: */ NULL,
/* domain: */ "mail",
/* XXX This provider is not really a "source", the
* flag just gets it shown in the account editor. */
(CamelProviderFlags) CAMEL_PROVIDER_IS_SOURCE,
(CamelProviderURLFlags) 0,
(CamelProviderConfEntry *) NULL,
(CamelProviderPortEntry *) NULL,
(CamelProviderAutoDetectFunc) NULL,
/* object_types: */ { 0, 0 }, /* see below */
/* authtypes: */ NULL,
(GHashFunc) camel_url_hash,
(GEqualFunc) camel_url_equal,
GETTEXT_PACKAGE
};
static void
camel_null_store_class_init (CamelNullStoreClass *class)
{
CamelServiceClass *service_class;
/* We should never be invoking methods on a CamelNullStore,
* but thankfully, in case we do, CamelStore has NULL function
* pointer checks in all of its wrapper functions. So it will
* emit a runtime warning, which is what we want, and frees us
* from having to override any class methods here. */
service_class = CAMEL_SERVICE_CLASS (class);
service_class->settings_type = CAMEL_TYPE_SETTINGS;
}
static void
camel_null_store_init (CamelNullStore *store)
{
/* nothing to do */
}
void
camel_null_store_register_provider (void)
{
GType object_type;
object_type = CAMEL_TYPE_NULL_STORE;
null_provider.object_types[CAMEL_PROVIDER_STORE] = object_type;
object_type = G_TYPE_INVALID;
null_provider.object_types[CAMEL_PROVIDER_TRANSPORT] = object_type;
camel_provider_register (&null_provider);
}
|