diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-17 21:37:24 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-17 21:37:24 -0400 |
commit | d04e101800c451c4963a530b7cf745666105cec4 (patch) | |
tree | d73fdf97b00d8f40d8888de762574a424df435eb /src/remoteauth/remoteauthdialog.hpp | |
parent | 0f3814586e3949d1a7fc15bfc2aff2b99d4975a8 (diff) | |
parent | 857e94af3817932b78963873fb5621ae3c4596f7 (diff) | |
download | abaddon-portaudio-d04e101800c451c4963a530b7cf745666105cec4.tar.gz abaddon-portaudio-d04e101800c451c4963a530b7cf745666105cec4.zip |
Merge branch 'master' into rnnoise
Diffstat (limited to 'src/remoteauth/remoteauthdialog.hpp')
-rw-r--r-- | src/remoteauth/remoteauthdialog.hpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/remoteauth/remoteauthdialog.hpp b/src/remoteauth/remoteauthdialog.hpp new file mode 100644 index 0000000..465a188 --- /dev/null +++ b/src/remoteauth/remoteauthdialog.hpp @@ -0,0 +1,38 @@ +#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); + std::string GetToken(); + +protected: + Gtk::Image m_image; + Gtk::Label m_status; + Gtk::Box m_layout; + Gtk::Button m_ok; + Gtk::Button m_cancel; + Gtk::ButtonBox m_bbox; + +private: + RemoteAuthClient m_ra; + + void OnHello(); + void OnFingerprint(const std::string &fingerprint); + void OnPendingTicket(Snowflake user_id, const std::string &discriminator, const std::string &avatar_hash, const std::string &username); + void OnPendingLogin(); + void OnToken(const std::string &token); + void OnError(const std::string &error); + + std::string m_token; +}; + +#endif |