Top |
void
matrix_api_abort_pending (MatrixAPI *self
);
Abort all pending requests toward a Matrix homeserver. Be aware that this may leave requests in an inconsistent state.
void matrix_api_media_download (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *server_name
,const gchar *media_id
,GError **error
);
Download content from the content repository.
Implementors: If server_name or media_id is
1 |
null |
, implementations MUST throw Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. a function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
server_name |
. the server name from the . |
[in] |
media_id |
. the media ID from the . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_media_thumbnail (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *server_name
,const gchar *media_id
,guint width
,guint height
,MatrixResizeMethod method
,GError **error
);
Download a thumbnail of the content from the content repository. The actual thumbnail may not match the size specified.
If param
server_name or param
media_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. a function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
server_name |
. the server name from the . |
[in] |
media_id |
. the media ID from the . |
[in] |
width |
|
|
height |
|
|
method |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_media_upload (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *content_type
,GByteArray *content
,GError **error
);
Upload some content to the content repository.
If param
content is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
content_type |
. the type of the content to be uploaded . |
[in][allow-none] |
content |
. the content to be uploaded . |
[in][transfer full] |
callback |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_presence_list (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,GError **error
);
Retrieve a list of presence events for every user on this list.
If param
user_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose presence list should be retrieved . |
[in] |
callback |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_update_presence_list (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,gchar **drop_ids
,int drop_ids_length1
,gchar **invite_ids
,int invite_ids_length1
,GError **error
);
Add or remove users from the specified user's presence list.
If param
user_id, or both param
drop_ids and param
invite_ids are
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose presence list is being modified . |
[in] |
drop_ids |
. a list of user IDs to remove from the list . |
[in][array length=drop_ids_length1] |
drop_ids_length1 |
length of the |
|
invite_ids |
. a list of user IDs to add to the list . |
[in][array length=invite_ids_length1] |
invite_ids_length1 |
length of the |
|
callback |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_presence (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,GError **error
);
Get the given user's presence state.
If param
user_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose presence list is being modified . |
[in] |
callback |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_set_user_presence (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,MatrixPresence presence
,const gchar *status_message
,GError **error
);
Set the given user's presence. You cannot set the presence of another user.
If param
user_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose presence list is being modified . |
[in] |
presence |
. the new presence state . |
[in] |
status_message |
. a status message attached to this state . |
[in][allow-none] |
callback |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_update_pusher (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,MatrixPusher *pusher
,GError **error
);
Create, update or delete a pusher for the active user on this homeserver.
If param
pusher is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
callback |
|
|
pusher |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_pushers (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,GError **error
);
Retrieve all push rulesets.
self |
the MatrixAPI instance |
|
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
callback |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_delete_pusher (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *scope
,MatrixPusherKind kind
,const gchar *rule_id
,GError **error
);
Delete a push rule.
If param
scope or param
rule_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||||||
callback |
. a function to call when the request is finished . |
[in][allow-none] | ||||||
callback_target |
user data to pass to |
[allow-none][closure] | ||||||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||||||
scope |
. either
to specify global rules, or
for rules for a given
. |
[in] | ||||||
kind |
. the kind of rule . |
[in] | ||||||
rule_id |
. an identifier for the rule . |
[in] | ||||||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_pusher (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *scope
,MatrixPusherKind kind
,const gchar *rule_id
,GError **error
);
Retrieve a specific push rule.
If param
scope or param
rule_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||||||
callback |
. a function to call when the request is finished . |
[in][allow-none] | ||||||
callback_target |
user data to pass to |
[allow-none][closure] | ||||||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||||||
scope |
. either
to specify global rules, or
for rules for a given
. . |
[in] | ||||||
kind |
. the kind of rule . |
[in] | ||||||
rule_id |
. an identifier for the rule . |
[in] | ||||||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_add_pusher (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *scope
,MatrixPusherKind kind
,const gchar *rule_id
,const gchar *before
,const gchar *after
,gchar **actions
,int actions_length1
,MatrixPusherConditionKind *conditions
,int conditions_length1
,GError **error
);
Add or change a push rule.
If either param
scope, param
rule_id or param
actions are
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||||||
callback |
. a function to call when the request is finished . |
[in][allow-none] | ||||||
callback_target |
user data to pass to |
[allow-none][closure] | ||||||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||||||
scope |
. either
to specify global rules, or
for rules for a given
. |
[in] | ||||||
kind |
. the kind of rule . |
[in] | ||||||
rule_id |
. an identifier for the rule . |
[in] | ||||||
before |
. make the new rule the next-most important than this rule ID . |
[in][allow-none] | ||||||
after |
. make the new rule the next-less important than this rule ID . |
[in][allow-none] | ||||||
actions |
. the actions to perform when the conditions for this rule are met . |
[in][array length=actions_length1] | ||||||
actions_length1 |
length of the |
|||||||
conditions |
. the conditions that must hold true for an event for a rule to be applied. A rule with no conditions always matches . |
[in][array length=conditions_length1] | ||||||
conditions_length1 |
length of the |
|||||||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_toggle_pusher (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *scope
,MatrixPusherKind kind
,const gchar *rule_id
,gboolean enabled
,GError **error
);
Enable or disable the specified push rule.
If scope
or rule_id
is NULL
, this function returns immediately, and fills error
with MATRIX_ERROR_INCOMPLETE
.
self |
the MatrixAPI instance |
|||||||
callback |
. a function to call when the request is finished . |
[in][allow-none] | ||||||
callback_target |
user data to pass to |
[allow-none][closure] | ||||||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||||||
scope |
. either
to specify global rules, or
for rules for a given
. |
[in] | ||||||
kind |
. the kind of rule . |
[in] | ||||||
rule_id |
. an identifier for the rule . |
[in] | ||||||
enabled |
. if
, the rule will be enabled, otherwise it gets disabled . |
[in] | ||||||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_create_room (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,MatrixRoomPreset preset
,const gchar *room_name
,const gchar *room_alias
,const gchar *topic
,MatrixRoomVisibility visibility
,JsonNode *creation_content
,MatrixEventState **initial_state
,int initial_state_length1
,gchar **invitees
,int invitees_length1
,Matrix3PidCredential **invite_3pids
,int invite_3pids_length1
,GError **error
);
Create a new room with the given name and invite the users in param
invitees.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
preset |
. a room preset to use . |
[in] |
room_name |
. the desired display name for the room . |
[in][allow-none] |
room_alias |
. an alias of the room . |
[in][allow-none] |
topic |
. the topic of the room . |
[in][allow-none] |
visibility |
. the initial visibility of the room . |
[in] |
creation_content |
. extra keys to be added to the content of m.room.create . |
[in][allow-none] |
initial_state |
. a list of state events to set in the new room . |
[in][array length=initial_state_length1] |
initial_state_length1 |
length of the |
|
invitees |
. list of user IDs to invite to the new room . |
[in][array length=invitees_length1] |
invitees_length1 |
length of the |
|
invite_3pids |
. a list of 3rd party credentials to invite to the new room . |
[in][array length=invite_3pids_length1] |
invite_3pids_length1 |
length of the |
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_delete_room_alias (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_alias
,GError **error
);
Remove the mapping of room_alias
to its room ID
Servers may choose to implement additional access control checks here, for instance that room aliases can only be deleted by their creator or a server administrator.
If room_alias
is NULL
, this function returns immediately, and fills error
with MATRIX_ERROR_INCOMPLETE
.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_alias |
. the alias name to remove . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_room_id (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_alias
,GError **error
);
Get the room ID corresponding to this room alias.
If param
room_alias is
1 |
null |
, this function returns immediately, throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_alias |
. the room alias . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_create_room_alias (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *room_alias
,GError **error
);
Create a new mapping from room alias to room ID.
If param
room_alias or param
room_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room ID to add this alias to . |
[in] |
room_alias |
. the room alias to set . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_list_public_rooms (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,GError **error
);
List the public rooms on the server.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_ban_user (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *user_id
,const gchar *reason
,GError **error
);
Ban the specified user from the specified room. An optional reason can be specified.
If param
room_id or param
user_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room ID where the user should be banned . |
[in] |
user_id |
. the user ID to ban . |
[in] |
reason |
. the reason of the ban . |
[in][allow-none] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_forget_room (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,GError **error
);
Stop the requesting user remembering about a particular room.
In general, history is a first class citizen in Matrix. After this API is called, however, a user will no longer be able to retrieve history for this room. If all users on a homeserver forget a room, the room is eligible for deletion from that homeserver.
If the user is currently joined to the room, they will implicitly leave the room as part of this API call.
If param
room_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room ID to forget . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_invite_user_3rdparty (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,Matrix3PidCredential *credential
,GError **error
);
Invite a user to the room by a 3rd party identifier. They do not start participating in the room until they actually join the room.
If the identity server does not know a Matrix user identifier for the passed third party identifier, the homeserver will issue an invitation which can be accepted upon providing proof of ownership of the third party identifier.
If param
credential is
1 |
null |
, this function immediately returns, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room ID to which to invite the user . |
[in] |
credential |
. a Matrix3PidCredential that identifies a user to invite . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_invite_user (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *user_id
,GError **error
);
Invite a user to a room.
If room_id
or user_id
is NULL
, this function returns immediately, and fills error
with MATRIX_ERROR_INCOMPLETE
.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room ID to invite the user to . |
[in] |
user_id |
. the user ID to invite . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_join_room (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,GError **error
);
Join a room.
If param
room_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room ID to join to . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_leave_room (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,GError **error
);
Leave a room.
If param
room_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room ID to kick the user from . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_event_stream (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *from_token
,gulong timeout
,GError **error
);
Get the event stream, optionally beginning from from_token
.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
from_token |
. events will be listed from this token . |
[in][allow-none] |
timeout |
. timeout of the request . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_event (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *event_id
,GError **error
);
Get a single event by event ID.
If param
event_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
event_id |
. the event ID to get . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_initial_sync (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,guint limit
,gboolean archived
,GError **error
);
Perform an initial sync of events
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
limit |
. the maximum number of events to get . |
[in] |
archived |
. whether to include rooms that the user has left . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_event_context (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *event_id
,guint limit
,GError **error
);
Gets a number of events that happened just before and after the specified event.
If param
room_id or param
event_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room to get events from . |
[in] |
event_id |
. the event to get context around . |
[in] |
limit |
. the maximum number of events to get. If 0, a default value is used (10, according to the specification) . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_initial_sync_room (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,GError **error
);
Get a copy of the current state and the most recent messages in a room.
If param
room_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room to get the data for . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_list_room_members (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,GError **error
);
Get the list of members for a room.
If param
room_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room to get the member events for . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_list_room_messages (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *from_token
,MatrixEventDirection direction
,guint limit
,GError **error
);
Get a list of message and state events for a room.
If param
room_id or param
from_token is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room to get the events for . |
[in] |
from_token |
. the token to start returning events from. This token can be obtained by calling . |
[in] |
direction |
. the direction of the returned events . |
[in] |
limit |
. the maximum number of events to return. If 0, a default value will be used (10, according to the specification . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_send_event_receipt (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,MatrixReceiptType receipt_type
,const gchar *event_id
,JsonNode *receipt
,GError **error
);
Update the marker for the given receipt type to the event ID specified.
If param
room_id, param
event_id or param
receipt is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||
callback |
. the function to call when the request is finished . |
[in][allow-none] | ||
callback_target |
user data to pass to |
[allow-none][closure] | ||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||
room_id |
. the room in which to send the event . |
[in] | ||
receipt_type |
. type of the receipt . |
[in] | ||
event_id |
. the event ID to acknowledge up to . |
[in] | ||
receipt |
. extra receipt information to attach. Note that the server will automatically attach the
field . |
[in] | ||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_redact_event (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *event_id
,const gchar *txn_id
,const gchar *reason
,GError **error
);
Strip all information out of an event which isn't critical to the integrity of the server-side representation of the room. This cannot be undone.
Users may redact their own events, and any user with a power level greater than or equal to
1 |
redact |
power level of the room may redact events there.
If param
room_id, param
event_id or param
txn_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room from which to redact the event . |
[in] |
event_id |
. the event ID to acknowledge up to . |
[in] |
txn_id |
. the transaction ID for this event. Clients should generate a unique ID; it will be used by the server to ensure idempotency of requests . |
[in] |
reason |
. the reason for the event being redacted . |
[in][allow-none] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_send_message_event (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *event_type
,const gchar *txn_id
,JsonNode *content
,GError **error
);
Send a message event to the room.
If param
room_id, param
event_type, param
txn_id or content
is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
room_id |
. the room to send the event to . |
[in] |
event_type |
. the type of event to send . |
[in] |
txn_id |
. the transaction ID for this event. Clients should generate a unique ID; it will be used by the server to ensure idempotency of requests . |
[in] |
content |
. the content of the event as a JsonNode . |
[in][transfer full] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_room_state (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *event_type
,const gchar *state_key
,GError **error
);
Look up the contents of a state event in a room. If both param
event_type and param
state_key are empty, get a list of state events for that room.
If param
room_id is
1 |
null |
, or if param
state_key is set with param
event_type being
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||
callback |
. the function to call when the request is finished . |
[in][allow-none] | ||
callback_target |
user data to pass to |
[allow-none][closure] | ||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||
room_id |
. the room ID to get a state for . |
[in] | ||
event_type |
. the type of state to look up . |
[in][allow-none] | ||
state_key |
. the key of the state to look up. If
, this parameter is ignored . |
[in][allow-none] | ||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_send_room_event (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *room_id
,const gchar *event_type
,const gchar *state_key
,JsonNode *content
,GError **error
);
Send a state event to the room. These events will be overwritten if param
room_id, param
event_type and param
state_key all match.
This request cannot use transaction IDs.
The required fields in the body of the request (param
content) vary depending on the type of the event.
If param
room_id or param
content is
1 |
null |
, or if param
state_key is set with param
event_type being
1 |
null |
, this function returns immediately, and throw Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||
callback |
. the function to call when the request is finished . |
[in][allow-none] | ||
callback_target |
user data to pass to |
[allow-none][closure] | ||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||
room_id |
. the room ID to get a state for . |
[in] | ||
event_type |
. the type of state to look up . |
[in] | ||
state_key |
. the key of the state to look up. If
, this parameter is ignored . |
[in][allow-none] | ||
content |
. the content of the state event . |
[in][transfer full] | ||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_notify_room_typing (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,const gchar *room_id
,guint timeout
,gboolean typing
,GError **error
);
Tell the server the user is typing for the next param
timeout milliseconds. If param
typing is
1 |
false |
, it tells the server that the user stopped typing.
If param
user_id or param
room_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||
callback |
. the function to call when the request is finished . |
[in][allow-none] | ||
callback_target |
user data to pass to |
[allow-none][closure] | ||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||
user_id |
. the user who has started to type . |
[in] | ||
room_id |
. the room in which the user is typing . |
[in] | ||
timeout |
. the length of time in milliseconds to mark this user as typing . |
[in] | ||
typing |
. whether the user is typing or not. If
, . |
[in] | ||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_sync (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *filter_id
,MatrixFilter *filter
,const gchar *since
,gboolean full_state
,gboolean set_presence
,gulong timeout
,GError **error
);
Synchronize the client's state with the latest state on the server. Clients should use this API when they first log in to get an initial snapshot of the state on the server and then continue to call this API to get incremental details to the state and to receive new messages.
Only one of param
filter and param
filter_id should be specified, or both of them should be set to
1 |
null |
to receive all events.
self |
the MatrixAPI instance |
|||||
callback |
. the function to call when the request is finished . |
[in][allow-none] | ||||
callback_target |
user data to pass to |
[allow-none][closure] | ||||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||||
filter_id |
. a filter ID created by the filter API (e.g. . |
[in][allow-none] | ||||
filter |
. a definition on what events to fetch . |
[in][allow-none] | ||||
since |
. a point in time to continue a sync from . |
[in][allow-none] | ||||
full_state |
. if
, all state events will be returned, even if
, and . |
[in] | ||||
set_presence |
. controls whether the client is automatically marked as online by polling this API. . |
[in] | ||||
timeout |
. the maximum time to poll in milliseconds . |
[in] | ||||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_create_filter (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,MatrixFilter *filter
,GError **error
);
Upload a new filter definition to the homeserver. It will return a filter ID that may be used in future requests.
If param
user_id or param
filter is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the ID of the user uploading the filter. An access token must be present (either specifying one with . |
[in] |
filter |
. the filter to upload . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_download_filter (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,const gchar *filter_id
,GError **error
);
Download a filter.
If param
user_id or param
filter_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user ID to download a filter from . |
[in] |
filter_id |
. the filter ID to download . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_search (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *next_batch
,MatrixSearchCategories *search_categories
,GError **error
);
Perform a server side search.
self |
the MatrixAPI instance |
|
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
next_batch |
. the point to return events from. If given, this should be a next_batch result from a previous call to this method . |
[in][allow-none] |
search_categories |
. describes which categories to search, and their criteria . |
[in] |
callback |
|
|
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_whois (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,GError **error
);
Get information about a particular user.
If param
user_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user ID to look up . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_versions (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,GError **error
);
Get the versions of the specification supported by the server.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_login (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *login_type
,JsonNode *content
,GError **error
);
Attempt to login with type param
type. Implementations of this method must set the token property on a successful login.
If param
login_type or param
content is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
login_type |
. the login type to use . |
[in] |
content |
. parameters to pass for the login request . |
[in][allow-none] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_token_refresh (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *refresh_token
,GError **error
);
Exchanges a refresh token for a new access token. This is intended to be used if the access token has expired. If param
refresh_token is
1 |
null |
, implementations MUST send the stored refresh token. If it is not pesent (e.g. because login hasn’t happened yet), this function MUST throw an error.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
refresh_token |
. the refresh token that was issued by the server . |
[in][allow-none] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_3pids (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,GError **error
);
Get a list of the third party identifiers that a homeserver has associated with the user's account.
This is not the same as the list of third party identifiers bound to the user's Matrix ID in Identity Servers.
Identifiers in this list may be used by the homeserver as, for example, identifiers to accept to reset the user's account password.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_add_3pid (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,gboolean bind_creds
,Matrix3PidCredential *threepid_creds
,GError **error
);
Add contact information to the user's account.
If param
threepid_creds is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
bind_creds |
. whether the homeserver should also bind this third party identifier to the account's Matrix ID with the passed Identity Server. . |
[in] |
threepid_creds |
. the credentials to associate with the account . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_change_password (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *new_password
,GError **error
);
Change the active user's password.
If param
new_password is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
new_password |
. the new password for the account . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_profile (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,GError **error
);
Get a user's profile.
If param
user_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose profile to get . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_avatar_url (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,GError **error
);
Get the URL of the specified user's avatar.
If param
user_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose avatar URL to get . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_set_avatar_url (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,const gchar *avatar_url
,GError **error
);
Set the user's avatar URL.
If param
user_id or param
avatar_url is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose avatar URL to set . |
[in] |
avatar_url |
. the avatar URL info . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_display_name (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,GError **error
);
Get the user's display name.
If param
user_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose display name to get . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_set_display_name (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,const gchar *display_name
,GError **error
);
Set the user's display name.
If param
user_id or param
display_name is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the user whose display name to set . |
[in] |
display_name |
. the display name info . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_register_account (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,MatrixAccountKind account_kind
,gboolean bind_email
,const gchar *username
,const gchar *password
,GError **error
);
Attempt to register an account with the homeserver using param
username and param
password.
Implementations of this method must set the token property on a successful login.
If param
password is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||
callback |
. the function to call when the request is finished . |
[in][allow-none] | ||
callback_target |
user data to pass to |
[allow-none][closure] | ||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||
account_kind |
. the type of account to register . |
[in] | ||
bind_email |
. if
, the server binds the e-mail used for authentication to the Matrix ID with the ID server . |
[in] | ||
username |
. the local part of the desired Matrix ID. If omitted, the server will generate a local part . |
[in][allow-none] | ||
password |
. the desired password for the account . |
[in] | ||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_set_account_data (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,const gchar *room_id
,const gchar *event_type
,JsonNode *content
,GError **error
);
Set some account data for the client. This config is only visible to the user who set the account data. The config will be synced to clients in the top-level account data.
If param
user_id, param
event_type or param
content is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|||
callback |
. the function to call when the request is finished . |
[in][allow-none] | ||
callback_target |
user data to pass to |
[allow-none][closure] | ||
callback_target_destroy_notify |
function to call when |
[allow-none] | ||
user_id |
. the user to set account data for. An access token must be present and be authorized to make requests for this user ID . |
[in] | ||
room_id |
. the room to set account data for. If
, the account data will be set globally . |
[in][allow-none] | ||
event_type |
. the event type of the account data to set. Custom types should be namespaced to avoid clashes . |
[in] | ||
content |
. the content of the account data . |
[in][transfer full] | ||
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_room_tags (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,const gchar *room_id
,GError **error
);
List the tags set by a user on a room.
If param
user_id or param
room_id is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the ID of the user to get the tags for. An access token must be set, and it must be authorised to make requests for this user ID . |
[in] |
room_id |
. the room to get tags for . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_delete_room_tag (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,const gchar *room_id
,const gchar *tag
,GError **error
);
Remove a tag from the room.
If param
user_id, param
room_id or param
tag is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the id of the user to remove a tag for . |
[in] |
room_id |
. the id of the room to remove the tag from . |
[in] |
tag |
. the tag to remove . |
[in] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_add_room_tag (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,const gchar *user_id
,const gchar *room_id
,const gchar *tag
,JsonNode *content
,GError **error
);
Add a tag to the room.
If param
user_id, param
room_id or param
tag is
1 |
null |
, this function returns immediately, and throws Matrix.Error.INCOMPLETE.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
user_id |
. the ID of the user to add the tag for . |
[in] |
room_id |
. the ID of the room to add the tag for . |
[in] |
tag |
. the tag to add . |
[in] |
content |
. extra data for the tag, e.g. ordering . |
[in][allow-none][transfer full] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void matrix_api_get_turn_server (MatrixAPI *self
,MatrixAPICallback callback
,void *callback_target
,GError **error
);
Get credentials for the client to use when initiating calls.
self |
the MatrixAPI instance |
|
callback |
. the function to call when the request is finished . |
[in][allow-none] |
callback_target |
user data to pass to |
[allow-none][closure] |
callback_target_destroy_notify |
function to call when |
[allow-none] |
error |
location to store the error occuring, or |
[error-domains MatrixError] |
void (*MatrixAPICallback) (MatrixAPI *api
,const gchar *content_type
,JsonNode *json_content
,GByteArray *raw_content
,GError *err
,void *user_data
);
A callback function to use with Client API calls. If the response is JSON, param
json_content is set and param
raw_content is not. If the response is not JSON, but still has a body (e.g. with media downloads), param
json_content is
1 |
null |
and raw_content
holds the content body.
api |
. a Matrix.API instance . |
[in] | ||
content_type |
. the content type of the response . |
[in] | ||
json_content |
. the JSON content of the response . |
[in][allow-none] | ||
raw_content |
. the raw (ie. binary) content of the response . |
[in][allow-none] | ||
err |
. a GLib.Error that holds any errors that occured during the API call, or
. |
[in][allow-none] | ||
user_data |
data to pass to the delegate function. |
[closure] |
const gchar *
matrix_api_get_token (MatrixAPI *self
);
Get and return the current value of the "token" property.
The token to use for authorization. The Matrix.API.login() and Matrix.API.register_account() calls MUST set this automatically.
void matrix_api_set_token (MatrixAPI *self
,const gchar *value
);
Set the value of the "token" property to value
.
The token to use for authorization. The Matrix.API.login() and Matrix.API.register_account() calls MUST set this automatically.
const gchar *
matrix_api_get_refresh_token (MatrixAPI *self
);
Get and return the current value of the "refresh-token" property.
The token to use for refreshing the authorization token. It is issued by the server after a successful registration, login or token refresh.
void matrix_api_set_refresh_token (MatrixAPI *self
,const gchar *value
);
Set the value of the "refresh-token" property to value
.
The token to use for refreshing the authorization token. It is issued by the server after a successful registration, login or token refresh.
self |
the MatrixAPI instance to modify |
|
value |
the new value of the "refresh-token" property |
const gchar *
matrix_api_get_user_id (MatrixAPI *self
);
Get and return the current value of the "user-id" property.
The Matrix user ID that is currently authenticated with the server. It is set automatically by the registration and login process.
const gchar *
matrix_api_get_homeserver (MatrixAPI *self
);
Get and return the current value of the "homeserver" property.
The name of the Matrix home server as it calls itself. It is set automatically by the registration and login process.
typedef struct _MatrixAPI MatrixAPI;
Base interface for all Client/Server API functionality.
struct MatrixAPIIface { GTypeInterface parent_iface; void (*abort_pending) (MatrixAPI* self); void (*media_download) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* server_name, const gchar* media_id, GError** error); void (*media_thumbnail) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* server_name, const gchar* media_id, guint width, guint height, MatrixResizeMethod method, GError** error); void (*media_upload) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* content_type, GByteArray* content, GError** error); void (*get_presence_list) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, GError** error); void (*update_presence_list) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, gchar** drop_ids, int drop_ids_length1, gchar** invite_ids, int invite_ids_length1, GError** error); void (*get_presence) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, GError** error); void (*set_user_presence) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, MatrixPresence presence, const gchar* status_message, GError** error); void (*update_pusher) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, MatrixPusher* pusher, GError** error); void (*get_pushers) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, GError** error); void (*delete_pusher) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* scope, MatrixPusherKind kind, const gchar* rule_id, GError** error); void (*get_pusher) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* scope, MatrixPusherKind kind, const gchar* rule_id, GError** error); void (*add_pusher) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* scope, MatrixPusherKind kind, const gchar* rule_id, const gchar* before, const gchar* after, gchar** actions, int actions_length1, MatrixPusherConditionKind* conditions, int conditions_length1, GError** error); void (*toggle_pusher) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* scope, MatrixPusherKind kind, const gchar* rule_id, gboolean enabled, GError** error); void (*create_room) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, MatrixRoomPreset preset, const gchar* room_name, const gchar* room_alias, const gchar* topic, MatrixRoomVisibility visibility, JsonNode* creation_content, MatrixEventState** initial_state, int initial_state_length1, gchar** invitees, int invitees_length1, Matrix3PidCredential** invite_3pids, int invite_3pids_length1, GError** error); void (*delete_room_alias) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_alias, GError** error); void (*get_room_id) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_alias, GError** error); void (*create_room_alias) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* room_alias, GError** error); void (*list_public_rooms) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, GError** error); void (*ban_user) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* user_id, const gchar* reason, GError** error); void (*forget_room) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, GError** error); void (*invite_user_3rdparty) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, Matrix3PidCredential* credential, GError** error); void (*invite_user) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* user_id, GError** error); void (*join_room) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, GError** error); void (*leave_room) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, GError** error); void (*event_stream) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* from_token, gulong timeout, GError** error); void (*get_event) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* event_id, GError** error); void (*initial_sync) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, guint limit, gboolean archived, GError** error); void (*get_event_context) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* event_id, guint limit, GError** error); void (*initial_sync_room) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, GError** error); void (*list_room_members) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, GError** error); void (*list_room_messages) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* from_token, MatrixEventDirection direction, guint limit, GError** error); void (*send_event_receipt) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, MatrixReceiptType receipt_type, const gchar* event_id, JsonNode* receipt, GError** error); void (*redact_event) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* event_id, const gchar* txn_id, const gchar* reason, GError** error); void (*send_message_event) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* event_type, const gchar* txn_id, JsonNode* content, GError** error); void (*get_room_state) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* event_type, const gchar* state_key, GError** error); void (*send_room_event) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* room_id, const gchar* event_type, const gchar* state_key, JsonNode* content, GError** error); void (*notify_room_typing) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, const gchar* room_id, guint timeout, gboolean typing, GError** error); void (*sync) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* filter_id, MatrixFilter* filter, const gchar* since, gboolean full_state, gboolean set_presence, gulong timeout, GError** error); void (*create_filter) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, MatrixFilter* filter, GError** error); void (*download_filter) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, const gchar* filter_id, GError** error); void (*search) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* next_batch, MatrixSearchCategories* search_categories, GError** error); void (*whois) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, GError** error); void (*versions) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, GError** error); void (*login) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* login_type, JsonNode* content, GError** error); void (*token_refresh) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* refresh_token, GError** error); void (*get_3pids) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, GError** error); void (*add_3pid) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, gboolean bind_creds, Matrix3PidCredential* threepid_creds, GError** error); void (*change_password) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* new_password, GError** error); void (*get_profile) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, GError** error); void (*get_avatar_url) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, GError** error); void (*set_avatar_url) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, const gchar* avatar_url, GError** error); void (*get_display_name) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, GError** error); void (*set_display_name) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, const gchar* display_name, GError** error); void (*register_account) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, MatrixAccountKind account_kind, gboolean bind_email, const gchar* username, const gchar* password, GError** error); void (*set_account_data) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, const gchar* room_id, const gchar* event_type, JsonNode* content, GError** error); void (*get_room_tags) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, const gchar* room_id, GError** error); void (*delete_room_tag) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, const gchar* room_id, const gchar* tag, GError** error); void (*add_room_tag) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, const gchar* user_id, const gchar* room_id, const gchar* tag, JsonNode* content, GError** error); void (*get_turn_server) (MatrixAPI* self, MatrixAPICallback callback, void* callback_target, GError** error); const gchar* (*get_token) (MatrixAPI* self); void (*set_token) (MatrixAPI* self, const gchar* value); const gchar* (*get_refresh_token) (MatrixAPI* self); void (*set_refresh_token) (MatrixAPI* self, const gchar* value); const gchar* (*get_user_id) (MatrixAPI* self); const gchar* (*get_homeserver) (MatrixAPI* self); };
Interface for creating MatrixAPI implementations.
the parent interface structure |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
virtual method called by |
||
getter method for the abstract property "token" |
||
setter method for the abstract property "token" |
||
getter method for the abstract property "refresh-token" |
||
setter method for the abstract property "refresh-token" |
||
getter method for the abstract property "user-id" |
||
getter method for the abstract property "homeserver" |