Extending test-client-custom-summary to try e_book_client_get_contacts_uids()
[platform/upstream/evolution-data-server.git] / camel / camel-medium.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-medium.h : class for a medium object */
3
4 /*
5  *
6  * Authors:  Bertrand Guiheneuf <bertrand@helixcode.com>
7  *           Michael Zucchi <notzed@ximian.com>
8  *
9  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
10  *
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.
14  *
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.
19  *
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
23  * USA
24  */
25
26 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
27 #error "Only <camel/camel.h> can be included directly."
28 #endif
29
30 #ifndef CAMEL_MEDIUM_H
31 #define CAMEL_MEDIUM_H
32
33 #include <camel/camel-data-wrapper.h>
34
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))
53
54 G_BEGIN_DECLS
55
56 typedef struct _CamelMedium CamelMedium;
57 typedef struct _CamelMediumClass CamelMediumClass;
58 typedef struct _CamelMediumPrivate CamelMediumPrivate;
59
60 typedef struct {
61         const gchar *name;
62         const gchar *value;
63 } CamelMediumHeader;
64
65 struct _CamelMedium {
66         CamelDataWrapper parent;
67         CamelMediumPrivate *priv;
68 };
69
70 struct _CamelMediumClass {
71         CamelDataWrapperClass parent_class;
72
73         void            (*add_header)           (CamelMedium *medium,
74                                                  const gchar *name,
75                                                  gconstpointer value);
76         void            (*set_header)           (CamelMedium *medium,
77                                                  const gchar *name,
78                                                  gconstpointer value);
79         void            (*remove_header)        (CamelMedium *medium,
80                                                  const gchar *name);
81         gconstpointer   (*get_header)           (CamelMedium *medium,
82                                                  const gchar *name);
83         GArray *        (*get_headers)          (CamelMedium *medium);
84         void            (*free_headers)         (CamelMedium *medium,
85                                                  GArray *headers);
86         CamelDataWrapper *
87                         (*get_content)          (CamelMedium *medium);
88         void            (*set_content)          (CamelMedium *medium,
89                                                  CamelDataWrapper *content);
90 };
91
92 GType           camel_medium_get_type           (void);
93 void            camel_medium_add_header         (CamelMedium *medium,
94                                                  const gchar *name,
95                                                  gconstpointer value);
96 void            camel_medium_set_header         (CamelMedium *medium,
97                                                  const gchar *name,
98                                                  gconstpointer value);
99 void            camel_medium_remove_header      (CamelMedium *medium,
100                                                  const gchar *name);
101 gconstpointer   camel_medium_get_header         (CamelMedium *medium,
102                                                  const gchar *name);
103 GArray *        camel_medium_get_headers        (CamelMedium *medium);
104 void            camel_medium_free_headers       (CamelMedium *medium,
105                                                  GArray *headers);
106 CamelDataWrapper *
107                 camel_medium_get_content        (CamelMedium *medium);
108 void            camel_medium_set_content        (CamelMedium *medium,
109                                                  CamelDataWrapper *content);
110
111 G_END_DECLS
112
113 #endif /* CAMEL_MEDIUM_H */