Camel.Medium

g Camel.DataWrapper Camel.DataWrapper Camel.Medium Camel.Medium Camel.DataWrapper->Camel.Medium GObject.Object GObject.Object GObject.Object->Camel.DataWrapper

Subclasses:

Camel.MimePart

Methods

Inherited:

Camel.DataWrapper (32), 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)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

Camel.DataWrapper

r

Class Details

class Camel.Medium(**kwargs)
Bases:

Camel.DataWrapper

Abstract:

Yes

Structure:

Camel.MediumClass

add_header(name, value)
Parameters:
  • name (str) – name of the header

  • value (str) – value of the header

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.DataWrapper containing self's content. Can return None.

Return type:

Camel.DataWrapper or 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:

str or None

Gets the value of the named header in the medium, or None if 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 or None) – a Camel.DataWrapper object

Sets the content of self to be content.

set_header(name, value)
Parameters:
  • name (str) – name of the header

  • value (str or None) – value of the header

Sets the value of a header. Any other occurances of the header will be removed. Setting a None header can be used to remove the header also.

do_add_header(name, value) virtual
Parameters:
  • name (str) – name of the header

  • value (str) – value of the header

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.DataWrapper containing medium's content. Can return None.

Return type:

Camel.DataWrapper or 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:

str or None

Gets the value of the named header in the medium, or None if 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 or None) – a Camel.DataWrapper object

Sets the content of medium to be content.

do_set_header(name, value) virtual
Parameters:
  • name (str) – name of the header

  • value (str or None) – value of the header

Sets the value of a header. Any other occurances of the header will be removed. Setting a None header can be used to remove the header also.

Property Details

Camel.Medium.props.content
Name:

content

Type:

Camel.DataWrapper

Default Value:

None

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY