using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IACommService4CSharp
{
    public abstract class IBrowseDeviceCallback_t : IBrowseDeviceCallback4CSharp
    {
        private Dictionary<uint, string[]> m_requestCache;
        public IBrowseDeviceCallback_t()
        {
            m_requestCache = new Dictionary<uint, string[]>();
        }
        ~IBrowseDeviceCallback_t()
        {
            m_requestCache.Clear();
        }
        //IBrowseDeviceCallback
        public override void OnBrowseDevices(IDataValue4CSharp device, uint status, bool bCompleted)
        {
            BrowsedDeviceInfo_t axDevice = new BrowsedDeviceInfo_t();

            if (status == ErrorCode.Good && !bCompleted)
            {
                axDevice = new BrowsedDeviceInfo_t(device);
            }

            OnBrowseDevices(axDevice, status, bCompleted);
        }
        public abstract void OnBrowseDevices(BrowsedDeviceInfo_t axDevice, uint status, bool bCompleted);

    }
}
