1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-medium.h : class for a medium object */
6 * Authors: Bertrand Guiheneuf <bertrand@helixcode.com>
7 * Michael Zucchi <notzed@ximian.com>
9 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
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.
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.
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
26 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
27 #error "Only <camel/camel.h> can be included directly."
30 #ifndef CAMEL_MEDIUM_H
31 #define CAMEL_MEDIUM_H
33 #include <camel/camel-data-wrapper.h>
35 /* Standard GObject macros */
36 #define CAMEL_TYPE_MEDIUM \
37 (camel_medium_get_type ())
38 #define CAMEL_MEDIUM(obj) \
39 (G_TYPE_CHECK_INSTANCE_CAST \
40 ((obj), CAMEL_TYPE_MEDIUM, CamelMedium))
41 #define CAMEL_MEDIUM_CLASS(cls) \
42 (G_TYPE_CHECK_CLASS_CAST \
43 ((cls), CAMEL_TYPE_MEDIUM, CamelMediumClass))
44 #define CAMEL_IS_MEDIUM(obj) \
45 (G_TYPE_CHECK_INSTANCE_TYPE \
46 ((obj), CAMEL_TYPE_MEDIUM))
47 #define CAMEL_IS_MEDIUM_CLASS(cls) \
48 (G_TYPE_CHECK_CLASS_TYPE \
49 ((cls), CAMEL_TYPE_MEDIUM))
50 #define CAMEL_MEDIUM_GET_CLASS(obj) \
51 (G_TYPE_INSTANCE_GET_CLASS \
52 ((obj), CAMEL_TYPE_MEDIUM, CamelMediumClass))
56 typedef struct _CamelMedium CamelMedium;
57 typedef struct _CamelMediumClass CamelMediumClass;
58 typedef struct _CamelMediumPrivate CamelMediumPrivate;
66 CamelDataWrapper parent;
67 CamelMediumPrivate *priv;
70 struct _CamelMediumClass {
71 CamelDataWrapperClass parent_class;
73 void (*add_header) (CamelMedium *medium,
76 void (*set_header) (CamelMedium *medium,
79 void (*remove_header) (CamelMedium *medium,
81 gconstpointer (*get_header) (CamelMedium *medium,
83 GArray * (*get_headers) (CamelMedium *medium);
84 void (*free_headers) (CamelMedium *medium,
87 (*get_content) (CamelMedium *medium);
88 void (*set_content) (CamelMedium *medium,
89 CamelDataWrapper *content);
92 GType camel_medium_get_type (void);
93 void camel_medium_add_header (CamelMedium *medium,
96 void camel_medium_set_header (CamelMedium *medium,
99 void camel_medium_remove_header (CamelMedium *medium,
101 gconstpointer camel_medium_get_header (CamelMedium *medium,
103 GArray * camel_medium_get_headers (CamelMedium *medium);
104 void camel_medium_free_headers (CamelMedium *medium,
107 camel_medium_get_content (CamelMedium *medium);
108 void camel_medium_set_content (CamelMedium *medium,
109 CamelDataWrapper *content);
113 #endif /* CAMEL_MEDIUM_H */