diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-09 22:31:21 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-09 22:31:21 -0400 |
commit | 229555939d697700e988f09f04871bde55adc5a7 (patch) | |
tree | 03e040a0c4c9e49d75d102982e9bae7334077e5f /src/remoteauth | |
parent | b5d85f4958601ef512dfc9fe302b4b9bfcda25f1 (diff) | |
download | abaddon-portaudio-229555939d697700e988f09f04871bde55adc5a7.tar.gz abaddon-portaudio-229555939d697700e988f09f04871bde55adc5a7.zip |
make qrcodegen optional wow!!!
Diffstat (limited to 'src/remoteauth')
-rw-r--r-- | src/remoteauth/remoteauthclient.cpp | 8 | ||||
-rw-r--r-- | src/remoteauth/remoteauthclient.hpp | 9 | ||||
-rw-r--r-- | src/remoteauth/remoteauthdialog.cpp | 8 | ||||
-rw-r--r-- | src/remoteauth/remoteauthdialog.hpp | 9 |
4 files changed, 34 insertions, 0 deletions
diff --git a/src/remoteauth/remoteauthclient.cpp b/src/remoteauth/remoteauthclient.cpp index 467ea8b..7653b78 100644 --- a/src/remoteauth/remoteauthclient.cpp +++ b/src/remoteauth/remoteauthclient.cpp @@ -1,8 +1,14 @@ +#ifdef WITH_QRLOGIN + +// clang-format off + #include "remoteauthclient.hpp" #include "http.hpp" #include <nlohmann/json.hpp> #include <spdlog/fmt/bin_to_hex.h> +// clang-format on + RemoteAuthClient::RemoteAuthClient() : m_ws("remote-auth-ws") , m_log(spdlog::get("remote-auth")) { @@ -341,3 +347,5 @@ RemoteAuthClient::type_signal_token RemoteAuthClient::signal_token() { RemoteAuthClient::type_signal_error RemoteAuthClient::signal_error() { return m_signal_error; } + +#endif diff --git a/src/remoteauth/remoteauthclient.hpp b/src/remoteauth/remoteauthclient.hpp index c2e00f3..6ab6dbb 100644 --- a/src/remoteauth/remoteauthclient.hpp +++ b/src/remoteauth/remoteauthclient.hpp @@ -1,4 +1,9 @@ #pragma once + +#ifdef WITH_QRLOGIN + +// clang-format off + #include <string> #include <queue> #include <spdlog/logger.h> @@ -6,6 +11,8 @@ #include "discord/waiter.hpp" #include "discord/websocket.hpp" +// clang-format on + class RemoteAuthClient { public: RemoteAuthClient(); @@ -84,3 +91,5 @@ private: type_signal_token m_signal_token; type_signal_error m_signal_error; }; + +#endif diff --git a/src/remoteauth/remoteauthdialog.cpp b/src/remoteauth/remoteauthdialog.cpp index 7ee045f..7975b4e 100644 --- a/src/remoteauth/remoteauthdialog.cpp +++ b/src/remoteauth/remoteauthdialog.cpp @@ -1,6 +1,12 @@ +#ifdef WITH_QRLOGIN + +// clang-format off + #include "remoteauthdialog.hpp" #include <qrcodegen.hpp> +// clang-format on + RemoteAuthDialog::RemoteAuthDialog(Gtk::Window &parent) : Gtk::Dialog("Login with QR Code", parent, true) , m_layout(Gtk::ORIENTATION_VERTICAL) @@ -122,3 +128,5 @@ void RemoteAuthDialog::OnError(const std::string &error) { Abaddon::Get().ShowConfirm(error, dynamic_cast<Gtk::Window *>(get_toplevel())); response(Gtk::RESPONSE_CANCEL); } + +#endif diff --git a/src/remoteauth/remoteauthdialog.hpp b/src/remoteauth/remoteauthdialog.hpp index 9a6ca29..465a188 100644 --- a/src/remoteauth/remoteauthdialog.hpp +++ b/src/remoteauth/remoteauthdialog.hpp @@ -1,7 +1,14 @@ #pragma once + +#ifdef WITH_QRLOGIN + +// clang-format off + #include <gtkmm/dialog.h> #include "remoteauthclient.hpp" +// clang-format on + class RemoteAuthDialog : public Gtk::Dialog { public: RemoteAuthDialog(Gtk::Window &parent); @@ -27,3 +34,5 @@ private: std::string m_token; }; + +#endif |