Goa.Client

g GObject.GInterface GObject.GInterface Gio.AsyncInitable Gio.AsyncInitable GObject.GInterface->Gio.AsyncInitable Gio.Initable Gio.Initable GObject.GInterface->Gio.Initable GObject.Object GObject.Object Goa.Client Goa.Client GObject.Object->Goa.Client Gio.AsyncInitable->Goa.Client Gio.Initable->Goa.Client

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.AsyncInitable (4), Gio.Initable (2)

Structs:

GObject.ObjectClass (5)

class

new (cancellable, callback, *user_data)

class

new_finish (res)

class

new_sync (cancellable)

get_accounts ()

get_manager ()

get_object_manager ()

lookup_by_id (id)

Virtual Methods

Inherited:

GObject.Object (7), Gio.AsyncInitable (2), Gio.Initable (1)

Properties

Name

Type

Flags

Short Description

object-manager

Gio.DBusObjectManager

r

The Gio.DBusObjectManager used by the Goa.Client

Signals

Inherited:

GObject.Object (1)

Name

Short Description

account-added

Emitted when object has been added.

account-changed

Emitted when something on object changes.

account-removed

Emitted when object has been removed.

Fields

Inherited:

GObject.Object (1)

Class Details

class Goa.Client(**kwargs)
Bases:

GObject.Object, Gio.AsyncInitable, Gio.Initable

Abstract:

No

Structure:

Goa.ClientClass

[class`Goa`.Client] is used for accessing the GNOME Online Accounts service from a client program.

classmethod new(cancellable, callback, *user_data)
Parameters:

Asynchronously gets a [class`Goa`.Client].

This is a failable asynchronous constructor - when the client is ready, callback will be invoked and you can use [ctor`Goa`.Client.new_finish] to get the result.

classmethod new_finish(res)
Parameters:

res (Gio.AsyncResult) – A GAsyncResult

Raises:

GLib.Error

Returns:

A GoaClient, or None with error set

Return type:

Goa.Client

Finishes an operation started with [func`Goa`.Client.new].

classmethod new_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – A GCancellable

Raises:

GLib.Error

Returns:

A GoaClient, or None with error set

Return type:

Goa.Client

Synchronously gets a [class`Goa`.Client].

get_accounts()
Returns:

A list of GoaObject instances

Return type:

[Goa.Object]

Gets all accounts that self knows about.

The result is a list of [iface`Goa`.Object] instances where each object at least has an [iface`Goa`.Account] interface (that can be obtained via the [method`Goa`.Object.get_account] method) but may also implement other interfaces such as [iface`Goa`.Mail] or [iface`Goa`.Files].

get_manager()
Returns:

A GoaManager or None

Return type:

Goa.Manager or None

Gets the [iface`Goa`.Manager] for self, if any.

get_object_manager()
Returns:

A GDBusObjectManager

Return type:

Gio.DBusObjectManager

Gets the [iface`Gio`.DBusObjectManager] used by self.

lookup_by_id(id)
Parameters:

id (str) – The ID to look for

Returns:

the object for the given id

Return type:

Goa.Object

Finds and returns the [iface`Goa`.Object] instance whose [property`Goa`.Account:id] D-Bus property matches id.

New in version 3.6.

Signal Details

Goa.Client.signals.account_added(client, object)
Signal Name:

account-added

Flags:

RUN_LAST

Parameters:
  • client (Goa.Client) – The object which received the signal

  • object (Goa.Object) – The GoaObject for the added account

Emitted when object has been added. See [method`Goa`.Client.get_accounts] for information about how to use this object.

Goa.Client.signals.account_changed(client, object)
Signal Name:

account-changed

Flags:

RUN_LAST

Parameters:
  • client (Goa.Client) – The object which received the signal

  • object (Goa.Object) – The GoaObject for the account with changes

Emitted when something on object changes.

Goa.Client.signals.account_removed(client, object)
Signal Name:

account-removed

Flags:

RUN_LAST

Parameters:
  • client (Goa.Client) – The object which received the signal

  • object (Goa.Object) – The GoaObject for the removed account

Emitted when object has been removed.

Property Details

Goa.Client.props.object_manager
Name:

object-manager

Type:

Gio.DBusObjectManager

Default Value:

None

Flags:

READABLE

The [iface`Gio`.DBusObjectManager] used by the [class`Goa`.Client] instance.