Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85803053
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/base/constants.hpp b/src/base/constants.hpp
deleted file mode 100644
index 86350e5..0000000
--- a/src/base/constants.hpp
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * This file is part of libkazv.
- * SPDX-FileCopyrightText: 2020 Tusooa Zhu
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-
-#include <string>
-
-namespace Kazv
-{
- using namespace std::string_literals;
- const std::string CLIENT_MAJOR_VERSION = "r0"s;
- const std::string BASE_PATH = "/_matrix/client/"s + CLIENT_MAJOR_VERSION;
-}
diff --git a/src/job/login.cpp b/src/job/login.cpp
deleted file mode 100644
index 686375b..0000000
--- a/src/job/login.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * This file is part of libkazv.
- * SPDX-FileCopyrightText: 2020 Tusooa Zhu
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-#include <libkazv-config.hpp>
-
-
-#include "constants.hpp"
-#include "login.hpp"
-
-namespace Kazv
-{
- GetLoginFlowsJob::GetLoginFlowsJob(std::string serverUrl)
- : BaseJob(std::move(serverUrl), BASE_PATH + "/login"s, GET)
- {
- }
-
-
- json loginDataToJson(std::string serverUrl,
- std::string username,
- std::string password,
- std::optional<std::string> deviceName)
- {
- json j = json::object();
- j["type"] = "m.login.password";
- j["identifier"] = json::object();
- j["identifier"]["type"] = "m.id.user";
- j["identifier"]["user"] = std::move(username);
- j["password"] = std::move(password);
- j["initial_device_display_name"] = deviceName
- ? std::move(deviceName.value())
- : "libkazv"s;
-
- return j;
- }
-
-
- LoginJob::LoginJob(std::string serverUrl,
- std::string username,
- std::string password,
- std::optional<std::string> deviceName)
- : BaseJob(serverUrl,
- BASE_PATH + "/login"s,
- POST,
- std::string{},
- ReturnType::Json,
- JsonBody(loginDataToJson(serverUrl,
- std::move(username),
- std::move(password),
- std::move(deviceName))))
- {
- }
-};
diff --git a/src/job/login.hpp b/src/job/login.hpp
deleted file mode 100644
index 7856cac..0000000
--- a/src/job/login.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This file is part of libkazv.
- * SPDX-FileCopyrightText: 2020 Tusooa Zhu
- * SPDX-License-Identifier: AGPL-3.0-or-later
- */
-
-
-#include "basejob.hpp"
-
-namespace Kazv
-{
- class GetLoginFlowsJob : public BaseJob
- {
- public:
- GetLoginFlowsJob(std::string serverUrl);
- };
- class LoginJob : public BaseJob
- {
- public:
- LoginJob(std::string serverUrl,
- std::string username,
- std::string password,
- std::optional<std::string> deviceName);
- };
-};
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Oct 8, 11:56 PM (23 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1784354
Default Alt Text
(2 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment