MailTransport

xoauthpasswordrequester.h
1/*
2 SPDX-FileCopyrightText: 2024 g10 Code GmbH
3 SPDX-FileContributor: Daniel Vrátil <dvratil@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#pragma once
9
10#include <QObject>
11
12namespace MailTransport
13{
14
15class Transport;
16
17class XOAuthPasswordRequester : public QObject
18{
20
21public:
22 enum Result {
23 Error = 0,
24 PasswordRetrieved = 1,
25 };
26 Q_ENUM(Result);
27
28 explicit XOAuthPasswordRequester(Transport *transport, QObject *parent = nullptr);
29 ~XOAuthPasswordRequester() override;
30
31 virtual void requestPassword(bool forceRefresh) = 0;
32
34 void done(XOAuthPasswordRequester::Result result, const QString &password);
35
36protected:
37 Transport *transport() const;
38
39private:
40 Transport *const mTransport;
41};
42
43XOAuthPasswordRequester *createXOAuthPasswordRequester(Transport *transport, QObject *parent = nullptr);
44
45} // namespace
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:43:20 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.