File indexing completed on 2024-05-05 04:57:31
0001 /* 0002 This file is part of Choqok, the KDE micro-blogging client 0003 0004 SPDX-FileCopyrightText: 2010-2012 Andrey Esin <gmlastik@gmail.com> 0005 0006 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0007 */ 0008 0009 #ifndef IMQDBUS_H 0010 #define IMQDBUS_H 0011 0012 #include <QObject> 0013 #include <QString> 0014 0015 #ifdef TELEPATHY_FOUND 0016 #include <TelepathyQt/Types> 0017 0018 namespace Tp 0019 { 0020 class PendingOperation; 0021 } 0022 #endif 0023 0024 /** 0025 @author Andrey Esin \<gmlastik@gmail.com\> 0026 */ 0027 0028 class IMQDBus : public QObject 0029 { 0030 Q_OBJECT 0031 public: 0032 IMQDBus(QObject *parent = nullptr); 0033 ~IMQDBus(); 0034 0035 void updateStatusMessage(const QString &im, const QString &statusMessage); 0036 static QStringList scanForIMs(); 0037 0038 private: 0039 void usePsi(const QString &statusMessage); 0040 void useKopete(const QString &statusMessage); 0041 void useSkype(const QString &statusMessage); 0042 void usePidgin(const QString &statusMessage); 0043 0044 #ifdef TELEPATHY_FOUND 0045 private Q_SLOTS: 0046 void slotFinished(Tp::PendingOperation *po); 0047 0048 private: 0049 void useTelepathy(const QString &statusMessage); 0050 Tp::AccountManagerPtr m_accountManager; 0051 #endif 0052 }; 0053 0054 #endif // IMQDBUS_H