/*
 * This file was generated by qdbusxml2cpp version 0.8
 * Command line was: qdbusxml2cpp -N com.kylin.RemoteDesktop.xml -p krd.h:krd.cpp
 *
 * qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd.
 *
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */

#ifndef KRD_H
#define KRD_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>

typedef QList<QVariantMap> ClientInfo;
Q_DECLARE_METATYPE(ClientInfo)

/*
 * Proxy class for interface com.kylin.RemoteDesktop
 */
class ComKylinRemoteDesktopInterface: public QDBusAbstractInterface
{
    Q_OBJECT
public:
    static inline const char *staticInterfaceName()
    { return "com.kylin.RemoteDesktop"; }

public:
    ComKylinRemoteDesktopInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr);

    ~ComKylinRemoteDesktopInterface();

    Q_PROPERTY(ClientInfo ClientsInfo READ clientsInfo)
    inline ClientInfo clientsInfo() const
    { return qvariant_cast< ClientInfo >(property("ClientsInfo")); }

public Q_SLOTS: // METHODS
    inline QDBusPendingReply<> CloseClient(int id)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(id);
        return asyncCallWithArgumentList(QStringLiteral("CloseClient"), argumentList);
    }

    // 退出服务
    inline QDBusPendingReply<> Exit()
    {
        QList<QVariant> argumentList;
        return asyncCallWithArgumentList(QStringLiteral("Exit"), argumentList);
    }

    // 获取使用的协议类型
    inline QDBusPendingReply<int> GetServerType()
    {
        return call(QStringLiteral("GetServerType"));
    }

    // 开启RDP远程连接
    inline QDBusPendingReply<int> StartRDP(const QString &output)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(output);
        return asyncCallWithArgumentList(QStringLiteral("StartRDP"), argumentList);
    }

    // 允许其他用户控制这台电脑的屏幕
    inline QDBusPendingReply<int> SetControlPermissionStatus(const bool allowControl)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(allowControl);
        return asyncCallWithArgumentList(QStringLiteral("SetControlPermissionStatus"), argumentList);
    }

    inline QDBusPendingReply<bool> GetControlPermissionStatus()
    {
        return call(QStringLiteral("GetControlPermissionStatus"));
    }

    // 每次访问这台电脑时需要确认
    inline QDBusPendingReply<int> SetVisitConfirmStatus(const bool need)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(need);
        return asyncCallWithArgumentList(QStringLiteral("SetVisitConfirmStatus"), argumentList);
    }

    inline QDBusPendingReply<bool> GetVisitConfirmStatus()
    {
        return call(QStringLiteral("GetVisitConfirmStatus"));
    }

    // 开启VNC远程连接
    inline QDBusPendingReply<int> Start(const QString &output)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(output);
        return asyncCallWithArgumentList(QStringLiteral("Start"), argumentList);
    }

    inline QDBusReply<bool> GetStatus()
    {
        return call(QStringLiteral("GetStatus"));
    }

    // 设置自动开启，开机启动 krd-daemon 服务
    inline QDBusPendingReply<int> SetAutoStart(const bool isAuto)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(isAuto);
        return asyncCallWithArgumentList(QStringLiteral("SetAutoStart"), argumentList);
    }

    // 设置远程连接时是否需要密码
    inline QDBusPendingReply<int> SetAuthMethod(const uchar need)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(need);
        return asyncCallWithArgumentList(QStringLiteral("SetAuthMethod"), argumentList);
    }

    inline QDBusReply<uchar> GetAuthMethod()
    {
        return call(QStringLiteral("GetAuthMethod"));
    }

    // 设置远程连接密码
    inline QDBusPendingReply<int> SetPassword(const QString &passwd)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(passwd);
        return asyncCallWithArgumentList(QStringLiteral("SetPassword"), argumentList);
    }
    inline QDBusReply<QString> GetPassword()
    {
        return call(QStringLiteral("GetPassword"));
    }

    // 获取输出显示器列表
    inline QDBusReply<QStringList> GetSupportedOutputDevice()
    {
        return call(QStringLiteral("GetSupportedOutputDevice"));
    }

    // 获取当前可远程连接的显示器
    inline QDBusReply<QString> GetCurrentDevice()
    {
        return call(QStringLiteral("GetCurrentDevice"));
    }

    // 设置允许连接的远程客户端数量
    inline QDBusPendingReply<int> SetAllowedMaxClient(const uint maxCount)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(maxCount);
        return asyncCallWithArgumentList(QStringLiteral("SetAllowedMaxClient"), argumentList);
    }

    inline QDBusReply<uint> GetAllowedMaxClient()
    {
        return call(QStringLiteral("GetAllowedMaxClient"));
    }

    inline QDBusPendingReply<> SetViewOnly(int id, bool viewOnly)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(id) << QVariant::fromValue(viewOnly);
        return asyncCallWithArgumentList(QStringLiteral("SetViewOnly"), argumentList);
    }

Q_SIGNALS: // SIGNALS
    void Changed(int type);
};

#endif
