Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / camel-digest-summary.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  *  Authors: Jeffrey Stedfast <fejj@ximian.com>
4  *
5  *  Copyright 2002 Ximian, Inc. (www.ximian.com)
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU Lesser General Public License as published by
9  *  the Free Software Foundation; either version 2 of the License, or
10  *  (at your option) any later version.
11  *
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU Lesser General Public License for more details.
16  *
17  *  You should have received a copy of the GNU Lesser General Public License
18  *  along with this program; if not, write to the Free Software
19  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22
23
24 #ifdef HAVE_CONFIG_H
25 #include <config.h>
26 #endif
27
28 #include "camel-digest-summary.h"
29
30 #define CAMEL_DIGEST_SUMMARY_VERSION 0
31
32 static void camel_digest_summary_class_init (CamelDigestSummaryClass *klass);
33 static void camel_digest_summary_init       (CamelDigestSummary *obj);
34 static void camel_digest_summary_finalise   (CamelObject *obj);
35
36
37 static CamelFolderSummaryClass *parent_class = NULL;
38
39
40 CamelType
41 camel_digest_summary_get_type(void)
42 {
43         static CamelType type = CAMEL_INVALID_TYPE;
44         
45         if (type == CAMEL_INVALID_TYPE) {
46                 type = camel_type_register (
47                         camel_folder_summary_get_type (),
48                         "CamelDigestSummary",
49                         sizeof (CamelDigestSummary),
50                         sizeof (CamelDigestSummaryClass),
51                         (CamelObjectClassInitFunc) camel_digest_summary_class_init,
52                         NULL,
53                         (CamelObjectInitFunc) camel_digest_summary_init,
54                         (CamelObjectFinalizeFunc) camel_digest_summary_finalise);
55         }
56         
57         return type;
58 }
59
60 static void
61 camel_digest_summary_class_init (CamelDigestSummaryClass *klass)
62 {
63         parent_class = CAMEL_FOLDER_SUMMARY_CLASS (camel_type_get_global_classfuncs (camel_folder_summary_get_type ()));
64 }
65
66 static void
67 camel_digest_summary_init (CamelDigestSummary *summary)
68 {
69         CamelFolderSummary *s = (CamelFolderSummary *) summary;
70         
71         /* subclasses need to set the right instance data sizes */
72         s->message_info_size = sizeof (CamelMessageInfo);
73         s->content_info_size = sizeof (CamelMessageContentInfo);
74         
75         /* and a unique file version */
76         s->version += CAMEL_DIGEST_SUMMARY_VERSION;
77 }
78
79 static void
80 camel_digest_summary_finalise (CamelObject *object)
81 {
82         
83 }
84
85
86 CamelFolderSummary *
87 camel_digest_summary_new (void)
88 {
89         return (CamelFolderSummary *) camel_object_new (camel_digest_summary_get_type ());
90 }