using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.Net;

namespace skyscraper5.Dvb.DataBroadcasting.IntModel
{
    public class Platform
    {
        public uint PlatformId { get; }
        public byte ProcessingOrder { get; }
        public byte ActionType { get; }

        //0x0c Ip Mac Platform Name Descriptor
        public string NameLanguageCode { get; set; }
        public string Name { get; set; }

        //0x0d Ip Mac Platform Provider Name Descriptor
        public string ProviderNameLanguageCode { get; set; }
        public string ProviderName { get; set; }
        
        public Platform(byte actionType, uint platformId, byte processingOrder)
        {
            ActionType = actionType;
            PlatformId = platformId;
            ProcessingOrder = processingOrder;
        }

		public override bool Equals(object? obj)
		{
			return obj is Platform platform &&
				   PlatformId == platform.PlatformId;
		}

		public override int GetHashCode()
		{
			return HashCode.Combine(PlatformId);
		}
	}
}
