Gjsify LogoGjsify Logo

The Telepathy Account Manager stores the user's configured real-time communication accounts. This object represents a stored account.

If this account is deleted from the account manager, the #TpProxy::invalidated signal will be emitted with the domain %TP_DBUS_ERRORS and the error code %TP_DBUS_ERROR_OBJECT_REMOVED.

One can connect to the #GObject::notify signal to get change notifications for many of the properties on this object. Refer to each property's documentation for whether it can be used in this way.

#TpAccount objects should normally be obtained from the #TpAccountManager.

Since 0.16, #TpAccount always has a non-%NULL #TpProxy:factory, and its #TpProxy:factory will be propagated to its #TpConnection (if any). If a #TpAccount is created without going via the #TpAccountManager or specifying a #TpProxy:factory, the default is to use a new #TpAutomaticClientFactory.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

automatic_presence_type: number

The account's automatic presence type (a #TpConnectionPresenceType).

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.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for automatic-presence-type, automatic-status and automatic-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %TP_CONNECTION_PRESENCE_TYPE_UNSET.

automatic_status: string

The string status name to use in conjunction with the #TpAccount:automatic-presence-type.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for automatic-presence-type, automatic-status and automatic-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

automatic_status_message: string

The user-defined message to use in conjunction with the #TpAccount:automatic-presence-type.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for automatic-presence-type, automatic-status and automatic-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

bus_name: string

The D-Bus bus name for this object. Read-only except during construction.

changing_presence: boolean

%TRUE if an attempt is currently being made to change the account's presence (#TpAccount:current-presence-type, #TpAccount:current-status and #TpAccount:current-status-message) to match its requested presence (#TpAccount:requested-presence-type, #TpAccount:requested-status and #TpAccount:requested-status-message).

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %FALSE.

cm_name: string

The account's connection manager name.

connect_automatically: boolean

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

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %FALSE.

The connection of the account, or %NULL if account is offline. Note that the returned #TpConnection is not guaranteed to have any features pre-prepared (not even %TP_CONNECTION_FEATURE_CORE) unless %TP_ACCOUNT_FEATURE_CONNECTION has been prepared on the account

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. If %TP_ACCOUNT_FEATURE_CONNECTION has been prepared, this signal will be delayed until the connection is ready.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

connection_error: string

The D-Bus error name for the last disconnection or connection failure, (in particular, %TP_ERROR_STR_CANCELLED if it was disconnected by user request), or %NULL if the account is connected.

One can receive change notifications on this property by connecting to the #TpAccount::status-changed signal, or by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

connection_error_details: HashTable<string | number | symbol, string | number | boolean>

A map from string to #GValue containing extensible error details related to #TpAccount:connection-error. Functions like tp_asv_get_string() can be used to read from this map.

The keys for this map are defined by the Telepathy D-Bus Interface Specification. They will typically include debug-message, which is a debugging message in the C locale, analogous to #GError.message.

One can receive change notifications on this property by connecting to the #TpAccount::status-changed signal, or by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is an empty map.

connection_manager: string

The account's connection manager name.

connection_status: number

The account's connection status type (a %TpConnectionStatus).

One can receive change notifications on this property by connecting to the #TpAccount::status-changed signal, or by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %TP_CONNECTION_STATUS_DISCONNECTED.

connection_status_reason: number

The account's connection status reason (a %TpConnectionStatusReason).

One can receive change notifications on this property by connecting to the #TpAccount::status-changed signal, or by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED.

current_presence_type: number

The account connection's current presence type (a %TpConnectionPresenceType).

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for current-presence-type, current-status and current-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %TP_CONNECTION_PRESENCE_TYPE_UNSET.

current_status: string

The current Status string of the account.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for current-presence-type, current-status and current-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

current_status_message: string

The current status message message of the account.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for current-presence-type, current-status and current-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

dbus_daemon: DBusDaemon

The D-Bus daemon for this object (this object itself, if it is a TpDBusDaemon). Read-only except during construction.

display_name: string

The account's display name, from the DisplayName property.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

enabled: boolean

Whether this account is enabled or not.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is FALSE.

The #TpSimpleClientFactory used to create this proxy, or %NULL if this proxy was not created through a factory.

g_type_instance: TypeInstance
has_been_online: boolean

Whether this account has been online or not.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %FALSE.

icon_name: string

The account's icon name. To change this propery, use tp_account_set_icon_name_async().

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

interfaces: string[]

Known D-Bus interface names for this object.

nickname: string

The nickname that should be set for the user on this account.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

normalized_name: string

The normalized form of the user's own unique identifier on this protocol. For example, on XMPP accounts this is the user's JID; on ICQ this is the user's UIN; and so on.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

object_path: string

The D-Bus object path for this object. Read-only except during construction.

protocol: string

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.

protocol_name: string

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.

requested_presence_type: number

The account's requested presence type (a #TpConnectionPresenceType).

Since 0.13.8, one can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for requested-presence-type, requested-status and requested-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

requested_status: string

The requested Status string of the account.

Since 0.13.8, one can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for requested-presence-type, requested-status and requested-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

requested_status_message: string

The requested status message message of the account.

Since 0.13.8, one can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail. Change notifications for requested-presence-type, requested-status and requested-status-message are always emitted together, so it is sufficient to connect to one of the notification signals.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %NULL.

service: string

A machine-readable name identifying a specific service to which this account connects, or a copy of #TpAccount:protocol if there is no more specific service.

Well-known names for various services can be found in the Telepathy D-Bus Interface Specification.

For instance, accounts for the "jabber" protocol should have the service names "google-talk", "ovi-chat", "facebook" and "lj-talk" for accounts that connect to Google Talk, Ovi Chat, Facebook and Livejournal, respectively, and this property will be "jabber" for accounts that connect to a generic Jabber server.

To change this property, use tp_account_set_service_async().

storage_identifier: any

The storage identifier for this account.

A provider-specific variant type used to identify this account with the provider. This value will be %NULL if #TpAccount:storage-provider is an empty string.

This property cannot change once an Account has been created.

This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_STORAGE feature has been prepared; until then, the value is %NULL.

storage_identifier_variant: GLib.Variant

Provider-specific information used to identify this account. Use g_variant_get_type() to check that the type is what you expect. For instance, if you use a #TpAccount:storage-provider with numeric identifiers for accounts, this variant might have type %G_VARIANT_TYPE_UINT32; if the storage provider has string-based identifiers, it should have type %G_VARIANT_TYPE_STRING.

This property cannot change once an Account has been created.

This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_STORAGE feature has been prepared; until then, the value is %NULL.

storage_provider: string

The storage provider for this account.

The name of the account storage implementation. When this is the empty string the account is internally stored.

This property cannot change once an Account has been created.

This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_STORAGE feature has been prepared; until then, the value is %NULL.

storage_restrictions: number

The storage restrictions for this account.

A bitfield of #TpStorageRestrictionFlags that give the limitations of this account imposed by the storage provider. This value will be 0 if #TpAccount:storage-provider is an empty string.

This property cannot change once an Account has been created.

This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_STORAGE feature has been prepared; until then, the value is 0.

supersedes: string[]

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.

This is not guaranteed to have been retrieved until the %TP_ACCOUNT_FEATURE_CORE feature has been prepared; until then, the value is NULL.

uri_schemes: string[]

If the %TP_ACCOUNT_FEATURE_ADDRESSING feature has been prepared successfully, a list of additional URI schemes for which this account should be used if possible. Otherwise %NULL.

For instance, a SIP or Skype account might have "tel" in this list if the user would like to use that account to call phone numbers.

This list should not contain the primary URI scheme(s) for the account's protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), since it should be assumed to be useful for those schemes in any case.

The notify::uri-schemes signal cannot be relied on if the Account Manager is Mission Control version 5.14.0 or older.

valid: boolean

Whether this account is valid.

One can receive change notifications on this property by connecting to the #GObject::notify signal and using this property as the signal detail.

This is not guaranteed to have been retrieved until tp_proxy_prepare_async() has finished; until then, the value is %FALSE.

name: string

Methods

  • associated_with_uri_scheme(scheme: string): boolean
  • bind_connection_status_to_property(target: object, target_property: string, invert: boolean): Binding
  • Binds the :connection-status of self to the boolean property of another object using a #GBinding such that the target_property will be set to %TRUE when self is connected (and invert is %FALSE).

    target_property will be synchronised immediately (%G_BINDING_SYNC_CREATE). invert can be interpreted as analogous to %G_BINDING_INVERT_BOOLEAN.

    For instance, this function can be used to bind the GtkWidget:sensitive property to only make a widget sensitive when the account is connected.

    See g_object_bind_property() for more information.

    Parameters

    • target: object

      the target #GObject

    • target_property: string

      the property on target to bind (must be %G_TYPE_BOOLEAN)

    • invert: boolean

      %TRUE if you wish to invert the value of target_property (i.e. %FALSE if connected)

    Returns Binding

  • Creates a binding between source_property on source and target_property on target.

    Whenever the source_property is changed the target_property is updated using the same value. For instance:

      g_object_bind_property (action, "active", widget, "sensitive", 0);
    

    Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.

    If flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: if target_property on target changes then the source_property on source will be updated as well.

    The binding will automatically be removed when either the source or the target instances are finalized. To remove the binding without affecting the source and the target you can just call g_object_unref() on the returned #GBinding instance.

    Removing the binding by calling g_object_unref() on it must only be done if the binding, source and target are only used from a single thread and it is clear that both source and target outlive the binding. Especially it is not safe to rely on this if the binding, source or target can be finalized from different threads. Keep another reference to the binding and use g_binding_unbind() instead to be on the safe side.

    A #GObject can have multiple bindings.

    Parameters

    • source_property: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • target_property: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    Returns Binding

  • Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

    This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.

    Parameters

    • source_property: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • target_property: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transform_to: TClosure<any, any>

      a #GClosure wrapping the transformation function from the source to the target, or %NULL to use the default

    • transform_from: TClosure<any, any>

      a #GClosure wrapping the transformation function from the target to the source, or %NULL to use the default

    Returns Binding

  • dbus_error_to_gerror(dbus_error: string, debug_message: string): void
  • Convert a D-Bus error name into a GError as if it was returned by a method on this proxy. This method is useful when D-Bus error names are emitted in signals, such as Connection.ConnectionError and Group.MembersChangedDetailed.

    Parameters

    • dbus_error: string

      a D-Bus error name, for instance from the callback for tp_cli_connection_connect_to_connection_error()

    • debug_message: string

      a debug message that accompanied the error name, or %NULL

    Returns void

  • disconnect(id: number): void
  • If the account's connection is not connected, return the D-Bus error name with which it last disconnected or failed to connect (in particular, this is %TP_ERROR_STR_CANCELLED if it was disconnected by a user request). This is the same as #TpAccount:connection-error.

    If details is not %NULL, it will be used to return additional details about the error (the same as #TpAccount:connection-error-details).

    Otherwise, return %NULL, without altering details.

    The returned string and details may become invalid when the main loop is re-entered or the account is destroyed.

    Returns [string, GLib.Variant]

  • Returns the parameters of the account, in a variant of type %G_VARIANT_TYPE_VARDICT where the keys are parameter names (account, password, require-encryption etc.). Use g_variant_lookup() or g_variant_lookup_value() for convenient access to the values.

    The allowed parameters depend on the connection manager, and can be found via tp_connection_manager_get_protocol() and tp_connection_manager_protocol_get_param(). Well-known parameters are listed in the Telepathy D-Bus Interface Specification.

    Returns GLib.Variant

  • Return provider-specific information used to identify this account. Use g_variant_get_type() to check that the type is what you expect; for instance, if the #TpAccount:storage-provider has string-based user identifiers, this variant should have type %G_VARIANT_TYPE_STRING.

    Returns GLib.Variant

  • Makes an asynchronous request of self's StorageSpecificInformation property (part of the Account.Interface.Storage interface).

    When the operation is finished, callback will be called. You must then call tp_account_dup_storage_specific_information_vardict_finish() to get the result of the request.

    Parameters

    Returns void

  • emit(sigName: "avatar-changed", ...args: any[]): void
  • emit(sigName: "presence-changed", presence: number, status: string, status_message: string, ...args: any[]): void
  • emit(sigName: "status-changed", old_status: number, new_status: number, reason: number, dbus_error_name: string, details: HashTable<string | number | symbol, string | number | boolean>, ...args: any[]): void
  • emit(sigName: "notify::automatic-presence-type", ...args: any[]): void
  • emit(sigName: "notify::automatic-status", ...args: any[]): void
  • emit(sigName: "notify::automatic-status-message", ...args: any[]): void
  • emit(sigName: "notify::changing-presence", ...args: any[]): void
  • emit(sigName: "notify::cm-name", ...args: any[]): void
  • emit(sigName: "notify::connect-automatically", ...args: any[]): void
  • emit(sigName: "notify::connection", ...args: any[]): void
  • emit(sigName: "notify::connection-error", ...args: any[]): void
  • emit(sigName: "notify::connection-error-details", ...args: any[]): void
  • emit(sigName: "notify::connection-manager", ...args: any[]): void
  • emit(sigName: "notify::connection-status", ...args: any[]): void
  • emit(sigName: "notify::connection-status-reason", ...args: any[]): void
  • emit(sigName: "notify::current-presence-type", ...args: any[]): void
  • emit(sigName: "notify::current-status", ...args: any[]): void
  • emit(sigName: "notify::current-status-message", ...args: any[]): void
  • emit(sigName: "notify::display-name", ...args: any[]): void
  • emit(sigName: "notify::enabled", ...args: any[]): void
  • emit(sigName: "notify::has-been-online", ...args: any[]): void
  • emit(sigName: "notify::icon-name", ...args: any[]): void
  • emit(sigName: "notify::nickname", ...args: any[]): void
  • emit(sigName: "notify::normalized-name", ...args: any[]): void
  • emit(sigName: "notify::protocol", ...args: any[]): void
  • emit(sigName: "notify::protocol-name", ...args: any[]): void
  • emit(sigName: "notify::requested-presence-type", ...args: any[]): void
  • emit(sigName: "notify::requested-status", ...args: any[]): void
  • emit(sigName: "notify::requested-status-message", ...args: any[]): void
  • emit(sigName: "notify::service", ...args: any[]): void
  • emit(sigName: "notify::storage-identifier", ...args: any[]): void
  • emit(sigName: "notify::storage-identifier-variant", ...args: any[]): void
  • emit(sigName: "notify::storage-provider", ...args: any[]): void
  • emit(sigName: "notify::storage-restrictions", ...args: any[]): void
  • emit(sigName: "notify::supersedes", ...args: any[]): void
  • emit(sigName: "notify::uri-schemes", ...args: any[]): void
  • emit(sigName: "notify::valid", ...args: any[]): void
  • emit(sigName: "notify::bus-name", ...args: any[]): void
  • emit(sigName: "notify::dbus-daemon", ...args: any[]): void
  • emit(sigName: "notify::factory", ...args: any[]): void
  • emit(sigName: "notify::interfaces", ...args: any[]): void
  • emit(sigName: "notify::object-path", ...args: any[]): void
  • emit(sigName: string, ...args: any[]): void
  • Set the connection of the account by specifying the connection object path. This function does not return a new ref and it is not guaranteed that the returned #TpConnection object is ready.

    The use-case for this function is in a HandleChannels callback and you already know the object path for the connection, so you can let account create its #TpConnection and return it for use.

    Parameters

    • path: string

      the path to connection object for #TpAccount

    Returns TelepathyGLib.Connection

  • force_floating(): void
  • This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().

    Returns void

  • freeze_notify(): void
  • Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

    This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.

    Returns void

  • Gets the automatic presence, status and status message of account. These values are the same as the #TpAccount:automatic-presence-type, #TpAccount:automatic-status and #TpAccount:automatic-status-message properties, and are the values that will be used if the account should be put online automatically.

    Returns [ConnectionPresenceType, string, string]

  • Requests an asynchronous get of account's avatar. When the operation is finished, callback will be called. You can then call tp_account_get_avatar_finish() to get the result of the operation.

    Parameters

    Returns void

  • Finishes an async get operation of account's avatar.

    Beware that the returned value is only valid until result is freed. Copy it with g_array_ref() if you need to keep it for longer.

    Parameters

    Returns Uint8Array

  • get_bus_name(): string
  • get_changing_presence(): boolean
  • get_cm_name(): string
  • get_connect_automatically(): boolean
  • get_connection_manager(): string
  • Gets the current presence, status and status message of account. These values are the same as the #TpAccount:current-presence-type, #TpAccount:current-status and #TpAccount:current-status-message properties.

    Returns [ConnectionPresenceType, string, string]

  • get_data(key?: string): object
  • Gets a named field from the objects table of associations (see g_object_set_data()).

    Parameters

    • Optional key: string

      name of the key for that association

    Returns object

  • get_display_name(): string
  • get_has_been_online(): boolean
  • get_icon_name(): string
  • get_nickname(): string
  • get_normalized_name(): string
  • get_object_path(): string
  • get_parameters(): HashTable<string | number | symbol, string | number | boolean>
  • Returns the parameters of the account, in a hash table where each string is the parameter name (account, password, require-encryption etc.), and each value is a #GValue. Using the tp_asv_get family of functions (tp_asv_get_uint32(), tp_asv_get_string() etc.) to access the parameters is recommended.

    The allowed parameters depend on the connection manager, and can be found via tp_connection_manager_get_protocol() and tp_connection_manager_protocol_get_param(). Well-known parameters are listed in the Telepathy D-Bus Interface Specification.

    Returns HashTable<string | number | symbol, string | number | boolean>

  • get_path_suffix(): string
  • Returns the portion of account's object path after the standard #TP_ACCOUNT_OBJECT_PATH_BASE prefix, of the form "cm/protocol/acct". This string uniquely identifies the account.

    This function is only intended to be used when printing debug messages or in tools for developer. For a string suitable for displaying to the user, see tp_account_get_display_name(). To retrieve the connection manager and protocol name parts of the object path, see tp_account_get_connection_manager() and tp_account_get_protocol(). For persistent identification of the account, use tp_proxy_get_object_path().

    Returns string

  • get_property(property_name?: string, value?: any): void
  • Gets a property of an object.

    The value can be:

    • an empty #GValue initialized by %G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
    • a #GValue initialized with the expected type of the property
    • a #GValue initialized with a type to which the expected type of the property can be transformed

    In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

    Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.

    Parameters

    • Optional property_name: string

      the name of the property to get

    • Optional value: any

      return location for the property value

    Returns void

  • get_protocol(): string
  • get_protocol_name(): string
  • get_qdata(quark: number): object
  • Gets the requested presence, status and status message of account. These values are the same as the #TpAccount:requested-presence-type, #TpAccount:requested-status and #TpAccount:requested-status-message properties.

    Returns [ConnectionPresenceType, string, string]

  • get_service(): string
  • get_storage_identifier(): any
  • get_storage_provider(): string
  • Makes an asynchronous request of self's StorageSpecificInformation property (part of the Account.Interface.Storage interface).

    When the operation is finished, callback will be called. You must then call tp_account_get_storage_specific_information_finish() to get the result of the request.

    Parameters

    Returns void

  • get_storage_specific_information_finish(result: AsyncResult): HashTable<string | number | symbol, string | number | boolean>
  • Retrieve the value of the request begun with tp_account_get_storage_specific_information_async().

    Beware that the returned value is only valid until result is freed. Copy it with g_hash_table_ref() if you need to keep it for longer.

    Parameters

    Returns HashTable<string | number | symbol, string | number | boolean>

  • get_supersedes(): string[]
  • Return the same thing as the #TpAccount:supersedes property, in a way that may be more convenient for C code.

    The returned pointers are not guaranteed to remain valid after the main loop has been re-entered.

    Returns string[]

  • get_uri_schemes(): string[]
  • getv(names: string[], values: any[]): void
  • Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

    Parameters

    • names: string[]

      the names of each property to get

    • values: any[]

      the values of each property to get

    Returns void

  • has_interface(iface: string): boolean
  • Return whether this proxy is known to have a particular interface. In versions older than 0.11.11, this was a macro wrapper around tp_proxy_has_interface_by_id().

    For objects that discover their interfaces at runtime, this method will indicate that interfaces are missing until they are known to be present. In subclasses that define features for use with tp_proxy_prepare_async(), successfully preparing the "core" feature for that subclass (such as %TP_CHANNEL_FEATURE_CORE or %TP_CONNECTION_FEATURE_CORE) implies that the interfaces are known.

    Parameters

    • iface: string

      the D-Bus interface required, as a string

    Returns boolean

  • has_interface_by_id(iface: number): boolean
  • Return whether this proxy is known to have a particular interface, by its quark ID. This is equivalent to using g_quark_to_string() followed by tp_proxy_has_interface(), but more efficient.

    Parameters

    • iface: number

      quark representing the D-Bus interface required

    Returns boolean

  • is_enabled(): boolean
  • is_floating(): boolean
  • is_prepared(feature: number): boolean
  • Return %TRUE if feature has been prepared successfully, or %FALSE if feature has not been requested, has not been prepared yet, or is not available on this object at all.

    (For instance, if feature is %TP_CHANNEL_FEATURE_CHAT_STATES and self is a #TpChannel in a protocol that doesn't actually implement chat states, or is not a #TpChannel at all, then this method will return %FALSE.)

    To prepare features, call tp_proxy_prepare_async().

    Parameters

    • feature: number

      a feature that is supported by self's class

    Returns boolean

  • is_valid(): boolean
  • notify(property_name: string): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    Parameters

    • property_name: string

      the name of a property installed on the class of object.

    Returns void

  • Emits a "notify" signal for the property specified by pspec on object.

    This function omits the property name lookup, hence it is faster than g_object_notify().

    One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:

      enum
    {
    PROP_0,
    PROP_FOO,
    PROP_LAST
    };

    static GParamSpec *properties[PROP_LAST];

    static void
    my_object_class_init (MyObjectClass *klass)
    {
    properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
    0, 100,
    50,
    G_PARAM_READWRITE);
    g_object_class_install_property (gobject_class,
    PROP_FOO,
    properties[PROP_FOO]);
    }

    and then notify a change on the "foo" property with:

      g_object_notify_by_pspec (self, properties[PROP_FOO]);
    

    Parameters

    • pspec: ParamSpec

      the #GParamSpec of a property installed on the class of object.

    Returns void

  • #TpProxy itself does not support any features, but subclasses like #TpChannel can support features, which can either be core functionality like %TP_CHANNEL_FEATURE_CORE, or extended functionality like %TP_CHANNEL_FEATURE_CHAT_STATES.

    Proxy instances start with no features prepared. When features are requested via tp_proxy_prepare_async(), the proxy starts to do the necessary setup to use those features.

    tp_proxy_prepare_async() always waits for core functionality of the proxy's class to be prepared, even if it is not specifically requested: for instance, because %TP_CHANNEL_FEATURE_CORE is core functionality of a #TpChannel,

    |[ TpChannel *channel = ...;

    tp_proxy_prepare_async (channel, NULL, callback, user_data);



    is equivalent to

    |[
    TpChannel *channel = ...;
    GQuark features[] = { TP_CHANNEL_FEATURE_CORE, 0 };

    tp_proxy_prepare_async (channel, features, callback, user_data);

    If a feature represents core functionality (like %TP_CHANNEL_FEATURE_CORE), failure to prepare it will result in tp_proxy_prepare_async() finishing unsuccessfully: if failure to prepare the feature indicates that the proxy is no longer useful, it will also emit #TpProxy::invalidated.

    If a feature represents non-essential functionality (like %TP_CHANNEL_FEATURE_CHAT_STATES), or is not supported by the object at all, then failure to prepare it is not fatal: tp_proxy_prepare_async() will complete successfully, but tp_proxy_is_prepared() will still return %FALSE for the feature, and accessor methods for the feature will typically return a dummy value.

    Some #TpProxy subclasses automatically start to prepare their core features when instantiated, and features will sometimes become prepared as a side-effect of other actions, but to ensure that a feature is present you must generally call tp_proxy_prepare_async() and wait for the result.

    Parameters

    • features: number[]

      an array of desired features, ending with 0; %NULL is equivalent to an array containing only 0

    • callback: AsyncReadyCallback

      if not %NULL, called exactly once, when the features have all been prepared or failed to prepare, or after the proxy is invalidated

    Returns void

  • Check for error in a call to tp_proxy_prepare_async(). An error here generally indicates that either the asynchronous call was cancelled, or self has emitted #TpProxy::invalidated.

    Parameters

    • result: AsyncResult

      the result passed to the callback of tp_proxy_prepare_async()

    Returns boolean

  • Requests an asynchronous reconnect of account. When the operation is finished, callback will be called. You can then call tp_account_reconnect_finish() to get the result of the operation.

    Parameters

    Returns void

  • Increases the reference count of object.

    Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type of object will be propagated to the return type (using the GCC typeof() extension), so any casting the caller needs to do on the return type must be explicit.

    Returns GObject.Object

  • Increase the reference count of object, and possibly remove the [floating][floating-ref] reference, if object has a floating reference.

    In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

    Since GLib 2.56, the type of object will be propagated to the return type under the same conditions as for g_object_ref().

    Returns GObject.Object

  • Requests an asynchronous removal of account. When the operation is finished, callback will be called. You can then call tp_account_remove_finish() to get the result of the operation.

    Parameters

    Returns void

  • Requests an asynchronous change of presence on account. When the operation is finished, callback will be called. You can then call tp_account_request_presence_finish() to get the result of the operation.

    Parameters

    • type: ConnectionPresenceType

      the requested presence

    • status: string

      a status message to set, or %NULL

    • message: string

      a message for the change, or %NULL

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • run_dispose(): void
  • Releases all references to other objects. This can be used to break reference cycles.

    This function should only be called from object system implementations.

    Returns void

  • Requests an asynchronous change of account's automatic presence. When the operation is finished, callback will be called. You can then call tp_account_set_automatic_presence_finish() to get the result of the operation.

    Parameters

    • type: ConnectionPresenceType

      the requested presence

    • status: string

      a status message to set, or %NULL

    • message: string

      a message for the change, or %NULL

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • set_automatic_presence_finish(result: AsyncResult): boolean
  • set_avatar_async(avatar: Uint8Array, mime_type: string, callback: AsyncReadyCallback): void
  • Requests an asynchronous change of the Avatar parameter on self. When the operation is finished, callback will be called. You can then call tp_account_set_avatar_finish() to get the result of the operation.

    If len equals 0, the avatar is cleared.

    Parameters

    • avatar: Uint8Array

      a new avatar to set; can be %NULL only if len equals 0

    • mime_type: string

      the MIME type of the new avatar; can be %NULL only if len equals 0

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • set_connect_automatically_async(connect_automatically: boolean, callback: AsyncReadyCallback): void
  • Requests an asynchronous set of the ConnectAutomatically property of account. When the operation is finished, callback will be called. You can then call tp_account_set_display_name_finish() to get the result of the operation.

    Parameters

    • connect_automatically: boolean

      new value for the parameter

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • set_connect_automatically_finish(result: AsyncResult): boolean
  • set_data(key: string, data?: object): void
  • Each object carries around a table of associations from strings to pointers. This function lets you set an association.

    If the object already had an association with that name, the old association will be destroyed.

    Internally, the key is converted to a #GQuark using g_quark_from_string(). This means a copy of key is kept permanently (even after object has been finalized) — so it is recommended to only use a small, bounded set of values for key in your program, to avoid the #GQuark storage growing unbounded.

    Parameters

    • key: string

      name of the key

    • Optional data: object

      data to associate with that key

    Returns void

  • Requests an asynchronous set of the DisplayName property of account. When the operation is finished, callback will be called. You can then call tp_account_set_display_name_finish() to get the result of the operation.

    Parameters

    • display_name: string

      a new display name, or %NULL to unset the display name

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • Requests an asynchronous set of the Enabled property of account. When the operation is finished, callback will be called. You can then call tp_account_set_enabled_finish() to get the result of the operation.

    Parameters

    • enabled: boolean

      the new enabled value of account

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • Requests an asynchronous set of the Icon property of account. When the operation is finished, callback will be called. You can then call tp_account_set_icon_name_finish() to get the result of the operation.

    Parameters

    • icon_name: string

      a new icon name, or %NULL to unset the icon name

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • Requests an asynchronous change of the Nickname parameter on account. When the operation is finished, callback will be called. You can then call tp_account_set_nickname_finish() to get the result of the operation.

    Parameters

    • nickname: string

      a new nickname to set

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • set_property(property_name: string, value?: any): void
  • Requests an asynchronous set of the Service property on self. When the operation is finished, callback will be called. You can then call tp_account_set_service_finish() to get the result of the operation.

    Parameters

    • service: string

      a new service name, or %NULL or the empty string to unset the service name (which will result in the #TpAccount:service property becoming the same as #TpAccount:protocol)

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • set_uri_scheme_association_async(scheme: string, associate: boolean, callback: AsyncReadyCallback): void
  • Add scheme to the list of additional URI schemes that would be returned by tp_account_get_uri_schemes(), or remove it from that list.

    scheme should not be the primary URI scheme for the account's protocol (for instance, "xmpp" for XMPP, or "sip" or "sips" for SIP), since the account should be assumed to be useful for those schemes regardless of the contents of the list.

    Calling this method does not require the %TP_ACCOUNT_FEATURE_ADDRESSING feature to be enabled, but the change will not be reflected in the result of tp_account_get_uri_schemes() or tp_account_associated_with_uri_scheme() unless that feature has been enabled.

    Parameters

    • scheme: string

      a non-%NULL URI scheme such as "tel"

    • associate: boolean

      %TRUE to use this account for scheme, or %FALSE to not use it

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • set_uri_scheme_association_finish(result: AsyncResult): boolean
  • steal_data(key?: string): object
  • Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

    Parameters

    • Optional key: string

      name of the key

    Returns object

  • steal_qdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata() and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

    void
    object_add_to_user_list (GObject *object,
    const gchar *new_string)
    {
    // the quark, naming the object data
    GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
    // retrieve the old string list
    GList *list = g_object_steal_qdata (object, quark_string_list);

    // prepend new string
    list = g_list_prepend (list, g_strdup (new_string));
    // this changed 'list', so we need to set it again
    g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
    }
    static void
    free_string_list (gpointer data)
    {
    GList *node, *list = data;

    for (node = list; node; node = node->next)
    g_free (node->data);
    g_list_free (list);
    }

    Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • thaw_notify(): void
  • Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

    Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.

    It is an error to call this function when the freeze count is zero.

    Returns void

  • unref(): void
  • Decreases the reference count of object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

    If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.

    Returns void

  • update_parameters_async(parameters: HashTable<string | number | symbol, string | number | boolean>, unset_parameters: string, callback: AsyncReadyCallback): void
  • Requests an asynchronous update of parameters of account. When the operation is finished, callback will be called. You can then call tp_account_update_parameters_finish() to get the result of the operation.

    Parameters

    • parameters: HashTable<string | number | symbol, string | number | boolean>

      new parameters to set on account

    • unset_parameters: string

      list of parameters to unset on account

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • update_parameters_finish(result: AsyncResult): [boolean, string[]]
  • Requests an asynchronous update of parameters of account. When the operation is finished, callback will be called. You can then call tp_account_update_parameters_finish() to get the result of the operation.

    If parameters is a floating reference (see g_variant_ref_sink()), ownership of parameters is taken by this function. This means you can pass the result of g_variant_new() or g_variant_new_parsed() directly to this function without additional reference-count management.

    Parameters

    • parameters: GLib.Variant

      a variant of type %G_VARIANT_TYPE_VARDICT containing new parameters to set on account

    • unset_parameters: string[]

      list of parameters to unset on account

    • callback: AsyncReadyCallback

      a callback to call when the request is satisfied

    Returns void

  • update_parameters_vardict_finish(result: AsyncResult): [boolean, string[]]
  • vfunc_constructed(): void
  • vfunc_dispatch_properties_changed(n_pspecs: number, pspecs: ParamSpec): void
  • vfunc_dispose(): void
  • vfunc_finalize(): void
  • vfunc_get_property(property_id: number, value?: any, pspec?: ParamSpec): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    virtual

    Parameters

    Returns void

  • vfunc_set_property(property_id: number, value?: any, pspec?: ParamSpec): void
  • watch_closure(closure: TClosure<any, any>): void
  • This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

    Parameters

    • closure: TClosure<any, any>

      #GClosure to watch

    Returns void

  • compat_control(what: number, data: object): number
  • get_feature_quark_addressing(): number
  • get_feature_quark_connection(): number
  • get_feature_quark_core(): number
  • get_feature_quark_storage(): number
  • init_known_interfaces(): void
  • Ensure that the known interfaces for TpAccount have been set up. This is done automatically when necessary, but for correct overriding of library interfaces by local extensions, you should call this function before calling tp_proxy_or_subclass_hook_on_interface_add() with first argument %TP_TYPE_ACCOUNT.

    Returns void

  • Find the #GParamSpec with the given name for an interface. Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    • property_name: string

      name of a property to look up.

    Returns ParamSpec

  • Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

    This function is meant to be called from the interface's default vtable initialization function (the class_init member of #GTypeInfo.) It must not be called after after class_init has been called for any object types implementing this interface.

    If pspec is a floating reference, it will be consumed.

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface.

    • pspec: ParamSpec

      the #GParamSpec for the new property

    Returns void

  • Lists the properties of an interface.Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • g_iface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    Returns ParamSpec[]

  • Creates a new instance of a #GObject subtype and sets its properties.

    Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.

    Parameters

    • object_type: GType<unknown>

      the type id of the #GObject subtype to instantiate

    • parameters: GObject.Parameter[]

      an array of #GParameter

    Returns GObject.Object

  • parse_object_path(object_path: string): [boolean, string, string, string]
  • Validates and parses a Telepathy Account's object path, extracting the connection manager's name, the protocol, and the account's unique identifier from the path. This includes replacing underscores with hyphens in the protocol name, as defined in the Account specification.

    Any of the out parameters may be %NULL if not needed. If %TRUE is returned, the caller is responsible for freeing the strings stored in any non-%NULL out parameters, using g_free().

    Parameters

    • object_path: string

      a Telepathy Account's object path

    Returns [boolean, string, string, string]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method