![]() |
![]() |
![]() |
GNOME Online Accounts Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties | Signals |
GoaClient; void goa_client_new (GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); GoaClient * goa_client_new_finish (GAsyncResult *res
,GError **error
); GoaClient * goa_client_new_sync (GCancellable *cancellable
,GError **error
); GoaManager * goa_client_get_manager (GoaClient *client
); GList * goa_client_get_accounts (GoaClient *client
); GDBusObjectManager * goa_client_get_object_manager (GoaClient *client
); GoaObject * goa_client_lookup_by_id (GoaClient *client
,const gchar *id
);
GoaClient is used for accessing the GNOME Online Accounts service from a client program.
typedef struct _GoaClient GoaClient;
The GoaClient structure contains only private data and should only be accessed using the provided API.
void goa_client_new (GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously gets a GoaClient. When the operation is
finished, callback
will be invoked in the
|
A GCancellable or NULL . |
|
Function that will be called when the result is ready. |
|
Data to pass to callback . |
GoaClient * goa_client_new_finish (GAsyncResult *res
,GError **error
);
Finishes an operation started with goa_client_new()
.
|
A GAsyncResult. |
|
Return location for error or NULL . |
Returns : |
A GoaClient or NULL if error is set. Free with
g_object_unref() when done with it. |
GoaClient * goa_client_new_sync (GCancellable *cancellable
,GError **error
);
Synchronously gets a GoaClient for the local system.
|
A GCancellable or NULL . [allow-none]
|
|
Return location for error or NULL . [allow-none]
|
Returns : |
A GoaClient or NULL if error is set. Free with
g_object_unref() when done with it. |
GoaManager * goa_client_get_manager (GoaClient *client
);
Gets the GoaManager for client
.
|
A GoaClient. |
Returns : |
A GoaManager. Do not free, the returned
object belongs to client . [transfer none]
|
GList * goa_client_get_accounts (GoaClient *client
);
Gets all accounts that client
knows about. The result is a list of
GoaObject instances where each object at least has an GoaAccount
interface (that can be obtained via the goa_object_get_account()
method) but may also implement other interfaces such as
GoaMail or GoaFiles.
GDBusObjectManager * goa_client_get_object_manager (GoaClient *client
);
Gets the GDBusObjectManager used by client
.
|
A GoaClient. |
Returns : |
A GDBusObjectManager. Do not free, the
instance is owned by client . [transfer none]
|
GoaObject * goa_client_lookup_by_id (GoaClient *client
,const gchar *id
);
Finds and returns the GoaObject instance whose
"Id"
D-Bus property matches id
.
|
A GoaClient. |
|
The ID to look for. |
Returns : |
A GoaObject. Free the returned
object with g_object_unref() . [transfer full]
|
Since 3.6
"object-manager"
property "object-manager" GDBusObjectManager* : Read
The GDBusObjectManager used by the GoaClient instance.
"account-added"
signalvoid user_function (GoaClient *client,
GoaObject *object,
gpointer user_data) : Run Last
Emitted when object
has been added. See
goa_client_get_accounts()
for information about how to use this
object.
"account-changed"
signalvoid user_function (GoaClient *client,
GoaObject *object,
gpointer user_data) : Run Last
Emitted when something on object
changes.