aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2018-05-26lib/csapi/: regenerate job classes from the most recent templatesKitsune Ral
2018-05-26lib/csapi/: Don't send parameters that were omittedKitsune Ral
2018-05-24Room: Make isFavourite/LowPriority/DirectChat accessible from QMLKitsune Ral
2018-05-23BaseJob: more careful error handling; unify and extend error signals in Conne...Kitsune Ral
2018-05-06Remove unused job classes.Kitsune Ral
2018-05-06converters.h: Fix CIKitsune Ral
2018-05-06Optimise #includes, eliminate some excess blank lines in lib/csapiKitsune Ral
2018-05-06lib/csapi/*.mustache: Optimise #includes, eliminate some blank linesKitsune Ral
2018-05-06lib/csapi: SearchJobKitsune Ral
2018-05-06Room::calculateDisplayname: fix a misleading room name after leaving a one-on...Kitsune Ral
2018-05-06CMakeLists.txt: Bump API versionKitsune Ral
2018-05-05Merge branch 'kitsune-gtad'Kitsune Ral
2018-05-05CONTRIBUTING.md: add a section about using GTADKitsune Ral
2018-05-05README.md: cleaning up captionsKitsune Ral
2018-05-04New home for the generated code - lib/csapiKitsune Ral
2018-05-04Fix building on OSXKitsune Ral
2018-05-04gtad.yaml: CleanupKitsune Ral
2018-05-04gtad.yaml: Even more concise type stubbingKitsune Ral
2018-05-04Connection, jobs/generated: Use QStringList instead of QVector<QString>Kitsune Ral
2018-05-04gtad.yaml: Use QStringList instead of QVector<QString>Kitsune Ral
2018-05-04jobs/generated: code ordering, more commentsKitsune Ral
2018-05-04gtad.yaml: Support maps of eventsKitsune Ral
2018-05-04{{base}}.h.mustache: better code ordering, more commentsKitsune Ral
2018-05-04converters.h: support std::unordered_map<QString, T>Kitsune Ral
2018-05-04SendToDeviceJob: use a map-of-maps for messages instead of an opaque QJsonObjectKitsune Ral
2018-05-04gtad.yaml: Support OpenAPI value maps (aka additionalProperties)Kitsune Ral
2018-05-04Ignore non-shadow qmake buildsKitsune Ral
2018-05-04Preempt job/setroomstatejob.* with jobs/generated/room_state.*Kitsune Ral
2018-05-04EvT::TypeId: Use a member function instead of a variableKitsune Ral
2018-05-03.travis.yml: Use newer QtKitsune Ral
2018-05-03gtad.yaml: Update regexes to match string partsKitsune Ral
2018-05-03Preempt jobs/joinroomjob.* with jobs/generated/joining.*Kitsune Ral
2018-05-03jobs/generated: Drop unused codeKitsune Ral
2018-05-03GetRoomEventsJob (replaces RoomMessagesJob) + refactoringKitsune Ral
2018-05-03Room::Private::processRedaction: minor refactoringKitsune Ral
2018-05-03CleanupKitsune Ral
2018-05-03GTAD: Use QMatrixClient::Event-derived classes in generated jobs + Mustache c...Kitsune Ral
2018-05-01Fix building on OSXKitsune Ral
2018-05-01Merge branch 'master' into kitsune-gtadKitsune Ral
2018-05-01jobs/generated: use std::move in baseURL; type updates from the API filesKitsune Ral
2018-05-01gtad.yaml: Use EventPtr for Notifications.Event; add variant type to the mapKitsune Ral
2018-05-01GetNotificationsJob: don't alias EventPtr with EventKitsune Ral
2018-05-01jobs/generated: use std::move in baseURL; type updates from the API filesKitsune Ral
2018-05-01Event and Room: further abstract event pointersKitsune Ral
2018-05-01Room: endorse std::moveKitsune Ral
2018-05-01converters.h: Support std::vector<>Kitsune Ral
2018-05-01User::processEvent: add constKitsune Ral
2018-05-01RedactionEvent: make the constructor explicitKitsune Ral
2018-05-01Event: cleanupKitsune Ral
2018-05-01Integrate converters with EventPtr partiallyKitsune Ral
>bool isReplaced() const; QString replacedBy() const; bool isRedacted() const { return bool(_redactedBecause); } const event_ptr_tt<RedactionEvent>& redactedBecause() const { return _redactedBecause; } QString redactionReason() const; QString transactionId() const; QString stateKey() const; //! \brief Fill the pending event object with the room id void setRoomId(const QString& roomId); //! \brief Fill the pending event object with the sender id void setSender(const QString& senderId); //! \brief Fill the pending event object with the transaction id //! \param txnId - transaction id, normally obtained from //! Connection::generateTxnId() void setTransactionId(const QString& txnId); //! \brief Add an event id to locally created events after they are sent //! //! When a new event is created locally, it has no id; the homeserver //! assigns it once the event is sent. This function allows to add the id //! once the confirmation from the server is received. There should be no id //! set previously in the event. It's the responsibility of the code calling //! addId() to notify clients about the change; there's no signal or //! callback for that in RoomEvent. void addId(const QString& newId); #ifdef Quotient_E2EE_ENABLED void setOriginalEvent(event_ptr_tt<RoomEvent>&& originalEvent); const RoomEvent* originalEvent() { return _originalEvent.get(); } const QJsonObject encryptedJson() const; #endif protected: void dumpTo(QDebug dbg) const override; private: event_ptr_tt<RedactionEvent> _redactedBecause; #ifdef Quotient_E2EE_ENABLED event_ptr_tt<RoomEvent> _originalEvent; #endif }; using RoomEventPtr = event_ptr_tt<RoomEvent>; using RoomEvents = EventsArray<RoomEvent>; using RoomEventsRange = Range<RoomEvents>; template <> inline EventPtr doLoadEvent(const QJsonObject& json, const QString& matrixType) { if (matrixType == "m.room.encrypted") return RoomEvent::factory.loadEvent(json, matrixType); return Event::factory.loadEvent(json, matrixType); } class QUOTIENT_API CallEventBase : public RoomEvent { public: CallEventBase(Type type, event_mtype_t matrixType, const QString& callId, int version, const QJsonObject& contentJson = {}); CallEventBase(Type type, const QJsonObject& json); ~CallEventBase() override = default; bool isCallEvent() const override { return true; } QUO_CONTENT_GETTER(QString, callId) QUO_CONTENT_GETTER(int, version) protected: static QJsonObject basicJson(const QString& matrixType, const QString& callId, int version, QJsonObject contentJson = {}); }; } // namespace Quotient Q_DECLARE_METATYPE(Quotient::RoomEvent*) Q_DECLARE_METATYPE(const Quotient::RoomEvent*)