calamares/src/modules/partition/core/PartitionActions.h

73 lines
2.5 KiB
C
Raw Normal View History

/* === This file is part of Calamares - <https://github.com/calamares> ===
2014-09-04 19:37:30 +02:00
*
* Copyright 2014-2016, Teo Mrnjavac <teo@kde.org>
2014-09-04 19:37:30 +02:00
*
* Calamares 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.
*
* Calamares 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 Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PARTITIONACTIONS_H
#define PARTITIONACTIONS_H
2014-09-04 19:37:30 +02:00
#include <QString>
2014-09-04 19:37:30 +02:00
class PartitionCoreModule;
class Device;
class Partition;
2014-09-04 19:37:30 +02:00
namespace PartitionActions
2014-09-04 19:37:30 +02:00
{
2017-03-03 12:31:39 +01:00
/**
* @brief doAutopartition sets up an autopartitioning operation on the given Device.
* @param core a pointer to the PartitionCoreModule instance.
* @param dev the device to wipe.
* @param luksPassphrase the passphrase for LUKS encryption (optional, default is empty).
*/
void doAutopartition( PartitionCoreModule* core,
Device* dev,
const QString& luksPassphrase = QString() );
2017-03-03 12:31:39 +01:00
/**
* @brief doReplacePartition sets up replace-partitioning with the given partition.
* @param core a pointer to the PartitionCoreModule instance.
* @param dev a pointer to the Device on which to replace a partition.
* @param partition a pointer to the Partition to be replaced.
* @param luksPassphrase the passphrase for LUKS encryption (optional, default is empty).
* @note this function also takes care of requesting PCM to delete the partition.
*/
void doReplacePartition( PartitionCoreModule* core,
Device* dev,
Partition* partition,
const QString& luksPassphrase = QString() );
/** @brief Namespace for enums
*
* This namespace houses non-class enums.....
*/
namespace Choices
{
/** @brief Ccchoice of swap (size and type) */
enum SwapChoice
{
NoSwap, // don't create any swap, don't use any
ReuseSwap, // don't create, but do use existing
SmallSwap, // up to 8GiB of swap
FullSwap, // ensureSuspendToDisk -- at least RAM size
SwapFile // use a file (if supported)
};
} // namespace Choices
} // namespace PartitionActions
2014-09-04 19:37:30 +02:00
#endif // PARTITIONACTIONS_H