aboutsummaryrefslogtreecommitdiff
path: root/lib/identity/definitions/sid.h
blob: ac8c4130a9d271d33a8b4ce866e9a20dc6298a46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "converters.h"


namespace QMatrixClient
{
    // Data structures

    struct Sid
    {
        /// The session ID. Session IDs are opaque strings generated by the identity
        /// server. They must consist entirely of the characters
        /// ``[0-9a-zA-Z.=_-]``. Their length must not exceed 255 characters and they
        /// must not be empty.
        QString sid;
    };
    template <> struct JsonObjectConverter<Sid>
    {
        static void dumpTo(QJsonObject& jo, const Sid& pod);
        static void fillFrom(const QJsonObject& jo, Sid& pod);
    };

} // namespace QMatrixClient
rivate { public: Event* event; QString stateKey; QString replacesState; }; State::State(Event* event) : d(new Private) { d->event = event; } State::~State() { delete d; } Event* State::event() const { return d->event; } QString State::stateKey() const { return d->stateKey; } QString State::replacesState() const { return d->replacesState; } State* State::fromJson(const QJsonObject& obj) { Event* event = Event::fromJson(obj); if( !event ) return nullptr; State* state = new State(event); state->d->stateKey = obj.value("state_key").toString(); state->d->replacesState = obj.value("replaces_state").toString(); return state; }