File indexing completed on 2024-04-21 03:56:32
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 "package.h" 0012 #include "packagejob.h" 0013 #include <QCoreApplication> 0014 0015 class QCommandLineParser; 0016 class KJob; 0017 0018 namespace KPackage 0019 { 0020 class PackageToolPrivate; 0021 0022 class PackageTool : public QCoreApplication 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 PackageTool(int &argc, char **argv, QCommandLineParser *parser); 0028 ~PackageTool() override; 0029 0030 void listPackages(const QString &kpackageType, const QString &path = QString()); 0031 void showPackageInfo(const QString &pluginName); 0032 void showAppstreamInfo(const QString &pluginName); 0033 QString resolvePackageRootWithOptions(); 0034 0035 private Q_SLOTS: 0036 void runMain(); 0037 void packageInstalled(KPackage::PackageJob *job); 0038 void packageUninstalled(KPackage::PackageJob *job); 0039 0040 private: 0041 PackageToolPrivate *d; 0042 }; 0043 0044 } 0045 0046 #endif