2015-06-04 01:29:22 +01:00
|
|
|
/*************************************************************************
|
|
|
|
* Copyright (C) 2008,2009 by Volker Lanz <vl@fidra.de> *
|
2017-12-24 23:24:23 +00:00
|
|
|
* Copyright (C) 2017 by Andrius Štikonas <andrius@stikonas.eu> *
|
2015-06-04 01:29:22 +01:00
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU General Public License as *
|
|
|
|
* published by the Free Software Foundation; either version 3 of *
|
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.*
|
|
|
|
*************************************************************************/
|
|
|
|
|
2018-04-16 09:32:29 +01:00
|
|
|
#ifndef KPMCORE_FAT16_H
|
2017-09-10 20:12:52 +01:00
|
|
|
#define KPMCORE_FAT16_H
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2017-12-24 23:24:23 +00:00
|
|
|
#include "fs/fat12.h"
|
2015-06-04 01:29:22 +01:00
|
|
|
|
|
|
|
class Report;
|
|
|
|
|
|
|
|
class QString;
|
|
|
|
|
|
|
|
namespace FS
|
|
|
|
{
|
2015-07-13 15:16:36 +01:00
|
|
|
/** A fat16 file system.
|
|
|
|
@author Volker Lanz <vl@fidra.de>
|
|
|
|
*/
|
2017-12-24 23:24:23 +00:00
|
|
|
class LIBKPMCORE_EXPORT fat16 : public fat12
|
2015-07-13 15:16:36 +01:00
|
|
|
{
|
|
|
|
public:
|
2017-12-24 23:24:23 +00:00
|
|
|
fat16(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label);
|
|
|
|
fat16(qint64 firstsector, qint64 lastsector, qint64 sectorsused, const QString& label, FileSystem::Type type);
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2015-07-13 15:16:36 +01:00
|
|
|
public:
|
2016-05-17 18:01:31 +01:00
|
|
|
void init() override;
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2016-09-05 12:10:56 +01:00
|
|
|
bool create(Report& report, const QString& deviceNode) override;
|
2017-11-09 23:14:52 +00:00
|
|
|
bool resize(Report& report, const QString& deviceNode, qint64 length) const override;
|
2015-06-04 01:29:22 +01:00
|
|
|
|
2018-04-16 09:32:29 +01:00
|
|
|
CommandSupportType supportGrow() const override {
|
|
|
|
return m_Grow;
|
|
|
|
}
|
|
|
|
CommandSupportType supportShrink() const override {
|
|
|
|
return m_Shrink;
|
|
|
|
}
|
|
|
|
|
2016-05-17 18:01:31 +01:00
|
|
|
qint64 minCapacity() const override;
|
|
|
|
qint64 maxCapacity() const override;
|
|
|
|
bool supportToolFound() const override;
|
2015-07-13 15:16:36 +01:00
|
|
|
};
|
2015-06-04 01:29:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|