events namespace
Namespace for all events.
Namespaces
- namespace account_data
- Namespace for events in account_
data. - namespace collections
- Contains heterogeneous collections of events using std::variant.
- namespace ephemeral
- Ephemeral events not part of the timeline like typing and read notifications.
- namespace msc2545
- Custom emotes and stickers MSC.
- namespace msg
- Non-state events sent in the timeline like messages.
- namespace state
- Events, that can be used as a state event.
Classes
-
template<class Content>struct DeviceEvent
- Extension of the Event type for device events.
-
template<class Content>struct EncryptedEvent
- Extension of the RoomEvent.
-
template<class Content>struct EphemeralEvent
- An ephemeral event like typing or read receipts.
-
template<class Content>struct Event
- The basic set of fields all events must have.
-
template<class Content>struct RedactionEvent
- Extension of the RoomEvent.
-
template<class Content>struct RoomEvent
- RoomEvent.
-
template<class Content>struct StateEvent
- Extension of the RoomEvent.
- struct Unknown
- Placeholder event for if an event is unsupported.
- struct UnsignedData
- Additional server provided data for this event.
Enums
- enum class MessageType { Audio, Emote, File, Image, Location, Notice, Text, Video, KeyVerificationRequest, ElementEffect, Unknown, Redacted, Invalid }
- enum class EventType { KeyVerificationCancel, KeyVerificationRequest, KeyVerificationStart, KeyVerificationAccept, KeyVerificationKey, KeyVerificationMac, KeyVerificationReady, KeyVerificationDone, Reaction, RoomKey, ForwardedRoomKey, RoomKeyRequest, RoomAliases, RoomAvatar, RoomCanonicalAlias, RoomCreate, RoomEncrypted, RoomEncryption, RoomGuestAccess, RoomHistoryVisibility, RoomJoinRules, RoomMember, RoomMessage, RoomName, RoomPowerLevels, RoomTopic, RoomRedaction, RoomPinnedEvents, RoomTombstone, RoomServerAcl, Sticker, Tag, Presence, PushRules, Widget, VectorWidget, PolicyRuleUser, PolicyRuleRoom, PolicyRuleServer, SpaceChild, SpaceParent, CallInvite, CallCandidates, CallAnswer, CallHangUp, CallSelectAnswer, CallReject, CallNegotiate, SecretRequest, SecretSend, Typing, Receipt, FullyRead, Direct, IgnoredUsers, NhekoHiddenEvents, NhekoEventExpiry, NhekoInvitePermissions, ImagePackInRoom, ImagePackInAccountData, ImagePackRooms, Dummy, Unsupported }
- The type of an event.
Typedefs
-
template<class Content>using AccountDataEvent = EphemeralEvent<Content>
- An account_
data event like fully_read or tags.
Functions
- auto to_string(EventType type) -> std::string
- Turn an event into a string.
- auto getEventType(const std::string& type) -> EventType
- Parse a string into an event type.
- auto getEventType(const nlohmann::json& obj) -> EventType
- Get the event type of an event.
Variables
-
template<typename Content>EventType message_content_to_type constexpr
- Get the right event type for some type of message content.
-
template<typename Content>EventType state_content_to_type constexpr
- Get the right event type for some type of state event content.
-
template<typename Content>EventType to_device_content_to_type constexpr
- Get the right event type for some type of device message content.
-
template<typename Content>EventType account_data_content_to_type constexpr
- Get the right event type for some type of account_
data event content.
Enum documentation
enum class mtx:: events:: MessageType
#include <include/mtx/events.hpp>
| Enumerators | |
|---|---|
| Audio | |
| Emote | |
| File | |
| Image | |
| Location | |
| Notice | |
| Text | |
| Video | |
| KeyVerificationRequest |
m.key.verification.request |
| ElementEffect | |
| Unknown | |
| Redacted | |
| Invalid |
enum class mtx:: events:: EventType
#include <include/mtx/events/event_type.hpp>
The type of an event.
| Enumerators | |
|---|---|
| KeyVerificationCancel |
m.key.verification.cancel |
| KeyVerificationRequest |
m.key.verification.request |
| KeyVerificationStart |
m.key.verification.start |
| KeyVerificationAccept |
m.key.verification.accept |
| KeyVerificationKey |
m.key.verification.key |
| KeyVerificationMac |
m.key.verification.mac |
| KeyVerificationReady |
m.key.verification.ready, |
| KeyVerificationDone |
m.key.verification.done, |
| Reaction |
m.reaction, |
| RoomKey |
m.room_key |
| ForwardedRoomKey |
m.forwarded_room_key |
| RoomKeyRequest |
m.room_key_request |
| RoomAliases |
m.room.aliases |
| RoomAvatar |
m.room.avatar |
| RoomCanonicalAlias |
m.room.canonical_alias |
| RoomCreate |
m.room.create |
| RoomEncrypted |
m.room.encrypted. |
| RoomEncryption |
m.room.encryption. |
| RoomGuestAccess |
m.room.guest_access |
| RoomHistoryVisibility |
m.room.history_visibility |
| RoomJoinRules |
m.room.join_rules |
| RoomMember |
m.room.member |
| RoomMessage |
m.room.message |
| RoomName |
m.room.name |
| RoomPowerLevels |
m.room.power_levels |
| RoomTopic |
m.room.topic |
| RoomRedaction |
m.room.redaction |
| RoomPinnedEvents |
m.room.pinned_events |
| RoomTombstone |
m.room.tombstone |
| RoomServerAcl |
m.room.server_acl |
| Sticker | |
| Tag | |
| Presence | |
| PushRules | |
| Widget |
m.widget |
| VectorWidget |
im.vector.modular.widgets |
| PolicyRuleUser |
m.policy.rule.user |
| PolicyRuleRoom |
m.policy.rule.room |
| PolicyRuleServer |
m.policy.rule.server |
| SpaceChild | |
| SpaceParent | |
| CallInvite | |
| CallCandidates | |
| CallAnswer | |
| CallHangUp | |
| CallSelectAnswer | |
| CallReject | |
| CallNegotiate | |
| SecretRequest | |
| SecretSend | |
| Typing |
m.typing |
| Receipt |
m.receipt |
| FullyRead |
m.fully_read |
| Direct |
m.direct |
| IgnoredUsers |
m.ignored_user_list |
| NhekoHiddenEvents | |
| NhekoEventExpiry | |
| NhekoInvitePermissions | |
| ImagePackInRoom |
m.image_pack, currently im.ponies.room_emotes |
| ImagePackInAccountData |
m.image_pack, currently im.ponies.user_emotes |
| ImagePackRooms |
m.image_pack.rooms, currently im.ponies.emote_rooms |
| Dummy |
|
| Unsupported |
Unsupported event. |
Typedef documentation
#include <include/mtx/events.hpp>
template<class Content>
using mtx:: events:: AccountDataEvent = EphemeralEvent<Content>
An account_
Function documentation
std::string mtx:: events:: to_string(EventType type)
#include <include/mtx/events/event_type.hpp>
Turn an event into a string.
EventType mtx:: events:: getEventType(const std::string& type)
#include <include/mtx/events/event_type.hpp>
Parse a string into an event type.
EventType mtx:: events:: getEventType(const nlohmann::json& obj)
#include <include/mtx/events/event_type.hpp>
Get the event type of an event.
Variable documentation
#include <include/mtx/events/collections.hpp>
template<typename Content>
EventType mtx:: events:: message_content_to_type constexpr
Get the right event type for some type of message content.
#include <include/mtx/events/collections.hpp>
template<typename Content>
EventType mtx:: events:: state_content_to_type constexpr
Get the right event type for some type of state event content.
#include <include/mtx/events/collections.hpp>
template<typename Content>
EventType mtx:: events:: to_device_content_to_type constexpr
Get the right event type for some type of device message content.
#include <include/mtx/events/collections.hpp>
template<typename Content>
EventType mtx:: events:: account_data_content_to_type constexpr
Get the right event type for some type of account_