// CppSampleDlg.h : header file
//

#pragma once
#include "afxwin.h"

#define			MAX_CHAN_NUM						4

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

	bool Capturing;

	//FILE* fpAudio[MAX_CHAN_NUM][2];

	void LogStatus(int ch, const char* strLog);
	void OnCallOffered(long ChanIndex, LPCTSTR CallerIP, LPCTSTR CallerID, LPCTSTR CalleeIP, LPCTSTR CalleeID, time_t CallTime, LPCTSTR UniqueID, LPCTSTR AudioFile);
	void OnCallEnd(long ChanIndex, LPCTSTR CallerIP, LPCTSTR CallerID, LPCTSTR CalleeIP, LPCTSTR CalleeID, time_t InitTime, time_t ConnectTime, time_t EndTime, LPCTSTR UniqueID, LPCTSTR AudioFile, long AudioFileNum, long Reason, int CallDir, const char* sDTMF, int Codec);
	void OnCallConnected(long ChanIndex, LPCTSTR CallerIP, LPCTSTR CallerID, LPCTSTR CalleeIP, LPCTSTR CalleeID, time_t InitTime, time_t ConnectTime, LPCTSTR UniqueID, LPCTSTR AudioFile);
	void OnCallAudioStream(long ChanIndex, LPCTSTR UniqueID, long Direction, unsigned char* Buff, long BuffSize);

// Dialog Data
	enum { IDD = IDD_CPPSAMPLE_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	CComboBox m_cbNIC;
	CButton m_btnStart;
	CButton m_btnStop;
	afx_msg void OnBnClickedButton1();
	afx_msg void OnBnClickedButton2();
	CButton m_btnEnableAudioStream;
	CEdit m_Chan1Status;
	CEdit m_Chan2Status;
	CEdit m_Chan3Status;
	CEdit m_Chan4Status;
	afx_msg void OnDestroy();
};
