File indexing completed on 2024-04-21 05:52:51

0001 /*
0002  *   Copyright (C) 2016 by Aditya Mehra <aix.m@outlook.com>                      *
0003  *   This program is free software; you can redistribute it and/or modify
0004  *   it under the terms of the GNU Library General Public License as
0005  *   published by the Free Software Foundation; either version 2, or
0006  *   (at your option) any later version.
0007  *
0008  *   This program is distributed in the hope that it will be useful,
0009  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
0010  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0011  *   GNU General Public License for more details
0012  *
0013  *   You should have received a copy of the GNU Library General Public
0014  *   License along with this program; if not, write to the
0015  *   Free Software Foundation, Inc.,
0016  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
0017  */
0018 
0019 #ifndef MYCROFTPLASMOID_DBUS_H
0020 #define MYCROFTPLASMOID_DBUS_H
0021 
0022 #include <QObject>
0023 #include <QtDBus>
0024 QT_BEGIN_NAMESPACE
0025 class QByteArray;
0026 template<class T> class QList;
0027 template<class Key, class Value> class QMap;
0028 class QString;
0029 class QStringList;
0030 class QVariant;
0031 QT_END_NAMESPACE
0032 
0033 /*
0034  * Adaptor class for interface org.kde.mycroftapplet
0035  */
0036 class MycroftDbusAdapterInterface: public QDBusAbstractAdaptor
0037 {
0038     Q_OBJECT
0039     Q_CLASSINFO("D-Bus Interface", "org.kde.mycroftapplet")
0040     Q_CLASSINFO("D-Bus Introspection", ""
0041 "  <interface name=\"org.kde.mycroftapplet\">\n"
0042 "    <signal name=\"sendShowMycroft\">\n"
0043 "      <arg direction=\"out\" type=\"s\" name=\"msgShowMycroft\"/>\n"
0044 "    </signal>\n"
0045 "    <signal name=\"sendShowSkills\">\n"
0046 "      <arg direction=\"out\" type=\"s\" name=\"msgShowSkills\"/>\n"
0047 "    </signal>\n"
0048 "    <signal name=\"installList\">\n"
0049 "      <arg direction=\"out\" type=\"s\" name=\"msgShowInstallSkills\"/>\n"
0050 "    </signal>\n"
0051 "    <signal name=\"recipeMethod\">\n"
0052 "      <arg direction=\"out\" type=\"s\" name=\"msgRecipeMethod\"/>\n"
0053 "    </signal>\n"
0054 "    <signal name=\"kioMethod\">\n"
0055 "      <arg direction=\"out\" type=\"s\" name=\"msgKioMethod\"/>\n"
0056 "    </signal>\n"
0057 "    <method name=\"showMycroft\"/>\n"
0058 "    <method name=\"showSkills\"/>\n"
0059 "    <method name=\"showSkillsInstaller\"/>\n"
0060 "    <method name=\"showRecipeMethod\">\n"
0061 "      <arg direction=\"in\" type=\"s\" name=\"recipeName\"/>\n"
0062 "     </method>\n"
0063 "    <method name=\"sendKioMethod\">\n"
0064 "      <arg direction=\"in\" type=\"s\" name=\"kioString\"/>\n"
0065 "     </method>\n"
0066 "  </interface>\n"
0067         "")
0068 public:
0069     MycroftDbusAdapterInterface(QObject *parent);
0070     virtual ~MycroftDbusAdapterInterface();
0071     Q_INVOKABLE QString getMethod(const QString &method);
0072 
0073 public: // PROPERTIES
0074 public Q_SLOTS: // METHODS
0075     void showMycroft();
0076     void showSkills();
0077     void showSkillsInstaller();
0078     void showRecipeMethod(const QString &recipeName);
0079     void sendKioMethod(const QString &kioString);
0080 Q_SIGNALS: // SIGNALS
0081     void sendShowMycroft(const QString &msgShowMycroft);
0082     void sendShowSkills(const QString &msgShowSkills);
0083     void installList(const QString &msgShowInstallSkills);
0084     void recipeMethod(const QString &msgRecipeMethod);
0085     void kioMethod(const QString &msgKioMethod);
0086 };
0087 
0088 #endif