Top |
This event specifies the minimum level a user must have in order to perform a certain action. It also specifies the levels of each user in the room. If a user_id is in the users list, then that user_id has the associated power level. Otherwise they have the default level users_default. If users_default is not supplied, it is assumed to be 0. The level required to send a certain event is governed by events, state_default and events_default. If an event type is specified in events, then the user must have at least the level specified in order to send that event. If the event type is not supplied, it defaults to events_default for Message Events and state_default for State Events.
#define MATRIX_EVENT_TYPE_ROOM_POWER_LEVELS (matrix_event_room_power_levels_get_type ())
The type for MatrixEventRoomPowerLevels.
MatrixEventRoomPowerLevels *
matrix_event_room_power_levels_new (void
);
gint
matrix_event_room_power_levels_get_users_default
(MatrixEventRoomPowerLevels *self
);
Get and return the current value of the "users-default" property.
The default power level for every user in the room, unless their user_id is mentioned in the users key.
void matrix_event_room_power_levels_set_users_default (MatrixEventRoomPowerLevels *self
,gint value
);
Set the value of the "users-default" property to value
.
The default power level for every user in the room, unless their user_id is mentioned in the users key.
self |
the MatrixEventRoomPowerLevels instance to modify |
|
value |
the new value of the "users-default" property |
gint
matrix_event_room_power_levels_get_events_default
(MatrixEventRoomPowerLevels *self
);
Get and return the current value of the "events-default" property.
The default level required to send message events. Can be overridden by the events key.
void matrix_event_room_power_levels_set_events_default (MatrixEventRoomPowerLevels *self
,gint value
);
Set the value of the "events-default" property to value
.
The default level required to send message events. Can be overridden by the events key.
self |
the MatrixEventRoomPowerLevels instance to modify |
|
value |
the new value of the "events-default" property |
gint
matrix_event_room_power_levels_get_state_default
(MatrixEventRoomPowerLevels *self
);
Get and return the current value of the "state-default" property.
The default level required to send state events. Can be overridden by the events key.
void matrix_event_room_power_levels_set_state_default (MatrixEventRoomPowerLevels *self
,gint value
);
Set the value of the "state-default" property to value
.
The default level required to send state events. Can be overridden by the events key.
self |
the MatrixEventRoomPowerLevels instance to modify |
|
value |
the new value of the "state-default" property |
gint
matrix_event_room_power_levels_get_ban
(MatrixEventRoomPowerLevels *self
);
Get and return the current value of the "ban" property.
The level required to ban a user.
void matrix_event_room_power_levels_set_ban (MatrixEventRoomPowerLevels *self
,gint value
);
Set the value of the "ban" property to value
.
The level required to ban a user.
self |
the MatrixEventRoomPowerLevels instance to modify |
|
value |
the new value of the "ban" property |
gint
matrix_event_room_power_levels_get_kick
(MatrixEventRoomPowerLevels *self
);
Get and return the current value of the "kick" property.
The level required to kick a user.
void matrix_event_room_power_levels_set_kick (MatrixEventRoomPowerLevels *self
,gint value
);
Set the value of the "kick" property to value
.
The level required to kick a user.
self |
the MatrixEventRoomPowerLevels instance to modify |
|
value |
the new value of the "kick" property |
gint
matrix_event_room_power_levels_get_redact
(MatrixEventRoomPowerLevels *self
);
Get and return the current value of the "redact" property.
The level required to redact an event.
void matrix_event_room_power_levels_set_redact (MatrixEventRoomPowerLevels *self
,gint value
);
Set the value of the "redact" property to value
.
The level required to redact an event.
self |
the MatrixEventRoomPowerLevels instance to modify |
|
value |
the new value of the "redact" property |
gint
matrix_event_room_power_levels_get_invite
(MatrixEventRoomPowerLevels *self
);
Get and return the current value of the "invite" property.
The level required to invite someone.
void matrix_event_room_power_levels_set_invite (MatrixEventRoomPowerLevels *self
,gint value
);
Set the value of the "invite" property to value
.
The level required to invite someone.
self |
the MatrixEventRoomPowerLevels instance to modify |
|
value |
the new value of the "invite" property |
struct MatrixEventRoomPowerLevels { MatrixEventState parent_instance; MatrixEventRoomPowerLevelsPrivate * priv; };
Class to handle m.room.power_levels event
This event specifies the minimum level a user must have in order to perform a certain action. It also specifies the levels of each user in the room. If a user_id is in the users list, then that user_id has the associated power level. Otherwise they have the default level users_default. If users_default is not supplied, it is assumed to be 0. The level required to send a certain event is governed by events, state_default and events_default. If an event type is specified in events, then the user must have at least the level specified in order to send that event. If the event type is not supplied, it defaults to events_default for Message Events and state_default for State Events.
struct MatrixEventRoomPowerLevelsClass { MatrixEventStateClass parent_class; };
The class structure for MATRIX_EVENT_TYPE_ROOM_POWER_LEVELS
. All the fields in this structure are private and should never be accessed directly.