diff options
author | Dan Winship <danw@src.gnome.org> | 2000-04-27 05:30:32 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-04-27 05:30:32 +0800 |
commit | 2a6a191e0501a677fbac59304b6bc375e221e3ec (patch) | |
tree | e352a5b911913e3254bc3c47c8315dace9bc2061 /camel/camel-mime-body-part.c | |
parent | 2409d71026645028f49bfd0f745e93346cc17450 (diff) | |
download | gsoc2013-evolution-2a6a191e0501a677fbac59304b6bc375e221e3ec.tar gsoc2013-evolution-2a6a191e0501a677fbac59304b6bc375e221e3ec.tar.gz gsoc2013-evolution-2a6a191e0501a677fbac59304b6bc375e221e3ec.tar.bz2 gsoc2013-evolution-2a6a191e0501a677fbac59304b6bc375e221e3ec.tar.lz gsoc2013-evolution-2a6a191e0501a677fbac59304b6bc375e221e3ec.tar.xz gsoc2013-evolution-2a6a191e0501a677fbac59304b6bc375e221e3ec.tar.zst gsoc2013-evolution-2a6a191e0501a677fbac59304b6bc375e221e3ec.zip |
Remove. We weren't using the fields that made this different from
* camel-mime-body-part.[ch]: Remove. We weren't using the fields
that made this different from camel-mime-part, so it basically
just forced us to do lots of gratuitous typecasting.
* camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
parent stuff, since we weren't using that either.
* etc: update for CamelMimeBodyPart -> CamelMimePart
svn path=/trunk/; revision=2645
Diffstat (limited to 'camel/camel-mime-body-part.c')
-rw-r--r-- | camel/camel-mime-body-part.c | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/camel/camel-mime-body-part.c b/camel/camel-mime-body-part.c deleted file mode 100644 index 988d530fcb..0000000000 --- a/camel/camel-mime-body-part.c +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* camel-mime-body-part.c : Abstract class for a mime body part */ - - -/* - * - * Author : - * Bertrand Guiheneuf <bertrand@helixcode.com> - * - * Copyright 1999, 2000 Helix Code, Inc. (http://www.helixcode.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#include <config.h> -#include "camel-mime-body-part.h" - - -static void _set_parent (CamelMimeBodyPart *mime_body_part, CamelMultipart *multipart); -static const CamelMultipart *_get_parent (CamelMimeBodyPart *mime_body_part); - - -static CamelMimePartClass *parent_class=NULL; - -/* Returns the class for a CamelMimeBodyPart */ -#define CMBP_CLASS(so) CAMEL_MIME_BODY_PART_CLASS (GTK_OBJECT(so)->klass) - - - -static void -camel_mime_body_part_class_init (CamelMimeBodyPartClass *camel_mime_body_part_class) -{ - parent_class = gtk_type_class (camel_mime_part_get_type ()); - - /* virtual method definition */ - camel_mime_body_part_class->set_parent = _set_parent; - camel_mime_body_part_class->get_parent = _get_parent; -} - -static void -camel_mime_body_part_init (gpointer object, gpointer klass) -{ - camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (object), "mime/body-part"); -} - - - - -GtkType -camel_mime_body_part_get_type (void) -{ - static GtkType camel_mime_body_part_type = 0; - - if (!camel_mime_body_part_type) { - GtkTypeInfo camel_mime_body_part_info = - { - "CamelMimeBodyPart", - sizeof (CamelMimeBodyPart), - sizeof (CamelMimeBodyPartClass), - (GtkClassInitFunc) camel_mime_body_part_class_init, - (GtkObjectInitFunc) camel_mime_body_part_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - camel_mime_body_part_type = gtk_type_unique (camel_mime_part_get_type (), &camel_mime_body_part_info); - } - - return camel_mime_body_part_type; -} - -CamelMimeBodyPart * -camel_mime_body_part_new (void) -{ - CamelMimeBodyPart *mime_body_part; - - mime_body_part = (CamelMimeBodyPart *)gtk_type_new (CAMEL_MIME_BODY_PART_TYPE); - return mime_body_part; -} - - -static void -_set_parent (CamelMimeBodyPart *mime_body_part, CamelMultipart *multipart) -{ - if (mime_body_part->parent) gtk_object_unref (GTK_OBJECT (mime_body_part->parent)); - mime_body_part->parent = multipart; - if (multipart) gtk_object_ref (GTK_OBJECT (multipart)); -} - - -void -camel_mime_body_part_set_parent (CamelMimeBodyPart *mime_body_part, CamelMultipart *multipart) -{ - CMBP_CLASS (mime_body_part)->set_parent (mime_body_part, multipart); -} - - -static const CamelMultipart * -_get_parent (CamelMimeBodyPart *mime_body_part) -{ - return mime_body_part->parent; -} - - -const CamelMultipart * -camel_mime_body_part_get_parent (CamelMimeBodyPart *mime_body_part) -{ - return CMBP_CLASS (mime_body_part)->get_parent (mime_body_part); -} - - |