Camel.MimeFilter

g Camel.MimeFilter Camel.MimeFilter GObject.Object GObject.Object GObject.Object->Camel.MimeFilter

Subclasses:

Camel.MimeFilterBasic, Camel.MimeFilterBestenc, Camel.MimeFilterCRLF, Camel.MimeFilterCanon, Camel.MimeFilterCharset, Camel.MimeFilterEnriched, Camel.MimeFilterFrom, Camel.MimeFilterGZip, Camel.MimeFilterHTML, Camel.MimeFilterIndex, Camel.MimeFilterLinewrap, Camel.MimeFilterPgp, Camel.MimeFilterPreview, Camel.MimeFilterProgress, Camel.MimeFilterToHTML, Camel.MimeFilterWindows, Camel.MimeFilterYenc

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

backup (data)

complete (in_, prespace)

filter (in_, prespace)

get_request_stop ()

reset ()

set_request_stop (request_stop)

set_size (size, keep)

Virtual Methods

Inherited:

GObject.Object (7)

do_complete (in_, prespace)

do_filter (in_, prespace)

do_reset ()

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

backbuf

str

r

backlen

int

r

backsize

int

r

outbuf

str

r

outpre

int

r

outptr

str

r

outreal

str

r

outsize

int

r

parent

GObject.Object

r

Class Details

class Camel.MimeFilter(**kwargs)
Bases:

GObject.Object

Abstract:

Yes

Structure:

Camel.MimeFilterClass

classmethod new()
Returns:

a new Camel.MimeFilter

Return type:

Camel.MimeFilter

Create a new Camel.MimeFilter object.

backup(data)
Parameters:

data (bytes) – data buffer to backup

Saves data to be used as prespace input data to the next call to Camel.MimeFilter.filter() or Camel.MimeFilter.complete().

Note: New calls replace old data.

complete(in_, prespace)
Parameters:
  • in (bytes) – input buffer

  • prespace (int) – amount of prespace

Returns:

out:

pointer to the output buffer (to be set)

outprespace:

pointer to the output prespace length (to be set)

Return type:

(out: bytes, outprespace: int)

Passes the input buffer, in, through self and generates an output buffer, out and makes sure that all data is flushed to the output buffer. This must be the last filtering call made, no further calls to Camel.MimeFilter.filter() may be called on self until self has been reset using Camel.MimeFilter.reset().

filter(in_, prespace)
Parameters:
  • in (bytes) – input buffer

  • prespace (int) – amount of prespace

Returns:

out:

pointer to the output buffer (to be set)

outprespace:

pointer to the output prespace length (to be set)

Return type:

(out: bytes, outprespace: int)

Passes the input buffer, in, through self and generates an output buffer, out.

get_request_stop()
Returns:

True, when the self request stop further processing, False otherwise

Return type:

bool

Returns whether the self requested stop further processing with Camel.MimeFilter.set_request_stop().

New in version 3.52.

reset()

Resets the state on self so that it may be used again.

set_request_stop(request_stop)
Parameters:

request_stop (bool) – value to set

Sets whether the self requests, or not, stop further processing. This can be used to stop before all the data is filtered.

New in version 3.52.

set_size(size, keep)
Parameters:
  • size (int) – requested amount of storage space

  • keep (int) – True to keep existing buffered data or False otherwise

Ensure that self has enough storage space to store size bytes for filter output.

do_complete(in_, prespace) virtual
Parameters:
  • in (bytes) – input buffer

  • prespace (int) – amount of prespace

Returns:

out:

pointer to the output buffer (to be set)

outprespace:

pointer to the output prespace length (to be set)

Return type:

(out: bytes, outprespace: int)

Passes the input buffer, in, through filter and generates an output buffer, out and makes sure that all data is flushed to the output buffer. This must be the last filtering call made, no further calls to Camel.MimeFilter.filter() may be called on filter until filter has been reset using Camel.MimeFilter.reset().

do_filter(in_, prespace) virtual
Parameters:
  • in (bytes) – input buffer

  • prespace (int) – amount of prespace

Returns:

out:

pointer to the output buffer (to be set)

outprespace:

pointer to the output prespace length (to be set)

Return type:

(out: bytes, outprespace: int)

Passes the input buffer, in, through filter and generates an output buffer, out.

do_reset() virtual

Resets the state on filter so that it may be used again.