aboutsummaryrefslogtreecommitdiff
path: root/lib/events/roomcreateevent.h
blob: 05e623edf57096a64d4695bb8bbf6ec576c8276d (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
29
// SPDX-FileCopyrightText: 2019 Kitsune Ral <Kitsune-Ral@users.sf.net>
// SPDX-License-Identifier: LGPL-2.1-or-later

#pragma once

#include "stateevent.h"

namespace Quotient {
class RoomCreateEvent : public StateEventBase {
public:
    DEFINE_EVENT_TYPEID("m.room.create", RoomCreateEvent)

    explicit RoomCreateEvent() : StateEventBase(typeId(), matrixTypeId()) {}
    explicit RoomCreateEvent(const QJsonObject& obj)
        : StateEventBase(typeId(), obj)
    {}

    struct Predecessor {
        QString roomId;
        QString eventId;
    };

    bool isFederated() const;
    QString version() const;
    Predecessor predecessor() const;
    bool isUpgrade() const;
};
REGISTER_EVENT_TYPE(RoomCreateEvent)
} // namespace Quotient
lass="p">); virtual ~ConnectionData(); void submit(BaseJob* job); void limitRate(std::chrono::milliseconds nextCallAfter); QByteArray accessToken() const; QUrl baseUrl() const; const QString& deviceId() const; const QString& userId() const; QNetworkAccessManager* nam() const; void setBaseUrl(QUrl baseUrl); void setToken(QByteArray accessToken); [[deprecated("Use setBaseUrl() instead")]] void setHost(QString host); [[deprecated("Use setBaseUrl() instead")]] void setPort(int port); void setDeviceId(const QString& deviceId); void setUserId(const QString& userId); QString lastEvent() const; void setLastEvent(QString identifier); QByteArray generateTxnId() const; private: class Private; std::unique_ptr<Private> d; }; } // namespace Quotient