TelepathyGLib.SimpleClientFactory

g GObject.Object GObject.Object TelepathyGLib.SimpleClientFactory TelepathyGLib.SimpleClientFactory GObject.Object->TelepathyGLib.SimpleClientFactory

Subclasses:

TelepathyGLib.AutomaticClientFactory

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (dbus)

add_account_features (features)

add_channel_features (features)

add_connection_features (features)

add_contact_features (features)

dup_account_features (account)

dup_channel_features (channel)

dup_connection_features (connection)

dup_contact_features (connection)

ensure_account (object_path, immutable_properties)

ensure_channel (connection, object_path, immutable_properties)

ensure_connection (object_path, immutable_properties)

ensure_contact (connection, handle, identifier)

ensure_contact_by_id_async (connection, identifier, callback, *user_data)

ensure_contact_by_id_finish (result)

get_dbus_daemon ()

upgrade_contacts_async (connection, contacts, callback, *user_data)

upgrade_contacts_finish (result)

Virtual Methods

Inherited:

GObject.Object (7)

do_dup_account_features (account)

do_dup_channel_features (channel)

do_dup_connection_features (connection)

do_dup_contact_features (connection)

Properties

Name

Type

Flags

Short Description

dbus-daemon

TelepathyGLib.DBusDaemon

r/w/co

The D-Bus daemon used by this object

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class TelepathyGLib.SimpleClientFactory(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

TelepathyGLib.SimpleClientFactoryClass

Data structure representing a TelepathyGLib.SimpleClientFactory

New in version 0.15.5.

classmethod new(dbus)
Parameters:

dbus (TelepathyGLib.DBusDaemon or None) – a TelepathyGLib.DBusDaemon, or None

Returns:

a new TelepathyGLib.SimpleClientFactory

Return type:

TelepathyGLib.SimpleClientFactory

Creates a new TelepathyGLib.SimpleClientFactory instance. If dbus is None, TelepathyGLib.DBusDaemon.dup() will be used.

New in version 0.15.5.

add_account_features(features)
Parameters:

features ([int] or None) – an array of desired features, ending with 0; None is equivalent to an array containing only 0

Add features to the desired features to be prepared on TelepathyGLib.Account objects. Those features will be added to the features already returned be TelepathyGLib.SimpleClientFactory.dup_account_features().

It is not necessary to add %TP_ACCOUNT_FEATURE_CORE as it is already included by default.

Note that these features will not be added to existing TelepathyGLib.Account objects; the user must call TelepathyGLib.Proxy.prepare_async() themself.

New in version 0.15.5.

add_channel_features(features)
Parameters:

features ([int] or None) – an array of desired features, ending with 0; None is equivalent to an array containing only 0

Add features to the desired features to be prepared on TelepathyGLib.Channel objects. Those features will be added to the features already returned be TelepathyGLib.SimpleClientFactory.dup_channel_features().

It is not necessary to add %TP_CHANNEL_FEATURE_CORE as it is already included by default.

Note that these features will not be added to existing TelepathyGLib.Channel objects; the user must call TelepathyGLib.Proxy.prepare_async() themself.

New in version 0.15.5.

add_connection_features(features)
Parameters:

features ([int] or None) – an array of desired features, ending with 0; None is equivalent to an array containing only 0

Add features to the desired features to be prepared on TelepathyGLib.Connection objects. Those features will be added to the features already returned be TelepathyGLib.SimpleClientFactory.dup_connection_features().

It is not necessary to add %TP_CONNECTION_FEATURE_CORE as it is already included by default.

Note that these features will not be added to existing TelepathyGLib.Connection objects; the user must call TelepathyGLib.Proxy.prepare_async() themself.

New in version 0.15.5.

add_contact_features(features)
Parameters:

features ([TelepathyGLib.ContactFeature] or None) – an array of desired features (may be None if n_features is 0)

Add features to the desired features to be prepared on TelepathyGLib.Contact objects. Those features will be added to the features already returned be TelepathyGLib.SimpleClientFactory.dup_contact_features().

Note that these features will not be added to existing TelepathyGLib.Contact objects; the user must call TelepathyGLib.Connection.upgrade_contacts() themself.

New in version 0.15.5.

dup_account_features(account)
Parameters:

account (TelepathyGLib.Account) – a TelepathyGLib.Account

Returns:

a newly allocated GLib.Array

Return type:

[int]

Return a zero-terminated GLib.Array containing the TelepathyGLib.Account features that should be prepared on account.

New in version 0.15.5.

dup_channel_features(channel)
Parameters:

channel (TelepathyGLib.Channel) – a TelepathyGLib.Channel

Returns:

a newly allocated GLib.Array

Return type:

[int]

Return a zero-terminated GLib.Array containing the TelepathyGLib.Channel features that should be prepared on channel.

New in version 0.15.5.

dup_connection_features(connection)
Parameters:

connection (TelepathyGLib.Connection) – a TelepathyGLib.Connection

Returns:

a newly allocated GLib.Array

Return type:

[int]

Return a zero-terminated GLib.Array containing the TelepathyGLib.Connection features that should be prepared on connection.

New in version 0.15.5.

dup_contact_features(connection)
Parameters:

connection (TelepathyGLib.Connection) – a TelepathyGLib.Connection

Returns:

a newly allocated GLib.Array

Return type:

[TelepathyGLib.ContactFeature]

Return a GLib.Array containing the TelepathyGLib.ContactFeature that should be prepared on all contacts of connection.

New in version 0.15.5.

ensure_account(object_path, immutable_properties)
Parameters:
  • object_path (str) – the object path of an account

  • immutable_properties ({str: GObject.Value}) – the immutable properties of the account, or None.

Raises:

GLib.Error

Returns:

a reference to a TelepathyGLib.Account; see TelepathyGLib.Account.new().

Return type:

TelepathyGLib.Account

Returns a TelepathyGLib.Account proxy for the account at object_path. The returned TelepathyGLib.Account is cached; the same TelepathyGLib.Account object will be returned by this function repeatedly, as long as at least one reference exists.

Note that the returned TelepathyGLib.Account is not guaranteed to be ready; the caller is responsible for calling TelepathyGLib.Proxy.prepare_async() with the desired features (as given by TelepathyGLib.SimpleClientFactory.dup_account_features()).

This function is rather low-level. TelepathyGLib.AccountManager.dup_valid_accounts() and TelepathyGLib.AccountManager ::validity-changed are more appropriate for most applications.

New in version 0.15.5.

ensure_channel(connection, object_path, immutable_properties)
Parameters:
Raises:

GLib.Error

Returns:

a reference to a TelepathyGLib.Channel; see TelepathyGLib.Channel.new_from_properties().

Return type:

TelepathyGLib.Channel

Returns a TelepathyGLib.Channel proxy for the channel at object_path on connection. The returned TelepathyGLib.Channel is cached; the same TelepathyGLib.Channel object will be returned by this function repeatedly, as long as at least one reference exists.

Note that the returned TelepathyGLib.Channel is not guaranteed to be ready; the caller is responsible for calling TelepathyGLib.Proxy.prepare_async() with the desired features (as given by TelepathyGLib.SimpleClientFactory.dup_channel_features()).

This function is rather low-level. TelepathyGLib.AccountChannelRequest and TelepathyGLib.BaseClient are more appropriate ways to obtain channels for most applications.

New in version 0.15.5.

ensure_connection(object_path, immutable_properties)
Parameters:
  • object_path (str) – the object path of a connection

  • immutable_properties ({str: GObject.Value}) – the immutable properties of the connection.

Raises:

GLib.Error

Returns:

a reference to a TelepathyGLib.Connection; see TelepathyGLib.Connection.new().

Return type:

TelepathyGLib.Connection

Returns a TelepathyGLib.Connection proxy for the connection at object_path. The returned TelepathyGLib.Connection is cached; the same TelepathyGLib.Connection object will be returned by this function repeatedly, as long as at least one reference exists.

Note that the returned TelepathyGLib.Connection is not guaranteed to be ready; the caller is responsible for calling TelepathyGLib.Proxy.prepare_async() with the desired features (as given by TelepathyGLib.SimpleClientFactory.dup_connection_features()).

This function is rather low-level. TelepathyGLib.Account :connection is more appropriate for most applications.

New in version 0.15.5.

ensure_contact(connection, handle, identifier)
Parameters:
Returns:

a reference to a TelepathyGLib.Contact.

Return type:

TelepathyGLib.Contact

Returns a TelepathyGLib.Contact representing identifier (and handle) on connection. The returned TelepathyGLib.Contact is cached; the same TelepathyGLib.Contact object will be returned by this function repeatedly, as long as at least one reference exists.

Note that the returned TelepathyGLib.Contact is not guaranteed to be ready; the caller is responsible for calling TelepathyGLib.Connection.upgrade_contacts() with the desired features (as given by TelepathyGLib.SimpleClientFactory.dup_contact_features()).

For this function to work properly, TelepathyGLib.Connection.has_immortal_handles() must return True for connection.

New in version 0.15.5.

ensure_contact_by_id_async(connection, identifier, callback, *user_data)
Parameters:

Same as TelepathyGLib.Connection.dup_contact_by_id_async(), but prepare the contact with all features previously passed to TelepathyGLib.SimpleClientFactory.add_contact_features().

New in version 0.19.1.

ensure_contact_by_id_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

a TelepathyGLib.Contact or None on error.

Return type:

TelepathyGLib.Contact

Finishes TelepathyGLib.SimpleClientFactory.ensure_contact_by_id_async()

New in version 0.19.1.

get_dbus_daemon()
Returns:

the value of the TelepathyGLib.SimpleClientFactory :dbus-daemon property

Return type:

TelepathyGLib.DBusDaemon

New in version 0.15.5.

upgrade_contacts_async(connection, contacts, callback, *user_data)
Parameters:

Same as TelepathyGLib.Connection.upgrade_contacts_async(), but prepare contacts with all features previously passed to TelepathyGLib.SimpleClientFactory.add_contact_features().

New in version 0.19.1.

upgrade_contacts_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False otherwise.

contacts:

a location to set a GLib.PtrArray of upgraded TelepathyGLib.Contact, or None.

Return type:

(bool, contacts: [TelepathyGLib.Contact])

Finishes TelepathyGLib.SimpleClientFactory.upgrade_contacts_async()

New in version 0.19.1.

do_dup_account_features(account) virtual
Parameters:

account (TelepathyGLib.Account) – a TelepathyGLib.Account

Returns:

a newly allocated GLib.Array

Return type:

[int]

Return a zero-terminated GLib.Array containing the TelepathyGLib.Account features that should be prepared on account.

New in version 0.15.5.

do_dup_channel_features(channel) virtual
Parameters:

channel (TelepathyGLib.Channel) – a TelepathyGLib.Channel

Returns:

a newly allocated GLib.Array

Return type:

[int]

Return a zero-terminated GLib.Array containing the TelepathyGLib.Channel features that should be prepared on channel.

New in version 0.15.5.

do_dup_connection_features(connection) virtual
Parameters:

connection (TelepathyGLib.Connection) – a TelepathyGLib.Connection

Returns:

a newly allocated GLib.Array

Return type:

[int]

Return a zero-terminated GLib.Array containing the TelepathyGLib.Connection features that should be prepared on connection.

New in version 0.15.5.

do_dup_contact_features(connection) virtual
Parameters:

connection (TelepathyGLib.Connection) – a TelepathyGLib.Connection

Returns:

a newly allocated GLib.Array

Return type:

[TelepathyGLib.ContactFeature]

Return a GLib.Array containing the TelepathyGLib.ContactFeature that should be prepared on all contacts of connection.

New in version 0.15.5.

Property Details

TelepathyGLib.SimpleClientFactory.props.dbus_daemon
Name:

dbus-daemon

Type:

TelepathyGLib.DBusDaemon

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The D-Bus daemon for this object.