using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Dvb.DataBroadcasting.SkyscraperVfs;
using skyscraper5.Dvb.Descriptors;
using skyscraper5.Teletext;
using skyscraper8.DvbNip;
using skyscraper8.Experimentals.NdsSsu;
using skyscraper8.Ietf.FLUTE;
using skyscraper8.SimpleServiceDiscoveryProtocol;
using skyscraper8.Skyscraper.Drawing;

namespace skyscraper8.Skyscraper.Scraper.Storage
{
    public interface ObjectStorage : ISsdpCache
    {
        bool ObjectCarouselFileArrival(VfsFile vfsFile, int transportStreamId, int networkId);
        bool TestForObjectCarouselFileArrival(string vfsFile, int transportStreamId, int pid, int networkId);
        byte[] GetObjectCarouselFileArrival(string vfsFile, int transportStreamId, int pid, int networkId);

        void DataCarouselModuleArrival(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleModuleId, byte moduleModuleVersion, Stream result);
        bool IsDsmCcModuleWanted(int currentNetworkId, int currentTransportStreamId, int elementaryPid, ushort moduleId, byte moduleVersion);
        bool TestForFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber, int mappingStreamElementaryPid);
        void StoreFramegrab(int currentNetworkId, int transportStreamId, ushort mappingProgramNumber, ushort pid, byte[] imageData);
        void WaitForCompletion();
        void UiSetVersion(int version);
        object[] GetPluginConnector();

        void Ping();
        bool DvbNipTestForFile(string announcedFileContentLocation);
        void DvbNipFileArrival(NipActualCarrierInformation carrier, FluteListener listener);
        void StoreIqGraph(Guid jobGuid, long frequency, char polarity, IqChartData plot);
        void StoreRfSpectrum(Guid jobGuid, RfSpectrumData rfSpectrum);
        void DeleteIqGraph(Guid selectedGuid, int frequencyItem1, SatelliteDeliverySystemDescriptor.PolarizationEnum frequencyItem2);
        void DeleteRfSpectrum(Guid selectedGuid);

        RfSpectrumData GetRfSpectrum(Guid selectedGuid);
        bool OtvSsuTestFile(int? currentNetworkId, int? currentTransportStreamId, int sourcePid, ushort tableIdExtension, uint fileId, uint unknown1, uint length);
        void OnOtvSsuComplete(int? currentNetworkId, int? currentTransportStreamId, int sourcePid, Stream getStream, ushort tableIdExtension, uint fileId, uint unknown1, uint length);
        void OnNdsSsuComplete(int? currentNetworkId, int? currentTransportStreamId, int pid, ushort tableIdExtension, NdsSsuDataMap dataMap);
        bool NdsSsuTestFile(int? currentNetworkId, int? currentTransportStreamId, int pid, ushort tableIdExtension);
        bool TestForSisDsaci(int value1, int value2, ushort groupId, int versionNumber);
        void StoreSisDsaci(int value1, int value2, ushort currentDsaGroupId, int versionNumber, Stream dsaci);
		byte[] DvbNipGetFile(string path);
        bool TestForWneStory(uint sessionId, string filename);
        void StoreWneStory(uint sessionId, string filename, Stream value);
    }
}
