1 /* === This file is part of Calamares - <https://calamares.io> ===
2  *
3  *   SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
4  *   SPDX-License-Identifier: GPL-3.0-or-later
5  *
6  *   Calamares is Free Software: see the License-Identifier above.
7  *
8  */
9 
10 #ifndef CALAMARES_PYTHONJOBMODULE_H
11 #define CALAMARES_PYTHONJOBMODULE_H
12 
13 #include "DllMacro.h"
14 #include "modulesystem/Module.h"
15 
16 namespace Calamares
17 {
18 
19 class UIDLLEXPORT PythonJobModule : public Module
20 {
21 public:
22     Type type() const override;
23     Interface interface() const override;
24 
25     void loadSelf() override;
26     JobList jobs() const override;
27 
28 protected:
29     void initFrom( const ModuleSystem::Descriptor& moduleDescriptor ) override;
30 
31 private:
32     explicit PythonJobModule();
33     ~PythonJobModule() override;
34 
35     QString m_scriptFileName;
36     QString m_workingPath;
37     job_ptr m_job;
38 
39     friend Module* Calamares::moduleFromDescriptor( const ModuleSystem::Descriptor& moduleDescriptor,
40                                                     const QString& instanceId,
41                                                     const QString& configFileName,
42                                                     const QString& moduleDirectory );
43 };
44 
45 }  // namespace Calamares
46 
47 #endif  // CALAMARES_PYTHONJOBMODULE_H
48