/*
* Copyright (C) 2004-2005 Jonathan Bindel
* Copyright (C) 2006 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
using System;
namespace DCSharp.Backend.Objects{
public class SearchResultEventArgs : EventArgs
{
public SearchResultEventArgs(SearchResult result)
{
this.result = result;
}
private SearchResult result;
public SearchResult Result
{
get
{
return result;
}
}
}
public enum ResultType
{
Directory,
File
}
public class SearchResult
{
public SearchResult(ResultType type, string path) : this(type, path, 0,
null)
{
}
public SearchResult(ResultType type, string path, long size, string tth)
{
this.type = type;
this.path = path;
this.size = size;
this.tth = tth;
}
public SearchResult()
{
}
#region Properties
private ResultType type;
public ResultType Type
{
get
{
return type;
}
internal set
{
type = value;
}
}
private string path;
public string Path
{
get
{
return path;
}
internal set
{
path = value;
}
}
private Identity user;
public Identity User
{
get
{
return user;
}
internal set
{
user = value;
}
}
private long size;
public long Size
{
get
{
return size;
}
internal set
{
size = value;
}
}
private int freeSlots;
public int FreeSlots
{
get
{
return freeSlots;
}
internal set
{
freeSlots = value;
}
}
private int slots;
public int Slots
{
get
{
return slots;
}
internal set
{
slots = value;
}
}
private string tth;
public string TTH
{
get
{
return tth;
}
internal set
{
tth = value;
}
}
#endregion
}
}
|