Class
CMClient
since: 0
Description [src]
final class CM.Client : GObject.Object
{
/* No available fields */
}
A Matrix client.
A client represents a Matrix account on a device. See
cm_client_get_account()
and cm_client_get_device_id()
.
Is responsible for logging in a user and interfacing with the user’s home server.
It can inform you about new events using a callback (see
cm_client_set_sync_callback()
).
Available since: 0
Instance methods
cm_client_add_pusher_finish
Finishes an asynchronous operation started with
cm_client_add_pusher_async()
.
since: 0.0.1
cm_client_can_connect
Check if self
can be connected to homeserver with current
network state. This function is a bit dumb: returning
TRUE
shall not ensure that the self
is connectable.
But if FALSE
is returned, self
shall not be
able to connect.
since: 0
cm_client_get_device_id
Get the device ID of the client self
.
Device ID may be available only after
a successful login.
since: 0
cm_client_get_device_name
Get the device name of the client self
as set with cm_client_set_device_name()
.
since: 0
cm_client_get_homeserver_async
Tries to determine the home server based on the user data set on
the CmAccount
.
since: 0
cm_client_get_homeserver_finish
Finishes an asynchronous operation started with cm_client_get_homeserver_async()
.
since: 0
cm_client_get_homeserver_versions
Get the suppported Matrix protocol versions of the home server set for the client.
unstable since: 0.0.3
cm_client_get_pushers_finish
Finishes an asynchronous operation started with
cm_client_get_pushers_async()
and returns an array
of configured pushers. Destroy with g_ptr_array_unref
.
since: 0.0.1
cm_client_get_user_id
Get the matrix user ID of the client self
. The User ID may be
available only after the login has succeeded and may return NULL
otherwise.
If you need the login id before that use cm_account_get_login_id()
.
since: 0
cm_client_join_room_finish
Finishes an asynchronous operation started with cm_client_join_room_async()
.
since: 0
cm_client_remove_pusher_async
Remove a pusher from the list of pushers known for the client.
since: 0.0.1
cm_client_remove_pusher_finish
Finishes an asynchronous operation started with
cm_client_remove_pusher_async()
.
since: 0.0.1
cm_client_remove_pusher_sync
Remove a pusher from the list of pushers known for the client.
since: 0.0.1
cm_client_set_access_token
Set the access token to be used for sync.
If set to NULL
, self
shall login using password
And use the newly got access token for sync.
since: 0
cm_client_set_device_name
Set the device name which shall be used as the human readable identifier for the device.
since: 0
cm_client_set_password
Set the password for the client. You can’t set the password once the client is enabled, except in the callback when the client failed to login due to wrong password.
since: 0
cm_client_set_pickle_key
Set the account pickle key. This key is used as the password to decrypt the encrypted pickle loaded from db, and so, this should be set before the db is set.
since: 0
cm_client_set_sync_callback
Set the sync callback which shall be executed for the events
happening in self
. Set this early after creating the client so any
async operations syncing the client state with the server can
invoke it already.
since: 0
cm_client_set_user_id
Set the client matrix user ID. This can be set only before the account has been enabled and never after.
since: 0
cm_client_start_sync
Start sync with server. If self
is already
in sync or in the process to do so, this method
simply returns.
since: 0
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
unstable since: 2.0