2015-04-02 16:04:37 +08:00
|
|
|
/* ffsdumper.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 FFSDUMPER_H
|
|
|
|
#define FFSDUMPER_H
|
2015-04-02 16:04:37 +08:00
|
|
|
|
|
|
|
|
2016-06-26 11:54:21 +08:00
|
|
|
#include <QDir>
|
|
|
|
#include "../common/ubytearray.h"
|
|
|
|
#include "../common/ustring.h"
|
|
|
|
#include "../common/umodelindex.h"
|
2015-04-04 21:22:52 +08:00
|
|
|
#include "../common/basetypes.h"
|
|
|
|
#include "../common/treemodel.h"
|
2015-05-17 17:45:32 +08:00
|
|
|
#include "../common/ffs.h"
|
2015-04-02 16:04:37 +08:00
|
|
|
|
2016-03-01 16:12:37 +08:00
|
|
|
class FfsDumper
|
2015-04-02 16:04:37 +08:00
|
|
|
{
|
|
|
|
public:
|
2016-03-01 16:12:37 +08:00
|
|
|
explicit FfsDumper(TreeModel * treeModel);
|
2015-04-02 16:04:37 +08:00
|
|
|
~FfsDumper();
|
2015-05-17 17:45:32 +08:00
|
|
|
|
2016-06-26 11:54:21 +08:00
|
|
|
USTATUS dump(const UModelIndex & root, const UString & path, const bool dumpAll = false, const UString & guid = UString());
|
2015-05-17 17:45:32 +08:00
|
|
|
|
2015-04-02 16:04:37 +08:00
|
|
|
private:
|
2016-06-26 11:54:21 +08:00
|
|
|
USTATUS recursiveDump(const UModelIndex & root, const UString & path, const bool dumpAll, const UString & guid);
|
2015-04-02 16:04:37 +08:00
|
|
|
TreeModel* model;
|
|
|
|
bool dumped;
|
|
|
|
};
|
|
|
|
|
2016-04-09 18:47:19 +08:00
|
|
|
#endif // FFSDUMPER_H
|