Skip to content
Snippets Groups Projects
video.hpp 1.08 KiB
Newer Older
#include <optional>
#if __has_include(<nlohmann/json_fwd.hpp>)
#include <nlohmann/json_fwd.hpp>
#else
#include <nlohmann/json.hpp>
#include "mtx/common.hpp"
#include "mtx/events/common.hpp"

namespace mtx {
namespace events {
namespace msg {

Nicolas Werner's avatar
Nicolas Werner committed
//! Content of `m.room.message` with msgtype `m.video`.
Nicolas Werner's avatar
Nicolas Werner committed
        /// @brief A description of the video or some kind of content description
        /// for accessibility.
        std::string body;
Nicolas Werner's avatar
Nicolas Werner committed
        //! Must be 'm.video'.
        std::string msgtype;
Nicolas Werner's avatar
Nicolas Werner committed
        //! The matrix URL of the video clip.
        std::string url;
Nicolas Werner's avatar
Nicolas Werner committed
        //! Metadata for the video clip referred to in url.
        mtx::common::VideoInfo info;
Nicolas Werner's avatar
Nicolas Werner committed
        //! Encryption members. If present, they replace url.
        std::optional<crypto::EncryptedFile> file;
        //! Relates to for rich replies
Joe Donofry's avatar
Joe Donofry committed
        mtx::common::ReplyRelatesTo relates_to;
from_json(const nlohmann::json &obj, Video &content);
to_json(nlohmann::json &obj, const Video &content);

} // namespace msg
} // namespace events
} // namespace mtx