From b71baf486dc276ad616e3c7b46f44b4cafb62f40 Mon Sep 17 00:00:00 2001
From: Kitsune Ral <Kitsune-Ral@users.sf.net>
Date: Fri, 20 Jul 2018 07:28:11 +0900
Subject: csapi: Rename entities in application-service/

The actual change is in API definition files, this is just regeneration.
---
 lib/application-service/definitions/location.cpp     | 6 +++---
 lib/application-service/definitions/location.h       | 8 ++++----
 lib/application-service/definitions/location_batch.h | 2 +-
 lib/application-service/definitions/protocol.cpp     | 6 +++---
 lib/application-service/definitions/protocol.h       | 8 ++++----
 lib/application-service/definitions/user.cpp         | 6 +++---
 lib/application-service/definitions/user.h           | 8 ++++----
 lib/application-service/definitions/user_batch.h     | 2 +-
 lib/csapi/third_party_lookup.cpp                     | 6 +++---
 lib/csapi/third_party_lookup.h                       | 2 +-
 10 files changed, 27 insertions(+), 27 deletions(-)

(limited to 'lib')

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>
     {
     };
 
diff --git a/lib/csapi/third_party_lookup.cpp b/lib/csapi/third_party_lookup.cpp
index 783d6896..d1158d19 100644
--- a/lib/csapi/third_party_lookup.cpp
+++ b/lib/csapi/third_party_lookup.cpp
@@ -53,7 +53,7 @@ BaseJob::Status GetProtocolsJob::parseJson(const QJsonDocument& data)
 class GetProtocolMetadataJob::Private
 {
     public:
-        Protocol data;
+        ThirdPartyProtocol data;
 };
 
 QUrl GetProtocolMetadataJob::makeRequestUrl(QUrl baseUrl, const QString& protocol)
@@ -73,7 +73,7 @@ GetProtocolMetadataJob::GetProtocolMetadataJob(const QString& protocol)
 
 GetProtocolMetadataJob::~GetProtocolMetadataJob() = default;
 
-const Protocol& GetProtocolMetadataJob::data() const
+const ThirdPartyProtocol& GetProtocolMetadataJob::data() const
 {
     return d->data;
 }
@@ -84,7 +84,7 @@ BaseJob::Status GetProtocolMetadataJob::parseJson(const QJsonDocument& data)
     if (!json.contains("data"_ls))
         return { JsonParseError,
             "The key 'data' not found in the response" };
-    d->data = fromJson<Protocol>(json.value("data"_ls));
+    d->data = fromJson<ThirdPartyProtocol>(json.value("data"_ls));
     return Success;
 }
 
diff --git a/lib/csapi/third_party_lookup.h b/lib/csapi/third_party_lookup.h
index c66902d7..8dec11a4 100644
--- a/lib/csapi/third_party_lookup.h
+++ b/lib/csapi/third_party_lookup.h
@@ -74,7 +74,7 @@ namespace QMatrixClient
             // Result properties
 
             /// The protocol was found and metadata returned.
-            const Protocol& data() const;
+            const ThirdPartyProtocol& data() const;
 
         protected:
             Status parseJson(const QJsonDocument& data) override;
-- 
cgit v1.2.3