2021-08-07 18:38:23 +02:00
|
|
|
#ifndef SANDBOXEDPROCESSOR_H
|
|
|
|
#define SANDBOXEDPROCESSOR_H
|
|
|
|
#include <QString>
|
2022-05-30 19:51:13 +02:00
|
|
|
#include <QMimeDatabase>
|
2023-05-14 14:14:51 +02:00
|
|
|
#include "documentprocessresult.h"
|
2022-06-24 17:10:43 +02:00
|
|
|
#include "savefileresult.h"
|
2021-08-07 18:38:23 +02:00
|
|
|
|
|
|
|
class SandboxedProcessor
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
QString filePath;
|
2022-05-30 19:51:13 +02:00
|
|
|
QMimeDatabase mimeDatabase;
|
2021-08-07 18:38:23 +02:00
|
|
|
|
|
|
|
void enableSandbox(QString readablePath = "");
|
2023-05-14 14:14:51 +02:00
|
|
|
void printResults(const DocumentProcessResult &pageData);
|
2021-08-07 18:38:23 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
SandboxedProcessor(QString filepath)
|
|
|
|
{
|
|
|
|
this->filePath = filepath;
|
|
|
|
}
|
|
|
|
|
2022-06-24 17:10:43 +02:00
|
|
|
SaveFileResult process();
|
2021-08-07 18:38:23 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SANDBOXEDPROCESSOR_H
|