21#ifndef SAYONARA_LASTFM_LOGIN_THREAD_H
22#define SAYONARA_LASTFM_LOGIN_THREAD_H
25#include "Utils/globals.h"
26#include "Utils/Pimpl.h"
37 bool hasError {
false};
39 [[nodiscard]]
bool isKeyValid()
const {
return (key.size() >= 32); }
41 [[nodiscard]]
bool isLoggedIn()
const {
return isKeyValid() && !hasError; }
54 explicit LoginThread(
const std::shared_ptr<WebClientFactory>& webClientFactory, QObject* parent =
nullptr);
57 void login(
const QString& username,
const QString& password);
59 [[nodiscard]]
LoginInfo loginInfo()
const;
62 void webClientFinished();
Definition LFMLoginThread.h:46
Definition WebClientFactory.h:29
Definition LFMLoginThread.h:32