diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-04 11:34:38 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-04 15:24:48 +0100 |
| commit | 23cc4be5bc02328fe73ccbd67493dd71ef2e2b8f (patch) | |
| tree | b9e1a7a416f004d96671c0abf597524946b9dda3 /login.h | |
| parent | 3b9973552ec613b37fb511f3a0ae24dacb1e4366 (diff) | |
| download | yachat6-23cc4be5bc02328fe73ccbd67493dd71ef2e2b8f.tar.gz | |
Add accounts and login pages
Diffstat (limited to 'login.h')
| -rw-r--r-- | login.h | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -0,0 +1,30 @@ +#ifndef LOGIN_H +#define LOGIN_H + +#include "client.h" +#include <QQmlApplicationEngine> +#include <QObject> +#include <QString> + +class Login : public QObject +{ + Q_OBJECT + QML_ELEMENT + +public: + Login(QObject *parent = nullptr); + Q_INVOKABLE void start(QString jid, QString pwd); + +Q_SIGNALS: + void authSuccess(Client *c); + void close(); + void error(QString error); + +private: + void setup(const QString &jid, const QString pwd, const QString &domain); + static QString error_to_str(const QXmppStanza::Error::Condition c); + static bool jid_is_valid(const QString &jid, QString &domain); +}; + + +#endif |
