aboutsummaryrefslogtreecommitdiff
path: root/lib/events
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-07-07 19:32:34 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-08-09 10:18:37 +0900
commit27ca32a1e5a56e09b9cc1d94224d2831004dcf3d (patch)
treef2e8d19705a13e39bd9484d13098f323c8d30194 /lib/events
parent7a5b359b8823646ce97cbaf05c251cb04c291466 (diff)
downloadlibquotient-27ca32a1e5a56e09b9cc1d94224d2831004dcf3d.tar.gz
libquotient-27ca32a1e5a56e09b9cc1d94224d2831004dcf3d.zip
Namespace: QMatrixClient -> Quotient (with back comp alias)
Diffstat (limited to 'lib/events')
-rw-r--r--lib/events/accountdataevents.h4
-rw-r--r--lib/events/callanswerevent.cpp2
-rw-r--r--lib/events/callanswerevent.h4
-rw-r--r--lib/events/callcandidatesevent.h4
-rw-r--r--lib/events/callhangupevent.cpp2
-rw-r--r--lib/events/callhangupevent.h4
-rw-r--r--lib/events/callinviteevent.cpp2
-rw-r--r--lib/events/callinviteevent.h4
-rw-r--r--lib/events/directchatevent.cpp2
-rw-r--r--lib/events/directchatevent.h4
-rw-r--r--lib/events/encryptedevent.h4
-rw-r--r--lib/events/encryptionevent.cpp6
-rw-r--r--lib/events/encryptionevent.h4
-rw-r--r--lib/events/event.cpp2
-rw-r--r--lib/events/event.h10
-rw-r--r--lib/events/eventcontent.cpp2
-rw-r--r--lib/events/eventcontent.h4
-rw-r--r--lib/events/eventloader.h4
-rw-r--r--lib/events/reactionevent.cpp4
-rw-r--r--lib/events/reactionevent.h4
-rw-r--r--lib/events/receiptevent.cpp2
-rw-r--r--lib/events/receiptevent.h4
-rw-r--r--lib/events/redactionevent.h4
-rw-r--r--lib/events/roomavatarevent.h4
-rw-r--r--lib/events/roomcreateevent.cpp2
-rw-r--r--lib/events/roomcreateevent.h4
-rw-r--r--lib/events/roomevent.cpp4
-rw-r--r--lib/events/roomevent.h8
-rw-r--r--lib/events/roommemberevent.cpp6
-rw-r--r--lib/events/roommemberevent.h4
-rw-r--r--lib/events/roommessageevent.cpp6
-rw-r--r--lib/events/roommessageevent.h4
-rw-r--r--lib/events/roomtombstoneevent.cpp2
-rw-r--r--lib/events/roomtombstoneevent.h4
-rw-r--r--lib/events/simplestateevents.h6
-rw-r--r--lib/events/stateevent.cpp2
-rw-r--r--lib/events/stateevent.h8
-rw-r--r--lib/events/typingevent.cpp2
-rw-r--r--lib/events/typingevent.h4
39 files changed, 78 insertions, 78 deletions
diff --git a/lib/events/accountdataevents.h b/lib/events/accountdataevents.h
index 3f519668..600fa5be 100644
--- a/lib/events/accountdataevents.h
+++ b/lib/events/accountdataevents.h
@@ -24,7 +24,7 @@
#include "event.h"
#include "eventcontent.h"
-namespace QMatrixClient {
+namespace Quotient {
constexpr const char* FavouriteTag = "m.favourite";
constexpr const char* LowPriorityTag = "m.lowpriority";
@@ -93,4 +93,4 @@ DEFINE_SIMPLE_EVENT(IgnoredUsersEvent, "m.ignored_user_list", QSet<QString>,
DEFINE_EVENTTYPE_ALIAS(Tag, TagEvent)
DEFINE_EVENTTYPE_ALIAS(ReadMarker, ReadMarkerEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/callanswerevent.cpp b/lib/events/callanswerevent.cpp
index 7ab4a6fb..d6622b30 100644
--- a/lib/events/callanswerevent.cpp
+++ b/lib/events/callanswerevent.cpp
@@ -44,7 +44,7 @@ m.call.answer
}
*/
-using namespace QMatrixClient;
+using namespace Quotient;
CallAnswerEvent::CallAnswerEvent(const QJsonObject& obj)
: CallEventBase(typeId(), obj)
diff --git a/lib/events/callanswerevent.h b/lib/events/callanswerevent.h
index 052f732d..e01b39db 100644
--- a/lib/events/callanswerevent.h
+++ b/lib/events/callanswerevent.h
@@ -20,7 +20,7 @@
#include "roomevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class CallAnswerEvent : public CallEventBase {
public:
DEFINE_EVENT_TYPEID("m.call.answer", CallAnswerEvent)
@@ -43,4 +43,4 @@ public:
REGISTER_EVENT_TYPE(CallAnswerEvent)
DEFINE_EVENTTYPE_ALIAS(CallAnswer, CallAnswerEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/callcandidatesevent.h b/lib/events/callcandidatesevent.h
index 2a915a43..3d13ba8a 100644
--- a/lib/events/callcandidatesevent.h
+++ b/lib/events/callcandidatesevent.h
@@ -20,7 +20,7 @@
#include "roomevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class CallCandidatesEvent : public CallEventBase {
public:
DEFINE_EVENT_TYPEID("m.call.candidates", CallCandidatesEvent)
@@ -43,4 +43,4 @@ public:
REGISTER_EVENT_TYPE(CallCandidatesEvent)
DEFINE_EVENTTYPE_ALIAS(CallCandidates, CallCandidatesEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/callhangupevent.cpp b/lib/events/callhangupevent.cpp
index 2a4fd3da..d41849c3 100644
--- a/lib/events/callhangupevent.cpp
+++ b/lib/events/callhangupevent.cpp
@@ -39,7 +39,7 @@ m.call.hangup
}
*/
-using namespace QMatrixClient;
+using namespace Quotient;
CallHangupEvent::CallHangupEvent(const QJsonObject& obj)
: CallEventBase(typeId(), obj)
diff --git a/lib/events/callhangupevent.h b/lib/events/callhangupevent.h
index 97fa2f52..d23e29db 100644
--- a/lib/events/callhangupevent.h
+++ b/lib/events/callhangupevent.h
@@ -20,7 +20,7 @@
#include "roomevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class CallHangupEvent : public CallEventBase {
public:
DEFINE_EVENT_TYPEID("m.call.hangup", CallHangupEvent)
@@ -31,4 +31,4 @@ public:
REGISTER_EVENT_TYPE(CallHangupEvent)
DEFINE_EVENTTYPE_ALIAS(CallHangup, CallHangupEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/callinviteevent.cpp b/lib/events/callinviteevent.cpp
index f565fc3e..54faac8d 100644
--- a/lib/events/callinviteevent.cpp
+++ b/lib/events/callinviteevent.cpp
@@ -44,7 +44,7 @@ m.call.invite
}
*/
-using namespace QMatrixClient;
+using namespace Quotient;
CallInviteEvent::CallInviteEvent(const QJsonObject& obj)
: CallEventBase(typeId(), obj)
diff --git a/lib/events/callinviteevent.h b/lib/events/callinviteevent.h
index 9b9d0ae5..3e39e0ba 100644
--- a/lib/events/callinviteevent.h
+++ b/lib/events/callinviteevent.h
@@ -20,7 +20,7 @@
#include "roomevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class CallInviteEvent : public CallEventBase {
public:
DEFINE_EVENT_TYPEID("m.call.invite", CallInviteEvent)
@@ -42,4 +42,4 @@ public:
REGISTER_EVENT_TYPE(CallInviteEvent)
DEFINE_EVENTTYPE_ALIAS(CallInvite, CallInviteEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/directchatevent.cpp b/lib/events/directchatevent.cpp
index 4ba098c2..b4027e16 100644
--- a/lib/events/directchatevent.cpp
+++ b/lib/events/directchatevent.cpp
@@ -20,7 +20,7 @@
#include <QtCore/QJsonArray>
-using namespace QMatrixClient;
+using namespace Quotient;
QMultiHash<QString, QString> DirectChatEvent::usersToDirectChats() const
{
diff --git a/lib/events/directchatevent.h b/lib/events/directchatevent.h
index 94857a93..b4981f2e 100644
--- a/lib/events/directchatevent.h
+++ b/lib/events/directchatevent.h
@@ -20,7 +20,7 @@
#include "event.h"
-namespace QMatrixClient {
+namespace Quotient {
class DirectChatEvent : public Event {
public:
DEFINE_EVENT_TYPEID("m.direct", DirectChatEvent)
@@ -31,4 +31,4 @@ public:
};
REGISTER_EVENT_TYPE(DirectChatEvent)
DEFINE_EVENTTYPE_ALIAS(DirectChat, DirectChatEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/encryptedevent.h b/lib/events/encryptedevent.h
index 67298a27..235b2aa4 100644
--- a/lib/events/encryptedevent.h
+++ b/lib/events/encryptedevent.h
@@ -3,7 +3,7 @@
#include "e2ee.h"
#include "roomevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class Room;
/*
* While the specification states:
@@ -63,4 +63,4 @@ public:
};
REGISTER_EVENT_TYPE(EncryptedEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/encryptionevent.cpp b/lib/events/encryptionevent.cpp
index 0c732a51..945e6696 100644
--- a/lib/events/encryptionevent.cpp
+++ b/lib/events/encryptionevent.cpp
@@ -12,10 +12,10 @@
#include <array>
static const std::array<QString, 1> encryptionStrings = {
- { QMatrixClient::MegolmV1AesSha2AlgoKey }
+ { Quotient::MegolmV1AesSha2AlgoKey }
};
-namespace QMatrixClient {
+namespace Quotient {
template <>
struct JsonConverter<EncryptionType> {
static EncryptionType load(const QJsonValue& jv)
@@ -32,7 +32,7 @@ struct JsonConverter<EncryptionType> {
};
} // namespace QMatrixClient
-using namespace QMatrixClient;
+using namespace Quotient;
EncryptionEventContent::EncryptionEventContent(const QJsonObject& json)
: encryption(fromJson<EncryptionType>(json["algorithm"_ls]))
diff --git a/lib/events/encryptionevent.h b/lib/events/encryptionevent.h
index debabcae..68e41719 100644
--- a/lib/events/encryptionevent.h
+++ b/lib/events/encryptionevent.h
@@ -21,7 +21,7 @@
#include "eventcontent.h"
#include "stateevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class EncryptionEventContent : public EventContent::Base {
public:
enum EncryptionType : size_t { MegolmV1AesSha2 = 0, Undefined };
@@ -71,4 +71,4 @@ private:
REGISTER_EVENT_TYPE(EncryptionEvent)
DEFINE_EVENTTYPE_ALIAS(Encryption, EncryptionEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/event.cpp b/lib/events/event.cpp
index 694254fe..96e33864 100644
--- a/lib/events/event.cpp
+++ b/lib/events/event.cpp
@@ -22,7 +22,7 @@
#include <QtCore/QJsonDocument>
-using namespace QMatrixClient;
+using namespace Quotient;
event_type_t EventTypeRegistry::initializeTypeId(event_mtype_t matrixTypeId)
{
diff --git a/lib/events/event.h b/lib/events/event.h
index 686bd8e0..e96d6897 100644
--- a/lib/events/event.h
+++ b/lib/events/event.h
@@ -25,7 +25,7 @@
# define USE_EVENTTYPE_ALIAS 1
#endif
-namespace QMatrixClient {
+namespace Quotient {
// === event_ptr_tt<> and type casting facilities ===
template <typename EventT>
@@ -292,7 +292,7 @@ using Events = EventsArray<Event>;
// provide matrixTypeId() and typeId().
#define DEFINE_EVENT_TYPEID(_Id, _Type) \
static constexpr event_mtype_t matrixTypeId() { return _Id; } \
- static auto typeId() { return QMatrixClient::typeId<_Type>(); } \
+ static auto typeId() { return Quotient::typeId<_Type>(); } \
// End of macro
// This macro should be put after an event class definition (in .h or .cpp)
@@ -406,6 +406,6 @@ visit(const BaseEventT& event, FnT1&& visitor1, FnT2&& visitor2,
return visit(event, std::forward<FnT2>(visitor2),
std::forward<FnTs>(visitors)...);
}
-} // namespace QMatrixClient
-Q_DECLARE_METATYPE(QMatrixClient::Event*)
-Q_DECLARE_METATYPE(const QMatrixClient::Event*)
+} // namespace Quotient
+Q_DECLARE_METATYPE(Quotient::Event*)
+Q_DECLARE_METATYPE(const Quotient::Event*)
diff --git a/lib/events/eventcontent.cpp b/lib/events/eventcontent.cpp
index 814f2787..802d8176 100644
--- a/lib/events/eventcontent.cpp
+++ b/lib/events/eventcontent.cpp
@@ -23,7 +23,7 @@
#include <QtCore/QMimeDatabase>
-using namespace QMatrixClient::EventContent;
+using namespace Quotient::EventContent;
QJsonObject Base::toJson() const
{
diff --git a/lib/events/eventcontent.h b/lib/events/eventcontent.h
index 5c0f92d1..c26cb931 100644
--- a/lib/events/eventcontent.h
+++ b/lib/events/eventcontent.h
@@ -26,7 +26,7 @@
#include <QtCore/QSize>
#include <QtCore/QUrl>
-namespace QMatrixClient {
+namespace Quotient {
namespace EventContent {
/**
* A base class for all content types that can be stored
@@ -275,4 +275,4 @@ namespace EventContent {
*/
using FileContent = UrlWithThumbnailContent<FileInfo>;
} // namespace EventContent
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/eventloader.h b/lib/events/eventloader.h
index 9e8bb410..ebb96441 100644
--- a/lib/events/eventloader.h
+++ b/lib/events/eventloader.h
@@ -20,7 +20,7 @@
#include "stateevent.h"
-namespace QMatrixClient {
+namespace Quotient {
namespace _impl {
template <typename BaseEventT>
static inline auto loadEvent(const QJsonObject& json,
@@ -83,4 +83,4 @@ struct JsonConverter<event_ptr_tt<EventT>> {
return loadEvent<EventT>(jd.object());
}
};
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/reactionevent.cpp b/lib/events/reactionevent.cpp
index 0a080607..df8910fe 100644
--- a/lib/events/reactionevent.cpp
+++ b/lib/events/reactionevent.cpp
@@ -20,7 +20,7 @@
using namespace QMatrixClient;
-void QMatrixClient::JsonObjectConverter<EventRelation>::dumpTo(
+void JsonObjectConverter<EventRelation>::dumpTo(
QJsonObject& jo, const EventRelation& pod)
{
if (pod.type.isEmpty()) {
@@ -33,7 +33,7 @@ void QMatrixClient::JsonObjectConverter<EventRelation>::dumpTo(
jo.insert(QStringLiteral("key"), pod.key);
}
-void QMatrixClient::JsonObjectConverter<EventRelation>::fillFrom(
+void JsonObjectConverter<EventRelation>::fillFrom(
const QJsonObject& jo, EventRelation& pod)
{
// The experimental logic for generic relationships (MSC1849)
diff --git a/lib/events/reactionevent.h b/lib/events/reactionevent.h
index b1e04561..75c6528c 100644
--- a/lib/events/reactionevent.h
+++ b/lib/events/reactionevent.h
@@ -20,7 +20,7 @@
#include "roomevent.h"
-namespace QMatrixClient {
+namespace Quotient {
struct EventRelation {
using reltypeid_t = const char*;
@@ -70,4 +70,4 @@ private:
};
REGISTER_EVENT_TYPE(ReactionEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/receiptevent.cpp b/lib/events/receiptevent.cpp
index 4a54b744..bf050cb2 100644
--- a/lib/events/receiptevent.cpp
+++ b/lib/events/receiptevent.cpp
@@ -38,7 +38,7 @@ Example of a Receipt Event:
#include "converters.h"
#include "logging.h"
-using namespace QMatrixClient;
+using namespace Quotient;
ReceiptEvent::ReceiptEvent(const QJsonObject& obj) : Event(typeId(), obj)
{
diff --git a/lib/events/receiptevent.h b/lib/events/receiptevent.h
index c32e0543..71cd5de0 100644
--- a/lib/events/receiptevent.h
+++ b/lib/events/receiptevent.h
@@ -23,7 +23,7 @@
#include <QtCore/QDateTime>
#include <QtCore/QVector>
-namespace QMatrixClient {
+namespace Quotient {
struct Receipt {
QString userId;
QDateTime timestamp;
@@ -49,4 +49,4 @@ private:
};
REGISTER_EVENT_TYPE(ReceiptEvent)
DEFINE_EVENTTYPE_ALIAS(Receipt, ReceiptEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/redactionevent.h b/lib/events/redactionevent.h
index 3628fb33..eac627d5 100644
--- a/lib/events/redactionevent.h
+++ b/lib/events/redactionevent.h
@@ -20,7 +20,7 @@
#include "roomevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class RedactionEvent : public RoomEvent {
public:
DEFINE_EVENT_TYPEID("m.room.redaction", RedactionEvent)
@@ -36,4 +36,4 @@ public:
};
REGISTER_EVENT_TYPE(RedactionEvent)
DEFINE_EVENTTYPE_ALIAS(Redaction, RedactionEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/roomavatarevent.h b/lib/events/roomavatarevent.h
index 16aeb070..109f4014 100644
--- a/lib/events/roomavatarevent.h
+++ b/lib/events/roomavatarevent.h
@@ -21,7 +21,7 @@
#include "eventcontent.h"
#include "stateevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class RoomAvatarEvent : public StateEvent<EventContent::ImageContent> {
// It's a bit of an overkill to use a full-fledged ImageContent
// because in reality m.room.avatar usually only has a single URL,
@@ -35,4 +35,4 @@ public:
};
REGISTER_EVENT_TYPE(RoomAvatarEvent)
DEFINE_EVENTTYPE_ALIAS(RoomAvatar, RoomAvatarEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/roomcreateevent.cpp b/lib/events/roomcreateevent.cpp
index cb575f24..c72b5bc2 100644
--- a/lib/events/roomcreateevent.cpp
+++ b/lib/events/roomcreateevent.cpp
@@ -18,7 +18,7 @@
#include "roomcreateevent.h"
-using namespace QMatrixClient;
+using namespace Quotient;
bool RoomCreateEvent::isFederated() const
{
diff --git a/lib/events/roomcreateevent.h b/lib/events/roomcreateevent.h
index c8ba8c40..91aefe9e 100644
--- a/lib/events/roomcreateevent.h
+++ b/lib/events/roomcreateevent.h
@@ -20,7 +20,7 @@
#include "stateevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class RoomCreateEvent : public StateEventBase {
public:
DEFINE_EVENT_TYPEID("m.room.create", RoomCreateEvent)
@@ -41,4 +41,4 @@ public:
bool isUpgrade() const;
};
REGISTER_EVENT_TYPE(RoomCreateEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/roomevent.cpp b/lib/events/roomevent.cpp
index 543640ca..e19c03ce 100644
--- a/lib/events/roomevent.cpp
+++ b/lib/events/roomevent.cpp
@@ -22,7 +22,7 @@
#include "logging.h"
#include "redactionevent.h"
-using namespace QMatrixClient;
+using namespace Quotient;
[[gnu::unused]] static auto roomEventTypeInitialised =
Event::factory_t::chainFactory<RoomEvent>();
@@ -48,7 +48,7 @@ QString RoomEvent::id() const { return fullJson()[EventIdKeyL].toString(); }
QDateTime RoomEvent::timestamp() const
{
- return QMatrixClient::fromJson<QDateTime>(fullJson()["origin_server_ts"_ls]);
+ return Quotient::fromJson<QDateTime>(fullJson()["origin_server_ts"_ls]);
}
QString RoomEvent::roomId() const
diff --git a/lib/events/roomevent.h b/lib/events/roomevent.h
index 155d4600..f943bce4 100644
--- a/lib/events/roomevent.h
+++ b/lib/events/roomevent.h
@@ -22,7 +22,7 @@
#include <QtCore/QDateTime>
-namespace QMatrixClient {
+namespace Quotient {
class RedactionEvent;
/** This class corresponds to m.room.* events */
@@ -102,6 +102,6 @@ public:
QString callId() const { return content<QString>("call_id"_ls); }
int version() const { return content<int>("version"_ls); }
};
-} // namespace QMatrixClient
-Q_DECLARE_METATYPE(QMatrixClient::RoomEvent*)
-Q_DECLARE_METATYPE(const QMatrixClient::RoomEvent*)
+} // namespace Quotient
+Q_DECLARE_METATYPE(Quotient::RoomEvent*)
+Q_DECLARE_METATYPE(const Quotient::RoomEvent*)
diff --git a/lib/events/roommemberevent.cpp b/lib/events/roommemberevent.cpp
index 3cbf6685..d0787170 100644
--- a/lib/events/roommemberevent.cpp
+++ b/lib/events/roommemberevent.cpp
@@ -28,7 +28,7 @@ static const std::array<QString, 5> membershipStrings = {
QStringLiteral("leave"), QStringLiteral("ban") }
};
-namespace QMatrixClient {
+namespace Quotient {
template <>
struct JsonConverter<MembershipType> {
static MembershipType load(const QJsonValue& jv)
@@ -43,9 +43,9 @@ struct JsonConverter<MembershipType> {
return MembershipType::Undefined;
}
};
-} // namespace QMatrixClient
+} // namespace Quotient
-using namespace QMatrixClient;
+using namespace Quotient;
MemberEventContent::MemberEventContent(const QJsonObject& json)
: membership(fromJson<MembershipType>(json["membership"_ls]))
diff --git a/lib/events/roommemberevent.h b/lib/events/roommemberevent.h
index 59d59e3a..2a16617a 100644
--- a/lib/events/roommemberevent.h
+++ b/lib/events/roommemberevent.h
@@ -21,7 +21,7 @@
#include "eventcontent.h"
#include "stateevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class MemberEventContent : public EventContent::Base {
public:
enum MembershipType : size_t {
@@ -107,4 +107,4 @@ public:
REGISTER_EVENT_TYPE(RoomMemberEvent)
DEFINE_EVENTTYPE_ALIAS(RoomMember, RoomMemberEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/roommessageevent.cpp b/lib/events/roommessageevent.cpp
index 991931de..09562d65 100644
--- a/lib/events/roommessageevent.cpp
+++ b/lib/events/roommessageevent.cpp
@@ -25,7 +25,7 @@
#include <QtGui/QImageReader>
#include <QtMultimedia/QMediaResource>
-using namespace QMatrixClient;
+using namespace Quotient;
using namespace EventContent;
using MsgType = RoomMessageEvent::MsgType;
@@ -279,7 +279,7 @@ TextContent::TextContent(const QString& text, const QString& contentType,
mimeType = QMimeDatabase().mimeTypeForName("text/html");
}
-namespace QMatrixClient {
+namespace Quotient {
// Overload the default fromJson<> logic that defined in converters.h
// as we want
template <>
@@ -295,7 +295,7 @@ Omittable<RelatesTo> fromJson(const QJsonValue& jv)
return RelatesTo { jo.value("rel_type"_ls).toString(),
jo.value(EventIdKeyL).toString() };
}
-} // namespace QMatrixClient
+} // namespace Quotient
TextContent::TextContent(const QJsonObject& json)
: relatesTo(fromJson<Omittable<RelatesTo>>(json[RelatesToKeyL]))
diff --git a/lib/events/roommessageevent.h b/lib/events/roommessageevent.h
index c7a5cb47..aa515c71 100644
--- a/lib/events/roommessageevent.h
+++ b/lib/events/roommessageevent.h
@@ -23,7 +23,7 @@
class QFileInfo;
-namespace QMatrixClient {
+namespace Quotient {
namespace MessageEventContent = EventContent; // Back-compatibility
/**
@@ -217,4 +217,4 @@ namespace EventContent {
*/
using AudioContent = PlayableContent<UrlBasedContent<FileInfo>>;
} // namespace EventContent
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/roomtombstoneevent.cpp b/lib/events/roomtombstoneevent.cpp
index a74bb367..f93eb60d 100644
--- a/lib/events/roomtombstoneevent.cpp
+++ b/lib/events/roomtombstoneevent.cpp
@@ -18,7 +18,7 @@
#include "roomtombstoneevent.h"
-using namespace QMatrixClient;
+using namespace Quotient;
QString RoomTombstoneEvent::serverMessage() const
{
diff --git a/lib/events/roomtombstoneevent.h b/lib/events/roomtombstoneevent.h
index 95fed998..2c2f0663 100644
--- a/lib/events/roomtombstoneevent.h
+++ b/lib/events/roomtombstoneevent.h
@@ -20,7 +20,7 @@
#include "stateevent.h"
-namespace QMatrixClient {
+namespace Quotient {
class RoomTombstoneEvent : public StateEventBase {
public:
DEFINE_EVENT_TYPEID("m.room.tombstone", RoomTombstoneEvent)
@@ -34,4 +34,4 @@ public:
QString successorRoomId() const;
};
REGISTER_EVENT_TYPE(RoomTombstoneEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/simplestateevents.h b/lib/events/simplestateevents.h
index 6dad8020..520f6b4b 100644
--- a/lib/events/simplestateevents.h
+++ b/lib/events/simplestateevents.h
@@ -20,7 +20,7 @@
#include "stateevent.h"
-namespace QMatrixClient {
+namespace Quotient {
namespace EventContent {
template <typename T>
class SimpleContent {
@@ -37,7 +37,7 @@ namespace EventContent {
{}
QJsonObject toJson() const
{
- return { { key, QMatrixClient::toJson(value) } };
+ return { { key, Quotient::toJson(value) } };
}
public:
@@ -92,4 +92,4 @@ public:
QStringList aliases() const { return content().value; }
};
REGISTER_EVENT_TYPE(RoomAliasesEvent)
-} // namespace QMatrixClient
+} // namespace Quotient
diff --git a/lib/events/stateevent.cpp b/lib/events/stateevent.cpp
index bd228abd..c0bb0794 100644
--- a/lib/events/stateevent.cpp
+++ b/lib/events/stateevent.cpp
@@ -18,7 +18,7 @@
#include "stateevent.h"
-using namespace QMatrixClient;
+using namespace Quotient;
// Aside from the normal factory to instantiate StateEventBase inheritors
// StateEventBase itself can be instantiated if there's a state_key JSON key
diff --git a/lib/events/stateevent.h b/lib/events/stateevent.h
index 757c94ee..74e36e74 100644
--- a/lib/events/stateevent.h
+++ b/lib/events/stateevent.h
@@ -20,7 +20,7 @@
#include "roomevent.h"
-namespace QMatrixClient {
+namespace Quotient {
/// Make a minimal correct Matrix state event JSON
template <typename StrT>
@@ -128,12 +128,12 @@ private:
ContentT _content;
std::unique_ptr<Prev<ContentT>> _prev;
};
-} // namespace QMatrixClient
+} // namespace Quotient
namespace std {
template <>
-struct hash<QMatrixClient::StateEventKey> {
- size_t operator()(const QMatrixClient::StateEventKey& k) const Q_DECL_NOEXCEPT
+struct hash<Quotient::StateEventKey> {
+ size_t operator()(const Quotient::StateEventKey& k) const Q_DECL_NOEXCEPT
{
return qHash(k);
}
diff --git a/lib/events/typingevent.cpp b/lib/events/typingevent.cpp
index ee3d6b67..0c5fc6ba 100644
--- a/lib/events/typingevent.cpp
+++ b/lib/events/typingevent.cpp
@@ -20,7 +20,7 @@
#include <QtCore/QJsonArray>
-using namespace QMatrixClient;
+using namespace Quotient;
TypingEvent::TypingEvent(const QJsonObject& obj) : Event(typeId(), obj)
{
diff --git a/lib/events/typingevent.h b/lib/events/typingevent.h
index c8170865..d659c597 100644
--- a/lib/events/typingevent.h
+++ b/lib/events/typingevent.h
@@ -20,7 +20,7 @@
#include "event.h"
-namespace QMatrixClient {
+namespace Quotient {
class TypingEvent : public Event {
public:
DEFINE_EVENT_TYPEID("m.typing", TypingEvent)
@@ -34,4 +34,4 @@ private:
};
REGISTER_EVENT_TYPE(TypingEvent)
DEFINE_EVENTTYPE_ALIAS(Typing, TypingEvent)
-} // namespace QMatrixClient
+} // namespace Quotient