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
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QDir>
|
|
|
|
#include <QByteArray>
|
|
|
|
#include <QString>
|
|
|
|
#include <QModelIndex>
|
|
|
|
|
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
|
|
|
|
|
|
|
STATUS dump(const QModelIndex & root, const QString & path, const QString & guid = QString());
|
|
|
|
|
2015-04-02 16:04:37 +08:00
|
|
|
private:
|
2015-05-17 17:45:32 +08:00
|
|
|
STATUS recursiveDump(const QModelIndex & root, const QString & path, const QString & guid);
|
2015-04-02 16:04:37 +08:00
|
|
|
TreeModel* model;
|
|
|
|
bool dumped;
|
|
|
|
};
|
|
|
|
|
2016-04-09 18:47:19 +08:00
|
|
|
#endif // FFSDUMPER_H
|