1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2000-2012 Jeffrey Stedfast
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1
8 * of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
22 #ifndef __GMIME_DISPOSITION_H__
23 #define __GMIME_DISPOSITION_H__
26 #include <glib-object.h>
28 #include <gmime/gmime-param.h>
32 #define GMIME_TYPE_CONTENT_DISPOSITION (g_mime_content_disposition_get_type ())
33 #define GMIME_CONTENT_DISPOSITION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), g_mime_content_disposition_get_type (), GMimeContentDisposition))
34 #define GMIME_CONTENT_DISPOSITION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), g_mime_content_disposition_get_type (), GMimeContentDispositionClass))
35 #define GMIME_IS_CONTENT_DISPOSITION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), g_mime_content_disposition_get_type ()))
36 #define GMIME_IS_CONTENT_DISPOSITION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), g_mime_content_disposition_get_type ()))
37 #define GMIME_CONTENT_DISPOSITION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), g_mime_content_disposition_get_type (), GMimeContentDispositionClass))
39 typedef struct _GMimeContentDisposition GMimeContentDisposition;
40 typedef struct _GMimeContentDispositionClass GMimeContentDispositionClass;
43 * GMIME_DISPOSITION_ATTACHMENT:
45 * Standard attachment disposition.
47 #define GMIME_DISPOSITION_ATTACHMENT "attachment"
51 * GMIME_DISPOSITION_INLINE:
53 * Standard inline disposition.
55 #define GMIME_DISPOSITION_INLINE "inline"
59 * GMimeContentDisposition:
60 * @parent_object: parent #GObject
61 * @param_hash: parameter hash table keyed by param name
62 * @params: a #GMimeParam list
63 * @disposition: disposition
65 * A data structure representing a Content-Disposition.
67 struct _GMimeContentDisposition {
68 GObject parent_object;
70 GHashTable *param_hash;
78 struct _GMimeContentDispositionClass {
79 GObjectClass parent_class;
83 GType g_mime_content_disposition_get_type (void);
86 GMimeContentDisposition *g_mime_content_disposition_new (void);
87 GMimeContentDisposition *g_mime_content_disposition_new_from_string (const char *str);
89 void g_mime_content_disposition_set_disposition (GMimeContentDisposition *disposition, const char *value);
90 const char *g_mime_content_disposition_get_disposition (GMimeContentDisposition *disposition);
92 void g_mime_content_disposition_set_params (GMimeContentDisposition *disposition, GMimeParam *params);
93 const GMimeParam *g_mime_content_disposition_get_params (GMimeContentDisposition *disposition);
95 void g_mime_content_disposition_set_parameter (GMimeContentDisposition *disposition,
96 const char *attribute, const char *value);
97 const char *g_mime_content_disposition_get_parameter (GMimeContentDisposition *disposition,
98 const char *attribute);
100 char *g_mime_content_disposition_to_string (GMimeContentDisposition *disposition, gboolean fold);
104 #endif /* __GMIME_DISPOSITION_H__ */