aboutsummaryrefslogtreecommitdiff
path: root/lib/application-service
diff options
context:
space:
mode:
Diffstat (limited to 'lib/application-service')
-rw-r--r--lib/application-service/definitions/location.cpp6
-rw-r--r--lib/application-service/definitions/location.h8
-rw-r--r--lib/application-service/definitions/location_batch.h2
-rw-r--r--lib/application-service/definitions/protocol.cpp6
-rw-r--r--lib/application-service/definitions/protocol.h8
-rw-r--r--lib/application-service/definitions/user.cpp6
-rw-r--r--lib/application-service/definitions/user.h8
-rw-r--r--lib/application-service/definitions/user_batch.h2
8 files changed, 23 insertions, 23 deletions
diff --git a/lib/application-service/definitions/location.cpp b/lib/application-service/definitions/location.cpp
index f70acd55..973bcd22 100644
--- a/lib/application-service/definitions/location.cpp
+++ b/lib/application-service/definitions/location.cpp
@@ -6,7 +6,7 @@
using namespace QMatrixClient;
-QJsonObject QMatrixClient::toJson(const Location& pod)
+QJsonObject QMatrixClient::toJson(const ThirdPartyLocation& pod)
{
QJsonObject _json;
addParam<IfNotEmpty>(_json, QStringLiteral("alias"), pod.alias);
@@ -15,10 +15,10 @@ QJsonObject QMatrixClient::toJson(const Location& pod)
return _json;
}
-Location FromJson<Location>::operator()(const QJsonValue& jv)
+ThirdPartyLocation FromJson<ThirdPartyLocation>::operator()(const QJsonValue& jv)
{
const auto& _json = jv.toObject();
- Location result;
+ ThirdPartyLocation result;
result.alias =
fromJson<QString>(_json.value("alias"_ls));
result.protocol =
diff --git a/lib/application-service/definitions/location.h b/lib/application-service/definitions/location.h
index af407a1a..761ea1db 100644
--- a/lib/application-service/definitions/location.h
+++ b/lib/application-service/definitions/location.h
@@ -13,7 +13,7 @@ namespace QMatrixClient
{
// Data structures
- struct Location
+ struct ThirdPartyLocation
{
/// An alias for a matrix room.
QString alias;
@@ -23,11 +23,11 @@ namespace QMatrixClient
QJsonObject fields;
};
- QJsonObject toJson(const Location& pod);
+ QJsonObject toJson(const ThirdPartyLocation& pod);
- template <> struct FromJson<Location>
+ template <> struct FromJson<ThirdPartyLocation>
{
- Location operator()(const QJsonValue& jv);
+ ThirdPartyLocation operator()(const QJsonValue& jv);
};
} // namespace QMatrixClient
diff --git a/lib/application-service/definitions/location_batch.h b/lib/application-service/definitions/location_batch.h
index 59e0d14e..cd8c0079 100644
--- a/lib/application-service/definitions/location_batch.h
+++ b/lib/application-service/definitions/location_batch.h
@@ -16,7 +16,7 @@ namespace QMatrixClient
// Data structures
/// List of matched third party locations.
- struct LocationBatch : QVector<Location>
+ struct LocationBatch : QVector<ThirdPartyLocation>
{
};
diff --git a/lib/application-service/definitions/protocol.cpp b/lib/application-service/definitions/protocol.cpp
index 65cbc20e..5e70ff16 100644
--- a/lib/application-service/definitions/protocol.cpp
+++ b/lib/application-service/definitions/protocol.cpp
@@ -43,7 +43,7 @@ FieldTypes FromJson<FieldTypes>::operator()(const QJsonValue& jv)
return result;
}
-QJsonObject QMatrixClient::toJson(const Protocol& pod)
+QJsonObject QMatrixClient::toJson(const ThirdPartyProtocol& pod)
{
QJsonObject _json;
addParam<IfNotEmpty>(_json, QStringLiteral("user_fields"), pod.userFields);
@@ -54,10 +54,10 @@ QJsonObject QMatrixClient::toJson(const Protocol& pod)
return _json;
}
-Protocol FromJson<Protocol>::operator()(const QJsonValue& jv)
+ThirdPartyProtocol FromJson<ThirdPartyProtocol>::operator()(const QJsonValue& jv)
{
const auto& _json = jv.toObject();
- Protocol result;
+ ThirdPartyProtocol result;
result.userFields =
fromJson<QStringList>(_json.value("user_fields"_ls));
result.locationFields =
diff --git a/lib/application-service/definitions/protocol.h b/lib/application-service/definitions/protocol.h
index d4124779..eecf132a 100644
--- a/lib/application-service/definitions/protocol.h
+++ b/lib/application-service/definitions/protocol.h
@@ -45,7 +45,7 @@ namespace QMatrixClient
FieldTypes operator()(const QJsonValue& jv);
};
- struct Protocol
+ struct ThirdPartyProtocol
{
/// Fields used to identify a third party user.
QStringList userFields;
@@ -61,11 +61,11 @@ namespace QMatrixClient
QVector<QJsonObject> instances;
};
- QJsonObject toJson(const Protocol& pod);
+ QJsonObject toJson(const ThirdPartyProtocol& pod);
- template <> struct FromJson<Protocol>
+ template <> struct FromJson<ThirdPartyProtocol>
{
- Protocol operator()(const QJsonValue& jv);
+ ThirdPartyProtocol operator()(const QJsonValue& jv);
};
} // namespace QMatrixClient
diff --git a/lib/application-service/definitions/user.cpp b/lib/application-service/definitions/user.cpp
index dfc12f29..17687cfd 100644
--- a/lib/application-service/definitions/user.cpp
+++ b/lib/application-service/definitions/user.cpp
@@ -6,7 +6,7 @@
using namespace QMatrixClient;
-QJsonObject QMatrixClient::toJson(const User& pod)
+QJsonObject QMatrixClient::toJson(const ThirdPartyUser& pod)
{
QJsonObject _json;
addParam<IfNotEmpty>(_json, QStringLiteral("userid"), pod.userid);
@@ -15,10 +15,10 @@ QJsonObject QMatrixClient::toJson(const User& pod)
return _json;
}
-User FromJson<User>::operator()(const QJsonValue& jv)
+ThirdPartyUser FromJson<ThirdPartyUser>::operator()(const QJsonValue& jv)
{
const auto& _json = jv.toObject();
- User result;
+ ThirdPartyUser result;
result.userid =
fromJson<QString>(_json.value("userid"_ls));
result.protocol =
diff --git a/lib/application-service/definitions/user.h b/lib/application-service/definitions/user.h
index 3f609dea..e24bd8d5 100644
--- a/lib/application-service/definitions/user.h
+++ b/lib/application-service/definitions/user.h
@@ -13,7 +13,7 @@ namespace QMatrixClient
{
// Data structures
- struct User
+ struct ThirdPartyUser
{
/// A Matrix User ID represting a third party user.
QString userid;
@@ -23,11 +23,11 @@ namespace QMatrixClient
QJsonObject fields;
};
- QJsonObject toJson(const User& pod);
+ QJsonObject toJson(const ThirdPartyUser& pod);
- template <> struct FromJson<User>
+ template <> struct FromJson<ThirdPartyUser>
{
- User operator()(const QJsonValue& jv);
+ ThirdPartyUser operator()(const QJsonValue& jv);
};
} // namespace QMatrixClient
diff --git a/lib/application-service/definitions/user_batch.h b/lib/application-service/definitions/user_batch.h
index e732eea1..891d3544 100644
--- a/lib/application-service/definitions/user_batch.h
+++ b/lib/application-service/definitions/user_batch.h
@@ -16,7 +16,7 @@ namespace QMatrixClient
// Data structures
/// List of matched third party users.
- struct UserBatch : QVector<User>
+ struct UserBatch : QVector<ThirdPartyUser>
{
};