GMime.StreamMmap

g GMime.Stream GMime.Stream GMime.StreamMmap GMime.StreamMmap GMime.Stream->GMime.StreamMmap GObject.Object GObject.Object GObject.Object->GMime.Stream

Subclasses:

None

Methods

Inherited:

GMime.Stream (17), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (fd, prot, flags)

class

new_with_bounds (fd, prot, flags, start, end)

get_owner ()

set_owner (owner)

Virtual Methods

Inherited:

GMime.Stream (10), GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

eos

bool

r

True if end-of-stream

fd

int

r

file descriptor

map

str

r

memory map

maplen

int

r

length of the memory map

owner

bool

r

True if this stream owns the memory map

parent_object

GMime.Stream

r

parent GMime.Stream

Class Details

class GMime.StreamMmap(**kwargs)
Bases:

GMime.Stream

Abstract:

No

Structure:

GMime.StreamMmapClass

A memory-mapped GMime.Stream.

classmethod new(fd, prot, flags)
Parameters:
  • fd (int) – file descriptor

  • prot (int) – protection flags

  • flags (int) – map flags

Returns:

a stream using fd.

Return type:

GMime.Stream

Creates a new GMime.StreamMmap object around fd.

classmethod new_with_bounds(fd, prot, flags, start, end)
Parameters:
  • fd (int) – file descriptor

  • prot (int) – protection flags

  • flags (int) – map flags

  • start (int) – start boundary

  • end (int) – end boundary

Returns:

a stream using fd with bounds start and end.

Return type:

GMime.Stream

Creates a new GMime.StreamMmap object around fd with bounds start and end.

get_owner()
Returns:

True if self owns the backend file descriptor or False otherwise.

Return type:

bool

Gets whether or not self owns the backend file descriptor.

New in version 3.2.

set_owner(owner)
Parameters:

owner (bool) – True if this stream should own the file descriptor or False otherwise

Sets whether or not self owns the backend file descriptor.

Note: owner should be True if the stream should close() the backend file descriptor when destroyed or False otherwise.

New in version 3.2.