// GTF2TestDlg.h : header file
//

#if !defined(AFX_GTF2TESTDLG_H__3F523DDA_D5DF_4BB1_B2FA_13AB5E65876E__INCLUDED_)
#define AFX_GTF2TESTDLG_H__3F523DDA_D5DF_4BB1_B2FA_13AB5E65876E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CGTF2TestDlg dialog


#define WM_USER        								0x0400
#define WM_SDKAPP_BASE 								(WM_USER+0x0F00)
#define WM_SDKAPP_OFFERED 							WM_SDKAPP_BASE+1
#define WM_SDKAPP_DIALING 							WM_SDKAPP_BASE+2
#define WM_SDKAPP_RINGING 							WM_SDKAPP_BASE+3
#define WM_SDKAPP_CONNECTED							WM_SDKAPP_BASE+4
#define WM_SDKAPP_IDLE								WM_SDKAPP_BASE+5
#define WM_SDKAPP_REGSTATUS							WM_SDKAPP_BASE+6


struct sdkapp_msg
{
	int eventID;
	int chanID;
	CString args[20];
};


class CGTF2TestDlg : public CDialog
{
// Construction
public:
	CGTF2TestDlg(CWnd* pParent = NULL);	// standard constructor

	void On_RecvConnected(int ch);
	void On_RecvOffered(int ch, const char* sCaller, const char* sCallee, const char* sDestAddr, \
			const char* sViaAddr, const char* sFromIP, unsigned short nFromPort);
	void On_RecvDialing(int ch, const char* sCaller, const char* sCallee);
	void On_RecvIdle(int ch, int code, const char* desc);
	void On_RecvRinging(int ch);
	void On_RecvRegStatus(int user_id, int status, int regtime);

// Dialog Data
	//{{AFX_DATA(CGTF2TestDlg)
	enum { IDD = IDD_GTF2TEST_DIALOG };
	CEdit	m_editSipAddr;
	CStatic	m_staticLog;
	CButton	m_btnHungup;
	CButton	m_btnDial;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CGTF2TestDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CGTF2TestDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnDestroy();
	afx_msg void OnButtonDial();
	afx_msg void OnButtonHungup();
	afx_msg LRESULT OnSDKAppMessage(WPARAM wParam, LPARAM lParam);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_GTF2TESTDLG_H__3F523DDA_D5DF_4BB1_B2FA_13AB5E65876E__INCLUDED_)
