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

namespace CSharpSIPPhone
{
    public class MyGTAPIEnv : GTAPIASM.GTAPIEnv
    {
        public PhoneForm mainForm;

        public override void On_RecvConnected(int ch)
        {
            base.On_RecvConnected(ch);
            mainForm.On_RecvConnected(ch);
        }

        public override void On_RecvOfferedEx(int ch, string sCaller, string sCallee, string sDestAddr, string sViaAddr, string sFromIP, ushort nFromPort, string sOrgSIPTxt, string sReserved1, string sReserved2, string sReserved3)
        {
            base.On_RecvOfferedEx(ch, sCaller, sCallee, sDestAddr, sViaAddr, sFromIP, nFromPort, sOrgSIPTxt, sReserved1, sReserved2, sReserved3);
            mainForm.On_RecvOfferedEx(ch, sCaller, sCallee, sDestAddr, sViaAddr, sFromIP, nFromPort, sOrgSIPTxt, sReserved1, sReserved2, sReserved3);
        }

        /*
        public override void On_RecvOffered(int ch, string sCaller, string sCallee, string sDestAddr, string sViaAddr, string sFromIP, ushort nFromPort)
        {
            base.On_RecvOffered(ch, sCaller, sCallee, sDestAddr, sViaAddr, sFromIP, nFromPort);
            mainForm.On_RecvOffered(ch, sCaller, sCallee, sDestAddr, sViaAddr, sFromIP, nFromPort);
        }*/

        public override void On_RecvDialing(int ch, string sCaller, string sCallee)
        {
            base.On_RecvDialing(ch, sCaller, sCallee);
            mainForm.On_RecvDialing(ch, sCaller, sCallee);
        }

        public override void On_RecvRinging(int ch)
        {
            base.On_RecvRinging(ch);
            mainForm.On_RecvRinging(ch);
        }

        public override void On_RecvIdle(int ch, int code, string desc)
        {
            base.On_RecvIdle(ch, code, desc);
            mainForm.On_RecvIdle(ch, code, desc);
        }

        public override void On_RecvRegStatus(int user_id, int status, int regtime)
        {
            base.On_RecvRegStatus(user_id, status, regtime);
            mainForm.On_RecvRegStatus(user_id, status, regtime);
        }

        public override void On_RecvHolding(int ch, int hold_on)
        {
            base.On_RecvHolding(ch, hold_on);
            mainForm.On_RecvHolding(ch, hold_on);
        }

        /*
        public override void On_RTPRawPacket(int ch, int dir, IntPtr rawData, int dataLen, string senderAddr, ushort senderPort, uint tick)
        {
            base.On_RTPRawPacket(ch, dir, rawData, dataLen, senderAddr, senderPort, tick);
            
        }*/
    }
}
