#ifndef SCREENSAVERWNDADAPTOR_H
#define SCREENSAVERWNDADAPTOR_H

#include <QtCore/QObject>
#include <QtDBus/QtDBus>
#include "fullbackgroundwidget.h"
QT_BEGIN_NAMESPACE
class QByteArray;
template<class T> class QList;
template<class Key, class Value> class QMap;
class QString;
class QStringList;
class QVariant;
QT_END_NAMESPACE

class ScreenSaverWndAdaptor : public QDBusAbstractAdaptor
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", "org.ukui.ScreenSaverWnd")
    Q_CLASSINFO("D-Bus Introspection", ""
                "  <interface name=\"org.ukui.ScreenSaverWnd\">\n"
                "    <signal name=\"SubWndChanged\"/>\n"
                "    <signal name=\"StartupModeChanged\"/>\n"
                "    <method name=\"RegisteSubWnd\">\n"
                "      <arg name=\"wndid\" direction=\"in\" type=\"t\"/>\n"
                "      <arg name=\"result\" direction=\"out\" type=\"i\"/>\n"
                "    </method>\n"
                "    <method name=\"UnRegisteSubWnd\">\n"
                "      <arg name=\"wndid\" direction=\"in\" type=\"t\"/>\n"
                "      <arg name=\"result\" direction=\"out\" type=\"i\"/>\n"
                "    </method>\n"
                "    <method name=\"GetSubWndIds\">\n"
                "      <arg name=\"result\" direction=\"out\" type=\"at\"/>\n"
                "    </method>\n"
                "    <method name=\"IsStartupMode\">\n"
                "      <arg name=\"result\" direction=\"out\" type=\"b\"/>\n"
                "    </method>\n"
                "  </interface>\n"
                "")
public:
    ScreenSaverWndAdaptor(FullBackgroundWidget *parent = nullptr);
    virtual ~ScreenSaverWndAdaptor();

public Q_SLOTS:
    int RegisteSubWnd(quint64 uWndId);
    int UnRegisteSubWnd(quint64 uWndId);
    QList<quint64> GetSubWndIds();
    bool IsStartupMode();

Q_SIGNALS:
    void SubWndChanged(int nCount);
    void StartupModeChanged(bool isStartup);

private:
    FullBackgroundWidget *m_parentWidget = nullptr;
};

#endif // SCREENSAVERWNDADAPTOR_H
