GMime.InternetAddressList

g GMime.InternetAddressList GMime.InternetAddressList GObject.Object GObject.Object GObject.Object->GMime.InternetAddressList

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

class

parse (options, str)

add (ia)

append (append)

clear ()

contains (ia)

encode (options, str)

get_address (index)

index_of (ia)

insert (index, ia)

length ()

prepend (prepend)

remove (ia)

remove_at (index)

set_address (index, ia)

to_string (options, encode)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

array

[object]

r

The array of GMime.InternetAddress objects.

changed

object

r

parent_object

GObject.Object

r

parent GObject.Object

Class Details

class GMime.InternetAddressList(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

GMime.InternetAddressListClass

A collection of GMime.InternetAddress objects.

classmethod new()
Returns:

a new GMime.InternetAddressList.

Return type:

GMime.InternetAddressList

Creates a new GMime.InternetAddressList.

classmethod parse(options, str)
Parameters:
Returns:

a GMime.InternetAddressList or None if the input string does not contain any addresses.

Return type:

GMime.InternetAddressList or None

Construct a list of internet addresses from the given string.

add(ia)
Parameters:

ia (GMime.InternetAddress) – a GMime.InternetAddress

Returns:

the index of the added GMime.InternetAddress.

Return type:

int

Adds an GMime.InternetAddress to the GMime.InternetAddressList.

append(append)
Parameters:

append (GMime.InternetAddressList) – a GMime.InternetAddressList

Adds all of the addresses in append to self.

clear()

Clears the list of addresses.

contains(ia)
Parameters:

ia (GMime.InternetAddress) – a GMime.InternetAddress

Returns:

True if the specified GMime.InternetAddress is contained within the specified GMime.InternetAddressList or False otherwise.

Return type:

bool

Checks whether or not the specified GMime.InternetAddress is contained within the GMime.InternetAddressList.

encode(options, str)
Parameters:

Writes the rfc2047-encoded rfc822 formatted addresses in self to str, folding appropriately.

get_address(index)
Parameters:

index (int) – index of GMime.InternetAddress to get

Returns:

the GMime.InternetAddress at the specified index or None if the index is out of range.

Return type:

GMime.InternetAddress

Gets the GMime.InternetAddress at the specified index.

index_of(ia)
Parameters:

ia (GMime.InternetAddress) – a GMime.InternetAddress

Returns:

the index of the requested GMime.InternetAddress within the GMime.InternetAddressList or %-1 if it is not contained within the GMime.InternetAddressList.

Return type:

int

Gets the index of the specified GMime.InternetAddress inside the GMime.InternetAddressList.

insert(index, ia)
Parameters:

Inserts an GMime.InternetAddress into the GMime.InternetAddressList at the specified index.

length()
Returns:

the number of GMime.InternetAddress objects in the list.

Return type:

int

Gets the length of the list.

prepend(prepend)
Parameters:

prepend (GMime.InternetAddressList) – a GMime.InternetAddressList

Inserts all of the addresses in prepend to the beginning of self.

remove(ia)
Parameters:

ia (GMime.InternetAddress) – a GMime.InternetAddress

Returns:

True if the specified GMime.InternetAddress was removed or False otherwise.

Return type:

bool

Removes an GMime.InternetAddress from the GMime.InternetAddressList.

remove_at(index)
Parameters:

index (int) – index to remove

Returns:

True if an GMime.InternetAddress was removed or False otherwise.

Return type:

bool

Removes an GMime.InternetAddress from the GMime.InternetAddressList at the specified index.

set_address(index, ia)
Parameters:

Sets the GMime.InternetAddress at the specified index to ia.

to_string(options, encode)
Parameters:
Returns:

a string containing the list of addresses in rfc822 format or None if no addresses are contained in the list.

Return type:

str or None

Allocates a string buffer containing the rfc822 formatted addresses in self.