TelepathyGLib.AccountRequest

g GObject.Object GObject.Object TelepathyGLib.AccountRequest TelepathyGLib.AccountRequest GObject.Object->TelepathyGLib.AccountRequest

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (account_manager, manager, protocol, display_name)

class

new_from_protocol (account_manager, protocol, display_name)

add_supersedes (superseded_path)

create_account_async (callback, *user_data)

create_account_finish (result)

set_automatic_presence (presence, status, message)

set_avatar (avatar, mime_type)

set_connect_automatically (connect_automatically)

set_display_name (name)

set_enabled (enabled)

set_icon_name (icon)

set_nickname (nickname)

set_parameter (key, value)

set_requested_presence (presence, status, message)

set_service (service)

set_storage_provider (provider)

unset_parameter (key)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

account-manager

TelepathyGLib.AccountManager

r/w/co

The account’s account manager

automatic-presence-type

int

r

Presence type used to put the account online automatically

automatic-status

str

r

Presence status used to put the account online automatically

automatic-status-message

str

r

User-defined message used to put the account online automatically

avatar

GLib.Array

r

The account’s avatar data

avatar-mime-type

str

r

The account’s avatar’s mime type

connect-automatically

bool

r

Whether this account should connect automatically or not

connection-manager

str

r/w/co

The account’s connection manager name

display-name

str

r/w/co

The account’s display name

enabled

bool

r

Whether this account is enabled or not

icon-name

str

r

The account’s icon name

nickname

str

r

The account’s nickname

parameters

GLib.Variant

r

Connection parameters of the account

properties

GLib.Variant

r

Account properties

protocol

str

r/w/co

The account’s protocol name

requested-presence-type

int

r

The account’s requested presence type

requested-status

str

r

The account’s requested status string

requested-status-message

str

r

The requested Status message string of the account

service

str

r

The account’s service

storage-provider

str

r

The account’s storage provider

supersedes

[str]

r

Accounts superseded by this one

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class TelepathyGLib.AccountRequest(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

TelepathyGLib.AccountRequestClass

An object for representing a currently non-existent account which is to be created on a TelepathyGLib.AccountManager.

New in version 0.19.1.

classmethod new(account_manager, manager, protocol, display_name)
Parameters:
Returns:

a new reference to an account request object, or None if any argument is incorrect

Return type:

TelepathyGLib.AccountRequest

Convenience function to create a new account request object which will assist in the creation of a new account on account_manager, using connection manager manager, and protocol protocol.

New in version 0.19.1.

classmethod new_from_protocol(account_manager, protocol, display_name)
Parameters:
Returns:

a new reference to an account request object, or None if any argument is incorrect

Return type:

TelepathyGLib.AccountRequest

Convenience function to create a new TelepathyGLib.AccountRequest object using a TelepathyGLib.Protocol instance, instead of specifying connection manager and protocol name specifically. See TelepathyGLib.AccountRequest.new() for more details.

New in version 0.19.1.

add_supersedes(superseded_path)
Parameters:

superseded_path (str) – an account object path to add to the supersedes list

Add an account object path to the list of superseded accounts which this new account will supersede. Use the TelepathyGLib.AccountRequest :supersedes property to read the current list of superseded accounts.

New in version 0.19.1.

create_account_async(callback, *user_data)
Parameters:

Start an asynchronous operation to create the account self on the account manager.

callback will only be called when the newly created TelepathyGLib.Account has the %TP_ACCOUNT_FEATURE_CORE feature ready on it, so when calling TelepathyGLib.AccountRequest.create_account_finish(), one can guarantee this feature.

New in version 0.19.1.

create_account_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

a new ref to a TelepathyGLib.Account, or None

Return type:

TelepathyGLib.Account

Finishes an asynchronous account creation operation and returns a new ref to a TelepathyGLib.Account object. The returned account will have the features listed in TelepathyGLib.SimpleClientFactory.dup_account_features() (with the proxy factory from TelepathyGLib.AccountRequest :account-manager) prepared on it.

New in version 0.19.1.

set_automatic_presence(presence, status, message)
Parameters:

Set the automatic presence for the new account, self, to the type (presence, status), with message message. Use the TelepathyGLib.AccountRequest :automatic-presence-type, TelepathyGLib.AccountRequest :automatic-status, and TelepathyGLib.AccountRequest :automatic-status-message properties to read the current automatic presence.

New in version 0.19.1.

set_avatar(avatar, mime_type)
Parameters:
  • avatar (bytes or None) – a new avatar to set; can be None only if %len equals 0

  • mime_type (str or None) – the MIME type of the new avatar; can be None only if len equals 0

Set the avatar of the account self to avatar. Use the TelepathyGLib.AccountRequest :avatar and TelepathyGLib.AccountRequest :avatar-mime-type properties to read the current avatar.

New in version 0.19.1.

set_connect_automatically(connect_automatically)
Parameters:

connect_automatically (bool) – True if the account is to connect automatically

Set the connect automatically property of the account on creation to connect_automatically so that the account is brought online to the automatic presence. Use the TelepathyGLib.AccountRequest :connect-automatically property to read the current connect automatically value.

New in version 0.19.1.

set_display_name(name)
Parameters:

name (str) – a display name for the account

Set the display name for the new account, self, to name. Use the TelepathyGLib.AccountRequest :display-name property to read the current display name.

New in version 0.19.1.

set_enabled(enabled)
Parameters:

enabled (bool) – True if the account is to be enabled

Set the enabled property of the account on creation to enabled. Use the TelepathyGLib.AccountRequest :enabled property to read the current enabled value.

New in version 0.19.1.

set_icon_name(icon)
Parameters:

icon (str) – an icon name for the account

Set the icon name for the new account, self, to icon. Use the TelepathyGLib.AccountRequest :icon-name property to read the current icon name.

New in version 0.19.1.

set_nickname(nickname)
Parameters:

nickname (str) – a nickname for the account

Set the nickname for the new account, self, to nickname. Use the TelepathyGLib.AccountRequest :nickname property to read the current nickname.

New in version 0.19.1.

set_parameter(key, value)
Parameters:
  • key (str) – the parameter key

  • value (GLib.Variant) – a variant containing the parameter value

Set an account parameter, key, to value. Use the TelepathyGLib.AccountRequest :parameters property to read the current list of set parameters.

Parameters can be unset using TelepathyGLib.AccountRequest.unset_parameter().

New in version 0.19.1.

set_requested_presence(presence, status, message)
Parameters:

Set the requested presence for the new account, self, to the type (presence, status), with message message. Use the TelepathyGLib.AccountRequest :requested-presence-type, TelepathyGLib.AccountRequest :requested-status, and TelepathyGLib.AccountRequest :requested-status-message properties to read the current requested presence.

New in version 0.19.1.

set_service(service)
Parameters:

service (str) – the service name for

Set the service property of the account to service. Use the TelepathyGLib.AccountRequest :service property to read the current value.

New in version 0.19.1.

set_storage_provider(provider)
Parameters:

provider (str) – the name of an account storage implementation

Set the account storage to use when creating the account. Use the TelepathyGLib.AccountRequest :storage-provider property to read the current value.

New in version 0.19.4.

unset_parameter(key)
Parameters:

key (str) – the parameter key

Unset the account parameter key which has previously been set using TelepathyGLib.AccountRequest.set_parameter() or another convenience function.

New in version 0.19.1.

Property Details

TelepathyGLib.AccountRequest.props.account_manager
Name:

account-manager

Type:

TelepathyGLib.AccountManager

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The TelepathyGLib.AccountManager to create the account on.

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.automatic_presence_type
Name:

automatic-presence-type

Type:

int

Default Value:

0

Flags:

READABLE

The account’s automatic presence type (a TelepathyGLib.ConnectionPresenceType). To change this property use TelepathyGLib.AccountRequest.set_automatic_presence().

When the account is put online automatically, for instance to make a channel request or because network connectivity becomes available, the automatic presence type, status and message will be copied to their “requested” counterparts.

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.automatic_status
Name:

automatic-status

Type:

str

Default Value:

None

Flags:

READABLE

The string status name to use in conjunction with the TelepathyGLib.AccountRequest :automatic-presence-type. To change this property use TelepathyGLib.AccountRequest.set_automatic_presence().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.automatic_status_message
Name:

automatic-status-message

Type:

str

Default Value:

None

Flags:

READABLE

The user-defined message to use in conjunction with the TelepathyGLib.Account :automatic-presence-type. To change this property use TelepathyGLib.AccountRequest.set_automatic_presence().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.avatar
Name:

avatar

Type:

GLib.Array

Default Value:

None

Flags:

READABLE

The avatar set on the account. The avatar’s mime type can be read in the TelepathyGLib.AccountRequest :avatar-mime-type property. To change this property, use TelepathyGLib.AccountRequest.set_avatar().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.avatar_mime_type
Name:

avatar-mime-type

Type:

str

Default Value:

None

Flags:

READABLE

The mime type of the TelepathyGLib.AccountRequest :avatar property. To change this property, use TelepathyGLib.AccountRequest.set_avatar().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.connect_automatically
Name:

connect-automatically

Type:

bool

Default Value:

False

Flags:

READABLE

Whether the account should connect automatically or not. To change this property, use TelepathyGLib.AccountRequest.set_connect_automatically().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.connection_manager
Name:

connection-manager

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The account’s connection manager name.

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.display_name
Name:

display-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The account’s display name. To change this property use TelepathyGLib.AccountRequest.set_display_name().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.enabled
Name:

enabled

Type:

bool

Default Value:

False

Flags:

READABLE

Whether the account is enabled or not. To change this property use TelepathyGLib.AccountRequest.set_enabled().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.icon_name
Name:

icon-name

Type:

str

Default Value:

None

Flags:

READABLE

The account’s icon name. To change this propery, use TelepathyGLib.AccountRequest.set_icon_name().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.nickname
Name:

nickname

Type:

str

Default Value:

None

Flags:

READABLE

The account’s nickname. To change this property use TelepathyGLib.AccountRequest.set_nickname().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.parameters
Name:

parameters

Type:

GLib.Variant

Default Value:

None

Flags:

READABLE

The account’s connection parameters. To add a parameter, use TelepathyGLib.AccountRequest.set_parameter() or another convience function.

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.properties
Name:

properties

Type:

GLib.Variant

Default Value:

None

Flags:

READABLE

The account’s properties.

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.protocol
Name:

protocol

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The account’s machine-readable protocol name, such as “jabber”, “msn” or “local-xmpp”. Recommended names for most protocols can be found in the Telepathy D-Bus Interface Specification.

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.requested_presence_type
Name:

requested-presence-type

Type:

int

Default Value:

0

Flags:

READABLE

The account’s requested presence type (a TelepathyGLib.ConnectionPresenceType). To change this property use TelepathyGLib.AccountRequest.set_requested_presence().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.requested_status
Name:

requested-status

Type:

str

Default Value:

None

Flags:

READABLE

The requested Status string of the account. To change this property use TelepathyGLib.AccountRequest.set_requested_presence().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.requested_status_message
Name:

requested-status-message

Type:

str

Default Value:

None

Flags:

READABLE

The requested status message message of the account. To change this property use TelepathyGLib.AccountRequest.set_requested_presence().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.service
Name:

service

Type:

str

Default Value:

None

Flags:

READABLE

A string describing the service of the account, which must consist only of ASCII letters, numbers and hyphen/minus signs, and start with a letter (matching the requirements for Protocol). To change this property, use TelepathyGLib.AccountRequest.set_service().

New in version 0.19.1.

TelepathyGLib.AccountRequest.props.storage_provider
Name:

storage-provider

Type:

str

Default Value:

None

Flags:

READABLE

The account’s storage provider. To change this property use TelepathyGLib.AccountRequest.set_storage_provider().

New in version 0.19.4.

TelepathyGLib.AccountRequest.props.supersedes
Name:

supersedes

Type:

[str]

Default Value:

[]

Flags:

READABLE

The object paths of previously-active accounts superseded by this one. For instance, this can be used in a logger to read old logs for an account that has been migrated from one connection manager to another.

To add to this property use TelepathyGLib.AccountRequest.add_supersedes().

New in version 0.19.1.