looqs/shared/sandboxedprocessor.h
Albert S aed0ca31f7 shared: SandboxedProcessor: Perform MIME-type detection
Detect mime types, and for text/*, run the default text processor.

The added benefit is that we can now add plaintext files without extensions,
or many other text files (e. g. source code).
2022-06-04 17:09:26 +02:00

26 lines
451 B
C++

#ifndef SANDBOXEDPROCESSOR_H
#define SANDBOXEDPROCESSOR_H
#include <QString>
#include <QMimeDatabase>
#include "pagedata.h"
class SandboxedProcessor
{
private:
QString filePath;
QMimeDatabase mimeDatabase;
void enableSandbox(QString readablePath = "");
void printResults(const QVector<PageData> &pageData);
public:
SandboxedProcessor(QString filepath)
{
this->filePath = filepath;
}
int process();
};
#endif // SANDBOXEDPROCESSOR_H