From 71002d1544cdbcf825377602dd738c15f910b93b Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 16 May 2001 18:23:15 +0000 Subject: 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 --- camel/camel-medium.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'camel/camel-medium.h') 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, -- cgit