EBook.Destination

g EBook.Destination EBook.Destination GObject.Object GObject.Object GObject.Object->EBook.Destination

Subclasses:None

Methods

Inherited:GObject.Object (38)
Structs:GObject.ObjectClass (5)
class exportv (destv)
class freev (destv)
class get_textrepv (destv)
class import_ (str)
class importv (str)
class new ()
  copy ()
  empty ()
  equal (b)
  export ()
  export_to_vcard_attribute (attr)
  get_address ()
  get_contact ()
  get_contact_uid ()
  get_email ()
  get_email_num ()
  get_html_mail_pref ()
  get_name ()
  get_source_uid ()
  get_textrep (include_email)
  is_auto_recipient ()
  is_evolution_list ()
  is_ignored ()
  list_get_dests ()
  list_get_root_dests ()
  list_show_addresses ()
  set_auto_recipient (value)
  set_client (client)
  set_contact (contact, email_num)
  set_contact_uid (uid, email_num)
  set_email (email)
  set_html_mail_pref (flag)
  set_ignored (ignored)
  set_name (name)
  set_raw (raw)

Virtual Methods

Inherited:GObject.Object (7)
  do_changed ()

Properties

None

Signals

Inherited:GObject.Object (1)
Name Short Description
changed  

Fields

Inherited:GObject.Object (1)
Name Type Access Description
object GObject.Object r  

Class Details

class EBook.Destination(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:EBook.DestinationClass
classmethod exportv(destv)
Parameters:destv ([EBook.Destination]) – a None-terminated array of pointers to EBook.Destination
Returns:An XML string, allocated with GLib.malloc.
Return type:str

Exports multiple EBook.Destination elements to a single XML document.

classmethod freev(destv)
Parameters:destv ([EBook.Destination]) – a None-terminated array of pointers to EBook.Destination

Unrefs the elements of destv and frees destv itself.

classmethod get_textrepv(destv)
Parameters:destv ([EBook.Destination]) – None-terminated array of pointers to EBook.Destination
Returns:The text representation of destv.
Return type:str

Generates a joint text representation of all the EBook.Destination elements in destv.

classmethod import_(str)
Parameters:str (str) – an XML string
Returns:An EBook.Destination, or None if the document was not well-formed.
Return type:EBook.Destination or None

Creates an EBook.Destination from an XML document.

classmethod importv(str)
Parameters:str (str) – an XML string
Returns:A None-terminated array of pointers to EBook.Destination elements.
Return type:[EBook.Destination]

Creates an array of pointers to EBook.Destination elements from an XML document.

classmethod new()
Returns:A newly created EBook.Destination.
Return type:EBook.Destination

Creates a new EBook.Destination with blank values.

copy()
Returns:A newly created EBook.Destination, identical to self.
Return type:EBook.Destination

Creates a new EBook.Destination identical to self.

empty()
Returns:True if self is empty, False otherwise.
Return type:bool

Checks if self is blank.

equal(b)
Parameters:b (EBook.Destination) – an EBook.Destination
Returns:True if the destinations are equal, False otherwise.
Return type:bool

Checks if self and b are equal.

export()
Returns:An XML string, allocated with GLib.malloc.
Return type:str

Exports a destination to an XML document.

export_to_vcard_attribute(attr)
Parameters:attr (EBookContacts.VCardAttribute) – an EBookContacts.VCardAttribute

Exports the contact information from self to parameters and values in attr, suitable for an address book.

get_address()
Returns:an encoded destination string suitable for use in an email header, or None if the destination was empty
Return type:str or None

Gets the encoded name and email address, or in the case of lists, the encoded list of email addresses, from self. The returned string is suitable for use in an email header, but not for displaying to users.

get_contact()
Returns:An EBookContacts.Contact, or None if none was set.
Return type:EBookContacts.Contact or None

Gets the contact self is pointing to, if any.

get_contact_uid()
Returns:A unique contact ID, or None if none was set.
Return type:str or None

Gets the unique contact ID self is pointing to, if any.

get_email()
Returns:An e-mail address, or an empty string if none was set.
Return type:str

Gets the e-mail address of self’s addressee.

get_email_num()
Returns:The e-mail index, or -1 if none was set.
Return type:int

Gets the index of the e-mail address of the contact that self is pointing to, if any.

get_html_mail_pref()
Returns:True if destination wants HTML, False if not.
Return type:bool

Check if self wants to get mail formatted as HTML.

get_name()
Returns:The full name of the addressee, or None if none was set.
Return type:str or None

Gets the full name of self’s addressee, or if the addressee is a contact list, the name the list was filed under.

get_source_uid()
Returns:A unique source ID, or None if none was set.
Return type:str or None

Gets the unique source ID self is pointing to, if any. The source ID specifies which address book self’s contact came from.

get_textrep(include_email)
Parameters:include_email (bool) – whether to include the e-mail address
Returns:A textual representation of the destination.
Return type:str

Generates a textual representation of self, suitable for referring to the destination during user interaction.

is_auto_recipient()
Returns:True if destination is an auto recipient, False otherwise.
Return type:bool

Checks if self is flagged as an automatic recipient, meaning it was not explicitly specified by the user. This can be used to hide it from some UI elements.

is_evolution_list()
Returns:True if destination is a list, False if it is an individual.
Return type:bool

Checks if self is a list of addresses.

is_ignored()
Returns:True if this destination should be ignored, else False.
Return type:bool

Check if self is to be ignored.

list_get_dests()
Returns:A list of elements of type EBook.Destination, or None.
Return type:[EBook.Destination]

If self is a list, gets recursively list of all destinations. Everything returned from this function belongs to self and thus should not be freed.

New in version 3.2.

list_get_root_dests()
Returns:A list of elements of type EBook.Destination, or None.
Return type:[EBook.Destination]

If self is a list, gets the list of EDestinations assigned directly to self. The list and its elements belong to self, and should not be freed.

New in version 3.2.

list_show_addresses()
Returns:True if addresses should be shown, False otherwise.
Return type:bool

If self is a list, checks if the addresses in the list should be presented to the user during interaction.

set_auto_recipient(value)
Parameters:value (bool) – the auto recipient flag

Sets the flag indicating if self is an automatic recipient, meaning it was not explicitly specified by the user. This can be used to hide it from some UI elements.

set_client(client)
Parameters:client (EBook.BookClient) – an EBook.BookClient

Specify the source self’s contact comes from. This is useful if you need to update the contact later.

New in version 3.2.

set_contact(contact, email_num)
Parameters:

Sets self to point to one of contact’s e-mail addresses indicated by email_num.

set_contact_uid(uid, email_num)
Parameters:
  • uid (str) – a unique contact ID
  • email_num (int) – an email index

Sets self to point to one of the contact specified by uid’s e-mail addresses indicated by email_num.

set_email(email)
Parameters:email (str) – the destination’s e-mail address

Sets the e-mail address of self’s addressee.

set_html_mail_pref(flag)
Parameters:flag (bool) – whether the destination wants HTML mail

Specifies whether self wants to get mail formatted as HTML.

set_ignored(ignored)
Parameters:ignored (bool) – True if this EBook.Destination should be ignored.

Set the ignore flag on a EBook.Destination.

set_name(name)
Parameters:name (str) – the destination’s full name

Sets the full name of self’s addressee.

set_raw(raw)
Parameters:raw (str) – an unparsed string

Sets self to point to the name and e-mail address resulting from parsing the supplied string. Useful for user input.

do_changed() virtual

Signal Details

EBook.Destination.signals.changed(destination)
Signal Name:changed
Flags:RUN_LAST
Parameters:destination (EBook.Destination) – The object which received the signal