change_code/src/metadataupdate/metadataprocessor.h

33 lines
847 B
C++

#ifndef METADATAPROCESSOR_H
#define METADATAPROCESSOR_H
#include <QObject>
#include <QString>
#include <QMap>
#include <QJsonDocument>
#include <QJsonObject>
struct InterfaceInfo;
class MetadataProcessor : public QObject
{
Q_OBJECT
public:
explicit MetadataProcessor(QObject *parent = nullptr);
bool processUf2Interfaces(const QString& basePath);
bool processUft3Interfaces(const QString& basePath);
QString getBasePath() const;
void setBasePath(const QString& path);
private:
bool isValidUtf8(const QByteArray& data);
QString readConfig(const QString& section, const QString& key, const QString& basePath);
bool writeJson(const QString& filePath, const QJsonObject& jsonObject);
QJsonObject readJson(const QString& filePath);
QString m_basePath;
};
#endif // METADATAPROCESSOR_H