File indexing completed on 2025-01-05 04:54:55

0001 /*
0002   Copyright (C) 2017 Michael Bohlender, <michael.bohlender@kdemail.net>
0003 
0004   This program is free software; you can redistribute it and/or modify
0005   it under the terms of the GNU General Public License as published by
0006   the Free Software Foundation; either version 2 of the License, or
0007   (at your option) any later version.
0008 
0009   This program is distributed in the hope that it will be useful,
0010   but WITHOUT ANY WARRANTY; without even the implied warranty of
0011   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0012   GNU General Public License for more details.
0013 
0014   You should have received a copy of the GNU General Public License along
0015   with this program; if not, write to the Free Software Foundation, Inc.,
0016   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0017 */
0018 
0019 #pragma once
0020 
0021 #include <QObject>
0022 #include <QString>
0023 #include <QByteArray>
0024 
0025 #include <domain/controller.h>
0026 
0027 class GmailController : public Kube::Controller
0028 {
0029     Q_OBJECT
0030 
0031     //Interface properties
0032     KUBE_CONTROLLER_PROPERTY(QString, Name, name)
0033 
0034     KUBE_CONTROLLER_PROPERTY(QString, EmailAddress, emailAddress)
0035     KUBE_CONTROLLER_PROPERTY(QString, Password, password)
0036     KUBE_CONTROLLER_PROPERTY(QString, IdentityName, identityName)
0037 
0038     //Actions
0039     KUBE_CONTROLLER_ACTION(create)
0040     KUBE_CONTROLLER_ACTION(modify)
0041     KUBE_CONTROLLER_ACTION(remove)
0042 
0043 public:
0044     explicit GmailController();
0045 
0046 public slots:
0047     void load(const QByteArray &id);
0048 
0049 private:
0050     QByteArray m_accountId;
0051     QByteArray m_smtpId;
0052     QByteArray m_imapId;
0053     QByteArray m_identityId;
0054 };
0055