mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
8f7cc0d20e
- some work done on ffsBuilder, still much to do - added more PE types - better names for utility.h functions
61 lines
2.0 KiB
C++
61 lines
2.0 KiB
C++
/* fssbuilder.h
|
|
|
|
Copyright (c) 2015, Nikolaj Schlej. All rights reserved.
|
|
This program and the accompanying materials
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
*/
|
|
|
|
#ifndef __FFSBUILDER_H__
|
|
#define __FFSBUILDER_H__
|
|
|
|
#include <QObject>
|
|
#include <QByteArray>
|
|
#include <QString>
|
|
#include <QModelIndex>
|
|
|
|
#include "../common/basetypes.h"
|
|
#include "../common/treemodel.h"
|
|
#include "../common/ffs.h"
|
|
#include "../common/utility.h"
|
|
|
|
class FfsBuilder : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit FfsBuilder(const TreeModel * treeModel, QObject *parent = 0);
|
|
~FfsBuilder();
|
|
|
|
QVector<QPair<QString, QModelIndex> > getMessages() const;
|
|
void clearMessages();
|
|
|
|
STATUS build(const QModelIndex & root, QByteArray & image);
|
|
|
|
private:
|
|
const TreeModel* model;
|
|
QVector<QPair<QString, QModelIndex> > messagesVector;
|
|
void msg(const QString & message, const QModelIndex &index = QModelIndex());
|
|
|
|
// UEFI standard structures
|
|
STATUS buildCapsule(const QModelIndex & index, QByteArray & capsule);
|
|
STATUS buildImage(const QModelIndex & index, QByteArray & intelImage);
|
|
STATUS buildRegion(const QModelIndex & index, QByteArray & region);
|
|
STATUS buildRawArea(const QModelIndex & index, QByteArray & rawArea);
|
|
STATUS buildVolume(const QModelIndex & index, QByteArray & volume);
|
|
STATUS buildPadding(const QModelIndex & index, QByteArray & padding);
|
|
STATUS buildNonUefiData(const QModelIndex & index, QByteArray & data);
|
|
STATUS buildFreeSpace(const QModelIndex & index, QByteArray & freeSpace);
|
|
STATUS buildPadFile(const QModelIndex & index, QByteArray & padFile);
|
|
STATUS buildFile(const QModelIndex & index, QByteArray & file);
|
|
STATUS buildSection(const QModelIndex & index, QByteArray & section);
|
|
|
|
};
|
|
|
|
#endif
|