Camel.Medium¶
| Subclasses: | Camel.MimePart | 
|---|
Methods¶
| Inherited: | Camel.DataWrapper (31), GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| add_header(name, value) | |
| dup_headers() | |
| get_content() | |
| get_header(name) | |
| get_headers() | |
| remove_header(name) | |
| set_content(content) | |
| set_header(name, value) | 
Virtual Methods¶
| Inherited: | Camel.DataWrapper (11), GObject.Object (7) | 
|---|
| do_add_header(name, value) | |
| do_dup_headers() | |
| do_get_content() | |
| do_get_header(name) | |
| do_get_headers() | |
| do_remove_header(name) | |
| do_set_content(content) | |
| do_set_header(name, value) | 
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| content | Camel.DataWrapper | r/w/en | 
Signals¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class Camel.Medium(**kwargs)¶
- Bases: - Camel.DataWrapper- Abstract: - Yes - Structure: - Camel.MediumClass- 
add_header(name, value)¶
- Parameters: - Adds a header to a - Camel.Medium.
 - 
dup_headers()¶
- Returns: - the array of headers, which must be freed with - Camel.NameValueArray.free().- Return type: - Camel.NameValueArray- Gets an array of all header name/value pairs. The values will be decoded to UTF-8 for any headers that are recognized by Camel. See also - Camel.Medium.get_headers().- New in version 3.24. 
 - 
get_content()¶
- Returns: - a - Camel.DataWrappercontaining self’s content. Can return- None.- Return type: - Camel.DataWrapperor- None- Gets a data wrapper that represents the content of the medium, without its headers. 
 - 
get_header(name)¶
- Parameters: - name ( - str) – the name of the header- Returns: - the value of the named header, or - None- Return type: - stror- None- Gets the value of the named header in the medium, or - Noneif it is unset. The caller should not modify or free the data.- If the header occurs more than once, only retrieve the first instance of the header. For multi-occuring headers, use - Camel.Medium.dup_headers() or- Camel.Medium.get_headers().
 - 
get_headers()¶
- Returns: - the array of headers, owned by self. - Return type: - Camel.NameValueArray- Gets an array of all header name/value pairs. The values will be decoded to UTF-8 for any headers that are recognized by Camel. See also - Camel.Medium.dup_headers().- New in version 3.24. 
 - 
remove_header(name)¶
- Parameters: - name ( - str) – the name of the header- Removes the named header from the medium. All occurances of the header are removed. 
 - 
set_content(content)¶
- Parameters: - content ( - Camel.DataWrapper) – a- Camel.DataWrapperobject- Sets the content of self to be content. 
 - 
set_header(name, value)¶
- Parameters: - Sets the value of a header. Any other occurances of the header will be removed. Setting a - Noneheader can be used to remove the header also.
 - 
do_add_header(name, value) virtual¶
- Parameters: - Adds a header to a - Camel.Medium.
 - 
do_dup_headers() virtual¶
- Returns: - the array of headers, which must be freed with - Camel.NameValueArray.free().- Return type: - Camel.NameValueArray- Gets an array of all header name/value pairs. The values will be decoded to UTF-8 for any headers that are recognized by Camel. See also - Camel.Medium.get_headers().- New in version 3.24. 
 - 
do_get_content() virtual¶
- Returns: - a - Camel.DataWrappercontaining medium’s content. Can return- None.- Return type: - Camel.DataWrapperor- None- Gets a data wrapper that represents the content of the medium, without its headers. 
 - 
do_get_header(name) virtual¶
- Parameters: - name ( - str) – the name of the header- Returns: - the value of the named header, or - None- Return type: - stror- None- Gets the value of the named header in the medium, or - Noneif it is unset. The caller should not modify or free the data.- If the header occurs more than once, only retrieve the first instance of the header. For multi-occuring headers, use - Camel.Medium.dup_headers() or- Camel.Medium.get_headers().
 - 
do_get_headers() virtual¶
- Returns: - the array of headers, owned by medium. - Return type: - Camel.NameValueArray- Gets an array of all header name/value pairs. The values will be decoded to UTF-8 for any headers that are recognized by Camel. See also - Camel.Medium.dup_headers().- New in version 3.24. 
 - 
do_remove_header(name) virtual¶
- Parameters: - name ( - str) – the name of the header- Removes the named header from the medium. All occurances of the header are removed. 
 - 
do_set_content(content) virtual¶
- Parameters: - content ( - Camel.DataWrapper) – a- Camel.DataWrapperobject- Sets the content of medium to be content. 
 
- 
Property Details¶
- 
Camel.Medium.props.content¶
- Name: - content- Type: - Camel.DataWrapper- Default Value: - None- Flags: - READABLE,- WRITABLE,- EXPLICIT_NOTIFY