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

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 Goa.Client. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from.

classmethod new_finish(res)
Parameters:

res (Gio.AsyncResult) – A Gio.AsyncResult.

Raises:

GLib.Error

Returns:

A Goa.Client or None if error is set. Free with GObject.Object.unref() when done with it.

Return type:

Goa.Client

Finishes an operation started with Goa.Client.new().

classmethod new_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None.

Raises:

GLib.Error

Returns:

A Goa.Client or None if error is set. Free with GObject.Object.unref() when done with it.

Return type:

Goa.Client

Synchronously gets a Goa.Client for the local system.

get_accounts()
Returns:

A list of Goa.Object instances that must be freed with g_list_free() after each element has been freed with GObject.Object.unref().

Return type:

[Goa.Object]

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

get_manager()
Returns:

A Goa.Manager or None. Do not free, the returned object belongs to self.

Return type:

Goa.Manager or None

Gets the Goa.Manager for self, if any.

get_object_manager()
Returns:

A Gio.DBusObjectManager. Do not free, the instance is owned by self.

Return type:

Gio.DBusObjectManager

Gets the Gio.DBusObjectManager used by self.

lookup_by_id(id)
Parameters:

id (str) – The ID to look for.

Returns:

A Goa.Object. Free the returned object with GObject.Object.unref().

Return type:

Goa.Object

Finds and returns the Goa.Object instance whose ‘“Id” [gdbus-property-org-gnome-OnlineAccounts-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:

Emitted when object has been added. See 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:

Emitted when something on object changes.

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

account-removed

Flags:

RUN_LAST

Parameters:

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 Gio.DBusObjectManager used by the Goa.Client instance.