1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Authors: Jeffrey Stedfast <fejj@ximian.com>
5 * Copyright 2002 Ximian, Inc. (www.ximian.com)
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.
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.
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.
28 #include "camel-digest-summary.h"
30 #define CAMEL_DIGEST_SUMMARY_VERSION 0
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);
37 static CamelFolderSummaryClass *parent_class = NULL;
41 camel_digest_summary_get_type(void)
43 static CamelType type = CAMEL_INVALID_TYPE;
45 if (type == CAMEL_INVALID_TYPE) {
46 type = camel_type_register (
47 camel_folder_summary_get_type (),
49 sizeof (CamelDigestSummary),
50 sizeof (CamelDigestSummaryClass),
51 (CamelObjectClassInitFunc) camel_digest_summary_class_init,
53 (CamelObjectInitFunc) camel_digest_summary_init,
54 (CamelObjectFinalizeFunc) camel_digest_summary_finalise);
61 camel_digest_summary_class_init (CamelDigestSummaryClass *klass)
63 parent_class = CAMEL_FOLDER_SUMMARY_CLASS (camel_type_get_global_classfuncs (camel_folder_summary_get_type ()));
67 camel_digest_summary_init (CamelDigestSummary *summary)
69 CamelFolderSummary *s = (CamelFolderSummary *) summary;
71 /* subclasses need to set the right instance data sizes */
72 s->message_info_size = sizeof (CamelMessageInfo);
73 s->content_info_size = sizeof (CamelMessageContentInfo);
75 /* and a unique file version */
76 s->version += CAMEL_DIGEST_SUMMARY_VERSION;
80 camel_digest_summary_finalise (CamelObject *object)
87 camel_digest_summary_new (void)
89 return (CamelFolderSummary *) camel_object_new (camel_digest_summary_get_type ());