calamares/src/modules/machineid/MachineIdJob.h

61 lines
1.5 KiB
C
Raw Normal View History

/* === This file is part of Calamares - <https://calamares.io> ===
2019-10-01 13:44:06 +02:00
*
2020-08-22 01:19:58 +02:00
* SPDX-FileCopyrightText: 2019 Adriaan de Groot <groot@kde.org>
* SPDX-License-Identifier: GPL-3.0-or-later
2019-10-01 13:44:06 +02:00
*
* Calamares is Free Software: see the License-Identifier above.
2019-10-01 13:44:06 +02:00
*
*/
#ifndef MACHINEIDJOB_H
#define MACHINEIDJOB_H
#include <QObject>
#include <QStringList>
2019-10-01 13:44:06 +02:00
#include <QVariantMap>
#include "CppJob.h"
2019-10-01 13:44:06 +02:00
#include "utils/PluginFactory.h"
2019-10-01 13:44:06 +02:00
#include "DllMacro.h"
2019-10-01 13:44:06 +02:00
/** @brief Write 'random' data: machine id, entropy, UUIDs
*
*/
2019-10-01 13:44:06 +02:00
class PLUGINDLLEXPORT MachineIdJob : public Calamares::CppJob
{
Q_OBJECT
public:
explicit MachineIdJob( QObject* parent = nullptr );
virtual ~MachineIdJob() override;
QString prettyName() const override;
Calamares::JobResult exec() override;
void setConfigurationMap( const QVariantMap& configurationMap ) override;
/** @brief The list of filenames to write full of entropy.
*
* The list may be empty (no entropy files are configure) or
* contain one or more filenames to be interpreted within the
* target system.
*/
QStringList entropyFileNames() const { return m_entropy_files; }
private:
bool m_systemd = false; ///< write systemd's files
bool m_dbus = false; ///< write dbus files
bool m_dbus_symlink = false; ///< .. or just symlink to systemd
bool m_entropy_copy = false; ///< copy from host system
QStringList m_entropy_files; ///< names of files to write
2019-10-01 13:44:06 +02:00
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( MachineIdJobFactory )
2019-10-02 12:37:31 +02:00
#endif // MACHINEIDJOB_H