/*
* Copyright (C) 2007 Eskil Bylund
*
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
namespace DCSharp.Hashing{
public partial class HashStore
{
/// <summary>
/// A class to hold HashTree metadata.
/// </summary>
protected class HashInfo
{
public HashInfo(long index, long blockSize, long size, string root)
: this()
{
this.index = index;
this.blockSize = blockSize;
this.size = size;
this.root = root;
}
public HashInfo()
{
type = "TTH";
}
#region Properties
private string type;
public string Type
{
get
{
return type;
}
set
{
type = value;
}
}
private long index;
public long Index
{
get
{
return index;
}
set
{
index = value;
}
}
private long blockSize;
public long BlockSize
{
get
{
return blockSize;
}
set
{
blockSize = value;
}
}
private long size;
public long Size
{
get
{
return size;
}
set
{
size = value;
}
}
private string root;
public string Root
{
get
{
return root;
}
set
{
root = value;
}
}
#endregion
}
}
}
|