//
// IPacketProvider.cs
//
// Copyright (c) František Boháček. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Threading.Tasks;
using DynamicData;
using PacketLogger.Models.Filters;
using Remora.Results;
namespace PacketLogger.Models.Packets;
///
/// Provides packets from some kind of a source.
///
public interface IPacketProvider : INotifyPropertyChanged
{
///
/// Gets whether was called and successfully finished.
///
public bool IsOpen { get; }
///
/// Gets the filtered packets from this provider.
///
public SourceList Packets { get; }
///
/// Open the provider/connection, load etc.
///
/// A result that may or may not have succeeded.
public Task Open();
///
/// Close the connection, dispose.
///
/// A result that may or may not have succeeded.
public Task Close();
///
/// Clear all packets.
///
public void Clear();
}