2016-07-07 13:57:45 +08:00
|
|
|
/* uefidump.h
|
|
|
|
|
2018-09-01 13:17:17 +08:00
|
|
|
Copyright (c) 2018, LongSoft. All rights reserved.
|
2016-07-07 13:57:45 +08:00
|
|
|
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 UEFIDUMP_H
|
|
|
|
#define UEFIDUMP_H
|
|
|
|
|
|
|
|
#include "../common/basetypes.h"
|
|
|
|
#include "../common/ustring.h"
|
|
|
|
#include "../common/treemodel.h"
|
|
|
|
#include "../common/ffsparser.h"
|
|
|
|
#include "../common/ffsreport.h"
|
|
|
|
|
|
|
|
class UEFIDumper
|
|
|
|
{
|
|
|
|
public:
|
2016-07-16 09:48:21 +08:00
|
|
|
explicit UEFIDumper() : model(), ffsParser(&model), ffsReport(&model), currentBuffer(), initialized(false), dumped(false) {}
|
2016-07-07 13:57:45 +08:00
|
|
|
~UEFIDumper() {}
|
|
|
|
|
2016-07-09 14:31:08 +08:00
|
|
|
USTATUS dump(const UByteArray & buffer, const UString & path, const UString & guid = UString());
|
2016-07-07 13:57:45 +08:00
|
|
|
|
|
|
|
private:
|
2016-07-09 14:31:08 +08:00
|
|
|
USTATUS recursiveDump(const UModelIndex & root);
|
2016-07-07 13:57:45 +08:00
|
|
|
|
|
|
|
TreeModel model;
|
|
|
|
FfsParser ffsParser;
|
|
|
|
FfsReport ffsReport;
|
|
|
|
|
|
|
|
UByteArray currentBuffer;
|
|
|
|
bool initialized;
|
|
|
|
bool dumped;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|