2017-06-03 01:10:46 +01:00
|
|
|
|
// /***************************************************************************
|
|
|
|
|
|
// The Disc Image Chef
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
|
|
|
|
// Filename : SscTestedMedia.cs
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
2017-06-03 01:10:46 +01:00
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Component : DiscImageChef Server.
|
2017-06-03 01:10:46 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ Description ] ----------------------------------------------------------
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Decodes SCSI Streaming media tests from reports.
|
2017-06-03 01:10:46 +01:00
|
|
|
|
//
|
|
|
|
|
|
// --[ License ] --------------------------------------------------------------
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// 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
|
2017-06-03 01:10:46 +01:00
|
|
|
|
// License, or (at your option) any later version.
|
|
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// 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.
|
2017-06-03 01:10:46 +01:00
|
|
|
|
//
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// 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-06-03 01:10:46 +01:00
|
|
|
|
//
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
2017-12-19 03:50:57 +00:00
|
|
|
|
// Copyright © 2011-2018 Natalia Portillo
|
2017-06-03 01:10:46 +01:00
|
|
|
|
// ****************************************************************************/
|
2017-12-19 03:50:57 +00:00
|
|
|
|
|
2017-06-03 01:19:47 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using DiscImageChef.Metadata;
|
|
|
|
|
|
|
2017-06-03 01:10:46 +01:00
|
|
|
|
namespace DiscImageChef.Server.App_Start
|
|
|
|
|
|
{
|
2017-06-03 01:19:47 +01:00
|
|
|
|
public static class SscTestedMedia
|
2017-06-03 01:10:46 +01:00
|
|
|
|
{
|
2017-06-03 01:19:47 +01:00
|
|
|
|
public static void Report(SequentialMedia[] testedMedia, ref List<string> mediaOneValue)
|
2017-06-03 01:10:46 +01:00
|
|
|
|
{
|
2017-06-03 01:19:47 +01:00
|
|
|
|
foreach(SequentialMedia media in testedMedia)
|
|
|
|
|
|
{
|
|
|
|
|
|
if(!string.IsNullOrWhiteSpace(media.MediumTypeName))
|
|
|
|
|
|
{
|
2017-12-21 17:58:51 +00:00
|
|
|
|
mediaOneValue.Add($"<i>Information for medium named \"{media.MediumTypeName}\"</i>");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(media.MediumTypeSpecified)
|
2017-12-21 17:58:51 +00:00
|
|
|
|
mediaOneValue.Add($"Medium type code: {media.MediumType:X2}h");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
}
|
|
|
|
|
|
else if(media.MediumTypeSpecified)
|
2017-12-21 17:58:51 +00:00
|
|
|
|
mediaOneValue.Add($"<i>Information for medium type {media.MediumType:X2}h</i>");
|
2017-12-19 20:33:03 +00:00
|
|
|
|
else mediaOneValue.Add("<i>Information for unknown medium type</i>");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(!string.IsNullOrWhiteSpace(media.Manufacturer))
|
2017-12-21 17:58:51 +00:00
|
|
|
|
mediaOneValue.Add($"Medium manufactured by: {media.Manufacturer}");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
if(!string.IsNullOrWhiteSpace(media.Model))
|
2017-12-21 17:58:51 +00:00
|
|
|
|
mediaOneValue.Add($"Medium model: {media.Model}");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
if(media.DensitySpecified)
|
2017-12-21 17:58:51 +00:00
|
|
|
|
mediaOneValue.Add($"Medium has density code {media.Density:X2}h");
|
2017-12-19 20:33:03 +00:00
|
|
|
|
if(media.CanReadMediaSerial) mediaOneValue.Add("Drive can read medium serial number.");
|
|
|
|
|
|
if(media.MediaIsRecognized) mediaOneValue.Add("DiscImageChef recognizes this medium.");
|
2017-06-03 01:19:47 +01:00
|
|
|
|
|
|
|
|
|
|
mediaOneValue.Add("");
|
|
|
|
|
|
}
|
2017-06-03 01:10:46 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2017-12-19 20:33:03 +00:00
|
|
|
|
}
|