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

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

        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_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, code, desc);
        }

        public override void On_DetectHumanVoiceDone(int ch, int result)
        {
            base.On_DetectHumanVoiceDone(ch, result);
            mainForm.On_DetectHumanVoiceDone(ch, result);
        }

        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_VoiceActivityDetected(int ch, int voice_dir, int voice_on, int level, uint reserved)
        {
            base.On_VoiceActivityDetected(ch, voice_dir, voice_on, level, reserved);

            mainForm.On_VoiceActivityDetected(ch, voice_dir, voice_on, level, reserved);
        }

        public override void On_RecvToneDetected(int ch, int freq)
        {
            base.On_RecvToneDetected(ch, freq);

            mainForm.On_RecvToneDetected(ch, freq);
        }

    }
}
