MatrixEventRoomThirdPartyInvite

MatrixEventRoomThirdPartyInvite — Class to hold a m.room.third_party_invite event

Functions

Types and Values

Description

Acts as an m.room.member invite event, where there isn't a target user_id to invite. This event contains a token and a public key whose private key must be used to sign the token. Any user who can present that signature may use this invitation to join the target room.

Functions

MATRIX_EVENT_TYPE_ROOM_THIRD_PARTY_INVITE

#define MATRIX_EVENT_TYPE_ROOM_THIRD_PARTY_INVITE (matrix_event_room_third_party_invite_get_type ())

The type for MatrixEventRoomThirdPartyInvite.


matrix_event_room_third_party_invite_new ()

MatrixEventRoomThirdPartyInvite *
matrix_event_room_third_party_invite_new
                               (void);

matrix_event_room_third_party_invite_get_display_name ()

const gchar *
matrix_event_room_third_party_invite_get_display_name
                               (MatrixEventRoomThirdPartyInvite *self);

Get and return the current value of the "display-name" property.

A user-readable string which represents the user who has been invited. This should not contain the user's third party ID, as otherwise when the invite is accepted it would leak the association between the matrix ID and the third party ID.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to query

 

Returns

the value of the "display-name" property


matrix_event_room_third_party_invite_set_display_name ()

void
matrix_event_room_third_party_invite_set_display_name
                               (MatrixEventRoomThirdPartyInvite *self,
                                const gchar *value);

Set the value of the "display-name" property to value .

A user-readable string which represents the user who has been invited. This should not contain the user's third party ID, as otherwise when the invite is accepted it would leak the association between the matrix ID and the third party ID.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to modify

 

value

the new value of the "display-name" property

 

matrix_event_room_third_party_invite_get_key_validity_url ()

const gchar *
matrix_event_room_third_party_invite_get_key_validity_url
                               (MatrixEventRoomThirdPartyInvite *self);

Get and return the current value of the "key-validity-url" property.

A URL which can be fetched, with querystring public_key=public_key, to validate whether the key has been revoked. The URL must return a JSON object containing a boolean property named valid.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to query

 

Returns

the value of the "key-validity-url" property


matrix_event_room_third_party_invite_set_key_validity_url ()

void
matrix_event_room_third_party_invite_set_key_validity_url
                               (MatrixEventRoomThirdPartyInvite *self,
                                const gchar *value);

Set the value of the "key-validity-url" property to value .

A URL which can be fetched, with querystring public_key=public_key, to validate whether the key has been revoked. The URL must return a JSON object containing a boolean property named valid.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to modify

 

value

the new value of the "key-validity-url" property

 

matrix_event_room_third_party_invite_get_public_key ()

const gchar *
matrix_event_room_third_party_invite_get_public_key
                               (MatrixEventRoomThirdPartyInvite *self);

Get and return the current value of the "public-key" property.

A base64-encoded ed25519 key with which token must be signed (though a signature from any entry in public_keys is also sufficient). This exists for backwards compatibility.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to query

 

Returns

the value of the "public-key" property


matrix_event_room_third_party_invite_set_public_key ()

void
matrix_event_room_third_party_invite_set_public_key
                               (MatrixEventRoomThirdPartyInvite *self,
                                const gchar *value);

Set the value of the "public-key" property to value .

A base64-encoded ed25519 key with which token must be signed (though a signature from any entry in public_keys is also sufficient). This exists for backwards compatibility.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to modify

 

value

the new value of the "public-key" property

 

matrix_event_room_third_party_invite_get_public_keys ()

MatrixEventRoomThirdPartyInvitePublicKey *
matrix_event_room_third_party_invite_get_public_keys
                               (MatrixEventRoomThirdPartyInvite *self,
                                int *result_length1);

Get and return the current value of the "public-keys" property.

Keys with which the token may be signed.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to query

 

Returns

the value of the "public-keys" property


matrix_event_room_third_party_invite_set_public_keys ()

void
matrix_event_room_third_party_invite_set_public_keys
                               (MatrixEventRoomThirdPartyInvite *self,
                                MatrixEventRoomThirdPartyInvitePublicKey *value,
                                int value_length1);

Set the value of the "public-keys" property to value .

Keys with which the token may be signed.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to modify

 

value

the new value of the "public-keys" property

 

matrix_event_room_third_party_invite_get_token ()

const gchar *
matrix_event_room_third_party_invite_get_token
                               (MatrixEventRoomThirdPartyInvite *self);

Get and return the current value of the "token" property.

The token, of which a signature must be produced in order to join the room.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to query

 

Returns

the value of the "token" property


matrix_event_room_third_party_invite_set_token ()

void
matrix_event_room_third_party_invite_set_token
                               (MatrixEventRoomThirdPartyInvite *self,
                                const gchar *value);

Set the value of the "token" property to value .

The token, of which a signature must be produced in order to join the room.

Parameters

self

the MatrixEventRoomThirdPartyInvite instance to modify

 

value

the new value of the "token" property

 

matrix_event_room_third_party_invite_public_key_dup ()

MatrixEventRoomThirdPartyInvitePublicKey *
matrix_event_room_third_party_invite_public_key_dup
                               (const MatrixEventRoomThirdPartyInvitePublicKey *self);

Creates a copy of self.

See also: matrix_event_room_third_party_invite_public_key_copy(), matrix_event_room_third_party_invite_public_key_destroy(), matrix_event_room_third_party_invite_public_key_free()

Parameters

self

the instance to duplicate

 

Returns

a copy of self , free with matrix_event_room_third_party_invite_public_key_free()


matrix_event_room_third_party_invite_public_key_free ()

void
matrix_event_room_third_party_invite_public_key_free
                               (MatrixEventRoomThirdPartyInvitePublicKey *self);

Frees the heap-allocated struct.

See also: matrix_event_room_third_party_invite_public_key_dup(), matrix_event_room_third_party_invite_public_key_copy(), matrix_event_room_third_party_invite_public_key_destroy()

Parameters

self

the struct to free

 

matrix_event_room_third_party_invite_public_key_copy ()

void
matrix_event_room_third_party_invite_public_key_copy
                               (const MatrixEventRoomThirdPartyInvitePublicKey *self,
                                MatrixEventRoomThirdPartyInvitePublicKey *dest);

Creates a copy of self.

See also: matrix_event_room_third_party_invite_public_key_dup(), matrix_event_room_third_party_invite_public_key_destroy(), matrix_event_room_third_party_invite_public_key_free()

Parameters

self

the struct to copy

 

dest

a unused struct. Use matrix_event_room_third_party_invite_public_key_destroy() to free the content.

 

matrix_event_room_third_party_invite_public_key_destroy ()

void
matrix_event_room_third_party_invite_public_key_destroy
                               (MatrixEventRoomThirdPartyInvitePublicKey *self);

Frees the content of the struct pointed by self .

See also: matrix_event_room_third_party_invite_public_key_dup(), matrix_event_room_third_party_invite_public_key_copy(), matrix_event_room_third_party_invite_public_key_free()

Parameters

self

the struct to destroy

 

Types and Values

struct MatrixEventRoomThirdPartyInvitePublicKey

struct MatrixEventRoomThirdPartyInvitePublicKey {
	gchar* key;
	gchar* validity_url;
};

struct MatrixEventRoomThirdPartyInvite

struct MatrixEventRoomThirdPartyInvite {
	MatrixEventState parent_instance;
	MatrixEventRoomThirdPartyInvitePrivate * priv;
};

Class to hold a m.room.third_party_invite event

Acts as an m.room.member invite event, where there isn't a target user_id to invite. This event contains a token and a public key whose private key must be used to sign the token. Any user who can present that signature may use this invitation to join the target room.


struct MatrixEventRoomThirdPartyInviteClass

struct MatrixEventRoomThirdPartyInviteClass {
	MatrixEventStateClass parent_class;
};

The class structure for MATRIX_EVENT_TYPE_ROOM_THIRD_PARTY_INVITE. All the fields in this structure are private and should never be accessed directly.

Members

MatrixEventStateClass parent_class;

the parent class structure