/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Command line was: qdbusxml2cpp -c DBusSessionManager -p dbussessionmanager sessionmagager.xml
 *
 * qdbusxml2cpp is Copyright (C) 2017 The Qt Company Ltd.
 *
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */

#ifndef DBUSSESSIONMANAGER_H
#define DBUSSESSIONMANAGER_H

#include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>

/*
 * Proxy class for interface org.deepin.dde.SessionManager1
 */
class DBusSessionManager: public QDBusAbstractInterface
{
public:
#ifdef COMPILE_ON_V2X
    static inline const char *staticInterfaceName()
    { return "org.deepin.dde.SessionManager1"; }
    static inline const char *staticServiceName()
    { return "org.deepin.dde.SessionManager1"; }
    static inline const char *staticObjectPath()
    { return "/org/deepin/dde/SessionManager1"; }
#else
    static inline const char *staticInterfaceName()
    { return "com.deepin.SessionManager"; }
    static inline const char *staticServiceName()
    { return "com.deepin.SessionManager"; }
    static inline const char *staticObjectPath()
    { return "/com/deepin/SessionManager"; }
#endif
private:
    Q_OBJECT
    Q_SLOT void __propertyChanged__(const QDBusMessage &msg)
    {
        QList<QVariant> arguments = msg.arguments();
        if (3 != arguments.count())
            return;
        QString interfaceName = msg.arguments().at(0).toString();
        if (interfaceName != staticInterfaceName())
            return;
        QVariantMap changedProps = qdbus_cast<QVariantMap>(arguments.at(1).value<QDBusArgument>());
        QStringList keys = changedProps.keys();
        foreach (const QString &prop, keys) {
            const QMetaObject *self = metaObject();
            for (int i = self->propertyOffset(); i < self->propertyCount(); ++i) {
                QMetaProperty p = self->property(i);
                if (p.name() == prop) {
                    Q_EMIT p.notifySignal().invoke(this);
                }
            }
        }
    }
public:
    explicit DBusSessionManager(QObject *parent = nullptr);

    ~DBusSessionManager();

    Q_PROPERTY(QString CurrentUid READ currentUid)
    inline QString currentUid() const
    { return qvariant_cast< QString >(property("CurrentUid")); }

    Q_PROPERTY(bool Locked READ locked NOTIFY LockedChanged)
    inline bool locked() const
    { return qvariant_cast< bool >(property("Locked")); }

    Q_PROPERTY(int Stage READ stage)
    inline int stage() const
    { return qvariant_cast< int >(property("Stage")); }

Q_SIGNALS: // SIGNALS
    void LockedChanged() const;
};

#endif
