2016-07-28 18:13:49 +01:00
|
|
|
// /***************************************************************************
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
//
|
2017-12-26 06:05:12 +00:00
|
|
|
// Filename : IPartition.cs
|
2016-07-28 18:13:49 +01:00
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
|
|
|
|
//
|
|
|
|
|
// Component : Partitioning scheme plugins.
|
|
|
|
|
//
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// Defines methods to be used by partitioning scheme plugins and several
|
|
|
|
|
// constants.
|
|
|
|
|
//
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
//
|
|
|
|
|
// This library is free software; you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Lesser General Public License as
|
|
|
|
|
// published by the Free Software Foundation; either version 2.1 of the
|
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This library 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
|
|
|
|
|
// Lesser General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
// License along with this library; if not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
//
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2017-12-19 03:50:57 +00:00
|
|
|
// Copyright © 2011-2018 Natalia Portillo
|
2016-07-28 18:13:49 +01:00
|
|
|
// ****************************************************************************/
|
2014-04-17 19:58:14 +00:00
|
|
|
|
2011-03-03 18:34:33 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2017-12-21 14:30:38 +00:00
|
|
|
using DiscImageChef.CommonTypes;
|
2018-06-25 19:08:16 +01:00
|
|
|
using DiscImageChef.CommonTypes.Interfaces;
|
2011-03-03 18:34:33 +00:00
|
|
|
|
2017-12-20 17:15:26 +00:00
|
|
|
namespace DiscImageChef.Partitions
|
2011-03-03 18:34:33 +00:00
|
|
|
{
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>
|
2017-12-24 03:11:33 +00:00
|
|
|
/// Abstract class to implement partitioning schemes interpreting plugins.
|
2014-06-07 05:57:17 +01:00
|
|
|
/// </summary>
|
2017-12-26 06:05:12 +00:00
|
|
|
public interface IPartition
|
2014-04-14 01:14:20 +00:00
|
|
|
{
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Plugin name.</summary>
|
2017-12-26 06:05:12 +00:00
|
|
|
string Name { get; }
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>Plugin UUID.</summary>
|
2017-12-26 06:05:12 +00:00
|
|
|
Guid Id { get; }
|
2014-04-14 01:14:20 +00:00
|
|
|
|
2014-06-07 05:57:17 +01:00
|
|
|
/// <summary>
|
2017-12-24 03:11:33 +00:00
|
|
|
/// Interprets a partitioning scheme.
|
2014-06-07 05:57:17 +01:00
|
|
|
/// </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>
|
2017-07-24 23:35:33 +01:00
|
|
|
/// <param name="sectorOffset">At which sector to start searching for the partition scheme.</param>
|
2017-12-26 06:05:12 +00:00
|
|
|
bool GetInformation(IMediaImage imagePlugin, out List<Partition> partitions, ulong sectorOffset);
|
2014-04-14 01:14:20 +00:00
|
|
|
}
|
2011-03-03 18:34:33 +00:00
|
|
|
}
|