#ifndef FPGAFLASHXML_H
#define FPGAFLASHXML_H

#include <QString>

QString md5hash (const QString &fileName);
bool checkMD5 (const QString &fileName, const QString &MD5);

class fpagFlashXmlClass
{
private:
    QString fPrimary;
    QString fSecondary;
    QString fPrimaryMD5;
    QString fSecondaryMD5;
    QString targetFlash;
    QString xmlFile;
    unsigned int area;      // 0 for golden, 1 for user
public:
    fpagFlashXmlClass();
    ~fpagFlashXmlClass();

    void setPrimary(QString _new);
    void setSecondary(QString _new);
    void setTarget(QString _target);
    void setArea(unsigned int _area);
    void setXmlFile(QString _new);

    QString getPrimaryFile();
    QString getPrimaryMD5();
    QString getSecondaryFile();
    QString getSecondaryMD5();
    unsigned int getArea();

    QString getTarget();

    bool writeXML();
    bool readXML();
};

#endif // FPGAFLASHXML_H
