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

namespace DTMFTest
{
    public class MyGTAPIEnv : GTAPIASM.GTAPIEnv
    {
        public Form1 mainForm;

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

            mainForm.On_RecvConnected(ch);
        }

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

            mainForm.On_RecvIdle(ch);
        }

        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_RecvRinging(int ch)
        {
            base.On_RecvRinging(ch);

            mainForm.On_RecvRinging(ch);
        }

        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_Timer(int ch)
        {
            base.On_Timer(ch);

            mainForm.On_Timer(ch);

        }

        public override void On_RecvDTMFKeyDown(int ch, byte keyValue, uint ticks)
        {
            base.On_RecvDTMFKeyDown(ch, keyValue, ticks);

            mainForm.On_RecvDTMFKeyDown(ch, keyValue, ticks);
        }
    }
}
