// SPDX-FileCopyrightText: 2022 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

#ifndef LAUNCHER_INTERFACE_H
#define LAUNCHER_INTERFACE_H

#include "dbus/dbusvariant/app_info.h"

#include <DSysInfo>

/*
 * Proxy class for interface org.deepin.dde.daemon.Launcher1
 */
class LauncherInterface : public QDBusAbstractInterface
{
    Q_OBJECT
public:
    static inline const char *staticInterfaceName()
    {
        if (Dtk::Core::DSysInfo::majorVersion().toInt() >= 23)
            return "org.deepin.dde.daemon.Launcher1";

        return "com.deepin.dde.daemon.Launcher";
    }

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

    ~LauncherInterface();

public Q_SLOTS: // METHODS
    inline QDBusPendingReply<AppInfoList> GetAllItemInfos()
    {
        QList<QVariant> argumentList;
        return asyncCallWithArgumentList(QStringLiteral("GetAllItemInfos"), argumentList);
    }

    inline QDBusPendingReply<AppInfo> GetItemInfo(const QString &in0)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(in0);
        return asyncCallWithArgumentList(QStringLiteral("GetItemInfo"), argumentList);
    }

Q_SIGNALS: // SIGNALS
    void ItemChanged(const QString &in0, AppInfo in1, qlonglong in2);
};

namespace com {
namespace deepin {
namespace dde {
namespace daemon {
typedef ::LauncherInterface Launcher;
}
} // namespace dde
} // namespace deepin
} // namespace com
#endif
