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.aliasesevent. - struct Avatar
- Content of the
m.room.avatarevent. - struct CanonicalAlias
- Content for the
m.room.canonical_aliasevent. - struct Create
- Content of the
m.room.createevent. - struct Encryption
- Content of the
m.room.encryptionevent. - struct GuestAccess
- Content of the
m.room.guest_accessstate event. - struct HistoryVisibility
- Content of the
m.room.history_visibilitystate event. - struct JoinAllowance
- An additional rule specifying what users are allowed to join.
- struct JoinRules
- Content of the
m.room.join_rulesstate event. - struct Member
- Content of the
m.room.memberstate event. - struct Name
- Content of the
m.room.nameevent. - struct PinnedEvents
m.room.pinned_eventsstate event.- struct PowerLevels
- Content for the
m.room.power_levelsstate event. - struct PreviousRoom
- The predecessor of this room.
- struct ServerAcl
- Content for the
m.room.server_aclevent. - struct Tombstone
- Content for the
m.room.tombstoneevent. - struct Topic
- Content for the
m.room.topicstate event. - struct Widget
- Content of the
m.widgetevent.
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
AccessStatetostd::stringfor serialization. - auto stringToAccessState(const std::string& state) -> AccessState
- Converts
std::stringtoAccessStatefor 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 |
| 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
#include <include/mtx/events/join_rules.hpp>
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
#include <include/mtx/events/member.hpp>
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.