File indexing completed on 2024-04-28 15:29:18

0001 /*
0002     SPDX-FileCopyrightText: 2008 Aaron Seigo <aseigo@kde.org>
0003     SPDX-FileCopyrightText: 2012 Sebastian Kügler <sebas@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef PACKAGETOOL_H
0009 #define PACKAGETOOL_H
0010 
0011 #include <QCoreApplication>
0012 
0013 class QCommandLineParser;
0014 class KJob;
0015 
0016 namespace KPackage
0017 {
0018 class PackageToolPrivate;
0019 
0020 class PackageTool : public QCoreApplication
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     PackageTool(int &argc, char **argv, QCommandLineParser *parser);
0026     ~PackageTool() override;
0027 
0028     void listPackages(const QStringList &types, const QString &path = QString());
0029     void showPackageInfo(const QString &pluginName);
0030     void showAppstreamInfo(const QString &pluginName);
0031     QString findPackageRoot(const QString &pluginName, const QString &prefix);
0032 
0033 private Q_SLOTS:
0034     void runMain();
0035     void packageInstalled(KJob *job);
0036     void packageUninstalled(KJob *job);
0037 
0038 private:
0039     PackageToolPrivate *d;
0040 };
0041 
0042 }
0043 
0044 #endif