File indexing completed on 2024-04-28 04:55:44
0001 /* 0002 This file is part of Choqok, the KDE micro-blogging client 0003 0004 SPDX-FileCopyrightText: 2017 Andrea Scarpino <scarpino@kde.org> 0005 0006 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0007 */ 0008 0009 #ifndef MASTODONACCOUNT_H 0010 #define MASTODONACCOUNT_H 0011 0012 #include "account.h" 0013 #include "choqoktypes.h" 0014 0015 #include "mastodonoauth.h" 0016 0017 class MastodonMicroBlog; 0018 0019 class MastodonAccount : public Choqok::Account 0020 { 0021 Q_OBJECT 0022 public: 0023 explicit MastodonAccount(MastodonMicroBlog *parent, const QString &alias); 0024 ~MastodonAccount(); 0025 0026 virtual void writeConfig() override; 0027 0028 QString host(); 0029 void setHost(const QString &host); 0030 0031 uint id(); 0032 void setId(const uint id); 0033 0034 QString consumerKey(); 0035 void setConsumerKey(const QString &consumerKey); 0036 0037 QString consumerSecret(); 0038 void setConsumerSecret(const QString &consumerSecret); 0039 0040 QString tokenSecret(); 0041 void setTokenSecret(const QString &tokenSecret); 0042 0043 MastodonOAuth *oAuth(); 0044 0045 QStringList followers(); 0046 void setFollowers(const QStringList &followers); 0047 0048 QStringList following(); 0049 void setFollowing(const QStringList &following); 0050 0051 QVariantList lists(); 0052 void setLists(const QVariantList &lists); 0053 0054 private: 0055 class Private; 0056 Private *d; 0057 0058 }; 0059 0060 #endif // MASTODONACCOUNT_H