aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-medium.h
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-05-17 02:23:15 +0800
committerDan Winship <danw@src.gnome.org>2001-05-17 02:23:15 +0800
commit71002d1544cdbcf825377602dd738c15f910b93b (patch)
tree46f8f339b9e69f2e170a57b0fd9a09cfbff5eca1 /camel/camel-medium.h
parent7e5b838da2848ea29a502813d917cee022cbdb35 (diff)
downloadgsoc2013-evolution-71002d1544cdbcf825377602dd738c15f910b93b.tar.gz
gsoc2013-evolution-71002d1544cdbcf825377602dd738c15f910b93b.tar.zst
gsoc2013-evolution-71002d1544cdbcf825377602dd738c15f910b93b.zip
New function to return an array of all headers.
* camel-medium.c (camel_medium_get_headers): New function to return an array of all headers. (camel_medium_free_headers): And free them. * camel-mime-part.c (get_headers, free_headers): Implement this for CamelMimePart. (Works for CamelMimeMessage too.) svn path=/trunk/; revision=9849
Diffstat (limited to 'camel/camel-medium.h')
-rw-r--r--camel/camel-medium.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/camel/camel-medium.h b/camel/camel-medium.h
index 9ce548ba1d..40ee17675d 100644
--- a/camel/camel-medium.h
+++ b/camel/camel-medium.h
@@ -42,6 +42,11 @@ extern "C" {
#define CAMEL_IS_MEDIUM(o) (CAMEL_CHECK_TYPE((o), CAMEL_MEDIUM_TYPE))
+typedef struct {
+ const char *name;
+ const char *value;
+} CamelMediumHeader;
+
struct _CamelMedium
{
CamelDataWrapper parent_object;
@@ -54,8 +59,6 @@ struct _CamelMedium
};
-
-
typedef struct {
CamelDataWrapperClass parent_class;
@@ -65,6 +68,9 @@ typedef struct {
void (*remove_header) (CamelMedium *medium, const gchar *header_name);
const void * (*get_header) (CamelMedium *medium, const gchar *header_name);
+ GArray * (*get_headers) (CamelMedium *medium);
+ void (*free_headers) (CamelMedium *medium, GArray *headers);
+
CamelDataWrapper * (*get_content_object) (CamelMedium *medium);
void (*set_content_object) (CamelMedium *medium, CamelDataWrapper *content);
@@ -79,6 +85,9 @@ void camel_medium_set_header (CamelMedium *medium, const gchar *header_name, con
void camel_medium_remove_header (CamelMedium *medium, const gchar *header_name);
const void *camel_medium_get_header (CamelMedium *medium, const gchar *header_name);
+GArray *camel_medium_get_headers (CamelMedium *medium);
+void camel_medium_free_headers (CamelMedium *medium, GArray *headers);
+
/* accessor methods */
CamelDataWrapper *camel_medium_get_content_object (CamelMedium *medium);
void camel_medium_set_content_object (CamelMedium *medium,