/*
* 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;
using System.Xml.Serialization;
using DCSharp.Backend.Connections;
namespace DCSharp.Backend.Objects{
public class FavoriteHubEventArgs : EventArgs
{
public FavoriteHubEventArgs(FavoriteHubInfo hubInfo)
{
this.hubInfo = hubInfo;
}
public FavoriteHubInfo FavoriteHubInfo
{
get { return hubInfo; }
}
private FavoriteHubInfo hubInfo;
}
public class FavoriteHubInfo
{
public FavoriteHubInfo(string name, string hostname) : this()
{
this.name = name;
this.hostname = hostname;
}
public FavoriteHubInfo()
{
autoConnect = true;
}
#region Properties
[XmlAttribute("Connect")]
public bool AutoConnect
{
get { return autoConnect; }
set { autoConnect = value; }
}
private bool autoConnect;
#region Hub details
[XmlAttribute]
public string Name
{
get { return name; }
set { name = value; }
}
private string name;
[XmlAttribute]
public string Description
{
get { return description; }
set { description = value; }
}
private string description;
[XmlAttribute("Server")]
public string Hostname
{
get { return hostname; }
set { hostname = value; }
}
private string hostname;
#endregion
#region User details
[XmlAttribute]
public string Nick
{
get { return nick; }
set { nick = value; }
}
private string nick;
// TODO: Password encryption.
[XmlAttribute]
public string Password
{
get { return password; }
set { password = value; }
}
private string password;
public string UserDescription
{
get { return userDescription; }
set { userDescription = value; }
}
private string userDescription;
#endregion
#endregion
}
}
|