diff options
Diffstat (limited to 'lib/events/receiptevent.h')
-rw-r--r-- | lib/events/receiptevent.h | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/lib/events/receiptevent.h b/lib/events/receiptevent.h index fca38bba..e8396670 100644 --- a/lib/events/receiptevent.h +++ b/lib/events/receiptevent.h @@ -23,31 +23,34 @@ #include <QtCore/QDateTime> #include <QtCore/QVector> -namespace QMatrixClient { - struct Receipt { - QString userId; - QDateTime timestamp; - }; - struct ReceiptsForEvent { - QString evtId; - QVector<Receipt> receipts; - }; - using EventsWithReceipts = QVector<ReceiptsForEvent>; +namespace QMatrixClient +{ +struct Receipt +{ + QString userId; + QDateTime timestamp; +}; +struct ReceiptsForEvent +{ + QString evtId; + QVector<Receipt> receipts; +}; +using EventsWithReceipts = QVector<ReceiptsForEvent>; - class ReceiptEvent : public Event - { - public: - DEFINE_EVENT_TYPEID("m.receipt", ReceiptEvent) - explicit ReceiptEvent(const QJsonObject& obj); +class ReceiptEvent : public Event +{ +public: + DEFINE_EVENT_TYPEID("m.receipt", ReceiptEvent) + explicit ReceiptEvent(const QJsonObject& obj); - const EventsWithReceipts& eventsWithReceipts() const - { - return _eventsWithReceipts; - } + const EventsWithReceipts& eventsWithReceipts() const + { + return _eventsWithReceipts; + } - private: - EventsWithReceipts _eventsWithReceipts; - }; - REGISTER_EVENT_TYPE(ReceiptEvent) - DEFINE_EVENTTYPE_ALIAS(Receipt, ReceiptEvent) +private: + EventsWithReceipts _eventsWithReceipts; +}; +REGISTER_EVENT_TYPE(ReceiptEvent) +DEFINE_EVENTTYPE_ALIAS(Receipt, ReceiptEvent) } // namespace QMatrixClient |