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

#pragma once

#include "stateevent.h"
#include "quotient_common.h"

namespace Quotient {
class QUOTIENT_API RoomCreateEvent : public StateEvent {
public:
    QUO_EVENT(RoomCreateEvent, "m.room.create")

    using StateEvent::StateEvent;

    struct Predecessor {
        QString roomId;
        QString eventId;
    };

    bool isFederated() const;
    QString version() const;
    Predecessor predecessor() const;
    bool isUpgrade() const;
    RoomType roomType() const;
};
} // namespace Quotient