| Camel Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
struct CamelMedium; CamelMediumHeader;void camel_medium_add_header (CamelMedium *medium,const,gchar *name);gconstpointer valuevoid camel_medium_set_header (CamelMedium *medium,const,gchar *name);gconstpointer valuevoid camel_medium_remove_header (CamelMedium *medium,const);gchar *namegconstpointer camel_medium_get_header (CamelMedium *medium,const);gchar *nameGArray * camel_medium_get_headers (CamelMedium *medium);void camel_medium_free_headers (CamelMedium *medium,); CamelDataWrapper * camel_medium_get_content (GArray *headersCamelMedium *medium);void camel_medium_set_content (CamelMedium *medium,CamelDataWrapper *content);
void camel_medium_add_header (CamelMedium *medium,const,gchar *name);gconstpointer value
Adds a header to a CamelMedium.
|
a CamelMedium object |
|
name of the header |
|
value of the header |
void camel_medium_set_header (CamelMedium *medium,const,gchar *name);gconstpointer value
Sets the value of a header. Any other occurances of the header
will be removed. Setting a NULL
|
a CamelMedium object |
|
name of the header |
|
value of the header |
void camel_medium_remove_header (CamelMedium *medium,const);gchar *name
Removes the named header from the medium. All occurances of the header are removed.
|
a CamelMedium |
|
the name of the header |
gconstpointer camel_medium_get_header (CamelMedium *medium,const);gchar *name
Gets the value of the named header in the medium, or NULL
If the header occurs more than once, only retrieve the first
instance of the header. For multi-occuring headers, use
:get_headers()
|
a CamelMedium |
|
the name of the header |
Returns : |
the value of the named header, or NULL |
GArray * camel_medium_get_headers (CamelMedium *medium);
Gets an array of all header name/value pairs (as CamelMediumHeader structures). The values will be decoded to UTF-8 for any headers that are recognized by Camel. The caller should not modify the returned data.
|
a CamelMedium object |
Returns : |
the array of headers, which must be freed with
camel_medium_free_headers(). |
void camel_medium_free_headers (CamelMedium *medium,);GArray *headers
Frees headers.
|
a CamelMedium object |
|
an array of headers returned from camel_medium_get_headers()
|
CamelDataWrapper * camel_medium_get_content (CamelMedium *medium);
Gets a data wrapper that represents the content of the medium, without its headers.
|
a CamelMedium object |
Returns : |
a CamelDataWrapper containing medium's content. Can return NULL. |
void camel_medium_set_content (CamelMedium *medium,CamelDataWrapper *content);
Sets the content of medium to be content.
|
a CamelMedium object |
|
a CamelDataWrapper object |