KPackage

packagestructure.h
1 /*
2  SPDX-FileCopyrightText: 2011 Aaron Seigo <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef KPACKAGE_PACKAGESTRUCTURE_H
8 #define KPACKAGE_PACKAGESTRUCTURE_H
9 
10 #include <QStringList>
11 
12 #include <KPluginFactory>
13 
14 #include <kpackage/package_export.h>
15 #include <kpackage/package.h>
16 #include <kpackage/version.h>
17 
18 namespace KPackage
19 {
20 
21 class PackageStructurePrivate;
22 
43 class KPACKAGE_EXPORT PackageStructure : public QObject
44 {
45  Q_OBJECT
46 
47 public:
48 
49  explicit PackageStructure(QObject *parent = nullptr, const QVariantList &args = QVariantList());
50 
52 
64  virtual void initPackage(Package *package);
65 
70  virtual void pathChanged(Package *package);
71 
83  virtual KJob *install(Package *package, const QString &archivePath, const QString &packageRoot);
84 
99  virtual KJob *update(Package *package, const QString &archivePath, const QString &packageRoot);
100 
110  virtual KJob *uninstall(Package *package, const QString &packageRoot);
111 
112 private:
113  PackageStructurePrivate *d;
114 };
115 
116 } // KPackage namespace
117 
122 #define K_EXPORT_KPACKAGE_PACKAGE_WITH_JSON(classname, jsonFile) \
123  K_PLUGIN_FACTORY_WITH_JSON(factory, jsonFile, registerPlugin<classname>();) \
124  K_EXPORT_PLUGIN_VERSION(PACKAGE_VERSION)
125 
126 #endif
This class is used to define the filesystem structure of a package type.
object representing an installed package
Definition: package.h:67
Namespace for everything in kpackage.
Definition: package.cpp:33
<KPackage/Version>
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Oct 30 2020 22:55:35 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.