mtx::events::state namespace

Events, that can be used as a state event.

Namespaces

namespace notification_keys
different predefined keys for notification levels
namespace room_type
Definitions of different room types.
namespace space
Namespace for space related state events.

Classes

struct Aliases
Content for the m.room.aliases event.
struct Avatar
Content of the m.room.avatar event.
struct CanonicalAlias
Content for the m.room.canonical_alias event.
struct Create
Content of the m.room.create event.
struct Encryption
Content of the m.room.encryption event.
struct GuestAccess
Content of the m.room.guest_access state event.
struct HistoryVisibility
Content of the m.room.history_visibility state event.
struct JoinAllowance
An additional rule specifying what users are allowed to join.
struct JoinRules
Content of the m.room.join_rules state event.
struct Member
Content of the m.room.member state event.
struct Name
Content of the m.room.name event.
struct PinnedEvents
m.room.pinned_events state event.
struct PowerLevels
Content for the m.room.power_levels state event.
struct PreviousRoom
The predecessor of this room.
struct ServerAcl
Content for the m.room.server_acl event.
struct Tombstone
Content for the m.room.tombstone event.
struct Topic
Content for the m.room.topic state event.
struct Widget
Content of the m.widget event.

Enums

enum class AccessState { CanJoin, Forbidden }
The different access states for a room.
enum class Visibility { WorldReadable, Shared, Invited, Joined }
The different visibilities.
enum class JoinRule { Public, Invite, Knock, Private, Restricted, KnockRestricted }
The different JoinRules.
enum class Membership { Join, Invite, Ban, Leave, Knock }
The different Membership states.

Typedefs

using power_level_t = int64_t
The type representing a power level.

Functions

auto accessStateToString(AccessState state) -> std::string
Converts AccessState to std::string for serialization.
auto stringToAccessState(const std::string& state) -> AccessState
Converts std::string to AccessState for deserialization.

Variables

power_level_t EventsDefault constexpr
The default level required for events.
power_level_t UsersDefault constexpr
The default level for users.
power_level_t StatesDefault constexpr
The default level required for state events.
power_level_t User constexpr
The power level usually associated with normal users.
power_level_t Moderator constexpr
The power level usually associated with moderators.
power_level_t Admin constexpr
The power level usually associated with admins.

Enum documentation

enum class mtx::events::state::AccessState

The different access states for a room.

Enumerators
CanJoin
Forbidden

Joining is allowd (for guests)

enum class mtx::events::state::Visibility

The different visibilities.

Enumerators
WorldReadable

All events while this is the m.room.history_visibility value may be shared by any participating homeserver with anyone, regardless of whether they have ever joined the room.

Shared

Previous events are always accessible to newly joined members. All events in the room are accessible, even those sent when the member was not a part of the room.

Invited

Events are accessible to newly joined members from the point they were invited onwards. Events stop being accessible when the member's state changes to something other than invite or join.

Joined

Events are accessible to newly joined members from the point they joined the room onwards. Events stop being accessible when the member's state changes to something other than join.

enum class mtx::events::state::JoinRule

The different JoinRules.

Enumerators
Public

Anyone can join the room without any prior action.

Invite

A user who wishes to join the room must first receive an invite to the room from someone already inside of the room.

Knock

the same as invite, except anyone can knock. See MSC2403.

Private

Reserved but not yet implemented by the Matrix specification.

Restricted

the same as invite, except users may also join if they are a member of a room listed in the allow rules.

KnockRestricted

a user can request an invite using the same functions offered by the knock join rule, or can attempt to join having satisfied an allow condition per the restricted join rule.

enum class mtx::events::state::Membership

The different Membership states.

Enumerators
Join

The user has joined.

Invite

The user has been invited.

Ban

The user is banned.

Leave

The user has left.

Knock

The user has requested to join.

Typedef documentation

using mtx::events::state::power_level_t = int64_t

The type representing a power level.

Function documentation

std::string mtx::events::state::accessStateToString(AccessState state)

Converts AccessState to std::string for serialization.

AccessState mtx::events::state::stringToAccessState(const std::string& state)

Converts std::string to AccessState for deserialization.

Variable documentation

power_level_t mtx::events::state::EventsDefault constexpr

The default level required for events.

power_level_t mtx::events::state::UsersDefault constexpr

The default level for users.

power_level_t mtx::events::state::StatesDefault constexpr

The default level required for state events.

power_level_t mtx::events::state::User constexpr

The power level usually associated with normal users.

power_level_t mtx::events::state::Moderator constexpr

The power level usually associated with moderators.

power_level_t mtx::events::state::Admin constexpr

The power level usually associated with admins.