gparted/include/PartitionLUKS.h
Mike Fleetwood 38a790d745 Display the label of encrypted file systems (#760080)
LUKS headers don't provide any concept of label.  Also there is already
the method Partition::get_filesystem_label() for getting the *file
system* label, so virtualise it and provide an appropriate
implementation to get the label of an encrypted file system represented
within a derived PartitionLUKS object.  This causes the label to be
displayed correctly in the main window.

It also happens to display the encrypted file system label in the
Information dialog for a LUKS formatted partition.  However the whole
Information dialog will be addressed differently in a following commit.

Bug 760080 - Implement read-only LUKS support
2016-01-29 13:41:41 -07:00

46 lines
1.2 KiB
C++

/* Copyright (C) 2015 Mike Fleetwood
*
* 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 2 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/>.
*/
#ifndef GPARTED_PARTITIONLUKS_H
#define GPARTED_PARTITIONLUKS_H
#include "../include/Partition.h"
#include "../include/Utils.h"
namespace GParted
{
class PartitionLUKS : public Partition
{
public:
PartitionLUKS();
virtual ~PartitionLUKS();
virtual PartitionLUKS * clone() const;
Partition & get_encrypted() { return encrypted; };
const Partition & get_encrypted() const { return encrypted; };
virtual Glib::ustring get_filesystem_label() const;
private:
Partition encrypted;
};
}//GParted
#endif /* GPARTED_PARTITIONLUKS_H */