File indexing completed on 2024-10-27 04:58:02

0001 /*
0002     SPDX-FileCopyrightText: 2014 Sandro Knauß <knauss@kolabsys.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 // This code was taken from kmail-account-wizard
0008 
0009 #pragma once
0010 
0011 #include "setupobject.h"
0012 
0013 class Identity;
0014 class Ispdb;
0015 
0016 class SetupIspdb : public SetupObject
0017 {
0018     Q_OBJECT
0019 public:
0020     /** Constructor */
0021     explicit SetupIspdb(QObject *parent = nullptr);
0022     SetupIspdb(QObject *parent, Ispdb *ispdb);
0023     ~SetupIspdb() override;
0024 
0025     void create() override;
0026     void destroy() override;
0027 
0028 public Q_SLOTS:
0029     Q_SCRIPTABLE QStringList relevantDomains() const;
0030     Q_SCRIPTABLE QString name(int l) const;
0031 
0032     Q_SCRIPTABLE void fillImapServer(int i, QObject *) const;
0033     Q_SCRIPTABLE int countImapServers() const;
0034 
0035     Q_SCRIPTABLE void fillSmtpServer(int i, QObject *) const;
0036     Q_SCRIPTABLE int countSmtpServers() const;
0037 
0038     Q_SCRIPTABLE void fillIdentity(int i, QObject *) const;
0039     Q_SCRIPTABLE int countIdentities() const;
0040     Q_SCRIPTABLE int defaultIdentity() const;
0041 
0042     Q_SCRIPTABLE void start();
0043 
0044     Q_SCRIPTABLE void setEmail(const QString &);
0045     Q_SCRIPTABLE void setPassword(const QString &);
0046 
0047 Q_SIGNALS:
0048     void ispdbFinished(bool);
0049 
0050 protected Q_SLOTS:
0051     void onIspdbFinished(bool);
0052 
0053 protected:
0054     Ispdb *mIspdb = nullptr;
0055 };
0056