2015-09-13 20:15:26 +08:00
|
|
|
/* uefifind.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.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2016-04-09 18:47:19 +08:00
|
|
|
#ifndef UEFIFIND_H
|
|
|
|
#define UEFIFIND_H
|
2015-09-13 20:15:26 +08:00
|
|
|
|
2016-11-03 03:40:38 +08:00
|
|
|
#include <iterator>
|
2016-03-01 16:12:37 +08:00
|
|
|
#include <set>
|
|
|
|
|
2015-09-13 20:15:26 +08:00
|
|
|
#include <QObject>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QString>
|
|
|
|
#include <QDir>
|
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QString>
|
|
|
|
#include <QUuid>
|
|
|
|
|
|
|
|
#include "../common/basetypes.h"
|
|
|
|
#include "../common/ffsparser.h"
|
|
|
|
#include "../common/ffs.h"
|
|
|
|
|
2016-03-01 16:12:37 +08:00
|
|
|
class UEFIFind
|
2015-09-13 20:15:26 +08:00
|
|
|
{
|
|
|
|
public:
|
2016-03-01 16:12:37 +08:00
|
|
|
explicit UEFIFind();
|
2015-09-13 20:15:26 +08:00
|
|
|
~UEFIFind();
|
|
|
|
|
2016-07-09 16:01:41 +08:00
|
|
|
USTATUS init(const QString & path);
|
|
|
|
USTATUS find(const UINT8 mode, const bool count, const QString & hexPattern, QString & result);
|
2015-09-13 20:15:26 +08:00
|
|
|
|
|
|
|
private:
|
2018-07-13 05:31:46 +08:00
|
|
|
USTATUS findFileRecursive(const UModelIndex index, const QString & hexPattern, const UINT8 mode, std::set<std::pair<UModelIndex, UModelIndex> > & files);
|
2015-09-13 20:15:26 +08:00
|
|
|
QString guidToQString(const UINT8* guid);
|
|
|
|
|
|
|
|
FfsParser* ffsParser;
|
|
|
|
TreeModel* model;
|
|
|
|
QFileInfo fileInfo;
|
|
|
|
bool initDone;
|
|
|
|
};
|
|
|
|
|
2016-04-09 18:47:19 +08:00
|
|
|
#endif // UEFIFIND_H
|