Move struct FS and FS_Limits into FileSystem.h
Struct FS and struct FS_Limits are strongly related to the FileSystem class, both being return values from members and associated with storing file system attributes. Move their definitions from Utils.h into FileSystem.h.
This commit is contained in:
parent
175d27c55d
commit
a3b47ca14a
|
@ -18,7 +18,7 @@
|
|||
#ifndef GPARTED_DIALOGFEATURES_H
|
||||
#define GPARTED_DIALOGFEATURES_H
|
||||
|
||||
#include "Utils.h"
|
||||
#include "FileSystem.h"
|
||||
|
||||
#include <gtkmm/dialog.h>
|
||||
#include <gtkmm/frame.h>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#define GPARTED_DIALOG_BASE_PARTITION_H
|
||||
|
||||
#include "Frame_Resizer_Extended.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
#include "Utils.h"
|
||||
|
||||
#include <gtkmm/dialog.h>
|
||||
#include <gtkmm/stock.h>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#define GPARTED_DIALOG_PARTITION_COPY_H
|
||||
|
||||
#include "Dialog_Base_Partition.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
#include "Utils.h"
|
||||
|
||||
namespace GParted
|
||||
{
|
||||
|
|
|
@ -18,9 +18,9 @@
|
|||
#define GPARTED_DIALOG_PARTITION_RESIZE_MOVE_H
|
||||
|
||||
#include "Dialog_Base_Partition.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
#include "PartitionVector.h"
|
||||
#include "Utils.h"
|
||||
|
||||
namespace GParted
|
||||
{
|
||||
|
|
|
@ -31,6 +31,54 @@
|
|||
namespace GParted
|
||||
{
|
||||
|
||||
// Minimum and maximum file system size limits
|
||||
struct FS_Limits
|
||||
{
|
||||
Byte_Value min_size; // 0 => no limit, +ve => limit defined. (As implemented by)
|
||||
Byte_Value max_size; // -----------------"----------------- (code using these.)
|
||||
|
||||
FS_Limits() : min_size( 0 ) , max_size( 0 ) {};
|
||||
FS_Limits( Byte_Value min, Byte_Value max ) : min_size( min ), max_size( max ) {};
|
||||
};
|
||||
|
||||
// Struct to store file system support information
|
||||
struct FS
|
||||
{
|
||||
enum Support
|
||||
{
|
||||
NONE = 0,
|
||||
GPARTED = 1,
|
||||
LIBPARTED = 2,
|
||||
EXTERNAL = 3
|
||||
};
|
||||
|
||||
FSType filesystem;
|
||||
Support busy; // How to determine if partition/file system is busy
|
||||
Support read; // Can and how to read sector usage while inactive
|
||||
Support read_label;
|
||||
Support write_label;
|
||||
Support read_uuid;
|
||||
Support write_uuid;
|
||||
Support create;
|
||||
Support create_with_label; // Can and how to format file system with label
|
||||
Support grow;
|
||||
Support shrink;
|
||||
Support move; // start point and endpoint
|
||||
Support check; // Some check tool available?
|
||||
Support copy;
|
||||
Support remove;
|
||||
Support online_read; // Can and how to read sector usage while active
|
||||
Support online_grow;
|
||||
Support online_shrink;
|
||||
|
||||
FS( FSType fstype = FS_UNKNOWN ) : filesystem( fstype )
|
||||
{
|
||||
busy = read = read_label = write_label = read_uuid = write_uuid = create =
|
||||
create_with_label = grow = shrink = move = check = copy = remove = online_read =
|
||||
online_grow = online_shrink = NONE;
|
||||
}
|
||||
};
|
||||
|
||||
enum ExecFlags
|
||||
{
|
||||
EXEC_NONE = 1 << 0,
|
||||
|
|
|
@ -123,55 +123,6 @@ enum CUSTOM_TEXT
|
|||
CTEXT_RESIZE_DISALLOWED_WARNING // File system resizing currently disallowed reason
|
||||
} ;
|
||||
|
||||
// Minimum and maximum file system size limits
|
||||
struct FS_Limits
|
||||
{
|
||||
Byte_Value min_size; // 0 => no limit, +ve => limit defined. (As implemented by)
|
||||
Byte_Value max_size; // -----------------"----------------- (code using these.)
|
||||
|
||||
FS_Limits() : min_size( 0 ) , max_size( 0 ) {};
|
||||
FS_Limits( Byte_Value min, Byte_Value max ) : min_size( min ), max_size( max ) {};
|
||||
};
|
||||
|
||||
//struct to store file system information
|
||||
struct FS
|
||||
{
|
||||
enum Support
|
||||
{
|
||||
NONE = 0,
|
||||
GPARTED = 1,
|
||||
LIBPARTED = 2,
|
||||
EXTERNAL = 3
|
||||
};
|
||||
|
||||
FSType filesystem;
|
||||
Support busy ; //How to determine if partition/file system is busy
|
||||
Support read ; //Can and how to read sector usage while inactive
|
||||
Support read_label ;
|
||||
Support write_label ;
|
||||
Support read_uuid ;
|
||||
Support write_uuid ;
|
||||
Support create ;
|
||||
Support create_with_label ; //Can and how to format file system with label
|
||||
Support grow ;
|
||||
Support shrink ;
|
||||
Support move ; //startpoint and endpoint
|
||||
Support check ; //some checktool available?
|
||||
Support copy ;
|
||||
Support remove ;
|
||||
Support online_read ; //Can and how to read sector usage while active
|
||||
Support online_grow ;
|
||||
Support online_shrink ;
|
||||
|
||||
FS( FSType fstype = FS_UNKNOWN ) : filesystem( fstype )
|
||||
{
|
||||
busy = read = read_label = write_label = read_uuid = write_uuid = create =
|
||||
create_with_label = grow = shrink = move = check = copy = remove = online_read =
|
||||
online_grow = online_shrink = NONE ;
|
||||
}
|
||||
} ;
|
||||
|
||||
|
||||
class Utils
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "DialogFeatures.h"
|
||||
#include "FileSystem.h"
|
||||
#include "GParted_Core.h"
|
||||
|
||||
#include <gtkmm/stock.h>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "Dialog_Partition_Copy.h"
|
||||
#include "FileSystem.h"
|
||||
#include "GParted_Core.h"
|
||||
#include "Partition.h"
|
||||
#include "Utils.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "Dialog_Partition_New.h"
|
||||
#include "FileSystem.h"
|
||||
#include "GParted_Core.h"
|
||||
#include "Partition.h"
|
||||
#include "Utils.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "Dialog_Partition_Resize_Move.h"
|
||||
#include "FileSystem.h"
|
||||
#include "GParted_Core.h"
|
||||
#include "Partition.h"
|
||||
#include "PartitionVector.h"
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "btrfs.h"
|
||||
#include "BlockSpecial.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Mount_Info.h"
|
||||
#include "Partition.h"
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "exfat.h"
|
||||
#include "FileSystem.h"
|
||||
|
||||
namespace GParted
|
||||
{
|
||||
|
@ -32,4 +33,3 @@ FS exfat::get_filesystem_support()
|
|||
}
|
||||
|
||||
} //GParted
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "ext2.h"
|
||||
#include "FileSystem.h"
|
||||
#include "OperationDetail.h"
|
||||
#include "Partition.h"
|
||||
#include "Utils.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "f2fs.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
namespace GParted
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "fat16.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
/*****
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "hfs.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
namespace GParted
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "hfsplus.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
namespace GParted
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "jfs.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
namespace GParted
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "linux_swap.h"
|
||||
#include "BlockSpecial.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
#include <cerrno>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "FileSystem.h"
|
||||
#include "LUKS_Info.h"
|
||||
#include "Utils.h"
|
||||
#include "luks.h"
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "FileSystem.h"
|
||||
#include "LVM2_PV_Info.h"
|
||||
#include "lvm2_pv.h"
|
||||
#include "Partition.h"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "nilfs2.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
namespace GParted
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "ntfs.h"
|
||||
#include "FileSystem.h"
|
||||
#include "OperationDetail.h"
|
||||
#include "Partition.h"
|
||||
#include "Utils.h"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "reiser4.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
namespace GParted
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "reiserfs.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
|
||||
namespace GParted
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "udf.h"
|
||||
#include "FileSystem.h"
|
||||
#include "Partition.h"
|
||||
#include "Utils.h"
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "ufs.h"
|
||||
#include "FileSystem.h"
|
||||
|
||||
namespace GParted
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "xfs.h"
|
||||
#include "FileSystem.h"
|
||||
#include "OperationDetail.h"
|
||||
#include "Partition.h"
|
||||
#include "Utils.h"
|
||||
|
|
Loading…
Reference in New Issue