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

Ancestors

Constructors

cm_client_new
No description available.

since: 0

Instance methods

cm_client_add_pusher_async

Add a pusher to the list of pushers for this client.

since: 0.0.1

cm_client_add_pusher_finish

Finishes an asynchronous operation started with cm_client_add_pusher_async().

since: 0.0.1

cm_client_add_pusher_sync

Add a pusher to the list of pushers known for this client.

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_access_token

Get the access token of the client self.

since: 0

cm_client_get_account

Get the account associated with the client.

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_ed25519_key

Get the public ed25519 key of own device.

since: 0

cm_client_get_enabled

Wheter self has been enabled.

since: 0

cm_client_get_homeserver

Get the Home server set for the client.

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_invited_rooms

Get the list of invited rooms with CmRoom as the members.

since: 0

cm_client_get_joined_rooms

Get the list of joined rooms with CmRoom as the members.

since: 0

cm_client_get_key_verifications

Get the key verifications.

since: 0

cm_client_get_logged_in

Gets whether the user is currently logged in.

since: 0

cm_client_get_logging_in

Gets whether the user is currently being logged in.

since: 0

cm_client_get_password

Get the password set for the self.

since: 0

cm_client_get_pickle_key

Get the pickle password.

since: 0

cm_client_get_pushers_async

Get the currently configured push servers.

since: 0.0.1

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_pushers_sync

Get the currently configured push servers.

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_is_sync

Check whether the client self is in sync with the server or not.

since: 0

cm_client_join_room_async

Tries to join a room by it’s room id.

since: 0

cm_client_join_room_finish

Finishes an asynchronous operation started with cm_client_join_room_async().

since: 0

cm_client_join_room_sync
No description available.

since: 0.0.2

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_id

Set the device ID for client.

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_enabled

Whether to enable the client and begin sync with the server.

since: 0

cm_client_set_homeserver

Set the matrix Home server URL for the client.

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

cm_client_stop_sync

Stop sync with server.

since: 0

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

CM.Client:home-server
No description available.

since: 0

Signals

CM.Client::status-changed
No description available.

since: 0

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

Class structure

struct CMClientClass {
  GObjectClass parent_class;
  
}
No description available.
Class members
parent_class: GObjectClass
No description available.