// /** // * File: HotspotNetwork.cs // * Author: haraldwolff // * // * This file and it's content is copyrighted by the Author and / or copyright holder. // * Any use wihtout proper permission is illegal and may lead to legal actions. // * // * // **/ using System; using ln.types.odb.attributes; using ln.types.net; using System.Text; namespace skyspot.hotspot { public class HotspotNetwork : IComparable { [DocumentID] public readonly Guid ID = Guid.NewGuid(); public string Name { get; set; } public string Description { get; set; } public string SID { get; set; } public Network4 ClientsNetwork { get; set; } public IPv4 Gateway { get; set; } public byte[] RadiusSecret { get; set; } public string RadiusTextSecret { get => Encoding.UTF8.GetString(RadiusSecret); set => RadiusSecret = Encoding.UTF8.GetBytes(value); } public TimeSpan ClientDefaultSessionTime { get; set; } public ClientProfile DefaultClientProfile { get; set; } public HotspotNetwork() { } public int CompareTo(object obj) { if (obj is HotspotNetwork) { HotspotNetwork you = obj as HotspotNetwork; return string.Compare(Name, you.Name, StringComparison.Ordinal); } return -1; } } }