2014-04-17 19:58:14 +00:00
|
|
|
/***************************************************************************
|
|
|
|
|
FileSystem identifier and checker
|
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Filename : PartPlugin.cs
|
|
|
|
|
Version : 1.0
|
|
|
|
|
Author(s) : Natalia Portillo
|
|
|
|
|
|
|
|
|
|
Component : Partitioning scheme plugins
|
|
|
|
|
|
|
|
|
|
Revision : $Revision$
|
|
|
|
|
Last change by : $Author$
|
|
|
|
|
Date : $Date$
|
|
|
|
|
|
|
|
|
|
--[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Defines functions to be used by partitioning scheme plugins and several constants.
|
|
|
|
|
|
|
|
|
|
--[ License ] --------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
2014-04-19 18:23:00 +01:00
|
|
|
it under the terms of the GNU General Public License as
|
2014-04-17 19:58:14 +00:00
|
|
|
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
|
2014-04-19 18:23:00 +01:00
|
|
|
GNU General Public License for more details.
|
2014-04-17 19:58:14 +00:00
|
|
|
|
2014-04-19 18:23:00 +01:00
|
|
|
You should have received a copy of the GNU General Public License
|
2014-04-17 19:58:14 +00:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------------
|
|
|
|
|
Copyright (C) 2011-2014 Claunia.com
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
//$Id$
|
|
|
|
|
|
2011-03-03 18:34:33 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace FileSystemIDandChk.PartPlugins
|
|
|
|
|
{
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Abstract class to implement partitioning schemes interpreting plugins.
|
|
|
|
|
/// </summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public abstract class PartPlugin
|
|
|
|
|
{
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Plugin name.</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public string Name;
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Plugin UUID.</summary>
|
2011-03-03 18:34:33 +00:00
|
|
|
public Guid PluginUUID;
|
2014-04-14 01:14:20 +00:00
|
|
|
|
|
|
|
|
protected PartPlugin()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Interprets a partitioning scheme.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns><c>true</c>, if partitioning scheme is recognized, <c>false</c> otherwise.</returns>
|
|
|
|
|
/// <param name="imagePlugin">Disk image.</param>
|
|
|
|
|
/// <param name="partitions">Returns list of partitions.</param>
|
2014-04-14 01:14:20 +00:00
|
|
|
public abstract bool GetInformation(ImagePlugins.ImagePlugin imagePlugin, out List<Partition> partitions);
|
|
|
|
|
}
|
|
|
|
|
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Partition structure.
|
|
|
|
|
/// </summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public struct Partition
|
|
|
|
|
{
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Partition number, 0-started</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public ulong PartitionSequence;
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Partition type</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public string PartitionType;
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Partition name (if the scheme supports it)</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public string PartitionName;
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Start of the partition, in bytes</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public ulong PartitionStart;
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>LBA of partition start</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public ulong PartitionStartSector;
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Length in bytes of the partition</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public ulong PartitionLength;
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Length in sectors of the partition</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public ulong PartitionSectors;
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Information that does not find space in this struct</summary>
|
2014-04-14 01:14:20 +00:00
|
|
|
public string PartitionDescription;
|
|
|
|
|
}
|
2011-03-03 18:34:33 +00:00
|
|
|
}
|