using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NetSDKCS;

namespace NetClient
{
    public class DeviceEventArgs : EventArgs
    {
        public IntPtr LoginID { get; private set; }
        public string IP { get; private set; }
        public ushort Port { get; private set; }
        public IntPtr UserData { get; private set; }

        public DeviceEventArgs(IntPtr loginID, string ip, ushort port, IntPtr data)
        {
            LoginID = loginID;
            IP = ip;
            Port = port;
            UserData = data;
        }
    }

    public class RealDataEventArgs : EventArgs
    {
        public IntPtr RealPlayHandle { get; private set; }
        public uint DataType { get; private set; }
        public byte[] Buffer { get; private set; }
        public int Param { get; private set; }
        public IntPtr LoginID { get; private set; }

        public RealDataEventArgs(IntPtr _RealPlayHandle, uint _DataType, byte[] _Buffer, int _Param, IntPtr _LoginID)
        {
            RealPlayHandle = _RealPlayHandle;
            DataType = _DataType;
            Buffer = _Buffer;
            Param = _Param;
            LoginID = _LoginID;
        }
    }

    public class RealDisConnectEventArgs : EventArgs
    {
        public IntPtr RealPlayHandle { get; private set; }
        public EM_REALPLAY_DISCONNECT_TYPE EventType { get; private set; }
        public IntPtr Param { get; private set; }
        public IntPtr LoginID { get; private set; }

        public RealDisConnectEventArgs(IntPtr _RealPlayHandle, EM_REALPLAY_DISCONNECT_TYPE _EventType, IntPtr _Param, IntPtr _LoginID)
        {
            RealPlayHandle = _RealPlayHandle;
            EventType = _EventType;
            Param = _Param;
            LoginID = _LoginID;
        }
    }

    public class AlarmEventArgs : EventArgs
    {
        public EM_ALARM_TYPE AlarmType { get; private set; }
        public object AlarmInfo { get; private set; }
        public bool AlarmAckFlag { get; private set; }
        public int AlarmEventID { get; private set; }

        public AlarmEventArgs(EM_ALARM_TYPE _AlarmType, object _AlarmInfo, bool _AlarmAckFlag, int _AlarmEventID)
        {
            AlarmType = _AlarmType;
            AlarmInfo = _AlarmInfo;
            AlarmAckFlag = _AlarmAckFlag;
            AlarmEventID = _AlarmEventID;
        }
    }

    public class IVSEventArgs : EventArgs
    {
        public EM_EVENT_IVS_TYPE EventType { get; private set; }
        public IntPtr LoginID { get; private set; }
        public IntPtr Handle { get; private set; }
        public object EventInfo { get; private set; }
        public byte[] EventPicInfo { get; private set; }
        public int EventSequence { get; private set; }

        public IVSEventArgs(IntPtr _LoginID, IntPtr _Handle, EM_EVENT_IVS_TYPE _EventType, object _EventInfo, byte[] _EventPicInfo, int _EventSequence)
        {
            LoginID = _LoginID;
            Handle = _Handle;
            EventType = _EventType;
            EventInfo = _EventInfo;
            EventPicInfo = _EventPicInfo;
            EventSequence = _EventSequence;
        }
    }

    public class DownloadEventArgs : EventArgs
    {
        public IntPtr FileHandle { get; private set; }
        public uint TotalSize { get; private set; }
        public uint DownloadSize { get; private set; }
        public bool IsFailed { get; private set; }
        public DownloadEventArgs(IntPtr _FileHandle, uint _TotalSize, uint _DownloadSize, bool _IsFailed)
        {
            FileHandle = _FileHandle;
            TotalSize = _TotalSize;
            DownloadSize = _DownloadSize;
            IsFailed = _IsFailed;
        }
    }

    public class PlayBackDataEventArgs : EventArgs
    {
        public IntPtr PlayBackHandle { get; private set; }
        public byte[] Data { get; private set; }
        public PlayBackDataEventArgs(IntPtr _PlayBackHandle, byte[] _Data)
        {
            PlayBackHandle = _PlayBackHandle;
            Data = _Data;
        }
    }

}
