2025-01-29 16:42:37 +01:00
|
|
|
#ifndef IMPORTKEYJOB_H
|
|
|
|
#define IMPORTKEYJOB_H
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "rnpjob.h"
|
|
|
|
/**
|
|
|
|
* @class ImportKeyJob
|
|
|
|
* @brief A class to handle import a key file in a separate thread.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class ImportKeyJob : public RnpJob
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The main function that performs the import operation.
|
|
|
|
*
|
|
|
|
* Handles the process of removing recursively a target path.
|
|
|
|
*/
|
|
|
|
void run() override;
|
|
|
|
|
2025-01-30 16:25:29 +01:00
|
|
|
signals:
|
|
|
|
void resultSuccess();
|
2025-01-29 16:42:37 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
QString m_key_file_path; ///< The path of the key file to import.
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
2025-01-30 16:25:29 +01:00
|
|
|
* @brief Constructor for the ImportKeyJob class.
|
2025-01-29 16:42:37 +01:00
|
|
|
*
|
|
|
|
* Initializes the ImportKeyJob with the file to import.
|
|
|
|
*
|
2025-01-30 16:25:29 +01:00
|
|
|
* @param rnp_homedir Rnp home dir that contains the keyrings.
|
2025-01-29 16:42:37 +01:00
|
|
|
* @param path Path of the key file to import.
|
|
|
|
*/
|
2025-01-30 16:25:29 +01:00
|
|
|
ImportKeyJob(QDir rnp_homedir, QString path);
|
2025-01-29 16:42:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // IMPORTKEYJOB_H
|